Don't transfer unused values to the new intervals formed by splitting.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Fri, 29 Oct 2010 17:47:49 +0000 (17:47 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Fri, 29 Oct 2010 17:47:49 +0000 (17:47 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117673 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SplitKit.cpp

index 84d3003859be372a1dbb6c8c8d7565f77371d2f9..763cce82519b218b987c2e974bbe84bb8ffb7ae3 100644 (file)
@@ -913,6 +913,9 @@ void SplitEditor::computeRemainder() {
   for (LiveInterval::const_vni_iterator I = parent.vni_begin(),
        E = parent.vni_end(); I != E; ++I) {
     const VNInfo *VNI = *I;
+    // Don't transfer unused values to the new intervals.
+    if (VNI->isUnused())
+      continue;
     // Original def is contained in the split intervals.
     if (intervalsLiveAt(VNI->def)) {
       // Did this value escape?