mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
Use cached subtargets inside X86FixupLEAs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228333 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d63e18f179
commit
3e68370c22
@ -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
Block a user