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

Larisse Voufo via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 9 03:20:23 PST 2015


lvoufo marked 3 inline comments as done.

================
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");
+}
+
----------------
asb wrote:
> nlewycky wrote:
> > 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()".
> Actually rL254975 added Instruction::getFunction
Thanks.


http://reviews.llvm.org/D13606





More information about the llvm-commits mailing list