Count references to interference cache entries.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Thu, 14 Jul 2011 00:31:14 +0000 (00:31 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Thu, 14 Jul 2011 00:31:14 +0000 (00:31 +0000)
commit6a9feaac935c9345f825b272cf3225248e282f3f
tree3dea0c08b277f98940c0512fa9c95bc77a20f5c3
parent7e9450107148895cd882dbaa21f17727b876998a
Count references to interference cache entries.

Each InterferenceCache::Cursor instance references a cache entry. A
non-zero reference count guarantees that the entry won't be reused for a
new register.

This makes it possible to have multiple live cursors examining
interference for different physregs.

The total number of live cursors into a cache must be kept below
InterferenceCache::getMaxCursors().

Code generation should be unaffected by this change, and it doesn't seem
to affect the cache replacement strategy either.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135121 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/InterferenceCache.cpp
lib/CodeGen/InterferenceCache.h
lib/CodeGen/RegAllocGreedy.cpp