aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/LiveIntervalAnalysis.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-04-07 18:43:14 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-04-07 18:43:14 +0000
commite815dab69f57da3f0ff365709491c7409cbb71bd (patch)
tree67a02ac9edb7191a1eaa4f11f6472ef4104ee74d /lib/CodeGen/LiveIntervalAnalysis.cpp
parent4d4e25740bd1225f413a10db6166b620d2f5fbbb (diff)
Recompute hasPHIKill flags when shrinking live intervals.
PHI values may be deleted, causing the flags to be wrong. This fixes PR9616. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129092 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r--lib/CodeGen/LiveIntervalAnalysis.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp
index 07f83ea7ce..c77ae1b7a7 100644
--- a/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/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));
}
}