2022-05-03 Richard Biener <rguenther@suse.de>
PR middle-end/105083
* tree-scalar-evolution.cc (scev_initialize): Verify we
have appropriate loop state.
* tree-ssa-dce.cc (perform_tree_ssa_dce): Re-order SCEV and
loop init and finalization.
void
scev_initialize (void)
{
- gcc_assert (! scev_initialized_p ());
+ gcc_assert (! scev_initialized_p ()
+ && loops_state_satisfies_p (cfun, LOOPS_NORMAL));
scalar_evolution_info = hash_table<scev_info_hasher>::create_ggc (100);
bool in_loop_pipeline = scev_initialized_p ();
if (aggressive && ! in_loop_pipeline)
{
- scev_initialize ();
loop_optimizer_init (LOOPS_NORMAL
| LOOPS_HAVE_RECORDED_EXITS);
+ scev_initialize ();
}
if (aggressive)
if (aggressive && ! in_loop_pipeline)
{
- loop_optimizer_finalize ();
scev_finalize ();
+ loop_optimizer_finalize ();
}
longest_chain = 0;