@@ -384,13 +384,10 @@ class RegisterCoalescer : private LiveRangeEdit::Delegate {
384
384
const MachineLoopInfo *Loops)
385
385
: LIS(LIS), SI(SI), Loops(Loops) {}
386
386
387
- void releaseMemory ();
388
387
bool run (MachineFunction &MF);
389
388
};
390
389
391
390
class RegisterCoalescerLegacy : public MachineFunctionPass {
392
- RegisterCoalescer Impl;
393
-
394
391
public:
395
392
static char ID; // /< Class identification, replacement for typeinfo
396
393
@@ -405,8 +402,6 @@ class RegisterCoalescerLegacy : public MachineFunctionPass {
405
402
MachineFunctionProperties::Property::IsSSA);
406
403
}
407
404
408
- void releaseMemory () override { Impl.releaseMemory (); }
409
-
410
405
// / This is the pass entry point.
411
406
bool runOnMachineFunction (MachineFunction &) override ;
412
407
};
@@ -4246,14 +4241,6 @@ void RegisterCoalescer::joinAllIntervals() {
4246
4241
lateLiveIntervalUpdate ();
4247
4242
}
4248
4243
4249
- void RegisterCoalescer::releaseMemory () {
4250
- ErasedInstrs.clear ();
4251
- WorkList.clear ();
4252
- DeadDefs.clear ();
4253
- InflateRegs.clear ();
4254
- LargeLIVisitCounter.clear ();
4255
- }
4256
-
4257
4244
PreservedAnalyses
4258
4245
RegisterCoalescerPass::run (MachineFunction &MF,
4259
4246
MachineFunctionAnalysisManager &MFAM) {
@@ -4276,7 +4263,7 @@ bool RegisterCoalescerLegacy::runOnMachineFunction(MachineFunction &MF) {
4276
4263
auto *Loops = &getAnalysis<MachineLoopInfoWrapperPass>().getLI ();
4277
4264
auto *SIWrapper = getAnalysisIfAvailable<SlotIndexesWrapperPass>();
4278
4265
SlotIndexes *SI = SIWrapper ? &SIWrapper->getSI () : nullptr ;
4279
- Impl = RegisterCoalescer (LIS, SI, Loops);
4266
+ RegisterCoalescer Impl (LIS, SI, Loops);
4280
4267
return Impl.run (MF);
4281
4268
}
4282
4269
0 commit comments