[llvm-commits] [llvm] r62639 - in /llvm/trunk: lib/CodeGen/PreAllocSplitting.cpp test/CodeGen/X86/pre-split2.ll

Owen Anderson resistor at mac.com
Tue Jan 20 16:13:28 PST 2009


Author: resistor
Date: Tue Jan 20 18:13:28 2009
New Revision: 62639

URL: http://llvm.org/viewvc/llvm-project?rev=62639&view=rev
Log:
Be more aggressive about renumbering vregs after splitting them.

Modified:
    llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp
    llvm/trunk/test/CodeGen/X86/pre-split2.ll

Modified: llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp?rev=62639&r1=62638&r2=62639&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp (original)
+++ llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp Tue Jan 20 18:13:28 2009
@@ -1127,9 +1127,11 @@
   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 @@
     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;
   }

Modified: llvm/trunk/test/CodeGen/X86/pre-split2.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/pre-split2.ll?rev=62639&r1=62638&r2=62639&view=diff

==============================================================================
--- llvm/trunk/test/CodeGen/X86/pre-split2.ll (original)
+++ llvm/trunk/test/CodeGen/X86/pre-split2.ll Tue Jan 20 18:13:28 2009
@@ -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:





More information about the llvm-commits mailing list