This is the mail archive of the gcc@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]

Change in order of compilation passes


Steven, on January 5, I believe you checked in the appended patch,
with the evocative log entry ``I am a moron.''  This patch does two
things: it re-enables the loop2 optimization pass, and it moves the
jump_bypass pass from after the first loop optimization pass to after
the second loop optimization pass.

There doesn't seem to be a ChangeLog entry associated with either
change.  Also, no corresponding change was made to enum
dump_file_index or to the dump_file array.

Part of this patch reverts what appears to be an obvious mistake to
rest_of_handle_loop2(), which you checked in with this ChangeLog
entry on 2003-12-30:

	* toplev.c (rest_of_handle_branch_prob): Free the dominators.

The rest of the patch is the change to order of the jump bypass
optimization.

Did you mean to check this in?  If not, could you please correct it?
Thanks.

Ian

Index: toplev.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/toplev.c,v
retrieving revision 1.857
retrieving revision 1.858
diff -p -u -r1.857 -r1.858
--- toplev.c	1 Jan 2004 13:58:57 -0000	1.857
+++ toplev.c	5 Jan 2004 09:35:05 -0000	1.858
@@ -3015,9 +3015,8 @@ rest_of_handle_loop_optimize (tree decl,
    sooner, but we want the profile feedback to work more
    efficiently.  */
 static void
-rest_of_handle_loop2 (tree decl ATTRIBUTE_UNUSED, rtx insns ATTRIBUTE_UNUSED)
+rest_of_handle_loop2 (tree decl, rtx insns)
 {
-#if 0
   struct loops *loops;
   timevar_push (TV_LOOP);
   open_dump_file (DFI_loop2, decl);
@@ -3049,7 +3048,6 @@ rest_of_handle_loop2 (tree decl ATTRIBUT
   close_dump_file (DFI_loop2, print_rtl_with_bb, get_insns ());
   timevar_pop (TV_LOOP);
   ggc_collect ();
-#endif
 }
 
 /* This is called from finish_function (within langhooks.parse_file)
@@ -3281,9 +3279,6 @@ rest_of_compilation (tree decl)
 
       if (flag_loop_optimize)
 	rest_of_handle_loop_optimize (decl, insns);
-
-      if (flag_gcse)
-	rest_of_handle_jump_bypass (decl, insns);
     }
 
   timevar_push (TV_FLOW);
@@ -3311,11 +3306,16 @@ rest_of_compilation (tree decl)
   if (flag_tracer)
     rest_of_handle_tracer (decl, insns);
 
-  if (optimize > 0
-      && (flag_unswitch_loops
+  if (optimize > 0)
+    {
+      if (flag_unswitch_loops
 	  || flag_peel_loops
-	  || flag_unroll_loops))
-    rest_of_handle_loop2 (decl, insns);
+	  || flag_unroll_loops)
+	rest_of_handle_loop2 (decl, insns);
+
+      if (flag_gcse)
+	rest_of_handle_jump_bypass (decl, insns);
+    }
 
   if (flag_web)
     rest_of_handle_web (decl, insns);


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