diff options
author | Richard Biener <rguenther@suse.de> | 2019-05-06 12:38:35 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2019-05-06 12:38:35 +0000 |
commit | 1d0b81c64c05f40b94bd221558d0339c732d8cc4 (patch) | |
tree | f8264b89d277701f04c4d39df3c9cfbbb60354bd /gcc/graphite-scop-detection.c | |
parent | b744fc85f549534bcbc36dedcc1659c02e16c617 (diff) | |
download | gcc-1d0b81c64c05f40b94bd221558d0339c732d8cc4.zip gcc-1d0b81c64c05f40b94bd221558d0339c732d8cc4.tar.gz gcc-1d0b81c64c05f40b94bd221558d0339c732d8cc4.tar.bz2 |
re PR tree-optimization/90328 (Wrong loop distribution with aliasing)
2019-05-06 Richard Biener <rguenther@suse.de>
PR tree-optimization/90328
* tree-data-ref.h (dr_may_alias_p): Pass in the actual loop nest.
* tree-data-ref.c (dr_may_alias_p): Check whether the clique
is valid in the loop nest before using it.
(initialize_data_dependence_relation): Adjust.
* graphite-scop-detection.c (build_alias_set): Pass the SCOP enclosing
loop as loop-nest to dr_may_alias_p.
* gcc.dg/torture/pr90328.c: New testcase.
From-SVN: r270906
Diffstat (limited to 'gcc/graphite-scop-detection.c')
-rw-r--r-- | gcc/graphite-scop-detection.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/graphite-scop-detection.c b/gcc/graphite-scop-detection.c index 45f459a..4534d43 100644 --- a/gcc/graphite-scop-detection.c +++ b/gcc/graphite-scop-detection.c @@ -1417,9 +1417,13 @@ build_alias_set (scop_p scop) int i, j; int *all_vertices; + struct loop *nest + = find_common_loop (scop->scop_info->region.entry->dest->loop_father, + scop->scop_info->region.exit->src->loop_father); + FOR_EACH_VEC_ELT (scop->drs, i, dr1) for (j = i+1; scop->drs.iterate (j, &dr2); j++) - if (dr_may_alias_p (dr1->dr, dr2->dr, true)) + if (dr_may_alias_p (dr1->dr, dr2->dr, nest)) { /* Dependences in the same alias set need to be handled by just looking at DR_ACCESS_FNs. */ |