summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/RegAllocFast.cpp
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2012-04-20 20:05:28 +0000
committerAndrew Trick <atrick@apple.com>2012-04-20 20:05:28 +0000
commit1eb4a0da55cd0aac0c439d59c0ec81842033841a (patch)
treeb33a132d803342e7070a22136a2c3ca7ea6d3744 /llvm/lib/CodeGen/RegAllocFast.cpp
parent7405c6d57a837bd2d0da20ec38fbf3bbcf8fee37 (diff)
downloadbcm5719-llvm-1eb4a0da55cd0aac0c439d59c0ec81842033841a.tar.gz
bcm5719-llvm-1eb4a0da55cd0aac0c439d59c0ec81842033841a.zip
SparseSet: Add support for key-derived indexes and arbitrary key types.
This nicely handles the most common case of virtual register sets, but also handles anticipated cases where we will map pointers to IDs. The goal is not to develop a completely generic SparseSet template. Instead we want to handle the expected uses within llvm without any template antics in the client code. I'm adding a bit of template nastiness here, and some assumption about expected usage in order to make the client code very clean. The expected common uses cases I'm designing for: - integer keys that need to be reindexed, and may map to additional data - densely numbered objects where we want pointer keys because no number->object map exists. llvm-svn: 155227
Diffstat (limited to 'llvm/lib/CodeGen/RegAllocFast.cpp')
-rw-r--r--llvm/lib/CodeGen/RegAllocFast.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/RegAllocFast.cpp b/llvm/lib/CodeGen/RegAllocFast.cpp
index e09b7f8d26b..70fbfd4c5ca 100644
--- a/llvm/lib/CodeGen/RegAllocFast.cpp
+++ b/llvm/lib/CodeGen/RegAllocFast.cpp
@@ -77,7 +77,7 @@ namespace {
explicit LiveReg(unsigned v)
: LastUse(0), VirtReg(v), PhysReg(0), LastOpNum(0), Dirty(false) {}
- unsigned getSparseSetKey() const {
+ unsigned getSparseSetIndex() const {
return TargetRegisterInfo::virtReg2Index(VirtReg);
}
};
OpenPOWER on IntegriCloud