forked from OSchip/llvm-project
Use cached subtargets inside X86FixupLEAs.
llvm-svn: 228333
This commit is contained in:
parent
d7dec666cc
commit
d361ff8282
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue