diff mbox

patch to fix PR63620 and PR63799

Message ID 54612F4B.1020202@redhat.com
State New
Headers show

Commit Message

Vladimir Makarov Nov. 10, 2014, 9:34 p.m. UTC
Uros reported that my latest patch to fix PR63620 does not fix actually 
the problem and H.J. reported that the patch resulted in 2 java test 
failures (PR63799).

   The following patch fixes PR63620 and PR63799.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63620
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63799

    The patch was successfully tested and bootstrapped on x86/x86-64.

Committed as rev. 217320.

2014-11-10  Vladimir Makarov  <vmakarov@redhat.com>

         PR rtl-optimization/63620
         PR rtl-optimization/63799
         * lra-lives.c (process_bb_lives): Do not delete EH_REGION, trapped
         and setting PIC pseudo insns.
         (lra_create_live_ranges): Fix the typo.
diff mbox

Patch

Index: lra-lives.c
===================================================================
--- lra-lives.c	(revision 217288)
+++ lra-lives.c	(working copy)
@@ -704,7 +704,13 @@  process_bb_lives (basic_block bb, int &c
       set = single_set (curr_insn);
 
       if (set != NULL_RTX
-	  && REG_P (SET_DEST (set)) && REGNO (SET_DEST (set)) >= FIRST_PSEUDO_REGISTER)
+	  && REG_P (SET_DEST (set)) && REGNO (SET_DEST (set)) >= FIRST_PSEUDO_REGISTER
+	  && find_reg_note (curr_insn, REG_EH_REGION, NULL_RTX) == NULL_RTX
+	  && ! may_trap_p (PATTERN (curr_insn))
+	  /* Don't do premature remove of pic offset pseudo as we
+	     can start to use it after some reload generation.  */
+	  && (pic_offset_table_rtx == NULL_RTX
+	      || pic_offset_table_rtx != SET_DEST (set)))
 	{
 	  bool dead_insn_p = true;
 
@@ -1273,7 +1279,8 @@  lra_create_live_ranges (bool all_p)
 	 df_get_postorder (DF_BACKWARD), df_get_n_blocks (DF_BACKWARD));
       if (lra_dump_file != NULL)
 	{
-	  fprintf (lra_dump_file, "Global pseudo live data have be updated:\n");
+	  fprintf (lra_dump_file,
+		   "Global pseudo live data have been updated:\n");
 	  basic_block bb;
 	  FOR_EACH_BB_FN (bb, cfun)
 	    {