[all-commits] [llvm/llvm-project] f264f9: [SlotIndexes] Fix and simplify basic block splitting

Jay Foad via All-commits all-commits at lists.llvm.org
Tue Jan 12 03:02:00 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f264f9ad7df538357dfc8c5f318c5c8b0df3d99f
      https://github.com/llvm/llvm-project/commit/f264f9ad7df538357dfc8c5f318c5c8b0df3d99f
  Author: Jay Foad <jay.foad at amd.com>
  Date:   2021-01-12 (Tue, 12 Jan 2021)

  Changed paths:
    M llvm/include/llvm/CodeGen/LiveIntervals.h
    M llvm/include/llvm/CodeGen/SlotIndexes.h
    M llvm/lib/CodeGen/MachineBasicBlock.cpp
    M llvm/unittests/MI/LiveIntervalTest.cpp

  Log Message:
  -----------
  [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




More information about the All-commits mailing list