diff options
| author | Akira Hatanaka <ahatanaka@mips.com> | 2012-05-12 03:22:13 +0000 | 
|---|---|---|
| committer | Akira Hatanaka <ahatanaka@mips.com> | 2012-05-12 03:22:13 +0000 | 
| commit | 3ecc5273c1484e5ec72b72068f384924db7d161c (patch) | |
| tree | 62dc502c3f49c93e3c329fc3dceede7538896585 /llvm/lib/Target | |
| parent | 2e31e036b620410b7dee26937632a361e42f505e (diff) | |
| download | bcm5719-llvm-3ecc5273c1484e5ec72b72068f384924db7d161c.tar.gz bcm5719-llvm-3ecc5273c1484e5ec72b72068f384924db7d161c.zip  | |
Delete all functions that are no longer needed in MipsFunctionInfo, including
the ones that get or set the frame index for the $gp save slot. 
Remove the piece of code in MipsFunctionInfo::getGlobalBaseReg() which returns
GP. This function should always return a virtual register.
llvm-svn: 156695
Diffstat (limited to 'llvm/lib/Target')
| -rw-r--r-- | llvm/lib/Target/Mips/MipsMachineFunction.cpp | 7 | ||||
| -rw-r--r-- | llvm/lib/Target/Mips/MipsMachineFunction.h | 9 | 
2 files changed, 1 insertions, 15 deletions
diff --git a/llvm/lib/Target/Mips/MipsMachineFunction.cpp b/llvm/lib/Target/Mips/MipsMachineFunction.cpp index 8535b290b43..e3746d4a420 100644 --- a/llvm/lib/Target/Mips/MipsMachineFunction.cpp +++ b/llvm/lib/Target/Mips/MipsMachineFunction.cpp @@ -22,10 +22,6 @@ static cl::opt<bool>  FixGlobalBaseReg("mips-fix-global-base-reg", cl::Hidden, cl::init(true),                   cl::desc("Always use $gp as the global base register.")); -bool MipsFunctionInfo::globalBaseRegFixed() const { -  return FixGlobalBaseReg; -} -  bool MipsFunctionInfo::globalBaseRegSet() const {    return GlobalBaseReg;  } @@ -37,9 +33,6 @@ unsigned MipsFunctionInfo::getGlobalBaseReg() {    const MipsSubtarget &ST = MF.getTarget().getSubtarget<MipsSubtarget>(); -  if (FixGlobalBaseReg && ST.isABI_O32()) // $gp is the global base register. -    return GlobalBaseReg = Mips::GP; -    const TargetRegisterClass *RC = ST.isABI_N64() ?      (const TargetRegisterClass*)&Mips::CPU64RegsRegClass :      (const TargetRegisterClass*)&Mips::CPURegsRegClass; diff --git a/llvm/lib/Target/Mips/MipsMachineFunction.h b/llvm/lib/Target/Mips/MipsMachineFunction.h index 0fde55cb62e..04cb3f22b26 100644 --- a/llvm/lib/Target/Mips/MipsMachineFunction.h +++ b/llvm/lib/Target/Mips/MipsMachineFunction.h @@ -45,7 +45,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 GPFI; // Index of the frame object for restoring $gp    mutable int DynAllocFI; // Frame index of dynamically allocated stack area.    unsigned MaxCallFrameSize; @@ -55,7 +54,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)), GPFI(0), DynAllocFI(0), +    OutArgFIRange(std::make_pair(-1, 0)), DynAllocFI(0),      MaxCallFrameSize(0), EmitNOAT(false)    {} @@ -74,11 +73,6 @@ public:      OutArgFIRange.second = LastFI;    } -  int getGPFI() const { return GPFI; } -  void setGPFI(int FI) { GPFI = FI; } -  bool needGPSaveRestore() const { return getGPFI(); } -  bool isGPFI(int FI) const { return GPFI && GPFI == FI; } -    // The first call to this function creates a frame object for dynamically    // allocated stack area.    int getDynAllocFI() const { @@ -92,7 +86,6 @@ public:    unsigned getSRetReturnReg() const { return SRetReturnReg; }    void setSRetReturnReg(unsigned Reg) { SRetReturnReg = Reg; } -  bool globalBaseRegFixed() const;    bool globalBaseRegSet() const;    unsigned getGlobalBaseReg();  | 

