[PATCH] D5227: [Polly] Support ModRef function behaviour
Michael Kruse via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 23 08:29:18 PST 2016
Meinersbur added a subscriber: Meinersbur.
================
Comment at: lib/Analysis/ScopDetection.cpp:476
@@ +475,3 @@
+ case llvm::FMRB_UnknownModRefBehavior:
+ return false;
+ case llvm::FMRB_DoesNotAccessMemory:
----------------
The same approach as for FMRB_OnlyReadsMemory could be taken here, but with "GlobalWrites", also known as [[ https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html#Clobbers | Clobbers ]].
================
Comment at: lib/Analysis/ScopInfo.cpp:3979
@@ +3978,3 @@
+ addArrayAccess(Inst, AccType, ArgBasePtr->getValue(),
+ ArgBasePtr->getType(), false, {AF}, {}, &CI);
+ }
----------------
What happens if there are other multi-dimensional accesses to the same array exist?
================
Comment at: lib/Analysis/ScopInfo.cpp:4308
@@ +4307,3 @@
+ for (auto *GlobalRead : GlobalReads)
+ for (auto *BP : ArrayBasePointers)
+ addArrayAccess(MemAccInst(GlobalRead), MemoryAccess::READ, BP,
----------------
Can't we iterate over all ScopArrayInfo's of type MK_Array instead of introducing a new list ArrayBasePointers?
================
Comment at: test/ScopInfo/mod_ref_access_pointee_arguments.ll:7-17
@@ +6,13 @@
+;
+; CHECK: Stmt_for_body
+; CHECK: Domain :=
+; CHECK: { Stmt_for_body[i0] : 0 <= i0 <= 1023 };
+; CHECK: Schedule :=
+; CHECK: { Stmt_for_body[i0] -> [i0] };
+; CHECK: MayWriteAccess := [Reduction Type: NONE]
+; CHECK: { Stmt_for_body[i0] -> MemRef_A[o0] };
+; CHECK: ReadAccess := [Reduction Type: NONE]
+; CHECK: { Stmt_for_body[i0] -> MemRef_B[i0] };
+; CHECK: MustWriteAccess := [Reduction Type: NONE]
+; CHECK: { Stmt_for_body[i0] -> MemRef_A[i0] };
+;
----------------
I think we want to go to the CHECK-NEXT style.
http://reviews.llvm.org/D5227
More information about the llvm-commits
mailing list