summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/LiveVariables.h
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-04-17 20:22:11 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-04-17 20:22:11 +0000
commit38b7ca6651643f1f98e1f7b0e7f8a3499883804b (patch)
tree6f7fc0bf2581c1163214bdc1aa3f0f7bfa6423eb /include/llvm/CodeGen/LiveVariables.h
parente060b5385f29ea36a9736bfa509b5a7644932ec3 (diff)
downloadllvm-38b7ca6651643f1f98e1f7b0e7f8a3499883804b.tar.gz
llvm-38b7ca6651643f1f98e1f7b0e7f8a3499883804b.tar.bz2
llvm-38b7ca6651643f1f98e1f7b0e7f8a3499883804b.tar.xz
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
Diffstat (limited to 'include/llvm/CodeGen/LiveVariables.h')
-rw-r--r--include/llvm/CodeGen/LiveVariables.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/LiveVariables.h b/include/llvm/CodeGen/LiveVariables.h
index d98ad34735..6c58815e27 100644
--- a/include/llvm/CodeGen/LiveVariables.h
+++ b/include/llvm/CodeGen/LiveVariables.h
@@ -83,12 +83,16 @@ public:
/// is a bit set which uses the basic block number as an index.
BitVector UsedBlocks;
+ /// NumUses - Number of uses of this register across the entire function.
+ ///
+ unsigned NumUses;
+
/// Kills - List of MachineInstruction's which are the last use of this
/// virtual register (kill it) in their basic block.
///
std::vector<MachineInstr*> Kills;
- VarInfo() : DefInst(0) {}
+ VarInfo() : DefInst(0), NumUses(0) {}
/// removeKill - Delete a kill corresponding to the specified
/// machine instruction. Returns true if there was a kill