]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* tree-pass.h (pass_into_cfg_layout_mode,
authorsteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 12 Mar 2007 19:38:06 +0000 (19:38 +0000)
committersteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 12 Mar 2007 19:38:06 +0000 (19:38 +0000)
pass_outof_cfg_layout_mode): Declare.
* cfglayout.c (into_cfg_layout_mode, outof_cfg_layout_mode,
pass_into_cfg_layout_mode, pass_outof_cfg_layout_mode): New.
* passes.c (pass_into_cfg_layout_mode): Schedule before jump2.
(pass_outof_cfg_layout_mode): Schedule after pass_rtl_ifcvt.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122858 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/cfglayout.c
gcc/passes.c
gcc/tree-pass.h

index 17fadea8814e4129272e5406930db6ada27e0503..a9abd65661c95b90fc179a72a16c2f21cd24262c 100644 (file)
@@ -1,3 +1,12 @@
+2007-03-12  Steven Bosscher  <steven@gcc.gnu.org>
+
+       * tree-pass.h (pass_into_cfg_layout_mode,
+       pass_outof_cfg_layout_mode): Declare.
+       * cfglayout.c (into_cfg_layout_mode, outof_cfg_layout_mode,
+       pass_into_cfg_layout_mode, pass_outof_cfg_layout_mode): New.
+       * passes.c (pass_into_cfg_layout_mode): Schedule before jump2.
+       (pass_outof_cfg_layout_mode): Schedule after pass_rtl_ifcvt.
+
 2007-03-12  Seongbae Park <seongbae.park@gmail.com>
 
        * c-decl.c (warn_variable_length_array): New function.
index bbdd7a25b414c176bb8a0afd7976b1e74f76afda..545cc5d77fcd12f238bd69be4fdaf381a230476e 100644 (file)
@@ -347,6 +347,60 @@ struct tree_opt_pass pass_insn_locators_initialize =
   0                                     /* letter */
 };
 
+static unsigned int
+into_cfg_layout_mode (void)
+{
+  cfg_layout_initialize (0);
+  return 0;
+}
+
+static unsigned int
+outof_cfg_layout_mode (void)
+{
+  basic_block bb;
+
+  FOR_EACH_BB (bb)
+    if (bb->next_bb != EXIT_BLOCK_PTR)
+      bb->aux = bb->next_bb;
+
+  cfg_layout_finalize ();
+
+  return 0;
+}
+
+struct tree_opt_pass pass_into_cfg_layout_mode =
+{
+  "into_cfglayout",                     /* name */
+  NULL,                                 /* gate */
+  into_cfg_layout_mode,                 /* execute */
+  NULL,                                 /* sub */
+  NULL,                                 /* next */
+  0,                                    /* static_pass_number */
+  0,                                    /* tv_id */
+  0,                                    /* properties_required */
+  0,                                    /* properties_provided */
+  0,                                    /* properties_destroyed */
+  0,                                    /* todo_flags_start */
+  TODO_dump_func,                       /* todo_flags_finish */
+  0                                     /* letter */
+};
+
+struct tree_opt_pass pass_outof_cfg_layout_mode =
+{
+  "outof_cfglayout",                    /* name */
+  NULL,                                 /* gate */
+  outof_cfg_layout_mode,                /* execute */
+  NULL,                                 /* sub */
+  NULL,                                 /* next */
+  0,                                    /* static_pass_number */
+  0,                                    /* tv_id */
+  0,                                    /* properties_required */
+  0,                                    /* properties_provided */
+  0,                                    /* properties_destroyed */
+  0,                                    /* todo_flags_start */
+  TODO_dump_func,                       /* todo_flags_finish */
+  0                                     /* letter */
+};
 
 /* For each lexical block, set BLOCK_NUMBER to the depth at which it is
    found in the block tree.  */
index 28bda4441e6c891f8433d8d33a57c388e807eb9a..b93cc6c262f9835036af1ca9898d3e9405adeadd 100644 (file)
@@ -658,6 +658,7 @@ init_optimization_passes (void)
       NEXT_PASS (pass_initial_value_sets);
       NEXT_PASS (pass_unshare_all_rtl);
       NEXT_PASS (pass_instantiate_virtual_regs);
+      NEXT_PASS (pass_into_cfg_layout_mode);
       NEXT_PASS (pass_jump2);
       NEXT_PASS (pass_lower_subreg);
       NEXT_PASS (pass_cse);
@@ -665,6 +666,7 @@ init_optimization_passes (void)
       NEXT_PASS (pass_gcse);
       NEXT_PASS (pass_jump_bypass);
       NEXT_PASS (pass_rtl_ifcvt);
+      NEXT_PASS (pass_outof_cfg_layout_mode);
       NEXT_PASS (pass_tracer);
       /* Perform loop optimizations.  It might be better to do them a bit
         sooner, but we want the profile feedback to work more
index 6d4f70748062ceaa16853d4bba27535dc58cac6c..ed4fb470dfe801b8b7b3c096391e69c73e51dfc8 100644 (file)
@@ -344,6 +344,9 @@ extern struct tree_opt_pass pass_profiling;
 extern struct tree_opt_pass pass_rtl_ifcvt;
 extern struct tree_opt_pass pass_tracer;
 
+extern struct tree_opt_pass pass_into_cfg_layout_mode;
+extern struct tree_opt_pass pass_outof_cfg_layout_mode;
+
 extern struct tree_opt_pass pass_loop2;
 extern struct tree_opt_pass pass_rtl_loop_init;
 extern struct tree_opt_pass pass_rtl_move_loop_invariants;