mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-26 07:34:06 +00:00
preserve the tail marker
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21734 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cfae2e80c8
commit
1430ef134d
@ -523,6 +523,8 @@ Value *llvm::ConvertExpressionToType(Value *V, const Type *Ty,
|
||||
Res = new CallInst(Constant::getNullValue(NewPTy),
|
||||
std::vector<Value*>(I->op_begin()+1, I->op_end()),
|
||||
Name);
|
||||
if (cast<CallInst>(I)->isTailCall())
|
||||
cast<CallInst>(Res)->setTailCall();
|
||||
VMC.ExprMap[I] = Res;
|
||||
Res->setOperand(0, ConvertExpressionToType(I->getOperand(0),NewPTy,VMC,TD));
|
||||
break;
|
||||
|
@ -443,6 +443,8 @@ Function *ArgPromotion::DoPromotion(Function *F,
|
||||
Args, "", Call);
|
||||
} else {
|
||||
New = new CallInst(NF, Args, "", Call);
|
||||
if (cast<CallInst>(Call)->isTailCall())
|
||||
cast<CallInst>(New)->setTailCall();
|
||||
}
|
||||
Args.clear();
|
||||
|
||||
|
@ -430,6 +430,8 @@ void DAE::RemoveDeadArgumentsFromFunction(Function *F) {
|
||||
Args, "", Call);
|
||||
} else {
|
||||
New = new CallInst(NF, Args, "", Call);
|
||||
if (cast<CallInst>(Call)->isTailCall())
|
||||
cast<CallInst>(New)->setTailCall();
|
||||
}
|
||||
Args.clear();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user