diff options
author | Jan Hubicka <jh@suse.cz> | 2007-01-05 03:00:56 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2007-01-05 02:00:56 +0000 |
commit | 59e504989c82c9d9845adfb383f78510f84a4b27 (patch) | |
tree | e08cf11e85f9b9ff1e3fee2736cbce8687c1f7bd /gcc | |
parent | c79441520f2a862204dabe01e20edce3bc7b0953 (diff) | |
download | gcc-59e504989c82c9d9845adfb383f78510f84a4b27.zip gcc-59e504989c82c9d9845adfb383f78510f84a4b27.tar.gz gcc-59e504989c82c9d9845adfb383f78510f84a4b27.tar.bz2 |
tree-optimize.c (execute_fixup_cfg): Correct previously mistakely comitted older version of patch.
* tree-optimize.c (execute_fixup_cfg): Correct previously mistakely
comitted older version of patch.
(pass_fixup_cfg): Add TODOs to verify flow and statements, dump
function, celanup cfg and collect garbage.
From-SVN: r120469
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/tree-optimize.c | 25 |
2 files changed, 20 insertions, 12 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5d2cf50..fb01be3f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2007-01-04 Jan Hubicka <jh@suse.cz> + + * tree-optimize.c (execute_fixup_cfg): Correct previously mistakely + comitted older version of patch. + (pass_fixup_cfg): Add TODOs to verify flow and statements, dump + function, celanup cfg and collect garbage. + 2007-01-04 Mike Stump <mrs@apple.com> * Makefile.in (mostlyclean): Don't remove libgcc anymore. diff --git a/gcc/tree-optimize.c b/gcc/tree-optimize.c index 75df4cc..e67b0ef 100644 --- a/gcc/tree-optimize.c +++ b/gcc/tree-optimize.c @@ -297,6 +297,7 @@ execute_fixup_cfg (void) { basic_block bb; block_stmt_iterator bsi; + int todo = gimple_in_ssa_p (cfun) ? TODO_verify_ssa : 0; cfun->after_inlining = true; @@ -312,7 +313,11 @@ execute_fixup_cfg (void) if (decl && call_expr_flags (call) & (ECF_CONST | ECF_PURE) && TREE_SIDE_EFFECTS (call)) { - update_stmt (stmt); + if (gimple_in_ssa_p (cfun)) + { + todo |= TODO_update_ssa; + update_stmt (stmt); + } TREE_SIDE_EFFECTS (call) = 0; } if (decl && TREE_NOTHROW (decl)) @@ -355,8 +360,10 @@ execute_fixup_cfg (void) if (DECL_NONLOCAL (target)) { tree phi; + for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi)) { + todo |= TODO_update_ssa; gcc_assert (SSA_NAME_OCCURS_IN_ABNORMAL_PHI (PHI_RESULT (phi))); mark_sym_for_renaming @@ -368,18 +375,11 @@ execute_fixup_cfg (void) } } - if (gimple_in_ssa_p (cfun)) - { - delete_unreachable_blocks (); - update_ssa (TODO_update_ssa); - } - cleanup_tree_cfg (); - /* Dump a textual representation of the flowgraph. */ if (dump_file) dump_tree_cfg (dump_file, dump_flags); - return 0; + return todo; } struct tree_opt_pass pass_fixup_cfg = @@ -395,9 +395,10 @@ struct tree_opt_pass pass_fixup_cfg = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - 0, /* todo_flags_finish */ - 0 /* letter */ -}; + TODO_cleanup_cfg | TODO_ggc_collect + | TODO_dump_func | TODO_verify_flow + | TODO_verify_stmts,/* todo_flags_finish */ + 0 /* letter */ }; /* Do the actions required to initialize internal data structures used in tree-ssa optimization passes. */ |