[llvm] r228333 - Use cached subtargets inside X86FixupLEAs.
Eric Christopher
echristo at gmail.com
Thu Feb 5 11:27:02 PST 2015
Author: echristo
Date: Thu Feb 5 13:27:01 2015
New Revision: 228333
URL: http://llvm.org/viewvc/llvm-project?rev=228333&view=rev
Log:
Use cached subtargets inside X86FixupLEAs.
Modified:
llvm/trunk/lib/Target/X86/X86FixupLEAs.cpp
Modified: llvm/trunk/lib/Target/X86/X86FixupLEAs.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FixupLEAs.cpp?rev=228333&r1=228332&r2=228333&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86FixupLEAs.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86FixupLEAs.cpp Thu Feb 5 13:27:01 2015
@@ -155,8 +155,7 @@ bool FixupLEAPass::runOnMachineFunction(
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(MachineOpe
return CurInst;
}
InstrDistance += TII->getInstrLatency(
- TM->getSubtargetImpl()->getInstrItineraryData(), CurInst);
+ MF->getSubtarget().getInstrItineraryData(), CurInst);
Found = getPreviousInstr(CurInst, MFI);
}
return nullptr;
More information about the llvm-commits
mailing list