[PATCH] D5226: [Polly] Support memory intrinsics

Hongbin Zheng via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 16 00:51:53 PST 2016


etherzhhb added a subscriber: etherzhhb.

================
Comment at: include/polly/Support/ScopHelper.h:169
@@ -155,1 +168,3 @@
+    if (isMemIntrinsic())
+      return asMemIntrinsic();
     llvm_unreachable("Operation not supported on nullptr");
----------------
This doesn't make sense to me.

================
Comment at: lib/Analysis/ScopDetection.cpp:492
@@ +491,3 @@
+  case llvm::Intrinsic::memcpy:
+    AF = SE->getSCEVAtScope(II.getOperand(1), L);
+    BP = dyn_cast<SCEVUnknown>(SE->getPointerBase(AF));
----------------
should it be getArgOperand (which is equivalent at the moment, but safer)?

================
Comment at: lib/Analysis/ScopDetection.cpp:500
@@ +499,3 @@
+  case llvm::Intrinsic::memset:
+    AF = SE->getSCEVAtScope(II.getOperand(0), L);
+    BP = dyn_cast<SCEVUnknown>(SE->getPointerBase(AF));
----------------
How about use getRawDest or getDest (this one strip the pointer-cast)?

================
Comment at: lib/Analysis/ScopInfo.cpp:765
@@ -732,1 +764,3 @@
   if (!isAffine()) {
+    if (MemAccInst(getAccessInstruction()).isMemIntrinsic())
+      buildMemIntrinsicAccessRelation();
----------------
simply isa<MemIntrinsic>(getAccessInstruction())?

================
Comment at: lib/Analysis/ScopInfo.cpp:2576
@@ -2575,3 +2615,1 @@
       AG.push_back(PtrToAcc[PR.getValue()]);
-    assert(AG.size() > 1 &&
-           "Alias groups should contain at least two accesses");
----------------
why we relax this assertion?


http://reviews.llvm.org/D5226





More information about the llvm-commits mailing list