Fix kill info for split intervals.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44609 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/VirtRegMap.h b/lib/CodeGen/VirtRegMap.h
index 61a9738..df32a65 100644
--- a/lib/CodeGen/VirtRegMap.h
+++ b/lib/CodeGen/VirtRegMap.h
@@ -80,7 +80,8 @@
     /// SpillPt2VirtMap - This records the virtual registers which should
     /// be spilled right after the MachineInstr due to live interval
     /// splitting.
-    std::map<MachineInstr*, std::vector<unsigned> > SpillPt2VirtMap;
+    std::map<MachineInstr*, std::vector<std::pair<unsigned,bool> > >
+    SpillPt2VirtMap;
 
     /// RestorePt2VirtMap - This records the virtual registers which should
     /// be restored right before the MachineInstr due to live interval
@@ -216,30 +217,31 @@
 
     /// @brief returns the virtual registers that should be spilled due to
     /// splitting right after the specified MachineInstr.
-    std::vector<unsigned> &getSpillPtSpills(MachineInstr *Pt) {
+    std::vector<std::pair<unsigned,bool> > &getSpillPtSpills(MachineInstr *Pt) {
       return SpillPt2VirtMap[Pt];
     }
 
     /// @brief records the specified MachineInstr as a spill point for virtReg.
-    void addSpillPoint(unsigned virtReg, MachineInstr *Pt) {
+    void addSpillPoint(unsigned virtReg, bool isKill, MachineInstr *Pt) {
       if (SpillPt2VirtMap.find(Pt) != SpillPt2VirtMap.end())
-        SpillPt2VirtMap[Pt].push_back(virtReg);
+        SpillPt2VirtMap[Pt].push_back(std::make_pair(virtReg, isKill));
       else {
-        std::vector<unsigned> Virts;
-        Virts.push_back(virtReg);
+        std::vector<std::pair<unsigned,bool> > Virts;
+        Virts.push_back(std::make_pair(virtReg, isKill));
         SpillPt2VirtMap.insert(std::make_pair(Pt, Virts));
       }
     }
 
     void transferSpillPts(MachineInstr *Old, MachineInstr *New) {
-      std::map<MachineInstr*,std::vector<unsigned> >::iterator I =
-        SpillPt2VirtMap.find(Old);
+      std::map<MachineInstr*,std::vector<std::pair<unsigned,bool> > >::iterator
+        I = SpillPt2VirtMap.find(Old);
       if (I == SpillPt2VirtMap.end())
         return;
       while (!I->second.empty()) {
-        unsigned virtReg = I->second.back();
+        unsigned virtReg = I->second.back().first;
+        bool isKill = I->second.back().second;
         I->second.pop_back();
-        addSpillPoint(virtReg, New);
+        addSpillPoint(virtReg, isKill, New);
       }
       SpillPt2VirtMap.erase(I);
     }