]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tree-pass.h (pass_fixup_cfg): New pass.
authorJan Hubicka <jh@suse.cz>
Sat, 28 Mar 2009 14:48:43 +0000 (15:48 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Sat, 28 Mar 2009 14:48:43 +0000 (14:48 +0000)
* tree-pass.h (pass_fixup_cfg): New pass.
* ipa-inline.c (inline_transform): Set
always_inline_functions_inlined/after_inlining.
* tree-optimize.c (execute_fixup_cfg): Do not set them here.
(pass_fixup_cfg): New pass.
* passes.c (init_optimization_passes): Add fixup_cfg.

From-SVN: r145191

gcc/ChangeLog
gcc/ipa-inline.c
gcc/passes.c
gcc/tree-optimize.c
gcc/tree-pass.h

index 7e842a0c2630710a50a0ea4e99a7a577c7e619bc..e1fac756fedb922f44331655f456600fd33d28f5 100644 (file)
@@ -1,3 +1,12 @@
+2009-03-28  Jan Hubicka  <jh@suse.cz>
+
+       * tree-pass.h (pass_fixup_cfg): New pass.
+       * ipa-inline.c (inline_transform): Set
+       always_inline_functions_inlined/after_inlining.
+       * tree-optimize.c (execute_fixup_cfg): Do not set them here.
+       (pass_fixup_cfg): New pass.
+       * passes.c (init_optimization_passes): Add fixup_cfg.
+
 2009-03-28  Richard Guenther  <rguenther@suse.de>
 
        PR tree-optimization/38458
index 94e4576f1aea248003f789c5e56f4c27f6992240..5da4b4c700e89660b2f437a6b765f5a3778de84e 100644 (file)
@@ -1755,6 +1755,8 @@ inline_transform (struct cgraph_node *node)
       todo = optimize_inline_calls (current_function_decl);
       timevar_pop (TV_INTEGRATION);
     }
+  cfun->always_inline_functions_inlined = true;
+  cfun->after_inlining = true;
   return todo | execute_fixup_cfg ();
 }
 
index b77b518ccf8f22222734981770de3a93b7ad264f..09094cadf3829423e4a2e3c8517c03b00eae8dbd 100644 (file)
@@ -536,6 +536,7 @@ init_optimization_passes (void)
   NEXT_PASS (pass_early_local_passes);
     {
       struct opt_pass **p = &pass_early_local_passes.pass.sub;
+      NEXT_PASS (pass_fixup_cfg);
       NEXT_PASS (pass_tree_profile);
       NEXT_PASS (pass_cleanup_cfg);
       NEXT_PASS (pass_init_datastructures);
index 2640167face06836b9f7a4452e3e4f46bd1f5a0f..13a50c00c37c190eb4fa2563dce264ffb7c5c577 100644 (file)
@@ -293,9 +293,6 @@ execute_fixup_cfg (void)
   gimple_stmt_iterator gsi;
   int todo = gimple_in_ssa_p (cfun) ? TODO_verify_ssa : 0;
 
-  cfun->after_inlining = true;
-  cfun->always_inline_functions_inlined = true;
-
   if (cfun->eh)
     FOR_EACH_BB (bb)
       {
@@ -333,6 +330,25 @@ execute_fixup_cfg (void)
   return todo;
 }
 
+struct gimple_opt_pass pass_fixup_cfg =
+{
+ {
+  GIMPLE_PASS,
+  NULL,                                        /* name */
+  NULL,                                        /* gate */
+  execute_fixup_cfg,           /* execute */
+  NULL,                                        /* sub */
+  NULL,                                        /* next */
+  0,                                   /* static_pass_number */
+  0,                                   /* tv_id */
+  PROP_cfg,                            /* properties_required */
+  0,                                   /* properties_provided */
+  0,                                   /* properties_destroyed */
+  0,                                   /* todo_flags_start */
+  0                                    /* todo_flags_finish */
+ }
+};
+
 /* Do the actions required to initialize internal data structures used
    in tree-ssa optimization passes.  */
 
index db437a6253822dc9a187c4b9e436876d2c76aaaa..2f4fed815f0617cdd40cb0539c0726056fa8aa19 100644 (file)
@@ -309,6 +309,7 @@ extern struct gimple_opt_pass pass_tree_profile;
 extern struct gimple_opt_pass pass_early_tree_profile;
 extern struct gimple_opt_pass pass_cleanup_cfg;
 extern struct gimple_opt_pass pass_referenced_vars;
+extern struct gimple_opt_pass pass_fixup_cfg;
 extern struct gimple_opt_pass pass_sra;
 extern struct gimple_opt_pass pass_sra_early;
 extern struct gimple_opt_pass pass_tail_recursion;