summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/EarlyIfConversion.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2015-01-27 07:31:29 +0000
committerEric Christopher <echristo@gmail.com>2015-01-27 07:31:29 +0000
commit3d4276f053061933d45140b7bcb727d6b6efc7b4 (patch)
tree6907fc3fb94028b4576c2bd55359de6f6356ba7e /llvm/lib/CodeGen/EarlyIfConversion.cpp
parente38c8d4aa92769e7d6af523310844fa361852d74 (diff)
downloadbcm5719-llvm-3d4276f053061933d45140b7bcb727d6b6efc7b4.tar.gz
bcm5719-llvm-3d4276f053061933d45140b7bcb727d6b6efc7b4.zip
The subtarget is cached on the MachineFunction. Access it directly.
llvm-svn: 227173
Diffstat (limited to 'llvm/lib/CodeGen/EarlyIfConversion.cpp')
-rw-r--r--llvm/lib/CodeGen/EarlyIfConversion.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/llvm/lib/CodeGen/EarlyIfConversion.cpp b/llvm/lib/CodeGen/EarlyIfConversion.cpp
index 995606f65d7..8f742713ccf 100644
--- a/llvm/lib/CodeGen/EarlyIfConversion.cpp
+++ b/llvm/lib/CodeGen/EarlyIfConversion.cpp
@@ -777,15 +777,13 @@ bool EarlyIfConverter::runOnMachineFunction(MachineFunction &MF) {
DEBUG(dbgs() << "********** EARLY IF-CONVERSION **********\n"
<< "********** Function: " << MF.getName() << '\n');
// Only run if conversion if the target wants it.
- if (!MF.getTarget()
- .getSubtarget<TargetSubtargetInfo>()
- .enableEarlyIfConversion())
+ const TargetSubtargetInfo &STI = MF.getSubtarget();
+ if (!STI.enableEarlyIfConversion())
return false;
- TII = MF.getSubtarget().getInstrInfo();
- TRI = MF.getSubtarget().getRegisterInfo();
- SchedModel =
- MF.getTarget().getSubtarget<TargetSubtargetInfo>().getSchedModel();
+ TII = STI.getInstrInfo();
+ TRI = STI.getRegisterInfo();
+ SchedModel = STI.getSchedModel();
MRI = &MF.getRegInfo();
DomTree = &getAnalysis<MachineDominatorTree>();
Loops = getAnalysisIfAvailable<MachineLoopInfo>();
OpenPOWER on IntegriCloud