aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/PowerPC/PPCCTRLoops.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2015-01-30 22:02:31 +0000
committerEric Christopher <echristo@gmail.com>2015-01-30 22:02:31 +0000
commitcccae7951ceb13ef51ba87ddf83d2f7eaa23e635 (patch)
treeb84ad978af65fded63b52456555c868ca9317949 /llvm/lib/Target/PowerPC/PPCCTRLoops.cpp
parent6d9fcc38be459f16ed4da465db0db14db06ecdb7 (diff)
downloadllvm-cccae7951ceb13ef51ba87ddf83d2f7eaa23e635.zip
llvm-cccae7951ceb13ef51ba87ddf83d2f7eaa23e635.tar.gz
llvm-cccae7951ceb13ef51ba87ddf83d2f7eaa23e635.tar.bz2
Use the cached subtargets and remove calls to getSubtarget/getSubtargetImpl
without a Function argument. llvm-svn: 227622
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCCTRLoops.cpp')
-rw-r--r--llvm/lib/Target/PowerPC/PPCCTRLoops.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCCTRLoops.cpp b/llvm/lib/Target/PowerPC/PPCCTRLoops.cpp
index a7713d1..5af8aab 100644
--- a/llvm/lib/Target/PowerPC/PPCCTRLoops.cpp
+++ b/llvm/lib/Target/PowerPC/PPCCTRLoops.cpp
@@ -401,7 +401,8 @@ bool PPCCTRLoops::mightUseCTR(const Triple &TT, BasicBlock *BB) {
} else if (SwitchInst *SI = dyn_cast<SwitchInst>(J)) {
if (!TM)
return true;
- const TargetLowering *TLI = TM->getSubtargetImpl()->getTargetLowering();
+ const TargetLowering *TLI =
+ TM->getSubtargetImpl(*BB->getParent())->getTargetLowering();
if (SI->getNumCases() + 1 >= (unsigned)TLI->getMinimumJumpTableEntries())
return true;