diff options
| author | Akira Hatanaka <ahatanak@gmail.com> | 2011-05-26 20:30:31 +0000 |
|---|---|---|
| committer | Akira Hatanaka <ahatanak@gmail.com> | 2011-05-26 20:30:31 +0000 |
| commit | 077964a03cd82f1edec4ab6379a0c67fcea3eecd (patch) | |
| tree | 0d368f950d8f16336cc01f88f7dd8b590714827f /llvm/lib/Target | |
| parent | 61384cb8bda790cfc70f85943bb380191a0723f6 (diff) | |
| download | bcm5719-llvm-077964a03cd82f1edec4ab6379a0c67fcea3eecd.tar.gz bcm5719-llvm-077964a03cd82f1edec4ab6379a0c67fcea3eecd.zip | |
Use MachineFrameInfo::hasCalls instead of MipsFunctionInfo::hasCall to check if
a function has any function calls.
llvm-svn: 132140
Diffstat (limited to 'llvm/lib/Target')
| -rw-r--r-- | llvm/lib/Target/Mips/MipsFrameLowering.cpp | 3 | ||||
| -rw-r--r-- | llvm/lib/Target/Mips/MipsISelLowering.cpp | 2 | ||||
| -rw-r--r-- | llvm/lib/Target/Mips/MipsMachineFunction.h | 7 |
3 files changed, 2 insertions, 10 deletions
diff --git a/llvm/lib/Target/Mips/MipsFrameLowering.cpp b/llvm/lib/Target/Mips/MipsFrameLowering.cpp index 45a1e71f76d..3b7e051439b 100644 --- a/llvm/lib/Target/Mips/MipsFrameLowering.cpp +++ b/llvm/lib/Target/Mips/MipsFrameLowering.cpp @@ -279,7 +279,6 @@ void MipsFrameLowering:: processFunctionBeforeCalleeSavedScan(MachineFunction &MF, RegScavenger *RS) const { MachineRegisterInfo& MRI = MF.getRegInfo(); - MipsFunctionInfo *MipsFI = MF.getInfo<MipsFunctionInfo>(); // FIXME: remove this code if register allocator can correctly mark // $fp and $ra used or unused. @@ -293,7 +292,7 @@ processFunctionBeforeCalleeSavedScan(MachineFunction &MF, // instructions to save/restore $ra unless there is a function call. // To correct this, $ra is explicitly marked unused if there is no // function call. - if (MipsFI->hasCall()) + if (MF.getFrameInfo()->hasCalls()) MRI.setPhysRegUsed(Mips::RA); else MRI.setPhysRegUnused(Mips::RA); diff --git a/llvm/lib/Target/Mips/MipsISelLowering.cpp b/llvm/lib/Target/Mips/MipsISelLowering.cpp index 4c425616094..7aaf13ca59f 100644 --- a/llvm/lib/Target/Mips/MipsISelLowering.cpp +++ b/llvm/lib/Target/Mips/MipsISelLowering.cpp @@ -1171,8 +1171,6 @@ MipsTargetLowering::LowerCall(SDValue Chain, SDValue Callee, SmallVector<std::pair<unsigned, SDValue>, 16> RegsToPass; SmallVector<SDValue, 8> MemOpChains; - MipsFI->setHasCall(); - // If this is the first call, create a stack frame object that points to // a location to which .cprestore saves $gp. The offset of this frame object // is set to 0, since we know nothing about the size of the argument area at diff --git a/llvm/lib/Target/Mips/MipsMachineFunction.h b/llvm/lib/Target/Mips/MipsMachineFunction.h index 9cc0faf0469..0a485ec5e54 100644 --- a/llvm/lib/Target/Mips/MipsMachineFunction.h +++ b/llvm/lib/Target/Mips/MipsMachineFunction.h @@ -47,14 +47,12 @@ private: // LowerCall except for the frame object for restoring $gp. std::pair<int, int> InArgFIRange, OutArgFIRange; int GPFI; // Index of the frame object for restoring $gp - bool HasCall; // True if function has a function call. unsigned MaxCallFrameSize; public: MipsFunctionInfo(MachineFunction& MF) : SRetReturnReg(0), GlobalBaseReg(0), VarArgsFrameIndex(0), InArgFIRange(std::make_pair(-1, 0)), - OutArgFIRange(std::make_pair(-1, 0)), GPFI(0), HasCall(false), - MaxCallFrameSize(0) + OutArgFIRange(std::make_pair(-1, 0)), GPFI(0), MaxCallFrameSize(0) {} bool isInArgFI(int FI) const { @@ -86,9 +84,6 @@ public: int getVarArgsFrameIndex() const { return VarArgsFrameIndex; } void setVarArgsFrameIndex(int Index) { VarArgsFrameIndex = Index; } - bool hasCall() const { return HasCall; } - void setHasCall() { HasCall = true; } - unsigned getMaxCallFrameSize() const { return MaxCallFrameSize; } void setMaxCallFrameSize(unsigned S) { MaxCallFrameSize = S; } }; |

