aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-dom.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-ssa-dom.c')
-rw-r--r--gcc/tree-ssa-dom.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c
index 6d99e54..1b78b6d5 100644
--- a/gcc/tree-ssa-dom.c
+++ b/gcc/tree-ssa-dom.c
@@ -479,7 +479,11 @@ tree_ssa_dominator_optimize (void)
if (cfg_altered)
free_dominance_info (CDI_DOMINATORS);
- cfg_altered = cleanup_tree_cfg ();
+ /* Only iterate if we threaded jumps AND the CFG cleanup did
+ something interesting. Other cases generate far fewer
+ optimization opportunities and thus are not worth another
+ full DOM iteration. */
+ cfg_altered &= cleanup_tree_cfg ();
if (rediscover_loops_after_threading)
{