mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-23 05:29:23 +00:00
Remove TLI from isInTailCallPosition's arguments. NFC.
There is no need to pass on TLI separately to the function. As Eric pointed out the Target Machine already provides everything we need. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213108 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a27bf373d9
commit
7e752a311a
@ -87,8 +87,7 @@ ISD::CondCode getICmpCondCode(ICmpInst::Predicate Pred);
|
|||||||
/// between it and the return.
|
/// between it and the return.
|
||||||
///
|
///
|
||||||
/// This function only tests target-independent requirements.
|
/// This function only tests target-independent requirements.
|
||||||
bool isInTailCallPosition(ImmutableCallSite CS, const TargetMachine &TM,
|
bool isInTailCallPosition(ImmutableCallSite CS, const TargetMachine &TM);
|
||||||
const TargetLoweringBase &TLI);
|
|
||||||
|
|
||||||
/// Test if given that the input instruction is in the tail call position if the
|
/// Test if given that the input instruction is in the tail call position if the
|
||||||
/// return type or any attributes of the function will inhibit tail call
|
/// return type or any attributes of the function will inhibit tail call
|
||||||
|
@ -475,8 +475,7 @@ static bool nextRealType(SmallVectorImpl<CompositeType *> &SubTypes,
|
|||||||
/// between it and the return.
|
/// between it and the return.
|
||||||
///
|
///
|
||||||
/// This function only tests target-independent requirements.
|
/// This function only tests target-independent requirements.
|
||||||
bool llvm::isInTailCallPosition(ImmutableCallSite CS, const TargetMachine &TM,
|
bool llvm::isInTailCallPosition(ImmutableCallSite CS, const TargetMachine &TM) {
|
||||||
const TargetLoweringBase &TLI) {
|
|
||||||
const Instruction *I = CS.getInstruction();
|
const Instruction *I = CS.getInstruction();
|
||||||
const BasicBlock *ExitBB = I->getParent();
|
const BasicBlock *ExitBB = I->getParent();
|
||||||
const TerminatorInst *Term = ExitBB->getTerminator();
|
const TerminatorInst *Term = ExitBB->getTerminator();
|
||||||
@ -509,7 +508,8 @@ bool llvm::isInTailCallPosition(ImmutableCallSite CS, const TargetMachine &TM,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return returnTypeIsEligibleForTailCall(ExitBB->getParent(), I, Ret, TLI);
|
return returnTypeIsEligibleForTailCall(ExitBB->getParent(), I, Ret,
|
||||||
|
*TM.getTargetLowering());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool llvm::returnTypeIsEligibleForTailCall(const Function *F,
|
bool llvm::returnTypeIsEligibleForTailCall(const Function *F,
|
||||||
|
@ -1023,7 +1023,7 @@ bool FastISel::LowerCall(const CallInst *CI) {
|
|||||||
// Check if target-independent constraints permit a tail call here.
|
// Check if target-independent constraints permit a tail call here.
|
||||||
// Target-dependent constraints are checked within FastLowerCall.
|
// Target-dependent constraints are checked within FastLowerCall.
|
||||||
bool IsTailCall = CI->isTailCall();
|
bool IsTailCall = CI->isTailCall();
|
||||||
if (IsTailCall && !isInTailCallPosition(CS, TM, TLI))
|
if (IsTailCall && !isInTailCallPosition(CS, TM))
|
||||||
IsTailCall = false;
|
IsTailCall = false;
|
||||||
|
|
||||||
CallLoweringInfo CLI;
|
CallLoweringInfo CLI;
|
||||||
|
@ -5490,7 +5490,7 @@ void SelectionDAGBuilder::LowerCallTo(ImmutableCallSite CS, SDValue Callee,
|
|||||||
|
|
||||||
// Check if target-independent constraints permit a tail call here.
|
// Check if target-independent constraints permit a tail call here.
|
||||||
// Target-dependent constraints are checked within TLI->LowerCallTo.
|
// Target-dependent constraints are checked within TLI->LowerCallTo.
|
||||||
if (isTailCall && !isInTailCallPosition(CS, DAG.getTarget(), *TLI))
|
if (isTailCall && !isInTailCallPosition(CS, DAG.getTarget()))
|
||||||
isTailCall = false;
|
isTailCall = false;
|
||||||
|
|
||||||
TargetLowering::CallLoweringInfo CLI(DAG);
|
TargetLowering::CallLoweringInfo CLI(DAG);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user