diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-06-07 20:42:15 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-06-07 20:42:15 +0000 |
commit | fc61b6f111af79662baf273c40593a1e8f4dc719 (patch) | |
tree | 455c0fd93c8addc3c6c6801ccea7ea472fad371b /lib/Target/SystemZ/SystemZLongBranch.cpp | |
parent | 3ff0abfaabc2c7f604d490be587b9c27e7c91ac0 (diff) | |
download | external_llvm-fc61b6f111af79662baf273c40593a1e8f4dc719.zip external_llvm-fc61b6f111af79662baf273c40593a1e8f4dc719.tar.gz external_llvm-fc61b6f111af79662baf273c40593a1e8f4dc719.tar.bz2 |
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/SystemZLongBranch.cpp')
-rw-r--r-- | lib/Target/SystemZ/SystemZLongBranch.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Target/SystemZ/SystemZLongBranch.cpp b/lib/Target/SystemZ/SystemZLongBranch.cpp index 24afb07..2cb5823 100644 --- a/lib/Target/SystemZ/SystemZLongBranch.cpp +++ b/lib/Target/SystemZ/SystemZLongBranch.cpp @@ -133,8 +133,7 @@ namespace { public: static char ID; SystemZLongBranch(const SystemZTargetMachine &tm) - : MachineFunctionPass(ID), - TII(static_cast<const SystemZInstrInfo *>(tm.getInstrInfo())) {} + : MachineFunctionPass(ID), TII(0) {} virtual const char *getPassName() const { return "SystemZ Long Branch"; @@ -402,6 +401,7 @@ void SystemZLongBranch::relaxBranches() { } bool SystemZLongBranch::runOnMachineFunction(MachineFunction &F) { + TII = static_cast<const SystemZInstrInfo *>(F.getTarget().getInstrInfo()); MF = &F; uint64_t Size = initMBBInfo(); if (Size <= MaxForwardRange || !mustRelaxABranch()) |