This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[trunk] PATCH to remove last pass that has to be completely rescanned.


This patch was approved a couple of months ago but could not be
installed before the last of the sharing issues was cleared up by
Honza.  That patch went in yesterday.

I retested this last night on x86-64, ppc-32 and ia-64 and it
bootstrapped and regression tested with no errors. 

Committed as revision 128129.

Kenny

2007-09-05  Kenneth Zadeck <zadeck@naturalbridge.com>

    * regrename.c (rerename_optimize):  Use deferred rescanning and
    insert explicit calls to rescan insns when changed.
   
Index: regrename.c
===================================================================
--- regrename.c	(revision 128103)
+++ regrename.c	(working copy)
@@ -184,8 +184,8 @@ regrename_optimize (void)
   df_set_flags (DF_LR_RUN_DCE);
   df_note_add_problem ();
   df_analyze ();
-  df_set_flags (DF_NO_INSN_RESCAN);
-  
+  df_set_flags (DF_DEFER_INSN_RESCAN);
+
   memset (tick, 0, sizeof tick);
 
   gcc_obstack_init (&rename_obstack);
@@ -345,8 +345,6 @@ regrename_optimize (void)
     }
 
   obstack_free (&rename_obstack, NULL);
-  df_clear_flags (DF_NO_INSN_RESCAN);
-  df_insn_rescan_all ();
 
   if (dump_file)
     fputc ('\n', dump_file);
@@ -364,6 +362,7 @@ do_replace (struct du_chain *chain, int 
       if (regno >= FIRST_PSEUDO_REGISTER)
 	ORIGINAL_REGNO (*chain->loc) = regno;
       REG_ATTRS (*chain->loc) = attr;
+      df_insn_rescan (chain->insn);
       chain = chain->next_use;
     }
 }
@@ -815,9 +814,11 @@ build_def_use (basic_block bb)
 		    OP_IN, 0);
 
 	  for (i = 0; i < recog_data.n_dups; i++)
-	    *recog_data.dup_loc[i] = old_dups[i];
+	    *recog_data.dup_loc[i] = copy_rtx (old_dups[i]);
 	  for (i = 0; i < n_ops; i++)
 	    *recog_data.operand_loc[i] = old_operands[i];
+	  if (recog_data.n_dups)
+	    df_insn_rescan (insn);
 
 	  /* Step 2B: Can't rename function call argument registers.  */
 	  if (CALL_P (insn) && CALL_INSN_FUNCTION_USAGE (insn))

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]