diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-04-07 18:43:14 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-04-07 18:43:14 +0000 |
commit | 64beb47783d4ebc9b6b33993672cea1c6fa262ae (patch) | |
tree | 00d8cf1394f6d069316e94523b011eea0819dcc5 /llvm/lib | |
parent | 4f3a28b38777ff30562e23d99b68fcfc8edb001f (diff) | |
download | bcm5719-llvm-64beb47783d4ebc9b6b33993672cea1c6fa262ae.tar.gz bcm5719-llvm-64beb47783d4ebc9b6b33993672cea1c6fa262ae.zip |
Recompute hasPHIKill flags when shrinking live intervals.
PHI values may be deleted, causing the flags to be wrong. This fixes PR9616.
llvm-svn: 129092
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/LiveIntervalAnalysis.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp index 07f83ea7cef..c77ae1b7a79 100644 --- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -787,6 +787,8 @@ bool LiveIntervals::shrinkToUses(LiveInterval *li, VNInfo *VNI = *I; if (VNI->isUnused()) continue; + // We may eliminate PHI values, so recompute PHIKill flags. + VNI->setHasPHIKill(false); NewLI.addRange(LiveRange(VNI->def, VNI->def.getNextSlot(), VNI)); // A use tied to an early-clobber def ends at the load slot and isn't caught @@ -822,7 +824,7 @@ bool LiveIntervals::shrinkToUses(LiveInterval *li, VNInfo *PVNI = li->getVNInfoAt(Stop); // A predecessor is not required to have a live-out value for a PHI. if (PVNI) { - assert(PVNI->hasPHIKill() && "Missing hasPHIKill flag"); + PVNI->setHasPHIKill(true); WorkList.push_back(std::make_pair(Stop, PVNI)); } } |