When a virtual register is folded into an instruction, keep track of whether
it was a use, def, or both. This allows us to be less pessimistic in our
analysis of them. In practice, this doesn't make a big difference, but it
doesn't hurt either.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16632 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp
index 40b11f1..6916e96 100644
--- a/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -223,7 +223,7 @@
if (MachineInstr* fmi = mri_->foldMemoryOperand(mi, i, slot)) {
if (lv_)
lv_->instructionChanged(mi, fmi);
- vrm.virtFolded(li.reg, mi, fmi);
+ vrm.virtFolded(li.reg, mi, i, fmi);
mi2iMap_.erase(mi);
i2miMap_[index/InstrSlots::NUM] = fmi;
mi2iMap_[fmi] = index;