Make load->store deletion a bit smarter. This allows us to compile this:
[oota-llvm.git] / lib / CodeGen / LiveInterval.cpp
index 5b855aa19383d499be09d71d0599ed5c2e9947b1..d4c572154be836785cb8af8455ac40446d37978b 100644 (file)
@@ -2,8 +2,8 @@
 //
 //                     The LLVM Compiler Infrastructure
 //
-// This file was developed by the LLVM research group and is distributed under
-// the University of Illinois Open Source License. See LICENSE.TXT for details.
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 //
@@ -206,6 +206,9 @@ LiveInterval::addRangeFrom(LiveRange LR, iterator From) {
         // endpoint as well.
         if (End > it->end)
           extendIntervalEndTo(it, End);
+        else if (End < it->end)
+          // Overlapping intervals, there might have been a kill here.
+          removeKill(it->valno, End);
         return it;
       }
     } else {
@@ -628,6 +631,8 @@ void LiveInterval::print(std::ostream &OS, const MRegisterInfo *MRI) const {
             if (j != ee-1)
               OS << " ";
           }
+          if (vni->hasPHIKill)
+            OS << " phi";
           OS << ")";
         }
       }