@@ -384,13 +384,10 @@ class RegisterCoalescer : private LiveRangeEdit::Delegate {
384384 const MachineLoopInfo *Loops)
385385 : LIS(LIS), SI(SI), Loops(Loops) {}
386386
387- void releaseMemory ();
388387 bool run (MachineFunction &MF);
389388};
390389
391390class RegisterCoalescerLegacy : public MachineFunctionPass {
392- RegisterCoalescer Impl;
393-
394391public:
395392 static char ID; // /< Class identification, replacement for typeinfo
396393
@@ -405,8 +402,6 @@ class RegisterCoalescerLegacy : public MachineFunctionPass {
405402 MachineFunctionProperties::Property::IsSSA);
406403 }
407404
408- void releaseMemory () override { Impl.releaseMemory (); }
409-
410405 // / This is the pass entry point.
411406 bool runOnMachineFunction (MachineFunction &) override ;
412407};
@@ -4246,14 +4241,6 @@ void RegisterCoalescer::joinAllIntervals() {
42464241 lateLiveIntervalUpdate ();
42474242}
42484243
4249- void RegisterCoalescer::releaseMemory () {
4250- ErasedInstrs.clear ();
4251- WorkList.clear ();
4252- DeadDefs.clear ();
4253- InflateRegs.clear ();
4254- LargeLIVisitCounter.clear ();
4255- }
4256-
42574244PreservedAnalyses
42584245RegisterCoalescerPass::run (MachineFunction &MF,
42594246 MachineFunctionAnalysisManager &MFAM) {
@@ -4276,7 +4263,7 @@ bool RegisterCoalescerLegacy::runOnMachineFunction(MachineFunction &MF) {
42764263 auto *Loops = &getAnalysis<MachineLoopInfoWrapperPass>().getLI ();
42774264 auto *SIWrapper = getAnalysisIfAvailable<SlotIndexesWrapperPass>();
42784265 SlotIndexes *SI = SIWrapper ? &SIWrapper->getSI () : nullptr ;
4279- Impl = RegisterCoalescer (LIS, SI, Loops);
4266+ RegisterCoalescer Impl (LIS, SI, Loops);
42804267 return Impl.run (MF);
42814268}
42824269
0 commit comments