This is an archive of the discontinued LLVM Phabricator instance.

[SlotIndexes] Fix and simplify basic block splitting
ClosedPublic

Authored by foad on Jan 8 2021, 8:03 AM.

Details

Summary

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!

Diff Detail

Event Timeline

foad created this revision.Jan 8 2021, 8:03 AM
foad requested review of this revision.Jan 8 2021, 8:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 8 2021, 8:03 AM
foad added a comment.Jan 8 2021, 8:03 AM

This is intended to supersede D91066 and D91064.

critson accepted this revision.Jan 11 2021, 5:57 PM

LGTM

This revision is now accepted and ready to land.Jan 11 2021, 5:57 PM
This revision was landed with ongoing or failed builds.Jan 12 2021, 3:02 AM
This revision was automatically updated to reflect the committed changes.