llvm.org GIT mirror llvm / 38b7ca6
Keep track of number of uses within the function per virtual register. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36214 91177308-0d34-0410-b5e6-96231b3b80d8 Evan Cheng 13 years ago
2 changed file(s) with 6 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
8282 /// is a bit set which uses the basic block number as an index.
8383 BitVector UsedBlocks;
8484
85 /// NumUses - Number of uses of this register across the entire function.
86 ///
87 unsigned NumUses;
88
8589 /// Kills - List of MachineInstruction's which are the last use of this
8690 /// virtual register (kill it) in their basic block.
8791 ///
8892 std::vector Kills;
8993
90 VarInfo() : DefInst(0) {}
94 VarInfo() : DefInst(0), NumUses(0) {}
9195
9296 /// removeKill - Delete a kill corresponding to the specified
9397 /// machine instruction. Returns true if there was a kill
140140 unsigned BBNum = MBB->getNumber();
141141
142142 VRInfo.UsedBlocks[BBNum] = true;
143 VRInfo.NumUses++;
143144
144145 // Check to see if this basic block is already a kill block...
145146 if (!VRInfo.Kills.empty() && VRInfo.Kills.back()->getParent() == MBB) {