From 46f838f3707183682fe0cd78601e85e089c35aa3 Mon Sep 17 00:00:00 2001 From: Roman Tereshin Date: Mon, 30 Apr 2018 18:58:57 +0000 Subject: [MIR] Reset unique MBB numbering in MachineFunction::reset() No need to waste space nor number MBBs differently if MF gets recreated. Reviewers: qcolombet, stoklund, t.p.northover, bogner, javed.absar Reviewed By: qcolombet Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D46078 llvm-svn: 331213 --- llvm/lib/CodeGen/MachineFunction.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'llvm/lib/CodeGen/MachineFunction.cpp') diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp index fa38a97862f..e47aeb64910 100644 --- a/llvm/lib/CodeGen/MachineFunction.cpp +++ b/llvm/lib/CodeGen/MachineFunction.cpp @@ -196,6 +196,7 @@ void MachineFunction::clear() { // Do call MachineBasicBlock destructors, it contains std::vectors. for (iterator I = begin(), E = end(); I != E; I = BasicBlocks.erase(I)) I->Insts.clearAndLeakNodesUnsafely(); + MBBNumbering.clear(); InstructionRecycler.clear(Allocator); OperandRecycler.clear(Allocator); -- cgit v1.2.3