Add SplitEditor::overlapIntv() to create small ranges where both registers are live.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Tue, 8 Feb 2011 18:50:21 +0000 (18:50 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Tue, 8 Feb 2011 18:50:21 +0000 (18:50 +0000)
commit5c716bdccce2fa504e1aa0b67226165d181d2459
treea3521d6a1e177037b2e620c3585ed3f0a462cd0a
parent01cb34b0111a1e8792f327b56c51bc3bbaf83aca
Add SplitEditor::overlapIntv() to create small ranges where both registers are live.

If a live range is used by a terminator instruction, and that live range needs
to leave the block on the stack or in a different register, it can be necessary
to have both sides of the split live at the terminator instruction.

Example:

  %vreg2 = COPY %vreg1
  JMP %vreg1

Becomes after spilling %vreg2:

  SPILL %vreg1
  JMP %vreg1

The spill doesn't kill the register as is normally the case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125102 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/RegAllocGreedy.cpp
lib/CodeGen/SplitKit.cpp
lib/CodeGen/SplitKit.h