summaryrefslogtreecommitdiff
path: root/lib/CodeGen/LiveIntervalAnalysis.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-03-03 00:20:51 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-03-03 00:20:51 +0000
commitc29d9b3495a2d87af524ad5c4b62f46c4265d828 (patch)
treeee2282903de441de2f49496ac1334abac26e43b7 /lib/CodeGen/LiveIntervalAnalysis.cpp
parent44456e86c866d51871fb77dffcbe55054f6e049c (diff)
downloadllvm-c29d9b3495a2d87af524ad5c4b62f46c4265d828.tar.gz
llvm-c29d9b3495a2d87af524ad5c4b62f46c4265d828.tar.bz2
llvm-c29d9b3495a2d87af524ad5c4b62f46c4265d828.tar.xz
Fix PHI handling in LiveIntervals::shrinkToUses().
We need to wait until we meet a PHIDef in its defining block before resurrecting PHIKills in the predecessors. This should unbreak the llvm-gcc-build-x86_64-darwin10-x-mingw32-x-armeabi bot. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126905 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r--lib/CodeGen/LiveIntervalAnalysis.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp
index 92829b1ea4..d326729920 100644
--- a/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -797,7 +797,7 @@ void LiveIntervals::shrinkToUses(LiveInterval *li) {
(void)ExtVNI;
assert(ExtVNI == VNI && "Unexpected existing value number");
// Is this a PHIDef we haven't seen before?
- if (!VNI->isPHIDef() || !UsedPHIs.insert(VNI))
+ if (!VNI->isPHIDef() || VNI->def != BlockStart || !UsedPHIs.insert(VNI))
continue;
// The PHI is live, make sure the predecessors are live-out.
for (MachineBasicBlock::const_pred_iterator PI = MBB->pred_begin(),