[polly] a5b8951 - [Polly] Gist new access relations using the SCoP context.
Michael Kruse via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 23 11:04:49 PST 2021
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 97321c018a12..9d2dca4ba575 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 47f449564508..abfe41b55b3d 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 7df590875014..494743b530a3 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 2581be6f96ee..2d07f0ccead7 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 6df11e71d278..bcc26f0c7b83 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 e16488a1bcf1..27ed2549e6b9 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: }
More information about the llvm-commits
mailing list