]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tree-cfg.c (gimple_duplicate_sese_region): Fix ordering of set_loop_copy and initiali...
authorRichard Biener <rguenther@suse.de>
Thu, 6 Feb 2014 09:41:44 +0000 (09:41 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 6 Feb 2014 09:41:44 +0000 (09:41 +0000)
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

gcc/ChangeLog
gcc/tree-cfg.c

index 8181db79434d553dd69b07b8c8a4659437bd6d15..b514a282485192e5c7cd2f35ba114bdcbbeb234f 100644 (file)
@@ -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
index dfc9b7b4cef14add84b2c8570ff9c57eee3cb8a2..3f17e1424f7b653a615ff47994d2e6137e98960d 100644 (file)
@@ -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)