diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-07-24 08:37:43 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-07-24 08:37:43 +0000 |
commit | ed74aa4415517f167aefeda7baadce6d572f713a (patch) | |
tree | 1a4b1ee8eb1c68d15f5bb386c2d00ad7f53cf040 /gcc/tree-loop-distribution.c | |
parent | 885d1f6b555ff06a45ecbfd027d523949d926f77 (diff) | |
download | gcc-ed74aa4415517f167aefeda7baadce6d572f713a.tar.gz |
2012-07-24 Richard Guenther <rguenther@suse.de>
PR tree-optimization/53616
* tree-loop-distribution.c (ldist_gen): Do not change
partition ordering when merging partitions.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189802 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-loop-distribution.c')
-rw-r--r-- | gcc/tree-loop-distribution.c | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/gcc/tree-loop-distribution.c b/gcc/tree-loop-distribution.c index 58ed12b1e69..18df9fbd249 100644 --- a/gcc/tree-loop-distribution.c +++ b/gcc/tree-loop-distribution.c @@ -1289,16 +1289,25 @@ ldist_gen (struct loop *loop, struct graph *rdg, nbp = 0; goto ldist_done; } - for (i = 0; VEC_iterate (partition_t, partitions, i, into); ++i) - if (!partition_builtin_p (into)) - break; - for (++i; VEC_iterate (partition_t, partitions, i, partition); ++i) - if (!partition_builtin_p (partition)) - { - bitmap_ior_into (into->stmts, partition->stmts); - VEC_ordered_remove (partition_t, partitions, i); - i--; - } + /* Only fuse adjacent non-builtin partitions, see PR53616. + ??? Use dependence information to improve partition ordering. */ + i = 0; + do + { + for (; VEC_iterate (partition_t, partitions, i, into); ++i) + if (!partition_builtin_p (into)) + break; + for (++i; VEC_iterate (partition_t, partitions, i, partition); ++i) + if (!partition_builtin_p (partition)) + { + bitmap_ior_into (into->stmts, partition->stmts); + VEC_ordered_remove (partition_t, partitions, i); + i--; + } + else + break; + } + while ((unsigned) i < VEC_length (partition_t, partitions)); } else { |