aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-cfgcleanup.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2017-10-10 13:26:15 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2017-10-10 13:26:15 +0000
commitfb1fe1f3cc3a65f3734c29b4a2280f93b76eb7cc (patch)
treec387c0bcdedbd737377a25613d0f4a667268c75f /gcc/tree-cfgcleanup.c
parent0c6ddd1ddeccd6982ddedd3a05ea4db4769b18d5 (diff)
downloadgcc-fb1fe1f3cc3a65f3734c29b4a2280f93b76eb7cc.zip
gcc-fb1fe1f3cc3a65f3734c29b4a2280f93b76eb7cc.tar.gz
gcc-fb1fe1f3cc3a65f3734c29b4a2280f93b76eb7cc.tar.bz2
tree-cfgcleanup.c (cleanup_tree_cfg_noloop): Avoid compacting blocks if SCEV is active.
2017-10-10 Richard Biener <rguenther@suse.de> * tree-cfgcleanup.c (cleanup_tree_cfg_noloop): Avoid compacting blocks if SCEV is active. * tree-scalar-evolution.c (analyze_scalar_evolution_1): Remove dead code. (analyze_scalar_evolution): Handle cached evolutions the obvious way. (scev_initialize): Assert we are not yet initialized. From-SVN: r253585
Diffstat (limited to 'gcc/tree-cfgcleanup.c')
-rw-r--r--gcc/tree-cfgcleanup.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/tree-cfgcleanup.c b/gcc/tree-cfgcleanup.c
index a7053d7..1a71c93 100644
--- a/gcc/tree-cfgcleanup.c
+++ b/gcc/tree-cfgcleanup.c
@@ -892,7 +892,11 @@ cleanup_tree_cfg_noloop (void)
changed |= cleanup_tree_cfg_1 ();
gcc_assert (dom_info_available_p (CDI_DOMINATORS));
- compact_blocks ();
+
+ /* Do not renumber blocks if the SCEV cache is active, it is indexed by
+ basic-block numbers. */
+ if (! scev_initialized_p ())
+ compact_blocks ();
checking_verify_flow_info ();