summaryrefslogtreecommitdiff
path: root/lib/Target/SystemZ/SystemZRegisterInfo.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-06-07 20:42:15 +0000
committerBill Wendling <isanbard@gmail.com>2013-06-07 20:42:15 +0000
commitfc61b6f111af79662baf273c40593a1e8f4dc719 (patch)
tree455c0fd93c8addc3c6c6801ccea7ea472fad371b /lib/Target/SystemZ/SystemZRegisterInfo.cpp
parent3ff0abfaabc2c7f604d490be587b9c27e7c91ac0 (diff)
downloadllvm-fc61b6f111af79662baf273c40593a1e8f4dc719.tar.gz
llvm-fc61b6f111af79662baf273c40593a1e8f4dc719.tar.bz2
llvm-fc61b6f111af79662baf273c40593a1e8f4dc719.tar.xz
Don't cache the instruction and register info from the TargetMachine, because
the internals of TargetMachine could change. No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183567 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/SystemZ/SystemZRegisterInfo.cpp')
-rw-r--r--lib/Target/SystemZ/SystemZRegisterInfo.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/Target/SystemZ/SystemZRegisterInfo.cpp b/lib/Target/SystemZ/SystemZRegisterInfo.cpp
index a0ae7ed000..c695bb3dad 100644
--- a/lib/Target/SystemZ/SystemZRegisterInfo.cpp
+++ b/lib/Target/SystemZ/SystemZRegisterInfo.cpp
@@ -17,9 +17,8 @@
using namespace llvm;
-SystemZRegisterInfo::SystemZRegisterInfo(SystemZTargetMachine &tm,
- const SystemZInstrInfo &tii)
- : SystemZGenRegisterInfo(SystemZ::R14D), TM(tm), TII(tii) {}
+SystemZRegisterInfo::SystemZRegisterInfo(SystemZTargetMachine &tm)
+ : SystemZGenRegisterInfo(SystemZ::R14D), TM(tm) {}
const uint16_t*
SystemZRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const {
@@ -61,6 +60,8 @@ SystemZRegisterInfo::saveScavengerRegister(MachineBasicBlock &MBB,
const TargetRegisterClass *RC,
unsigned Reg) const {
MachineFunction &MF = *MBB.getParent();
+ const SystemZInstrInfo &TII =
+ *static_cast<const SystemZInstrInfo*>(TM.getInstrInfo());
const SystemZFrameLowering *TFI =
static_cast<const SystemZFrameLowering *>(TM.getFrameLowering());
unsigned Base = getFrameRegister(MF);
@@ -86,6 +87,8 @@ SystemZRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator MI,
MachineBasicBlock &MBB = *MI->getParent();
MachineFunction &MF = *MBB.getParent();
+ const SystemZInstrInfo &TII =
+ *static_cast<const SystemZInstrInfo*>(TM.getInstrInfo());
const TargetFrameLowering *TFI = MF.getTarget().getFrameLowering();
DebugLoc DL = MI->getDebugLoc();