aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/PreAllocSplitting.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/PreAllocSplitting.cpp')
-rw-r--r--lib/CodeGen/PreAllocSplitting.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/CodeGen/PreAllocSplitting.cpp b/lib/CodeGen/PreAllocSplitting.cpp
index 6b37637ee9..3c8257f1da 100644
--- a/lib/CodeGen/PreAllocSplitting.cpp
+++ b/lib/CodeGen/PreAllocSplitting.cpp
@@ -1127,9 +1127,11 @@ bool PreAllocSplitting::Rematerialize(unsigned vreg, VNInfo* ValNo,
LIs->InsertMachineInstrInMaps(prior(RestorePt), RestoreIdx);
if (KillPt->getParent() == BarrierMBB) {
- UpdateRegisterInterval(ValNo, LIs->getUseIndex(KillIdx)+1,
+ VNInfo* After = UpdateRegisterInterval(ValNo, LIs->getUseIndex(KillIdx)+1,
LIs->getDefIndex(RestoreIdx));
+ RenumberValno(After);
+
++NumSplits;
++NumRemats;
return true;
@@ -1312,9 +1314,11 @@ bool PreAllocSplitting::SplitRegLiveInterval(LiveInterval *LI) {
UpdateSpillSlotInterval(ValNo, LIs->getUseIndex(SpillIndex)+1,
LIs->getDefIndex(RestoreIndex));
- UpdateRegisterInterval(ValNo, LIs->getUseIndex(SpillIndex)+1,
+ VNInfo* After = UpdateRegisterInterval(ValNo,
+ LIs->getUseIndex(SpillIndex)+1,
LIs->getDefIndex(RestoreIndex));
-
+ RenumberValno(After);
+
++NumSplits;
return true;
}