[PATCH] D13606: [Introduction] Redundant load reduction with invariant intrinsics
Alex Bradbury via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 8 22:59:28 PST 2015
asb added a subscriber: asb.
================
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");
+}
+
----------------
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
http://reviews.llvm.org/D13606
More information about the llvm-commits
mailing list