diff options
author | Karthika Devi C <quic_kartc@quicinc.com> | 2024-02-13 03:19:32 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-12 13:49:32 -0800 |
commit | 283feb42ee509cc56fb75316b4fd86b53a714cf4 (patch) | |
tree | e1671795b3e31e3a231ef85bc4d811202790ec5a /polly/test | |
parent | fcef407aa21ad5a79d66a088e6f2a66a5745725d (diff) | |
download | llvm-283feb42ee509cc56fb75316b4fd86b53a714cf4.zip llvm-283feb42ee509cc56fb75316b4fd86b53a714cf4.tar.gz llvm-283feb42ee509cc56fb75316b4fd86b53a714cf4.tar.bz2 |
[polly] Make reduction detection checks more robust - part 2 (#80721)
Existing reduction detection algorithm does two types of memory checks
before marking a load store pair as reduction.
Second check is to verify there is no other memory access in ScopStmt
overlapping with the memory of load and store that forms the reduction.
Existing check misses cases where there could be probable overlap such
as
A[V] += A[P];
In the above case there is chance of overlap between A[V] and A[P] which
is missed.
This commit addresses this by removing the parameter from space before
checking for compatible space.
Part 1 of this patch :
[75297](https://github.com/llvm/llvm-project/pull/75297)
Diffstat (limited to 'polly/test')
3 files changed, 6 insertions, 6 deletions
diff --git a/polly/test/ScopInfo/NonAffine/non-affine-loop-condition-dependent-access_2.ll b/polly/test/ScopInfo/NonAffine/non-affine-loop-condition-dependent-access_2.ll index f2574b7..e39569ab 100644 --- a/polly/test/ScopInfo/NonAffine/non-affine-loop-condition-dependent-access_2.ll +++ b/polly/test/ScopInfo/NonAffine/non-affine-loop-condition-dependent-access_2.ll @@ -44,9 +44,9 @@ ; INNERMOST-NEXT: [p_0, p_1, p_2] -> { Stmt_bb16[i0] -> MemRef_A[p_1] }; ; INNERMOST-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 0] ; INNERMOST-NEXT: [p_0, p_1, p_2] -> { Stmt_bb16[i0] -> MemRef_A[p_2] }; -; INNERMOST-NEXT: ReadAccess := [Reduction Type: +] [Scalar: 0] +; INNERMOST-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 0] ; INNERMOST-NEXT: [p_0, p_1, p_2] -> { Stmt_bb16[i0] -> MemRef_A[p_0 + i0] }; -; INNERMOST-NEXT: MustWriteAccess := [Reduction Type: +] [Scalar: 0] +; INNERMOST-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0] ; INNERMOST-NEXT: [p_0, p_1, p_2] -> { Stmt_bb16[i0] -> MemRef_A[p_0 + i0] }; ; INNERMOST-NEXT: Stmt_bb26 ; INNERMOST-NEXT: Domain := diff --git a/polly/test/ScopInfo/NonAffine/non-affine-loop-condition-dependent-access_3.ll b/polly/test/ScopInfo/NonAffine/non-affine-loop-condition-dependent-access_3.ll index 463db23..75dd7ac 100644 --- a/polly/test/ScopInfo/NonAffine/non-affine-loop-condition-dependent-access_3.ll +++ b/polly/test/ScopInfo/NonAffine/non-affine-loop-condition-dependent-access_3.ll @@ -44,9 +44,9 @@ ; INNERMOST-NEXT: [p_0, p_1, p_2] -> { Stmt_bb16[i0] -> MemRef_A[p_1] }; ; INNERMOST-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 0] ; INNERMOST-NEXT: [p_0, p_1, p_2] -> { Stmt_bb16[i0] -> MemRef_A[p_2] }; -; INNERMOST-NEXT: ReadAccess := [Reduction Type: +] [Scalar: 0] +; INNERMOST-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 0] ; INNERMOST-NEXT: [p_0, p_1, p_2] -> { Stmt_bb16[i0] -> MemRef_A[i0] }; -; INNERMOST-NEXT: MustWriteAccess := [Reduction Type: +] [Scalar: 0] +; INNERMOST-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0] ; INNERMOST-NEXT: [p_0, p_1, p_2] -> { Stmt_bb16[i0] -> MemRef_A[i0] }; ; INNERMOST-NEXT: Stmt_bb26 ; INNERMOST-NEXT: Domain := diff --git a/polly/test/ScopInfo/int2ptr_ptr2int.ll b/polly/test/ScopInfo/int2ptr_ptr2int.ll index 2e7bfbe..9fadc5a 100644 --- a/polly/test/ScopInfo/int2ptr_ptr2int.ll +++ b/polly/test/ScopInfo/int2ptr_ptr2int.ll @@ -11,9 +11,9 @@ ; ; CHECK: ReadAccess := [Reduction Type: NONE] [Scalar: 0] ; CHECK-NEXT: [val, ptr] -> { Stmt_for_body[i0] -> MemRef_A[9 + val] }; -; CHECK-NEXT: ReadAccess := [Reduction Type: +] [Scalar: 0] +; CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 0] ; CHECK-NEXT: [val, ptr] -> { Stmt_for_body[i0] -> MemRef_A[9 + ptr] }; -; CHECK-NEXT: MustWriteAccess := [Reduction Type: +] [Scalar: 0] +; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0] ; CHECK-NEXT: [val, ptr] -> { Stmt_for_body[i0] -> MemRef_A[9 + ptr] }; ; ; IR: entry: |