From be7a29de0b54dd1d4d79b0652b42cab1fc106b20 Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Wed, 21 Jan 2009 00:13:28 +0000 Subject: Be more aggressive about renumbering vregs after splitting them. llvm-svn: 62639 --- llvm/lib/CodeGen/PreAllocSplitting.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'llvm/lib/CodeGen') diff --git a/llvm/lib/CodeGen/PreAllocSplitting.cpp b/llvm/lib/CodeGen/PreAllocSplitting.cpp index 6b37637ee95..3c8257f1dac 100644 --- a/llvm/lib/CodeGen/PreAllocSplitting.cpp +++ b/llvm/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; } -- cgit v1.2.3