[llvm-commits] [llvm] r167043 - in /llvm/trunk/lib/Target/Mips: MipsISelLowering.cpp MipsMachineFunction.h
Akira Hatanaka
ahatanaka at mips.com
Tue Oct 30 12:37:25 PDT 2012
Author: ahatanak
Date: Tue Oct 30 14:37:25 2012
New Revision: 167043
URL: http://llvm.org/viewvc/llvm-project?rev=167043&view=rev
Log:
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.
Modified:
llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp
llvm/trunk/lib/Target/Mips/MipsMachineFunction.h
Modified: llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp?rev=167043&r1=167042&r2=167043&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp Tue Oct 30 14:37:25 2012
@@ -3021,6 +3021,8 @@
MipsCC MipsCCInfo(CallConv, isVarArg, IsO32, CCInfo);
MipsCCInfo.analyzeFormalArguments(Ins);
+ MipsFI->setFormalArgInfo(CCInfo.getNextStackOffset(),
+ MipsCCInfo.hasByValArg());
Function::const_arg_iterator FuncArg =
DAG.getMachineFunction().getFunction()->arg_begin();
Modified: llvm/trunk/lib/Target/Mips/MipsMachineFunction.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsMachineFunction.h?rev=167043&r1=167042&r2=167043&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsMachineFunction.h (original)
+++ llvm/trunk/lib/Target/Mips/MipsMachineFunction.h Tue Oct 30 14:37:25 2012
@@ -47,6 +47,10 @@
/// VarArgsFrameIndex - FrameIndex for start of varargs area.
int VarArgsFrameIndex;
+ // Formal argument information obtained during call to LowerFormalArguments.
+ unsigned NextStackOffset;
+ bool HasByvalArg;
+
bool EmitNOAT;
public:
@@ -67,6 +71,13 @@
int getVarArgsFrameIndex() const { return VarArgsFrameIndex; }
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; }
void setEmitNOAT() { EmitNOAT = true; }
};
More information about the llvm-commits
mailing list