aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/Mips/MipsMachineFunction.h
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-06-03 20:30:14 +0000
committerDan Gohman <gohman@apple.com>2009-06-03 20:30:14 +0000
commit9911405183f8596fe9d521467f83f6652a296cf4 (patch)
tree3629144f2929ce9eac2f881ec163e26fe1b17632 /lib/Target/Mips/MipsMachineFunction.h
parentc553462c2989bbcbd9a911f7a5d56e76883d3038 (diff)
downloadexternal_llvm-9911405183f8596fe9d521467f83f6652a296cf4.zip
external_llvm-9911405183f8596fe9d521467f83f6652a296cf4.tar.gz
external_llvm-9911405183f8596fe9d521467f83f6652a296cf4.tar.bz2
Convert Alpha and Mips to use a MachineFunctionInfo subclass to
carry GlobalBaseReg, and GlobalRetAddr too in Alpha's case. This eliminates the need for them to search through the MachineRegisterInfo livein list in order to identify these virtual registers. EmitLiveInCopies is now the only user of the virtual register portion of MachineRegisterInfo's livein data. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72802 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/MipsMachineFunction.h')
-rw-r--r--lib/Target/Mips/MipsMachineFunction.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/Target/Mips/MipsMachineFunction.h b/lib/Target/Mips/MipsMachineFunction.h
index b95394e..ac3cdfd 100644
--- a/lib/Target/Mips/MipsMachineFunction.h
+++ b/lib/Target/Mips/MipsMachineFunction.h
@@ -75,11 +75,16 @@ private:
/// holds the virtual register into which the sret argument is passed.
unsigned SRetReturnReg;
+ /// GlobalBaseReg - keeps track of the virtual register initialized for
+ /// use as the global base register. This is used for PIC in some PIC
+ /// relocation models.
+ unsigned GlobalBaseReg;
+
public:
MipsFunctionInfo(MachineFunction& MF)
: FPStackOffset(0), RAStackOffset(0), CPUTopSavedRegOff(0),
FPUTopSavedRegOff(0), GPHolder(-1,-1), HasLoadArgs(false),
- HasStoreVarArgs(false), SRetReturnReg(0)
+ HasStoreVarArgs(false), SRetReturnReg(0), GlobalBaseReg(0)
{}
int getFPStackOffset() const { return FPStackOffset; }
@@ -124,6 +129,9 @@ public:
unsigned getSRetReturnReg() const { return SRetReturnReg; }
void setSRetReturnReg(unsigned Reg) { SRetReturnReg = Reg; }
+
+ unsigned getGlobalBaseReg() const { return GlobalBaseReg; }
+ void setGlobalBaseReg(unsigned Reg) { GlobalBaseReg = Reg; }
};
} // end of namespace llvm