[PATCH] D55967: [CodeExtractor] Do not extract unsafe lifetime markers
Vedant Kumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 21 12:34:34 PST 2018
vsk added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/CodeExtractor.cpp:1199
+ if (ID != Intrinsic::lifetime_start && ID != Intrinsic::lifetime_end)
+ continue;
+ Value *Mem = II->getOperand(1)->stripInBoundsOffsets();
----------------
davidxl wrote:
> Is there a common utility function to detect lifetime marker intrinsics?
I'll rebase this on top of D56019.
================
Comment at: llvm/lib/Transforms/Utils/CodeExtractor.cpp:1200
+ continue;
+ Value *Mem = II->getOperand(1)->stripInBoundsOffsets();
+ if (SunkDefs.count(Mem) || definedInRegion(Blocks, Mem))
----------------
davidxl wrote:
> Is there a better API to access the mem operand instead of using hard coded operand number?
Unfortunately not. I'll leave a better comment to explain what is happening here.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55967/new/
https://reviews.llvm.org/D55967
More information about the llvm-commits
mailing list