mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-23 11:49:50 +00:00
[CodeGen] Remove dead call-or-prologue enum from CCState
This enum has been dead since Olivier Stannard re-implemented ARM byval handling in r202985 (2014). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293943 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
050d2a7ccb
commit
b084c50312
@ -183,11 +183,6 @@ typedef bool CCCustomFn(unsigned &ValNo, MVT &ValVT,
|
||||
MVT &LocVT, CCValAssign::LocInfo &LocInfo,
|
||||
ISD::ArgFlagsTy &ArgFlags, CCState &State);
|
||||
|
||||
/// ParmContext - This enum tracks whether calling convention lowering is in
|
||||
/// the context of prologue or call generation. Not all backends make use of
|
||||
/// this information.
|
||||
typedef enum { Unknown, Prologue, Call } ParmContext;
|
||||
|
||||
/// CCState - This class holds information needed while lowering arguments and
|
||||
/// return values. It captures which registers are already assigned and which
|
||||
/// stack slots are used. It provides accessors to allocate these values.
|
||||
@ -256,9 +251,6 @@ private:
|
||||
// during argument analysis.
|
||||
unsigned InRegsParamsProcessed;
|
||||
|
||||
protected:
|
||||
ParmContext CallOrPrologue;
|
||||
|
||||
public:
|
||||
CCState(CallingConv::ID CC, bool isVarArg, MachineFunction &MF,
|
||||
SmallVectorImpl<CCValAssign> &locs, LLVMContext &C);
|
||||
@ -510,8 +502,6 @@ public:
|
||||
InRegsParamsProcessed = 0;
|
||||
}
|
||||
|
||||
ParmContext getCallOrPrologue() const { return CallOrPrologue; }
|
||||
|
||||
// Get list of pending assignments
|
||||
SmallVectorImpl<llvm::CCValAssign> &getPendingLocs() {
|
||||
return PendingLocs;
|
||||
|
@ -30,8 +30,7 @@ using namespace llvm;
|
||||
CCState::CCState(CallingConv::ID CC, bool isVarArg, MachineFunction &mf,
|
||||
SmallVectorImpl<CCValAssign> &locs, LLVMContext &C)
|
||||
: CallingConv(CC), IsVarArg(isVarArg), MF(mf),
|
||||
TRI(*MF.getSubtarget().getRegisterInfo()), Locs(locs), Context(C),
|
||||
CallOrPrologue(Unknown) {
|
||||
TRI(*MF.getSubtarget().getRegisterInfo()), Locs(locs), Context(C) {
|
||||
// No stack is used.
|
||||
StackOffset = 0;
|
||||
MaxStackArgAlign = 1;
|
||||
|
@ -136,23 +136,6 @@ static cl::opt<unsigned> ConstpoolPromotionMaxTotal(
|
||||
cl::desc("Maximum size of ALL constants to promote into a constant pool"),
|
||||
cl::init(128));
|
||||
|
||||
namespace {
|
||||
|
||||
class ARMCCState : public CCState {
|
||||
public:
|
||||
ARMCCState(CallingConv::ID CC, bool isVarArg, MachineFunction &MF,
|
||||
SmallVectorImpl<CCValAssign> &locs, LLVMContext &C,
|
||||
ParmContext PC)
|
||||
: CCState(CC, isVarArg, MF, locs, C) {
|
||||
assert(((PC == Call) || (PC == Prologue)) &&
|
||||
"ARMCCState users must specify whether their context is call"
|
||||
"or prologue generation.");
|
||||
CallOrPrologue = PC;
|
||||
}
|
||||
};
|
||||
|
||||
} // end anonymous namespace
|
||||
|
||||
// The APCS parameter registers.
|
||||
static const MCPhysReg GPRArgRegs[] = {
|
||||
ARM::R0, ARM::R1, ARM::R2, ARM::R3
|
||||
@ -1605,8 +1588,8 @@ SDValue ARMTargetLowering::LowerCallResult(
|
||||
|
||||
// Assign locations to each value returned by this call.
|
||||
SmallVector<CCValAssign, 16> RVLocs;
|
||||
ARMCCState CCInfo(CallConv, isVarArg, DAG.getMachineFunction(), RVLocs,
|
||||
*DAG.getContext(), Call);
|
||||
CCState CCInfo(CallConv, isVarArg, DAG.getMachineFunction(), RVLocs,
|
||||
*DAG.getContext());
|
||||
CCInfo.AnalyzeCallResult(Ins, CCAssignFnForReturn(CallConv, isVarArg));
|
||||
|
||||
// Copy all of the result registers out of their specified physreg.
|
||||
@ -1766,8 +1749,8 @@ ARMTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,
|
||||
|
||||
// Analyze operands of the call, assigning locations to each operand.
|
||||
SmallVector<CCValAssign, 16> ArgLocs;
|
||||
ARMCCState CCInfo(CallConv, isVarArg, DAG.getMachineFunction(), ArgLocs,
|
||||
*DAG.getContext(), Call);
|
||||
CCState CCInfo(CallConv, isVarArg, DAG.getMachineFunction(), ArgLocs,
|
||||
*DAG.getContext());
|
||||
CCInfo.AnalyzeCallOperands(Outs, CCAssignFnForCall(CallConv, isVarArg));
|
||||
|
||||
// Get a count of how many bytes are to be pushed on the stack.
|
||||
@ -2143,10 +2126,6 @@ ARMTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,
|
||||
/// this.
|
||||
void ARMTargetLowering::HandleByVal(CCState *State, unsigned &Size,
|
||||
unsigned Align) const {
|
||||
assert((State->getCallOrPrologue() == Prologue ||
|
||||
State->getCallOrPrologue() == Call) &&
|
||||
"unhandled ParmContext");
|
||||
|
||||
// Byval (as with any stack) slots are always at least 4 byte aligned.
|
||||
Align = std::max(Align, 4U);
|
||||
|
||||
@ -2315,7 +2294,7 @@ ARMTargetLowering::IsEligibleForTailCallOptimization(SDValue Callee,
|
||||
// Check if stack adjustment is needed. For now, do not do this if any
|
||||
// argument is passed on the stack.
|
||||
SmallVector<CCValAssign, 16> ArgLocs;
|
||||
ARMCCState CCInfo(CalleeCC, isVarArg, MF, ArgLocs, C, Call);
|
||||
CCState CCInfo(CalleeCC, isVarArg, MF, ArgLocs, C);
|
||||
CCInfo.AnalyzeCallOperands(Outs, CCAssignFnForCall(CalleeCC, isVarArg));
|
||||
if (CCInfo.getNextStackOffset()) {
|
||||
// Check if the arguments are already laid out in the right way as
|
||||
@ -2417,8 +2396,8 @@ ARMTargetLowering::LowerReturn(SDValue Chain, CallingConv::ID CallConv,
|
||||
SmallVector<CCValAssign, 16> RVLocs;
|
||||
|
||||
// CCState - Info about the registers and stack slots.
|
||||
ARMCCState CCInfo(CallConv, isVarArg, DAG.getMachineFunction(), RVLocs,
|
||||
*DAG.getContext(), Call);
|
||||
CCState CCInfo(CallConv, isVarArg, DAG.getMachineFunction(), RVLocs,
|
||||
*DAG.getContext());
|
||||
|
||||
// Analyze outgoing return values.
|
||||
CCInfo.AnalyzeReturn(Outs, CCAssignFnForReturn(CallConv, isVarArg));
|
||||
@ -3514,8 +3493,8 @@ SDValue ARMTargetLowering::LowerFormalArguments(
|
||||
|
||||
// Assign locations to all of the incoming arguments.
|
||||
SmallVector<CCValAssign, 16> ArgLocs;
|
||||
ARMCCState CCInfo(CallConv, isVarArg, DAG.getMachineFunction(), ArgLocs,
|
||||
*DAG.getContext(), Prologue);
|
||||
CCState CCInfo(CallConv, isVarArg, DAG.getMachineFunction(), ArgLocs,
|
||||
*DAG.getContext());
|
||||
CCInfo.AnalyzeFormalArguments(Ins, CCAssignFnForCall(CallConv, isVarArg));
|
||||
|
||||
SmallVector<SDValue, 16> ArgValues;
|
||||
|
Loading…
Reference in New Issue
Block a user