[llvm-commits] patch: make the inliner emit lifetime markers
Chris Lattner
clattner at apple.com
Sat May 21 11:02:32 PDT 2011
On May 18, 2011, at 5:03 PM, Nick Lewycky wrote:
> Hi, I'm starting to get serious about lifetime markers.
>
> The attached patch teaches the inliner to emit lifetime.start and lifetime.end markers for the alloca's that it hoists to the beginning of the function. Please review, or propose some testing that you'd like to see done on this patch!
The algorithm looks right to me. Please make a couple of changes:
1. Please use IRBuilder. It would make sense to add a "getIntrinsic(Intrinsic::lifetime_start);" method to IRBuilder.
2. instead of "x != Type::getInt8PtrTy(Context)". IRBuilder shoudl handle this check for you.
3. Minor thing:
+ Value *Args[2];
+ Args[0] = MinusOne;
+ Args[1] = AI;
Can be:
+ Value *Args[2] = { MinusOne, AI };
It would be good to synch up with Owen on this, I think he's working on similar things.
-Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110521/083ec1f6/attachment.html>
More information about the llvm-commits
mailing list