diff options
| author | Eric Christopher <echristo@gmail.com> | 2015-01-27 08:27:06 +0000 |
|---|---|---|
| committer | Eric Christopher <echristo@gmail.com> | 2015-01-27 08:27:06 +0000 |
| commit | 7592b0c5e63b650df04f3c34b8ef5708eaa6f5d5 (patch) | |
| tree | 29fded6ca9b96aac3a7f63e209ebed28e69613c7 /llvm/lib/CodeGen | |
| parent | e005826526220f66bdc3c15a29d079450c087727 (diff) | |
| download | bcm5719-llvm-7592b0c5e63b650df04f3c34b8ef5708eaa6f5d5.tar.gz bcm5719-llvm-7592b0c5e63b650df04f3c34b8ef5708eaa6f5d5.zip | |
Have the PBQP register allocator use the subtarget on the MachineFunction.
(and remove an extraneous private).
llvm-svn: 227181
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/RegAllocPBQP.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/RegAllocPBQP.cpp b/llvm/lib/CodeGen/RegAllocPBQP.cpp index eb7e563352a..849cc6c4bc0 100644 --- a/llvm/lib/CodeGen/RegAllocPBQP.cpp +++ b/llvm/lib/CodeGen/RegAllocPBQP.cpp @@ -172,8 +172,6 @@ public: class Interference : public PBQPRAConstraint { private: -private: - typedef const PBQP::RegAlloc::AllowedRegVector* AllowedRegVecPtr; typedef std::pair<AllowedRegVecPtr, AllowedRegVecPtr> IMatrixKey; typedef DenseMap<IMatrixKey, PBQPRAGraph::MatrixPtr> IMatrixCache; @@ -308,7 +306,7 @@ private: PBQPRAGraph::NodeId MId, IMatrixCache &C) { const TargetRegisterInfo &TRI = - *G.getMetadata().MF.getTarget().getSubtargetImpl()->getRegisterInfo(); + *G.getMetadata().MF.getSubtarget().getRegisterInfo(); const auto &NRegs = G.getNodeMetadata(NId).getAllowedRegs(); const auto &MRegs = G.getNodeMetadata(MId).getAllowedRegs(); @@ -342,7 +340,7 @@ public: void apply(PBQPRAGraph &G) override { MachineFunction &MF = G.getMetadata().MF; MachineBlockFrequencyInfo &MBFI = G.getMetadata().MBFI; - CoalescerPair CP(*MF.getTarget().getSubtargetImpl()->getRegisterInfo()); + CoalescerPair CP(*MF.getSubtarget().getRegisterInfo()); // Scan the machine function and add a coalescing cost whenever CoalescerPair // gives the Ok. @@ -494,7 +492,7 @@ void RegAllocPBQP::initializeGraph(PBQPRAGraph &G) { LiveIntervals &LIS = G.getMetadata().LIS; const MachineRegisterInfo &MRI = G.getMetadata().MF.getRegInfo(); const TargetRegisterInfo &TRI = - *G.getMetadata().MF.getTarget().getSubtargetImpl()->getRegisterInfo(); + *G.getMetadata().MF.getSubtarget().getRegisterInfo(); for (auto VReg : VRegsToAlloc) { const TargetRegisterClass *TRC = MRI.getRegClass(VReg); @@ -553,8 +551,7 @@ bool RegAllocPBQP::mapPBQPToRegAlloc(const PBQPRAGraph &G, Spiller &VRegSpiller) { MachineFunction &MF = G.getMetadata().MF; LiveIntervals &LIS = G.getMetadata().LIS; - const TargetRegisterInfo &TRI = - *MF.getTarget().getSubtargetImpl()->getRegisterInfo(); + const TargetRegisterInfo &TRI = *MF.getSubtarget().getRegisterInfo(); (void)TRI; // Set to true if we have any spills @@ -670,7 +667,7 @@ bool RegAllocPBQP::runOnMachineFunction(MachineFunction &MF) { // If there are non-empty intervals allocate them using pbqp. if (!VRegsToAlloc.empty()) { - const TargetSubtargetInfo &Subtarget = *MF.getTarget().getSubtargetImpl(); + const TargetSubtargetInfo &Subtarget = MF.getSubtarget(); std::unique_ptr<PBQPRAConstraintList> ConstraintsRoot = llvm::make_unique<PBQPRAConstraintList>(); ConstraintsRoot->addConstraint(llvm::make_unique<SpillCosts>()); |

