Commit 16eba420 by Richard Biener Committed by Richard Biener

tree-loop-distribution.c (distribute_loop): Fix issue with the cost model loop.

2016-07-05  Richard Biener  <rguenther@suse.de>

	* tree-loop-distribution.c (distribute_loop): Fix issue with
	the cost model loop.

From-SVN: r238004
parent b758f6e2
2016-07-05 Richard Biener <rguenther@suse.de>
* tree-loop-distribution.c (distribute_loop): Fix issue with
the cost model loop.
2016-07-05 Christophe Lyon <christophe.lyon@linaro.org> 2016-07-05 Christophe Lyon <christophe.lyon@linaro.org>
* config/arm/neon-testgen.ml: Delete. * config/arm/neon-testgen.ml: Delete.
......
...@@ -1504,6 +1504,7 @@ distribute_loop (struct loop *loop, vec<gimple *> stmts, ...@@ -1504,6 +1504,7 @@ distribute_loop (struct loop *loop, vec<gimple *> stmts,
memory accesses. */ memory accesses. */
for (i = 0; partitions.iterate (i, &into); ++i) for (i = 0; partitions.iterate (i, &into); ++i)
{ {
bool changed = false;
if (partition_builtin_p (into)) if (partition_builtin_p (into))
continue; continue;
for (int j = i + 1; for (int j = i + 1;
...@@ -1524,8 +1525,15 @@ distribute_loop (struct loop *loop, vec<gimple *> stmts, ...@@ -1524,8 +1525,15 @@ distribute_loop (struct loop *loop, vec<gimple *> stmts,
partitions.unordered_remove (j); partitions.unordered_remove (j);
partition_free (partition); partition_free (partition);
j--; j--;
changed = true;
} }
} }
/* If we fused 0 1 2 in step 1 to 0,2 1 as 0 and 2 have similar
accesses when 1 and 2 have similar accesses but not 0 and 1
then in the next iteration we will fail to consider merging
1 into 0,2. So try again if we did any merging into 0. */
if (changed)
i--;
} }
/* Build the partition dependency graph. */ /* Build the partition dependency graph. */
......
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