aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Matz <matz@suse.de>2012-09-03 15:39:15 +0000
committerMichael Matz <matz@gcc.gnu.org>2012-09-03 15:39:15 +0000
commit197ce79334cbe9acc9bb627b134dd60c28afc3e5 (patch)
tree5c61fe37a8c4d4812ae54b068c7b7b4b57f6a9d6
parent1d85ac834e6468a8eee1edcbd383b261c043799d (diff)
downloadgcc-197ce79334cbe9acc9bb627b134dd60c28afc3e5.zip
gcc-197ce79334cbe9acc9bb627b134dd60c28afc3e5.tar.gz
gcc-197ce79334cbe9acc9bb627b134dd60c28afc3e5.tar.bz2
re PR tree-optimization/46590 (long compile time with -O2 and many loops)
PR tree-optimization/46590 * tree-cfg.c (gimple_duplicate_sese_region): Don't update SSA web here ... * tree-ssa-loop-ch.c (copy_loop_headers): ... but here. From-SVN: r190897
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/tree-cfg.c12
-rw-r--r--gcc/tree-ssa-loop-ch.c1
3 files changed, 12 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a92a5f2..fa72f0b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2012-09-03 Michael Matz <matz@suse.de>
+
+ PR tree-optimization/46590
+ * tree-cfg.c (gimple_duplicate_sese_region): Don't update
+ SSA web here ...
+ * tree-ssa-loop-ch.c (copy_loop_headers): ... but here.
+
2012-09-03 Sandra Loosemore <sandra@codesourcery.com>
* doc/invoke.texi: Fix numerous typos and punctuation/grammatical
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 247f616..9b2ae50 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -5530,9 +5530,10 @@ add_phi_args_after_copy (basic_block *region_copy, unsigned n_region,
important exit edge EXIT. By important we mean that no SSA name defined
inside region is live over the other exit edges of the region. All entry
edges to the region must go to ENTRY->dest. The edge ENTRY is redirected
- to the duplicate of the region. SSA form, dominance and loop information
- is updated. The new basic blocks are stored to REGION_COPY in the same
- order as they had in REGION, provided that REGION_COPY is not NULL.
+ to the duplicate of the region. Dominance and loop information is
+ updated, but not the SSA web. The new basic blocks are stored to
+ REGION_COPY in the same order as they had in REGION, provided that
+ REGION_COPY is not NULL.
The function returns false if it is unable to copy the region,
true otherwise. */
@@ -5593,8 +5594,6 @@ gimple_duplicate_sese_region (edge entry, edge exit,
free_region_copy = true;
}
- gcc_assert (!need_ssa_update_p (cfun));
-
/* Record blocks outside the region that are dominated by something
inside. */
doms = NULL;
@@ -5663,9 +5662,6 @@ gimple_duplicate_sese_region (edge entry, edge exit,
/* Add the other PHI node arguments. */
add_phi_args_after_copy (region_copy, n_region, NULL);
- /* Update the SSA web. */
- update_ssa (TODO_update_ssa);
-
if (free_region_copy)
free (region_copy);
diff --git a/gcc/tree-ssa-loop-ch.c b/gcc/tree-ssa-loop-ch.c
index 46097c2..c43819ab 100644
--- a/gcc/tree-ssa-loop-ch.c
+++ b/gcc/tree-ssa-loop-ch.c
@@ -241,6 +241,7 @@ copy_loop_headers (void)
split_edge (loop_latch_edge (loop));
}
+ update_ssa (TODO_update_ssa);
free (bbs);
free (copied_bbs);