diff options
author | Bin Cheng <bin.cheng@linux.alibaba.com> | 2020-05-13 11:37:47 +0800 |
---|---|---|
committer | Bin Cheng <bin.cheng@linux.alibaba.com> | 2020-05-13 11:37:47 +0800 |
commit | f6e1a4cd83190746b6544917f7526fa480ca5f18 (patch) | |
tree | f7cd60b573c8a867fbab2c5d81da5b095dce13fd /gcc/tree-loop-distribution.c | |
parent | 0fec3f62b9bfc03e5088a09036791c2ac84fe0c8 (diff) | |
download | gcc-f6e1a4cd83190746b6544917f7526fa480ca5f18.zip gcc-f6e1a4cd83190746b6544917f7526fa480ca5f18.tar.gz gcc-f6e1a4cd83190746b6544917f7526fa480ca5f18.tar.bz2 |
Add missing unit dependence vector in data dependence analysis
Current data dependence analysis misses unit distant vector if DRs in
DDR have the same invariant access functions. This adds the vector as
the constant access function case.
2020-05-13 Bin Cheng <bin.cheng@linux.alibaba.com>
PR tree-optimization/94969
gcc/
* tree-data-dependence.c (constant_access_functions): Rename to...
(invariant_access_functions): ...this. Add parameter. Check for
invariant access function, rather than constant.
(build_classic_dist_vector): Call above function.
* tree-loop-distribution.c (pg_add_dependence_edges): Add comment.
gcc/testsuite/
* gcc.dg/tree-ssa/pr94969.c: New test.
Diffstat (limited to 'gcc/tree-loop-distribution.c')
-rw-r--r-- | gcc/tree-loop-distribution.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-loop-distribution.c b/gcc/tree-loop-distribution.c index 4442321..b122c39 100644 --- a/gcc/tree-loop-distribution.c +++ b/gcc/tree-loop-distribution.c @@ -2080,7 +2080,8 @@ loop_distribution::pg_add_dependence_edges (struct graph *rdg, int dir, this_dir = -this_dir; /* Known dependences can still be unordered througout the - iteration space, see gcc.dg/tree-ssa/ldist-16.c. */ + iteration space, see gcc.dg/tree-ssa/ldist-16.c and + gcc.dg/tree-ssa/pr94969.c. */ if (DDR_NUM_DIST_VECTS (ddr) != 1) this_dir = 2; /* If the overlap is exact preserve stmt order. */ |