When inserting copies during splitting, always use the parent register as the
source, and let rewrite() clean it up.
This way, kill flags on the inserted copies are fixed as well during rewrite().
We can't just assume that all the copies we insert are going to be kills since
critical edges into loop headers sometimes require both source and dest to be
live out of a block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117980 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/SplitKit.h b/lib/CodeGen/SplitKit.h
index 9a7fa53..395df75 100644
--- a/lib/CodeGen/SplitKit.h
+++ b/lib/CodeGen/SplitKit.h
@@ -246,12 +246,12 @@
/// beforehand so mapValue will work.
void addRange(SlotIndex Start, SlotIndex End);
- /// defByCopyFrom - Insert a copy from Reg to li, assuming that Reg carries
- /// ParentVNI. Add a minimal live range for the new value and return it.
- VNInfo *defByCopyFrom(unsigned Reg,
- const VNInfo *ParentVNI,
- MachineBasicBlock &MBB,
- MachineBasicBlock::iterator I);
+ /// defByCopy- Insert a copy from parentli to li, assuming that ParentVNI is
+ /// live at the insert location. Add a minimal live range for the new value
+ /// and return it.
+ VNInfo *defByCopy(const VNInfo *ParentVNI,
+ MachineBasicBlock &MBB,
+ MachineBasicBlock::iterator I);
};