[llvm] r219381 - Remove uses of getSubtargetImpl from ResourcePriorityQueue and
Eric Christopher
echristo at gmail.com
Wed Oct 8 18:59:32 PDT 2014
Author: echristo
Date: Wed Oct 8 20:59:31 2014
New Revision: 219381
URL: http://llvm.org/viewvc/llvm-project?rev=219381&view=rev
Log:
Remove uses of getSubtargetImpl from ResourcePriorityQueue and
replace them with calls off of the MachineFuncton.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/ResourcePriorityQueue.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ResourcePriorityQueue.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ResourcePriorityQueue.cpp?rev=219381&r1=219380&r2=219381&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/ResourcePriorityQueue.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/ResourcePriorityQueue.cpp Wed Oct 8 20:59:31 2014
@@ -42,14 +42,12 @@ static cl::opt<signed> RegPressureThresh
cl::desc("Track reg pressure and switch priority to in-depth"));
ResourcePriorityQueue::ResourcePriorityQueue(SelectionDAGISel *IS)
- : Picker(this), InstrItins(IS->TLI->getTargetMachine()
- .getSubtargetImpl()
- ->getInstrItineraryData()) {
- const TargetMachine &TM = (*IS->MF).getTarget();
- TRI = TM.getSubtargetImpl()->getRegisterInfo();
+ : Picker(this), InstrItins(IS->MF->getSubtarget().getInstrItineraryData()) {
+ const TargetSubtargetInfo &STI = IS->MF->getSubtarget();
+ TRI = STI.getRegisterInfo();
TLI = IS->TLI;
- TII = TM.getSubtargetImpl()->getInstrInfo();
- ResourcesModel = TII->CreateTargetScheduleState(&TM, nullptr);
+ TII = STI.getInstrInfo();
+ ResourcesModel = TII->CreateTargetScheduleState(&IS->MF->getTarget(), nullptr);
// This hard requirement could be relaxed, but for now
// do not let it procede.
assert(ResourcesModel && "Unimplemented CreateTargetScheduleState.");
More information about the llvm-commits
mailing list