diff options
author | Eric Christopher <echristo@gmail.com> | 2014-06-27 01:14:50 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2014-06-27 01:14:50 +0000 |
commit | c3c52ee642168e26f2e48687f38138b544ce6656 (patch) | |
tree | ca57ff6f2dc78cfca64fd6de1d501457402aa744 /lib | |
parent | 4b45f30be3a523e410875a82aa81dcb3a6bfdb3b (diff) | |
download | llvm-c3c52ee642168e26f2e48687f38138b544ce6656.tar.gz llvm-c3c52ee642168e26f2e48687f38138b544ce6656.tar.bz2 llvm-c3c52ee642168e26f2e48687f38138b544ce6656.tar.xz |
Remove uses and caches of the target machine and subtarget from
both MSP430InstrInfo and MSP430RegisterInfo. Remove unused member
variable StackAlign from MSP430RegisterInfo. Update constructors
accordingly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211835 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/MSP430/MSP430InstrInfo.cpp | 4 | ||||
-rw-r--r-- | lib/Target/MSP430/MSP430InstrInfo.h | 4 | ||||
-rw-r--r-- | lib/Target/MSP430/MSP430RegisterInfo.cpp | 6 | ||||
-rw-r--r-- | lib/Target/MSP430/MSP430RegisterInfo.h | 11 | ||||
-rw-r--r-- | lib/Target/MSP430/MSP430TargetMachine.cpp | 2 |
5 files changed, 8 insertions, 19 deletions
diff --git a/lib/Target/MSP430/MSP430InstrInfo.cpp b/lib/Target/MSP430/MSP430InstrInfo.cpp index 0c04ddbb11..ccb6c09e3f 100644 --- a/lib/Target/MSP430/MSP430InstrInfo.cpp +++ b/lib/Target/MSP430/MSP430InstrInfo.cpp @@ -30,9 +30,9 @@ using namespace llvm; // Pin the vtable to this file. void MSP430InstrInfo::anchor() {} -MSP430InstrInfo::MSP430InstrInfo(MSP430TargetMachine &tm) +MSP430InstrInfo::MSP430InstrInfo(MSP430Subtarget &STI) : MSP430GenInstrInfo(MSP430::ADJCALLSTACKDOWN, MSP430::ADJCALLSTACKUP), - RI(tm) {} + RI() {} void MSP430InstrInfo::storeRegToStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, diff --git a/lib/Target/MSP430/MSP430InstrInfo.h b/lib/Target/MSP430/MSP430InstrInfo.h index 1ffcebb015..e6baaefe48 100644 --- a/lib/Target/MSP430/MSP430InstrInfo.h +++ b/lib/Target/MSP430/MSP430InstrInfo.h @@ -22,7 +22,7 @@ namespace llvm { -class MSP430TargetMachine; +class MSP430Subtarget; /// MSP430II - This namespace holds all of the target specific flags that /// instruction info tracks. @@ -44,7 +44,7 @@ class MSP430InstrInfo : public MSP430GenInstrInfo { const MSP430RegisterInfo RI; virtual void anchor(); public: - explicit MSP430InstrInfo(MSP430TargetMachine &TM); + explicit MSP430InstrInfo(MSP430Subtarget &STI); /// getRegisterInfo - TargetInstrInfo is a superset of MRegister info. As /// such, whenever a client has an instance of instruction info, it should diff --git a/lib/Target/MSP430/MSP430RegisterInfo.cpp b/lib/Target/MSP430/MSP430RegisterInfo.cpp index 341fb64b8f..691bceef0d 100644 --- a/lib/Target/MSP430/MSP430RegisterInfo.cpp +++ b/lib/Target/MSP430/MSP430RegisterInfo.cpp @@ -32,10 +32,8 @@ using namespace llvm; #include "MSP430GenRegisterInfo.inc" // FIXME: Provide proper call frame setup / destroy opcodes. -MSP430RegisterInfo::MSP430RegisterInfo(MSP430TargetMachine &tm) - : MSP430GenRegisterInfo(MSP430::PCW), TM(tm) { - StackAlign = TM.getFrameLowering()->getStackAlignment(); -} +MSP430RegisterInfo::MSP430RegisterInfo() + : MSP430GenRegisterInfo(MSP430::PCW) {} const MCPhysReg* MSP430RegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const { diff --git a/lib/Target/MSP430/MSP430RegisterInfo.h b/lib/Target/MSP430/MSP430RegisterInfo.h index a607528fd1..cb0196134a 100644 --- a/lib/Target/MSP430/MSP430RegisterInfo.h +++ b/lib/Target/MSP430/MSP430RegisterInfo.h @@ -21,18 +21,9 @@ namespace llvm { -class TargetInstrInfo; -class MSP430TargetMachine; - struct MSP430RegisterInfo : public MSP430GenRegisterInfo { -private: - MSP430TargetMachine &TM; - - /// StackAlign - Default stack alignment. - /// - unsigned StackAlign; public: - MSP430RegisterInfo(MSP430TargetMachine &tm); + MSP430RegisterInfo(); /// Code Generation virtual methods... const MCPhysReg * diff --git a/lib/Target/MSP430/MSP430TargetMachine.cpp b/lib/Target/MSP430/MSP430TargetMachine.cpp index 04f8f08cc5..ab7284e830 100644 --- a/lib/Target/MSP430/MSP430TargetMachine.cpp +++ b/lib/Target/MSP430/MSP430TargetMachine.cpp @@ -35,7 +35,7 @@ MSP430TargetMachine::MSP430TargetMachine(const Target &T, Subtarget(TT, CPU, FS), // FIXME: Check DataLayout string. DL("e-m:e-p:16:16-i32:16:32-n8:16"), - InstrInfo(*this), TLInfo(*this), TSInfo(DL), + InstrInfo(Subtarget), TLInfo(*this), TSInfo(DL), FrameLowering() { initAsmInfo(); } |