[llvm-commits] [llvm] r110995 - /llvm/trunk/lib/CodeGen/SplitKit.cpp

Jakob Stoklund Olesen stoklund at 2pi.dk
Thu Aug 12 18:05:26 PDT 2010


Author: stoklund
Date: Thu Aug 12 20:05:26 2010
New Revision: 110995

URL: http://llvm.org/viewvc/llvm-project?rev=110995&view=rev
Log:
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.

Modified:
    llvm/trunk/lib/CodeGen/SplitKit.cpp

Modified: llvm/trunk/lib/CodeGen/SplitKit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SplitKit.cpp?rev=110995&r1=110994&r2=110995&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SplitKit.cpp (original)
+++ llvm/trunk/lib/CodeGen/SplitKit.cpp Thu Aug 12 20:05:26 2010
@@ -465,9 +465,6 @@
     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 @@
 
   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;





More information about the llvm-commits mailing list