When an insertion point is specified in insertMBBIntoMaps the
index range of existing instructions in the block needs to be
considered.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
llvm/include/llvm/CodeGen/SlotIndexes.h | ||
---|---|---|
621 | I am not sure I understand the patch. Admittedly, that behavior is weird (because that means the users of this method must make sure to split/join the blocks accordingly), but this is what the comment says! Side-comment: Is that code reachable? A quick grep tells me that InsertionPoint is never passed around. I.e., we should just delete it. |
llvm/include/llvm/CodeGen/SlotIndexes.h | ||
---|---|---|
621 | This fixes the case where an inserted block contains multiple instructions. InsertionPoint is used by MachineBasicBlock::splitAt, which I am trying to fix in D91064. Note D91064 contains tests for behaviour fixed by this patch. A couple of other changes are dependent on splitAt working correctly. |
I am not sure I understand the patch.
When InsertionPoint is set the block will be inserted before it, thus the endEntry for the block is the entry of the insertion point.
Admittedly, that behavior is weird (because that means the users of this method must make sure to split/join the blocks accordingly), but this is what the comment says!
Side-comment: Is that code reachable? A quick grep tells me that InsertionPoint is never passed around. I.e., we should just delete it.