mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
add a new @llvm.donothing intrinsic that, well, does nothing, and teach CodeGen to ignore calls to it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159383 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1828,9 +1828,13 @@ void SelectionDAGBuilder::visitInvoke(const InvokeInst &I) {
|
||||
MachineBasicBlock *LandingPad = FuncInfo.MBBMap[I.getSuccessor(1)];
|
||||
|
||||
const Value *Callee(I.getCalledValue());
|
||||
const Function *Fn = dyn_cast<Function>(Callee);
|
||||
if (isa<InlineAsm>(Callee))
|
||||
visitInlineAsm(&I);
|
||||
else
|
||||
else if (Fn && Fn->isIntrinsic()) {
|
||||
assert(Fn->getIntrinsicID() == Intrinsic::donothing);
|
||||
return; // ignore invokes to @llvm.donothing
|
||||
} else
|
||||
LowerCallTo(&I, getValue(Callee), false, LandingPad);
|
||||
|
||||
// If the value of the invoke is used outside of its defining block, make it
|
||||
@@ -5178,6 +5182,9 @@ SelectionDAGBuilder::visitIntrinsicCall(const CallInst &I, unsigned Intrinsic) {
|
||||
case Intrinsic::lifetime_end:
|
||||
// Discard region information.
|
||||
return 0;
|
||||
case Intrinsic::donothing:
|
||||
// ignore
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user