diff options
Diffstat (limited to 'llvm/lib/CodeGen/RegAllocPBQP.cpp')
-rw-r--r-- | llvm/lib/CodeGen/RegAllocPBQP.cpp | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/llvm/lib/CodeGen/RegAllocPBQP.cpp b/llvm/lib/CodeGen/RegAllocPBQP.cpp index d1221ec59bd..d5b0f96e24a 100644 --- a/llvm/lib/CodeGen/RegAllocPBQP.cpp +++ b/llvm/lib/CodeGen/RegAllocPBQP.cpp @@ -123,12 +123,6 @@ private: RegSet VRegsToAlloc, EmptyIntervalVRegs; - /// Inst which is a def of an original reg and whose defs are already all - /// dead after remat is saved in DeadRemats. The deletion of such inst is - /// postponed till all the allocations are done, so its remat expr is - /// always available for the remat of all the siblings of the original reg. - SmallPtrSet<MachineInstr *, 32> DeadRemats; - /// \brief Finds the initial set of vreg intervals to allocate. void findVRegIntervalsToAlloc(const MachineFunction &MF, LiveIntervals &LIS); @@ -152,7 +146,6 @@ private: void finalizeAlloc(MachineFunction &MF, LiveIntervals &LIS, VirtRegMap &VRM) const; - void postOptimization(Spiller &VRegSpiller, LiveIntervals &LIS); }; char RegAllocPBQP::ID = 0; @@ -638,8 +631,7 @@ void RegAllocPBQP::spillVReg(unsigned VReg, VirtRegMap &VRM, Spiller &VRegSpiller) { VRegsToAlloc.erase(VReg); - LiveRangeEdit LRE(&LIS.getInterval(VReg), NewIntervals, MF, LIS, &VRM, - nullptr, &DeadRemats); + LiveRangeEdit LRE(&LIS.getInterval(VReg), NewIntervals, MF, LIS, &VRM); VRegSpiller.spill(LRE); const TargetRegisterInfo &TRI = *MF.getSubtarget().getRegisterInfo(); @@ -721,16 +713,6 @@ void RegAllocPBQP::finalizeAlloc(MachineFunction &MF, } } -void RegAllocPBQP::postOptimization(Spiller &VRegSpiller, LiveIntervals &LIS) { - VRegSpiller.postOptimization(); - /// Remove dead defs because of rematerialization. - for (auto DeadInst : DeadRemats) { - LIS.RemoveMachineInstrFromMaps(*DeadInst); - DeadInst->eraseFromParent(); - } - DeadRemats.clear(); -} - static inline float normalizePBQPSpillWeight(float UseDefFreq, unsigned Size, unsigned NumInstr) { // All intervals have a spill weight that is mostly proportional to the number @@ -816,7 +798,6 @@ bool RegAllocPBQP::runOnMachineFunction(MachineFunction &MF) { // Finalise allocation, allocate empty ranges. finalizeAlloc(MF, LIS, VRM); - postOptimization(*VRegSpiller, LIS); VRegsToAlloc.clear(); EmptyIntervalVRegs.clear(); |