aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-04-18 00:36:11 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-04-18 00:36:11 +0000
commit3fefc182a00663bfadbcbe17711b6d08469c9727 (patch)
tree7ba2eb9a3986e8e8fbad0385da80933c4dc4d74f
parentb1b2f0bc44d01b33198a3aa51a64f79bad01378f (diff)
downloadexternal_llvm-3fefc182a00663bfadbcbe17711b6d08469c9727.zip
external_llvm-3fefc182a00663bfadbcbe17711b6d08469c9727.tar.gz
external_llvm-3fefc182a00663bfadbcbe17711b6d08469c9727.tar.bz2
Increment use count of new virtuals created during PHI elimination.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36233 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/PHIElimination.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/CodeGen/PHIElimination.cpp b/lib/CodeGen/PHIElimination.cpp
index 734a06f..513bfde 100644
--- a/lib/CodeGen/PHIElimination.cpp
+++ b/lib/CodeGen/PHIElimination.cpp
@@ -138,6 +138,9 @@ void PNE::LowerAtomicPHINode(MachineBasicBlock &MBB,
if (LV) {
MachineInstr *PHICopy = prior(AfterPHIsIt);
+ // Increment use count of the newly created virtual register.
+ LV->getVarInfo(IncomingReg).NumUses++;
+
// Add information to LiveVariables to know that the incoming value is
// killed. Note that because the value is defined in several places (once
// each for each incoming block), the "def" block and instruction fields