[llvm-commits] patch: make memdep scan memory use intrinsics

Nick Lewycky nicholas at mxc.ca
Sat Nov 28 12:22:49 PST 2009


Duncan Sands wrote:
> Hi Nick,
>
>> + case Intrinsic::lifetime_start:
>> + case Intrinsic::invariant_start:
>> + case Intrinsic::invariant_end:
>> + MemPtr = QueryInst->getOperand(1);
>> + MemSize = cast<ConstantInt>(QueryInst->getOperand(0))->getZExtValue();
>
> isn't the pointer operand 2, and the size operand 1?

Yes.

>> + break;
>> + case Intrinsic::lifetime_end:
>> + MemPtr = QueryInst->getOperand(2);
>> + MemSize = cast<ConstantInt>(QueryInst->getOperand(1))->getZExtValue();
>
> And here operands 3 and 2?

Worse! It was supposed to be Intrinsic::invariant_end here, not 
lifetime_end!

I've fixed this part and intend to commit it shortly.

Nick



More information about the llvm-commits mailing list