Reapply r135074 and r135080 with a fix.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Thu, 14 Jul 2011 00:17:10 +0000 (00:17 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Thu, 14 Jul 2011 00:17:10 +0000 (00:17 +0000)
commitc66a37df73f70ec3dbed06277763624f33ee3512
tree8508c1e84206b414e064c9cc13433c54877daf3c
parent77f379e2a100e2fe778145cc3f28c6837adee33e
Reapply r135074 and r135080 with a fix.

The cache entry referenced by the best split candidate could become
clobbered by an unsuccessful candidate.

The correct fix here is to use reference counts on the cache entries.
Coming up.

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