diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-11-11 00:19:20 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-11-11 00:19:20 +0000 |
commit | 1e8e72d72a71ec3fb6c81bd35a34261f34436900 (patch) | |
tree | a3ce7403dd08269e717c88dea185f780c827fcef /include/llvm/CodeGen/SlotIndexes.h | |
parent | 40d438e20ab73b2fb9d1ff06b090128e70fec9e8 (diff) | |
download | llvm-1e8e72d72a71ec3fb6c81bd35a34261f34436900.tar.gz llvm-1e8e72d72a71ec3fb6c81bd35a34261f34436900.tar.bz2 llvm-1e8e72d72a71ec3fb6c81bd35a34261f34436900.tar.xz |
Insert two blank SlotIndexes between basic blocks instead of just one.
This is the first small step towards using closed intervals for liveness instead
of the half-open intervals we're using now.
We want to be able to distinguish between a SlotIndex that represents a variable
being live-out of a basic block, and an index representing a variable live-in to
its successor.
That requires two separate indexes between blocks. One for live-outs and one for
live-ins.
With this change, getMBBEndIdx(MBB).getPrevSlot() becomes stable so it stays
greater than any instructions inserted at the end of MBB.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118747 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/SlotIndexes.h')
-rw-r--r-- | include/llvm/CodeGen/SlotIndexes.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/SlotIndexes.h b/include/llvm/CodeGen/SlotIndexes.h index d207923099..c8f26544f0 100644 --- a/include/llvm/CodeGen/SlotIndexes.h +++ b/include/llvm/CodeGen/SlotIndexes.h @@ -738,6 +738,7 @@ namespace llvm { MachineFunction::iterator nextMBB = llvm::next(MachineFunction::iterator(mbb)); IndexListEntry *startEntry = createEntry(0, 0); + IndexListEntry *stopEntry = createEntry(0, 0); IndexListEntry *nextEntry = 0; if (nextMBB == mbb->getParent()->end()) { @@ -747,6 +748,7 @@ namespace llvm { } insert(nextEntry, startEntry); + insert(nextEntry, stopEntry); SlotIndex startIdx(startEntry, SlotIndex::LOAD); SlotIndex endIdx(nextEntry, SlotIndex::LOAD); |