Be more aggressive about renumbering vregs after splitting them.

llvm-svn: 62639
This commit is contained in:
Owen Anderson 2009-01-21 00:13:28 +00:00
parent 19f2dd794e
commit be7a29de0b
2 changed files with 8 additions and 4 deletions

View File

@ -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;
}

View File

@ -1,5 +1,5 @@
; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -pre-alloc-split -stats |& \
; RUN: grep {pre-alloc-split} | count 2
; RUN: grep {pre-alloc-split} | count 3
define i32 @t() {
entry: