summaryrefslogtreecommitdiff
path: root/lib/CodeGen/SplitKit.h
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-05-29 21:24:39 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-05-29 21:24:39 +0000
commit626d6fb1903e74337b257c5e165944bcd1273e65 (patch)
tree97aa5c47945772c89decee6c13919b1904f7038f /lib/CodeGen/SplitKit.h
parent57903357ee4f9fed47dcad6f3739414301136b0f (diff)
downloadllvm-626d6fb1903e74337b257c5e165944bcd1273e65.tar.gz
llvm-626d6fb1903e74337b257c5e165944bcd1273e65.tar.bz2
llvm-626d6fb1903e74337b257c5e165944bcd1273e65.tar.xz
Revert r132245, "Create two BlockInfo entries when a live range is discontinuous through a block."
This commit seems to have broken a darwin 9 tester. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132299 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SplitKit.h')
-rw-r--r--lib/CodeGen/SplitKit.h21
1 files changed, 6 insertions, 15 deletions
diff --git a/lib/CodeGen/SplitKit.h b/lib/CodeGen/SplitKit.h
index 7174c0b55f..dc27486e73 100644
--- a/lib/CodeGen/SplitKit.h
+++ b/lib/CodeGen/SplitKit.h
@@ -63,22 +63,17 @@ public:
/// 1. | o---x | Internal to block. Variable is only live in this block.
/// 2. |---x | Live-in, kill.
/// 3. | o---| Def, live-out.
- /// 4. |---x o---| Live-in, kill, def, live-out. Counted by NumGapBlocks.
+ /// 4. |---x o---| Live-in, kill, def, live-out.
/// 5. |---o---o---| Live-through with uses or defs.
- /// 6. |-----------| Live-through without uses. Counted by NumThroughBlocks.
- ///
- /// Two BlockInfo entries are created for template 4. One for the live-in
- /// segment, and one for the live-out segment. These entries look as if the
- /// block were split in the middle where the live range isn't live.
- ///
- /// Live-through blocks without any uses don't get BlockInfo entries. They
- /// are simply listed in ThroughBlocks instead.
+ /// 6. |-----------| Live-through without uses. Transparent.
///
struct BlockInfo {
MachineBasicBlock *MBB;
SlotIndex FirstUse; ///< First instr using current reg.
SlotIndex LastUse; ///< Last instr using current reg.
- bool LiveThrough; ///< Live in whole block (Templ 5. above).
+ SlotIndex Kill; ///< Interval end point inside block.
+ SlotIndex Def; ///< Interval start point inside block.
+ bool LiveThrough; ///< Live in whole block (Templ 5. or 6. above).
bool LiveIn; ///< Current reg is live in.
bool LiveOut; ///< Current reg is live out.
};
@@ -96,10 +91,6 @@ private:
/// UseBlocks - Blocks where CurLI has uses.
SmallVector<BlockInfo, 8> UseBlocks;
- /// NumGapBlocks - Number of duplicate entries in UseBlocks for blocks where
- /// the live range has a gap.
- unsigned NumGapBlocks;
-
/// ThroughBlocks - Block numbers where CurLI is live through without uses.
BitVector ThroughBlocks;
@@ -169,7 +160,7 @@ public:
/// getNumLiveBlocks - Return the number of blocks where CurLI is live.
unsigned getNumLiveBlocks() const {
- return getUseBlocks().size() - NumGapBlocks + getNumThroughBlocks();
+ return getUseBlocks().size() + getNumThroughBlocks();
}
/// countLiveBlocks - Return the number of blocks where li is live. This is