[PATCH] D13606: [Introduction] Redundant load reduction with invariant intrinsics

Nick Lewycky via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 8 21:47:54 PST 2015


nlewycky added inline comments.

================
Comment at: lib/IR/Instructions.cpp:1155-1158
@@ -1152,1 +1154,6 @@
 
+void AllocaInst::checkInvariantStartInstruction(IntrinsicInst *II) {
+  assert((!II || II->getIntrinsicID() == Intrinsic::invariant_start) &&
+         "Given intrinsic instruction is not invariant_start");
+}
+
----------------
lvoufo wrote:
> lvoufo wrote:
> > Good point. Thanks!
> Actually, I'm not sure that this works. For example, take an alloca outside of a branch that contains an invariant_start...
Sorry, you're right. To check that they're the same function, it's "II->getParent()->getParent() == getParent()->getParent()".


http://reviews.llvm.org/D13606





More information about the llvm-commits mailing list