aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2014-02-06 09:41:44 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2014-02-06 09:41:44 +0000
commitd50f7b84e39784a14e96d095964d71fbdf53f5e9 (patch)
tree3575337a719184192100d5befc13113f7a548d4d /gcc
parent179d29415e365b1473165627efa12607f7ca5975 (diff)
downloadgcc-d50f7b84e39784a14e96d095964d71fbdf53f5e9.zip
gcc-d50f7b84e39784a14e96d095964d71fbdf53f5e9.tar.gz
gcc-d50f7b84e39784a14e96d095964d71fbdf53f5e9.tar.bz2
tree-cfg.c (gimple_duplicate_sese_region): Fix ordering of set_loop_copy and initialize_original_copy_tables.
2014-02-06 Richard Biener <rguenther@suse.de> * tree-cfg.c (gimple_duplicate_sese_region): Fix ordering of set_loop_copy and initialize_original_copy_tables. From-SVN: r207532
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/tree-cfg.c12
2 files changed, 12 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8181db7..b514a28 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2014-02-06 Richard Biener <rguenther@suse.de>
+
+ * tree-cfg.c (gimple_duplicate_sese_region): Fix ordering of
+ set_loop_copy and initialize_original_copy_tables.
+
2014-02-06 Alex Velenko <Alex.Velenko@arm.com>
* config/aarch64/aarch64-simd.md
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index dfc9b7b..3f17e14 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -5879,14 +5879,11 @@ gimple_duplicate_sese_region (edge entry, edge exit,
return false;
}
- set_loop_copy (loop, loop);
-
/* In case the function is used for loop header copying (which is the primary
use), ensure that EXIT and its copy will be new latch and entry edges. */
if (loop->header == entry->dest)
{
copying_header = true;
- set_loop_copy (loop, loop_outer (loop));
if (!dominated_by_p (CDI_DOMINATORS, loop->latch, exit->src))
return false;
@@ -5897,14 +5894,19 @@ gimple_duplicate_sese_region (edge entry, edge exit,
return false;
}
+ initialize_original_copy_tables ();
+
+ if (copying_header)
+ set_loop_copy (loop, loop_outer (loop));
+ else
+ set_loop_copy (loop, loop);
+
if (!region_copy)
{
region_copy = XNEWVEC (basic_block, n_region);
free_region_copy = true;
}
- initialize_original_copy_tables ();
-
/* Record blocks outside the region that are dominated by something
inside. */
if (update_dominance)