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]

Re: [PATCH] Do not set BB_SUPERBLOCK in loop-unroll.c:split_edge_and_insert


On 2/26/07, Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz> wrote:
> I really would not propose this unusual way forward if I would see a
> better way out...

If you need that as a prerequisite for some other patches, I guess we
might go this way temporarily;

I need this for my patches to stay in cfglayout mode between pass_rtl_eh and combine. Right now I have to go out of cfglayout mode before loop2, and back into cfglayout mode after loop2.

As you know, loop2 it self only works in cfglayout mode.

So I have this now:

Index: passes.c
===================================================================
--- passes.c    (revision 122329)
+++ passes.c    (working copy)
@@ -654,6 +654,7 @@ init_optimization_passes (void)
      NEXT_PASS (pass_jump);
      NEXT_PASS (pass_insn_locators_initialize);
      NEXT_PASS (pass_rtl_eh);
+      NEXT_PASS (pass_into_cfglayout_mode);
      NEXT_PASS (pass_initial_value_sets);
      NEXT_PASS (pass_unshare_all_rtl);
      NEXT_PASS (pass_instantiate_virtual_regs);
@@ -665,6 +666,14 @@ init_optimization_passes (void)
      NEXT_PASS (pass_jump_bypass);
      NEXT_PASS (pass_rtl_ifcvt);
      NEXT_PASS (pass_tracer);
+      /* ??? loop-unroll needs a break_superblocks, which does not work in
+        cfglayout mode.  So we need to go out of cfglayout mode, break the
+        superblocks, and go back into it.
+        For now, go out of cfglayout mode here.  In loop2_init we will go
+        back into it, then out of it in loop2_done, then again back into
+        cfglayout mode after all of loop2 is done.  Still with me?  This
+        is wasteful...  */
+      NEXT_PASS (pass_outof_cfglayout_mode);
      /* Perform loop optimizations.  It might be better to do them a bit
        sooner, but we want the profile feedback to work more
        efficiently.  */
@@ -679,10 +688,12 @@ init_optimization_passes (void)
         NEXT_PASS (pass_rtl_loop_done);
         *p = NULL;
       }
+      NEXT_PASS (pass_into_cfglayout_mode);
      NEXT_PASS (pass_web);
      NEXT_PASS (pass_cse2);
      NEXT_PASS (pass_rtl_fwprop_addr);
      NEXT_PASS (pass_life);
+      NEXT_PASS (pass_outof_cfglayout_mode);
      NEXT_PASS (pass_combine);
      NEXT_PASS (pass_if_after_combine);
      NEXT_PASS (pass_partition_blocks);

Gr.
Steven


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