Have MachineFunction cache a pointer to the subtarget to make lookups
[oota-llvm.git] / lib / Target / R600 / SIFixSGPRLiveRanges.cpp
index c6a24362a72fa5a1224a5fbd7a9ac15582fd1c79..fbc9aed207e262ae27de651df3b0b28328c25ab3 100644 (file)
@@ -73,8 +73,8 @@ FunctionPass *llvm::createSIFixSGPRLiveRangesPass() {
 
 bool SIFixSGPRLiveRanges::runOnMachineFunction(MachineFunction &MF) {
   MachineRegisterInfo &MRI = MF.getRegInfo();
-  const SIRegisterInfo *TRI = static_cast<const SIRegisterInfo *>(
-      MF.getTarget().getSubtargetImpl()->getRegisterInfo());
+  const SIRegisterInfo *TRI =
+      static_cast<const SIRegisterInfo *>(MF.getSubtarget().getRegisterInfo());
   LiveIntervals *LIS = &getAnalysis<LiveIntervals>();
 
   for (MachineFunction::iterator BI = MF.begin(), BE = MF.end();