summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2014-06-27 07:01:17 +0000
committerEric Christopher <echristo@gmail.com>2014-06-27 07:01:17 +0000
commit673b3afacd2539bc7a88ebfcf8060d92c09170c9 (patch)
treea55deaafcf24c6cb0c25b428f20c298ae860283d /llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp
parent80effa415c1faf38324fbad9604535b0be4f9a3e (diff)
downloadbcm5719-llvm-673b3afacd2539bc7a88ebfcf8060d92c09170c9.tar.gz
bcm5719-llvm-673b3afacd2539bc7a88ebfcf8060d92c09170c9.zip
Remove target machine caching from SystemZInstrInfo and
SystemZRegisterInfo and replace it with the subtarget as that's all they needed in the first place. Update all uses and calls accordingly. llvm-svn: 211877
Diffstat (limited to 'llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp')
-rw-r--r--llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp b/llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp
index a04d703d09f..84a33d8a128 100644
--- a/llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp
@@ -7,18 +7,20 @@
//
//===----------------------------------------------------------------------===//
+#include "SystemZInstrInfo.h"
#include "SystemZRegisterInfo.h"
-#include "SystemZTargetMachine.h"
+#include "SystemZSubtarget.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
+#include "llvm/Target/TargetFrameLowering.h"
using namespace llvm;
#define GET_REGINFO_TARGET_DESC
#include "SystemZGenRegisterInfo.inc"
-SystemZRegisterInfo::SystemZRegisterInfo(SystemZTargetMachine &tm)
- : SystemZGenRegisterInfo(SystemZ::R14D), TM(tm) {}
+SystemZRegisterInfo::SystemZRegisterInfo()
+ : SystemZGenRegisterInfo(SystemZ::R14D) {}
const MCPhysReg*
SystemZRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const {
@@ -63,7 +65,8 @@ SystemZRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator MI,
MachineBasicBlock &MBB = *MI->getParent();
MachineFunction &MF = *MBB.getParent();
- auto *TII = static_cast<const SystemZInstrInfo*>(TM.getInstrInfo());
+ auto *TII =
+ static_cast<const SystemZInstrInfo *>(MF.getTarget().getInstrInfo());
const TargetFrameLowering *TFI = MF.getTarget().getFrameLowering();
DebugLoc DL = MI->getDebugLoc();
OpenPOWER on IntegriCloud