mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-29 10:25:12 +00:00
Eliminate target hook IsEligibleForTailCallOptimization.
Target independent isel should always pass along the "tail call" property. Change target hook LowerCall's parameter "isTailCall" into a refernce. If the target decides it's impossible to honor the tail call request, it should set isTailCall to false to make target independent isel happy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94626 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -4651,9 +4651,6 @@ SelectionDAGBuilder::visitIntrinsicCall(CallInst &I, unsigned Intrinsic) {
|
||||
/// between it and the return.
|
||||
///
|
||||
/// This function only tests target-independent requirements.
|
||||
/// For target-dependent requirements, a target should override
|
||||
/// TargetLowering::IsEligibleForTailCallOptimization.
|
||||
///
|
||||
static bool
|
||||
isInTailCallPosition(const Instruction *I, Attributes CalleeRetAttr,
|
||||
const TargetLowering &TLI) {
|
||||
@@ -6204,12 +6201,6 @@ TargetLowering::LowerCallTo(SDValue Chain, const Type *RetTy,
|
||||
}
|
||||
}
|
||||
|
||||
// Check if target-dependent constraints permit a tail call here.
|
||||
// Target-independent constraints should be checked by the caller.
|
||||
if (isTailCall &&
|
||||
!IsEligibleForTailCallOptimization(Callee, CallConv, isVarArg, Ins, DAG))
|
||||
isTailCall = false;
|
||||
|
||||
SmallVector<SDValue, 4> InVals;
|
||||
Chain = LowerCall(Chain, Callee, CallConv, isVarArg, isTailCall,
|
||||
Outs, Ins, dl, DAG, InVals);
|
||||
|
Reference in New Issue
Block a user