From: Richard Biener Date: Thu, 11 May 2017 07:26:32 +0000 (+0000) Subject: passes.c (execute_function_todo): Verify loops if they are said to be up-to-date. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=687aed9cc8c53b7833df9c62912292c17fdbc97f;p=gcc.git passes.c (execute_function_todo): Verify loops if they are said to be up-to-date. 2017-05-11 Richard Biener * passes.c (execute_function_todo): Verify loops if they are said to be up-to-date. * cfgexpand.c (pass_expand::execute): Discard loops for -dx. * trans-mem.c (pass_tm_edges::execute): Mark loops for fixup. From-SVN: r247879 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4ee565be7b4..5c3f57940fb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2017-05-11 Richard Biener + + * passes.c (execute_function_todo): Verify loops if they are + said to be up-to-date. + * cfgexpand.c (pass_expand::execute): Discard loops for -dx. + * trans-mem.c (pass_tm_edges::execute): Mark loops for fixup. + 2017-05-10 John David Anglin PR target/80090 diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index 66af69973c6..e38c8e4ac49 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -6542,6 +6542,14 @@ pass_expand::execute (function *fun) set_block_levels (DECL_INITIAL (fun->decl), 0); default_rtl_profile (); + /* For -dx discard loops now, otherwise IL verify in clean_state will + ICE. */ + if (rtl_dump_and_exit) + { + cfun->curr_properties &= ~PROP_loops; + loop_optimizer_finalize (); + } + timevar_pop (TV_POST_EXPAND); return 0; diff --git a/gcc/passes.c b/gcc/passes.c index 185c3cd3175..911495ed865 100644 --- a/gcc/passes.c +++ b/gcc/passes.c @@ -1979,8 +1979,12 @@ execute_function_todo (function *fn, void *data) && !from_ipa_pass) verify_flow_info (); if (current_loops - && loops_state_satisfies_p (LOOP_CLOSED_SSA)) - verify_loop_closed_ssa (false); + && ! loops_state_satisfies_p (LOOPS_NEED_FIXUP)) + { + verify_loop_structure (); + if (loops_state_satisfies_p (LOOP_CLOSED_SSA)) + verify_loop_closed_ssa (false); + } if (cfun->curr_properties & PROP_rtl) verify_rtl_sharing (); } diff --git a/gcc/trans-mem.c b/gcc/trans-mem.c index 4409bea94d1..b564d369dc5 100644 --- a/gcc/trans-mem.c +++ b/gcc/trans-mem.c @@ -3369,6 +3369,8 @@ pass_tm_edges::execute (function *fun) must be rebuilt completely. Otherwise we'll crash trying to update the SSA web in the TODO section following this pass. */ free_dominance_info (CDI_DOMINATORS); + /* We'ge also wrecked loops badly with inserting of abnormal edges. */ + loops_state_set (LOOPS_NEED_FIXUP); bitmap_obstack_release (&tm_obstack); all_tm_regions = NULL;