llvm.org GIT mirror llvm / e8f4ac2
Update VarInfo's comments to reflect the current code. LiveVar no longer records a unique defining instruction, and virtual registers may have multiple kills while still being defined and killed in the same block. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59145 91177308-0d34-0410-b5e6-96231b3b80d8 Dan Gohman 11 years ago
1 changed file(s) with 13 addition(s) and 16 deletion(s). Raw diff Collapse all Expand all
4646
4747 /// VarInfo - This represents the regions where a virtual register is live in
4848 /// the program. We represent this with three different pieces of
49 /// information: the instruction that uniquely defines the value, the set of
50 /// blocks the instruction is live into and live out of, and the set of
51 /// non-phi instructions that are the last users of the value.
52 ///
53 /// In the common case where a value is defined and killed in the same block,
54 /// There is one killing instruction, and AliveBlocks is empty.
55 ///
56 /// Otherwise, the value is live out of the block. If the value is live
57 /// across any blocks, these blocks are listed in AliveBlocks. Blocks where
58 /// the liveness range ends are not included in AliveBlocks, instead being
59 /// captured by the Kills set. In these blocks, the value is live into the
60 /// block (unless the value is defined and killed in the same block) and lives
61 /// until the specified instruction. Note that there cannot ever be a value
62 /// whose Kills set contains two instructions from the same basic block.
49 /// information: the set of blocks in which the instruction is live
50 /// throughout, the set of blocks in which the instruction is actually used,
51 /// and the set of non-phi instructions that are the last users of the value.
52 ///
53 /// If the value is live throughout any blocks, these blocks are listed in
54 /// AliveBlocks. Blocks where the liveness range ends are not included in
55 /// AliveBlocks, instead being captured by the Kills set. In these blocks,
56 /// the value is live into the block (unless the value is defined and killed
57 /// in the same block) and lives until the specified instruction. Note that
58 /// there cannot ever be a value whose Kills set contains two instructions
59 /// from the same basic block.
6360 ///
6461 /// PHI nodes complicate things a bit. If a PHI node is the last user of a
6562 /// value in one of its predecessor blocks, it is not listed in the kills set,
7168 /// included). This is sensical because the value must be live to the end of
7269 /// the block, but is not live in any successor blocks.
7370 struct VarInfo {
74 /// AliveBlocks - Set of blocks of which this value is alive completely
71 /// AliveBlocks - Set of blocks in which this value is alive completely
7572 /// through. This is a bit set which uses the basic block number as an
7673 /// index.
7774 ///
7875 BitVector AliveBlocks;
7976
80 /// UsedBlocks - Set of blocks of which this value is actually used. This
77 /// UsedBlocks - Set of blocks in which this value is actually used. This
8178 /// is a bit set which uses the basic block number as an index.
8279 BitVector UsedBlocks;
8380