Author: Michael Kruse Date: 2021-01-23T13:03:48-06:00 New Revision: a5b895110f02c69465dfa605c036abf420c5acc3
URL: https://github.com/llvm/llvm-project/commit/a5b895110f02c69465dfa605c036abf420c5acc3 DIFF: https://github.com/llvm/llvm-project/commit/a5b895110f02c69465dfa605c036abf420c5acc3.diff LOG: [Polly] Gist new access relations using the SCoP context. This simplifies the access relations. Added: Modified: polly/lib/Analysis/ScopInfo.cpp polly/test/DeLICM/reduction_looprotate_hoisted.ll polly/test/Simplify/coalesce_3partials.ll polly/test/Simplify/coalesce_disjointelements.ll polly/test/Simplify/coalesce_overlapping.ll polly/test/Simplify/coalesce_partial.ll Removed: ################################################################################ diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp index 97321c018a120..9d2dca4ba5758 100644 --- a/polly/lib/Analysis/ScopInfo.cpp +++ b/polly/lib/Analysis/ScopInfo.cpp @@ -1109,6 +1109,7 @@ void MemoryAccess::setNewAccessRelation(isl::map NewAccess) { "Access dims must match array dims"); #endif + NewAccess = NewAccess.gist_params(getStatement()->getParent()->getContext()); NewAccess = NewAccess.gist_domain(getStatement()->getDomain()); NewAccessRelation = NewAccess; } diff --git a/polly/test/DeLICM/reduction_looprotate_hoisted.ll b/polly/test/DeLICM/reduction_looprotate_hoisted.ll index 47f449564508e..abfe41b55b3d2 100644 --- a/polly/test/DeLICM/reduction_looprotate_hoisted.ll +++ b/polly/test/DeLICM/reduction_looprotate_hoisted.ll @@ -70,7 +70,7 @@ return: ; CHECK-NEXT: Stmt_reduction_preheader ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 1] ; CHECK-NEXT: [Start] -> { Stmt_reduction_preheader[i0] -> MemRef_phi__phi[] }; -; CHECK-NEXT: new: [Start] -> { Stmt_reduction_preheader[i0] -> MemRef_A[i0] : Start >= 2147483648 or Start <= 2147483646 }; +; CHECK-NEXT: new: [Start] -> { Stmt_reduction_preheader[i0] -> MemRef_A[i0] : Start <= 2147483646 }; ; CHECK-NEXT: Stmt_reduction_for ; CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 1] ; CHECK-NEXT: [Start] -> { Stmt_reduction_for[i0, i1] -> MemRef_phi__phi[] }; diff --git a/polly/test/Simplify/coalesce_3partials.ll b/polly/test/Simplify/coalesce_3partials.ll index 7df5908750141..494743b530a38 100644 --- a/polly/test/Simplify/coalesce_3partials.ll +++ b/polly/test/Simplify/coalesce_3partials.ll @@ -44,5 +44,5 @@ return: ; CHECK-NEXT: Stmt_body ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0] ; CHECK-NEXT: [n] -> { Stmt_body[i0] -> MemRef_A[0] }; -; CHECK-NEXT: new: [n] -> { Stmt_body[i0] -> MemRef_A[0] : n <= 2147483647 }; +; CHECK-NEXT: new: [n] -> { Stmt_body[i0] -> MemRef_A[0] }; ; CHECK-NEXT: } diff --git a/polly/test/Simplify/coalesce_disjointelements.ll b/polly/test/Simplify/coalesce_disjointelements.ll index 2581be6f96eed..2d07f0ccead73 100644 --- a/polly/test/Simplify/coalesce_disjointelements.ll +++ b/polly/test/Simplify/coalesce_disjointelements.ll @@ -49,8 +49,8 @@ return: ; CHECK-NEXT: Stmt_body ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0] ; CHECK-NEXT: [n] -> { Stmt_body[i0] -> MemRef_A[0] }; -; CHECK-NEXT: new: [n] -> { Stmt_body[i0] -> MemRef_A[0] : n <= 2147483647 }; +; CHECK-NEXT: new: [n] -> { Stmt_body[i0] -> MemRef_A[0] }; ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0] ; CHECK-NEXT: [n] -> { Stmt_body[i0] -> MemRef_A[1] }; -; CHECK-NEXT: new: [n] -> { Stmt_body[i0] -> MemRef_A[1] : n <= 2147483647 }; +; CHECK-NEXT: new: [n] -> { Stmt_body[i0] -> MemRef_A[1] }; ; CHECK-NEXT: } diff --git a/polly/test/Simplify/coalesce_overlapping.ll b/polly/test/Simplify/coalesce_overlapping.ll index 6df11e71d2789..bcc26f0c7b836 100644 --- a/polly/test/Simplify/coalesce_overlapping.ll +++ b/polly/test/Simplify/coalesce_overlapping.ll @@ -42,5 +42,5 @@ return: ; CHECK-NEXT: Stmt_body ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0] ; CHECK-NEXT: [n] -> { Stmt_body[i0] -> MemRef_A[0] }; -; CHECK-NEXT: new: [n] -> { Stmt_body[i0] -> MemRef_A[0] : n <= 2147483647 }; +; CHECK-NEXT: new: [n] -> { Stmt_body[i0] -> MemRef_A[0] }; ; CHECK-NEXT: } diff --git a/polly/test/Simplify/coalesce_partial.ll b/polly/test/Simplify/coalesce_partial.ll index e16488a1bcf1d..27ed2549e6b92 100644 --- a/polly/test/Simplify/coalesce_partial.ll +++ b/polly/test/Simplify/coalesce_partial.ll @@ -42,5 +42,5 @@ return: ; CHECK-NEXT: Stmt_body ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0] ; CHECK-NEXT: [n] -> { Stmt_body[i0] -> MemRef_A[0] }; -; CHECK-NEXT: new: [n] -> { Stmt_body[i0] -> MemRef_A[0] : n <= 2147483647 }; +; CHECK-NEXT: new: [n] -> { Stmt_body[i0] -> MemRef_A[0] }; ; CHECK-NEXT: } _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits