diff options
| author | Akira Hatanaka <ahatanaka@mips.com> | 2012-07-25 03:16:47 +0000 |
|---|---|---|
| committer | Akira Hatanaka <ahatanaka@mips.com> | 2012-07-25 03:16:47 +0000 |
| commit | 5a69c235aea730d90a9b2ce57077ce45815650a0 (patch) | |
| tree | 21ffd08e5eb0188ada927b94a5be612766dc95d9 /llvm/lib/Target/Mips/MipsMachineFunction.h | |
| parent | e6af54af9b0a7d728b11888ecb9483276dce07e6 (diff) | |
| download | bcm5719-llvm-5a69c235aea730d90a9b2ce57077ce45815650a0.tar.gz bcm5719-llvm-5a69c235aea730d90a9b2ce57077ce45815650a0.zip | |
Eliminate the stack slot used to save the global base register.
The long branch pass (fixed in r160601) no longer uses the global base register
to compute addresses of branch destinations, so it is not necessary to reserve
a slot on the stack.
llvm-svn: 160703
Diffstat (limited to 'llvm/lib/Target/Mips/MipsMachineFunction.h')
| -rw-r--r-- | llvm/lib/Target/Mips/MipsMachineFunction.h | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/llvm/lib/Target/Mips/MipsMachineFunction.h b/llvm/lib/Target/Mips/MipsMachineFunction.h index b2232c6573c..9f1c85de1c3 100644 --- a/llvm/lib/Target/Mips/MipsMachineFunction.h +++ b/llvm/lib/Target/Mips/MipsMachineFunction.h @@ -48,7 +48,6 @@ class MipsFunctionInfo : public MachineFunctionInfo { // OutArgFIRange: Range of indices of all frame objects created during call to // LowerCall except for the frame object for restoring $gp. std::pair<int, int> InArgFIRange, OutArgFIRange; - int GlobalRegFI; mutable int DynAllocFI; // Frame index of dynamically allocated stack area. unsigned MaxCallFrameSize; @@ -58,7 +57,7 @@ public: MipsFunctionInfo(MachineFunction& MF) : MF(MF), SRetReturnReg(0), GlobalBaseReg(0), VarArgsFrameIndex(0), InArgFIRange(std::make_pair(-1, 0)), - OutArgFIRange(std::make_pair(-1, 0)), GlobalRegFI(0), DynAllocFI(0), + OutArgFIRange(std::make_pair(-1, 0)), DynAllocFI(0), MaxCallFrameSize(0), EmitNOAT(false) {} @@ -77,24 +76,6 @@ public: OutArgFIRange.second = LastFI; } - bool isGlobalRegFI(int FI) const { - return GlobalRegFI && (FI == GlobalRegFI); - } - - int getGlobalRegFI() const { - return GlobalRegFI; - } - - int initGlobalRegFI() { - const TargetMachine &TM = MF.getTarget(); - unsigned RegSize = TM.getSubtarget<MipsSubtarget>().isABI_N64() ? 8 : 4; - int64_t StackAlignment = TM.getFrameLowering()->getStackAlignment(); - uint64_t Offset = RoundUpToAlignment(MaxCallFrameSize, StackAlignment); - - GlobalRegFI = MF.getFrameInfo()->CreateFixedObject(RegSize, Offset, true); - return GlobalRegFI; - } - // The first call to this function creates a frame object for dynamically // allocated stack area. int getDynAllocFI() const { |

