mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 20:29:48 +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())
|
if (!ST.LEAusesAG() && !ST.slowLEA())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
TII =
|
TII = ST.getInstrInfo();
|
||||||
static_cast<const X86InstrInfo *>(TM->getSubtargetImpl()->getInstrInfo());
|
|
||||||
|
|
||||||
DEBUG(dbgs() << "Start X86FixupLEAs\n";);
|
DEBUG(dbgs() << "Start X86FixupLEAs\n";);
|
||||||
// Process all basic blocks.
|
// Process all basic blocks.
|
||||||
@ -219,7 +218,7 @@ FixupLEAPass::searchBackwards(MachineOperand &p, MachineBasicBlock::iterator &I,
|
|||||||
return CurInst;
|
return CurInst;
|
||||||
}
|
}
|
||||||
InstrDistance += TII->getInstrLatency(
|
InstrDistance += TII->getInstrLatency(
|
||||||
TM->getSubtargetImpl()->getInstrItineraryData(), CurInst);
|
MF->getSubtarget().getInstrItineraryData(), CurInst);
|
||||||
Found = getPreviousInstr(CurInst, MFI);
|
Found = getPreviousInstr(CurInst, MFI);
|
||||||
}
|
}
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
Loading…
Reference in New Issue
Block a user