diff options
Diffstat (limited to 'gcc/passes.c')
-rw-r--r-- | gcc/passes.c | 30 |
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); |