aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-threadupdate.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2012-04-03 11:38:04 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2012-04-03 11:38:04 +0000
commit07b1bf209c2fa991491ea9317d8afe225dd44f97 (patch)
tree89c43a99b22d5e7d34c2934ec55d1719cf2bab3a /gcc/tree-ssa-threadupdate.c
parent90b2952fa43b86c74d7ad99893f757abf30788f5 (diff)
downloadgcc-07b1bf209c2fa991491ea9317d8afe225dd44f97.zip
gcc-07b1bf209c2fa991491ea9317d8afe225dd44f97.tar.gz
gcc-07b1bf209c2fa991491ea9317d8afe225dd44f97.tar.bz2
re PR bootstrap/52808 (LTO bootstrap failed with bootstrap-profiled)
2012-04-03 Richard Guenther <rguenther@suse.de> PR tree-optimization/52808 * tracer.c (tail_duplicate): Return whether we have duplicated any block. (tracer): If we have duplicated any block, cleanup the CFG. * cfghooks.c (duplicate_block): If we duplicated a loop header but not its loop, destroy the loop because it now has multiple entries. * tree-ssa-threadupdate.c (thread_through_loop_header): Tell the cfg manipulation routines we are not creating a multiple entry loop. * gcc.dg/pr52808.c: New testcase. From-SVN: r186104
Diffstat (limited to 'gcc/tree-ssa-threadupdate.c')
-rw-r--r--gcc/tree-ssa-threadupdate.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/tree-ssa-threadupdate.c b/gcc/tree-ssa-threadupdate.c
index 000bd3f..687eee0 100644
--- a/gcc/tree-ssa-threadupdate.c
+++ b/gcc/tree-ssa-threadupdate.c
@@ -1004,8 +1004,12 @@ thread_through_loop_header (struct loop *loop, bool may_peel_loop_headers)
basic_block *bblocks;
unsigned nblocks, i;
- /* First handle the case latch edge is redirected. */
+ /* First handle the case latch edge is redirected. We are copying
+ the loop header but not creating a multiple entry loop. Make the
+ cfg manipulation code aware of that fact. */
+ set_loop_copy (loop, loop);
loop->latch = thread_single_edge (latch);
+ set_loop_copy (loop, NULL);
gcc_assert (single_succ (loop->latch) == tgt_bb);
loop->header = tgt_bb;