Use cached subtargets inside X86FixupLEAs.

llvm-svn: 228333
This commit is contained in:
Eric Christopher 2015-02-05 19:27:01 +00:00
parent d7dec666cc
commit d361ff8282
1 changed files with 2 additions and 3 deletions

View File

@ -155,8 +155,7 @@ bool FixupLEAPass::runOnMachineFunction(MachineFunction &Func) {
if (!ST.LEAusesAG() && !ST.slowLEA())
return false;
TII =
static_cast<const X86InstrInfo *>(TM->getSubtargetImpl()->getInstrInfo());
TII = ST.getInstrInfo();
DEBUG(dbgs() << "Start X86FixupLEAs\n";);
// Process all basic blocks.
@ -219,7 +218,7 @@ FixupLEAPass::searchBackwards(MachineOperand &p, MachineBasicBlock::iterator &I,
return CurInst;
}
InstrDistance += TII->getInstrLatency(
TM->getSubtargetImpl()->getInstrItineraryData(), CurInst);
MF->getSubtarget().getInstrItineraryData(), CurInst);
Found = getPreviousInstr(CurInst, MFI);
}
return nullptr;