From f264f9ad7df538357dfc8c5f318c5c8b0df3d99f Mon Sep 17 00:00:00 2001 From: Jay Foad Date: Fri, 8 Jan 2021 13:40:29 +0000 Subject: [SlotIndexes] Fix and simplify basic block splitting Remove the InsertionPoint argument from SlotIndexes::insertMBBInMaps because it was confusing: what does it mean to insert a new block between two instructions, in the middle of an existing block? Instead, support the case that MachineBasicBlock::splitAt really needs, where the new block contains some instructions that are already in the maps because they have been moved there from the tail of the previous block. In all other use cases the new block is empty. Based on work by Carl Ritson! Differential Revision: https://reviews.llvm.org/D94311 --- llvm/lib/CodeGen/MachineBasicBlock.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp') diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp index c7b404e075e1..fded4b15e67b 100644 --- a/llvm/lib/CodeGen/MachineBasicBlock.cpp +++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp @@ -980,7 +980,7 @@ MachineBasicBlock *MachineBasicBlock::splitAt(MachineInstr &MI, addLiveIns(*SplitBB, LiveRegs); if (LIS) - LIS->insertMBBInMaps(SplitBB, &MI); + LIS->insertMBBInMaps(SplitBB); return SplitBB; } -- cgit v1.2.3