diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-06-07 07:04:14 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-06-07 07:04:14 +0000 |
commit | 41e632d9e1a55d36cb08b0551ad82a13d9137a5e (patch) | |
tree | 52d4b47f777e9928012d6028eefa27bedf9f4a12 /lib/Target/Mips/MipsDelaySlotFiller.cpp | |
parent | ed8b5b55a4416286758c5567c2602d2c7d0be585 (diff) | |
download | external_llvm-41e632d9e1a55d36cb08b0551ad82a13d9137a5e.zip external_llvm-41e632d9e1a55d36cb08b0551ad82a13d9137a5e.tar.gz external_llvm-41e632d9e1a55d36cb08b0551ad82a13d9137a5e.tar.bz2 |
Don't cache the instruction and register info from the TargetMachine, because
the internals of TargetMachine could change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183493 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/MipsDelaySlotFiller.cpp')
-rw-r--r-- | lib/Target/Mips/MipsDelaySlotFiller.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Target/Mips/MipsDelaySlotFiller.cpp b/lib/Target/Mips/MipsDelaySlotFiller.cpp index d07a595..928a43d 100644 --- a/lib/Target/Mips/MipsDelaySlotFiller.cpp +++ b/lib/Target/Mips/MipsDelaySlotFiller.cpp @@ -177,7 +177,7 @@ namespace { class Filler : public MachineFunctionPass { public: Filler(TargetMachine &tm) - : MachineFunctionPass(ID), TM(tm), TII(tm.getInstrInfo()) { } + : MachineFunctionPass(ID), TM(tm) { } virtual const char *getPassName() const { return "Mips Delay Slot Filler"; @@ -243,7 +243,6 @@ namespace { bool terminateSearch(const MachineInstr &Candidate) const; TargetMachine &TM; - const TargetInstrInfo *TII; static char ID; }; @@ -514,6 +513,8 @@ bool Filler::runOnMachineBasicBlock(MachineBasicBlock &MBB) { } // Bundle the NOP to the instruction with the delay slot. + const MipsInstrInfo *TII = + static_cast<const MipsInstrInfo*>(TM.getInstrInfo()); BuildMI(MBB, llvm::next(I), I->getDebugLoc(), TII->get(Mips::NOP)); MIBundleBuilder(MBB, I, llvm::next(llvm::next(I))); } |