[IR] Add Instruction::isLifetimeStartOrEnd, NFC
Instruction::isLifetimeStartOrEnd() checks whether an Instruction is an llvm.lifetime.start or an llvm.lifetime.end intrinsic. This was suggested as a cleanup in D55967. Differential Revision: https://reviews.llvm.org/D56019 llvm-svn: 349964
This commit is contained in:
@@ -332,8 +332,7 @@ bool CodeExtractor::isLegalToShrinkwrapLifetimeMarkers(
|
||||
default: {
|
||||
IntrinsicInst *IntrInst = dyn_cast<IntrinsicInst>(&II);
|
||||
if (IntrInst) {
|
||||
if (IntrInst->getIntrinsicID() == Intrinsic::lifetime_start ||
|
||||
IntrInst->getIntrinsicID() == Intrinsic::lifetime_end)
|
||||
if (IntrInst->isLifetimeStartOrEnd())
|
||||
break;
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user