Dead code elimination may separate the live interval into multiple connected components.

I have convinced myself that it can only happen when a phi value dies. When it
happens, allocate new virtual registers for the components.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127827 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/SplitKit.cpp b/lib/CodeGen/SplitKit.cpp
index 6f7b972..ff00bd8 100644
--- a/lib/CodeGen/SplitKit.cpp
+++ b/lib/CodeGen/SplitKit.cpp
@@ -538,11 +538,11 @@
 
   // Create the complement as index 0.
   if (Edit->empty())
-    Edit->create(MRI, LIS, VRM);
+    Edit->create(LIS, VRM);
 
   // Create the open interval.
   OpenIdx = Edit->size();
-  Edit->create(MRI, LIS, VRM);
+  Edit->create(LIS, VRM);
 }
 
 SlotIndex SplitEditor::enterIntvBefore(SlotIndex Idx) {
@@ -802,7 +802,7 @@
   if (Dead.empty())
     return;
 
-  Edit->eliminateDeadDefs(Dead, LIS, TII);
+  Edit->eliminateDeadDefs(Dead, LIS, VRM, TII);
 }
 
 void SplitEditor::finish() {
@@ -866,7 +866,7 @@
     SmallVector<LiveInterval*, 8> dups;
     dups.push_back(li);
     for (unsigned i = 1; i != NumComp; ++i)
-      dups.push_back(&Edit->create(MRI, LIS, VRM));
+      dups.push_back(&Edit->create(LIS, VRM));
     ConEQ.Distribute(&dups[0], MRI);
   }