summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SplitKit.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2010-08-13 01:05:26 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2010-08-13 01:05:26 +0000
commit3d1027e7a1b36be04a293fab2482e1134a58cfd8 (patch)
tree38562c15327f085e99150696843dc918566d130f /llvm/lib/CodeGen/SplitKit.cpp
parent840b81a19e6c425c3570e2aa62ea04f5a6ac9adc (diff)
downloadbcm5719-llvm-3d1027e7a1b36be04a293fab2482e1134a58cfd8.tar.gz
bcm5719-llvm-3d1027e7a1b36be04a293fab2482e1134a58cfd8.zip
Let LiveInterval::addRange extend existing ranges, it will verify that value
numbers match. The old check could accidentally leave holes in openli. Also let useIntv add all ranges for the phi-def value inserted by enterIntvAtEnd. This works as long at the value mapping is established in enterIntvAtEnd. llvm-svn: 110995
Diffstat (limited to 'llvm/lib/CodeGen/SplitKit.cpp')
-rw-r--r--llvm/lib/CodeGen/SplitKit.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/SplitKit.cpp b/llvm/lib/CodeGen/SplitKit.cpp
index 5193cf4ad0d..8ec2e1ee5b4 100644
--- a/llvm/lib/CodeGen/SplitKit.cpp
+++ b/llvm/lib/CodeGen/SplitKit.cpp
@@ -465,9 +465,6 @@ void SplitEditor::enterIntvAtEnd(MachineBasicBlock &A, MachineBasicBlock &B) {
VNIB = openli_->getNextValue(SlotIndex(StartB, true), 0, false,
lis_.getVNInfoAllocator());
VNIB->setIsPHIDef(true);
- // Add a minimal range for the new value.
- openli_->addRange(LiveRange(VNIB->def, std::min(EndB, CurB->end), VNIB));
-
VNInfo *&mapVNI = valueMap_[CurB->valno];
if (mapVNI) {
// Multiple copies - must create PHI value.
@@ -496,8 +493,8 @@ void SplitEditor::useIntv(SlotIndex Start, SlotIndex End) {
if (I != B) {
--I;
- // I begins before Start, but overlaps. openli may already have a value.
- if (I->end > Start && !openli_->liveAt(Start))
+ // I begins before Start, but overlaps.
+ if (I->end > Start)
openli_->addRange(LiveRange(Start, std::min(End, I->end),
mapValue(I->valno)));
++I;
OpenPOWER on IntegriCloud