Skip to content

Commit 422c9b5

Browse files
committed
remove releaseMemory()
1 parent d0a6953 commit 422c9b5

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

llvm/lib/CodeGen/RegisterCoalescer.cpp

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -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

391390
class RegisterCoalescerLegacy : public MachineFunctionPass {
392-
RegisterCoalescer Impl;
393-
394391
public:
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-
42574244
PreservedAnalyses
42584245
RegisterCoalescerPass::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

Comments
 (0)