mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-27 14:34:58 +00:00
Add code for saving formal argument information to MipsFunctionInfo. This
information will be used by IsEligibleForTailCallOptimization to determine whether a call can be tail-call optimized. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167043 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
202d1cb8a5
commit
b33b34a7dc
@ -3021,6 +3021,8 @@ MipsTargetLowering::LowerFormalArguments(SDValue Chain,
|
|||||||
MipsCC MipsCCInfo(CallConv, isVarArg, IsO32, CCInfo);
|
MipsCC MipsCCInfo(CallConv, isVarArg, IsO32, CCInfo);
|
||||||
|
|
||||||
MipsCCInfo.analyzeFormalArguments(Ins);
|
MipsCCInfo.analyzeFormalArguments(Ins);
|
||||||
|
MipsFI->setFormalArgInfo(CCInfo.getNextStackOffset(),
|
||||||
|
MipsCCInfo.hasByValArg());
|
||||||
|
|
||||||
Function::const_arg_iterator FuncArg =
|
Function::const_arg_iterator FuncArg =
|
||||||
DAG.getMachineFunction().getFunction()->arg_begin();
|
DAG.getMachineFunction().getFunction()->arg_begin();
|
||||||
|
@ -47,6 +47,10 @@ class MipsFunctionInfo : public MachineFunctionInfo {
|
|||||||
/// VarArgsFrameIndex - FrameIndex for start of varargs area.
|
/// VarArgsFrameIndex - FrameIndex for start of varargs area.
|
||||||
int VarArgsFrameIndex;
|
int VarArgsFrameIndex;
|
||||||
|
|
||||||
|
// Formal argument information obtained during call to LowerFormalArguments.
|
||||||
|
unsigned NextStackOffset;
|
||||||
|
bool HasByvalArg;
|
||||||
|
|
||||||
bool EmitNOAT;
|
bool EmitNOAT;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -67,6 +71,13 @@ public:
|
|||||||
int getVarArgsFrameIndex() const { return VarArgsFrameIndex; }
|
int getVarArgsFrameIndex() const { return VarArgsFrameIndex; }
|
||||||
void setVarArgsFrameIndex(int Index) { VarArgsFrameIndex = Index; }
|
void setVarArgsFrameIndex(int Index) { VarArgsFrameIndex = Index; }
|
||||||
|
|
||||||
|
unsigned nextStackOffset() const { return NextStackOffset; }
|
||||||
|
bool hasByvalArg() const { return HasByvalArg; }
|
||||||
|
void setFormalArgInfo(unsigned Offset, bool HasByval) {
|
||||||
|
NextStackOffset = Offset;
|
||||||
|
HasByvalArg = HasByval;
|
||||||
|
}
|
||||||
|
|
||||||
bool getEmitNOAT() const { return EmitNOAT; }
|
bool getEmitNOAT() const { return EmitNOAT; }
|
||||||
void setEmitNOAT() { EmitNOAT = true; }
|
void setEmitNOAT() { EmitNOAT = true; }
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user