Commit d50f7b84 by Richard Biener Committed by Richard Biener

tree-cfg.c (gimple_duplicate_sese_region): Fix ordering of set_loop_copy and…

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
parent 179d2941
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> 2014-02-06 Alex Velenko <Alex.Velenko@arm.com>
* config/aarch64/aarch64-simd.md * config/aarch64/aarch64-simd.md
......
...@@ -5879,14 +5879,11 @@ gimple_duplicate_sese_region (edge entry, edge exit, ...@@ -5879,14 +5879,11 @@ gimple_duplicate_sese_region (edge entry, edge exit,
return false; return false;
} }
set_loop_copy (loop, loop);
/* In case the function is used for loop header copying (which is the primary /* 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. */ use), ensure that EXIT and its copy will be new latch and entry edges. */
if (loop->header == entry->dest) if (loop->header == entry->dest)
{ {
copying_header = true; copying_header = true;
set_loop_copy (loop, loop_outer (loop));
if (!dominated_by_p (CDI_DOMINATORS, loop->latch, exit->src)) if (!dominated_by_p (CDI_DOMINATORS, loop->latch, exit->src))
return false; return false;
...@@ -5897,14 +5894,19 @@ gimple_duplicate_sese_region (edge entry, edge exit, ...@@ -5897,14 +5894,19 @@ gimple_duplicate_sese_region (edge entry, edge exit,
return false; 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) if (!region_copy)
{ {
region_copy = XNEWVEC (basic_block, n_region); region_copy = XNEWVEC (basic_block, n_region);
free_region_copy = true; free_region_copy = true;
} }
initialize_original_copy_tables ();
/* Record blocks outside the region that are dominated by something /* Record blocks outside the region that are dominated by something
inside. */ inside. */
if (update_dominance) if (update_dominance)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment