aboutsummaryrefslogtreecommitdiff
path: root/gcc/passes.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2014-04-30 08:06:49 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2014-04-30 08:06:49 +0000
commite9ff9caf265a47e747c12de69bcf5bd6db32843e (patch)
tree89764a65392e04dc94709cea493bd321464376f5 /gcc/passes.c
parentf8ed5150c3a1f821fb0cf266fc0fca76027fbef9 (diff)
downloadgcc-e9ff9caf265a47e747c12de69bcf5bd6db32843e.zip
gcc-e9ff9caf265a47e747c12de69bcf5bd6db32843e.tar.gz
gcc-e9ff9caf265a47e747c12de69bcf5bd6db32843e.tar.bz2
passes.c (execute_function_todo): Move TODO_verify_stmts and TODO_verify_ssa under the TODO_verify_il umbrella.
2014-04-30 Richard Biener <rguenther@suse.de> * passes.c (execute_function_todo): Move TODO_verify_stmts and TODO_verify_ssa under the TODO_verify_il umbrella. * tree-ssa.h (verify_ssa): Adjust prototype. * tree-ssa.c (verify_ssa): Add parameter to tell whether we should verify SSA operands. * tree-cfg.h (verify_gimple_in_cfg): Adjust prototype. * tree-cfg.c (verify_gimple_in_cfg): Add parameter to tell whether we should verify whether not throwing stmts have EH info. * graphite-scop-detection.c (create_sese_edges): Adjust. * tree-ssa-loop-manip.c (verify_loop_closed_ssa): Likewise. * tree-eh.c (lower_try_finally_switch): Do not add the default case label twice. From-SVN: r209928
Diffstat (limited to 'gcc/passes.c')
-rw-r--r--gcc/passes.c30
1 files changed, 17 insertions, 13 deletions
diff --git a/gcc/passes.c b/gcc/passes.c
index 7559a3b..dbff587 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -1716,6 +1716,7 @@ pass_manager::dump_profile_report () const
static void
execute_function_todo (function *fn, void *data)
{
+ bool from_ipa_pass = (cfun == NULL);
unsigned int flags = (size_t)data;
flags &= ~fn->last_verified;
if (!flags)
@@ -1767,26 +1768,29 @@ execute_function_todo (function *fn, void *data)
dom_state pre_verify_state = dom_info_state (fn, CDI_DOMINATORS);
dom_state pre_verify_pstate = dom_info_state (fn, CDI_POST_DOMINATORS);
- if (flags & TODO_verify_ssa)
+ if (flags & TODO_verify_il)
{
- verify_gimple_in_cfg (cfun);
- verify_ssa (true);
+ if (cfun->curr_properties & PROP_trees)
+ {
+ if (cfun->curr_properties & PROP_cfg)
+ /* IPA passes leave stmts to be fixed up, so make sure to
+ not verify stmts really throw. */
+ verify_gimple_in_cfg (cfun, !from_ipa_pass);
+ else
+ verify_gimple_in_seq (gimple_body (cfun->decl));
+ }
+ if (cfun->curr_properties & PROP_ssa)
+ /* IPA passes leave stmts to be fixed up, so make sure to
+ not verify SSA operands whose verifier will choke on that. */
+ verify_ssa (true, !from_ipa_pass);
}
- else if (flags & TODO_verify_stmts)
- verify_gimple_in_cfg (cfun);
if (flags & TODO_verify_flow)
verify_flow_info ();
if (flags & TODO_verify_il)
{
if (current_loops
&& loops_state_satisfies_p (LOOP_CLOSED_SSA))
- {
- if (!(flags & (TODO_verify_stmts|TODO_verify_ssa)))
- verify_gimple_in_cfg (cfun);
- if (!(flags & TODO_verify_ssa))
- verify_ssa (true);
- verify_loop_closed_ssa (false);
- }
+ verify_loop_closed_ssa (false);
}
if (flags & TODO_verify_rtl_sharing)
verify_rtl_sharing ();
@@ -1803,7 +1807,7 @@ execute_function_todo (function *fn, void *data)
/* For IPA passes make sure to release dominator info, it can be
computed by non-verifying TODOs. */
- if (!cfun)
+ if (from_ipa_pass)
{
free_dominance_info (fn, CDI_DOMINATORS);
free_dominance_info (fn, CDI_POST_DOMINATORS);