aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-cfgcleanup.c
diff options
context:
space:
mode:
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 ();