[llvm-commits] CVS: llvm/lib/CodeGen/LiveIntervals.cpp

Alkis Evlogimenos alkis at niobe.cs.uiuc.edu
Tue Feb 17 21:36:01 PST 2004


Changes in directory llvm/lib/CodeGen:

LiveIntervals.cpp updated: 1.52 -> 1.53

---
Log message:

Fix overly conservative spill interval computation.

---
Diffs of the changes:  (+3 -4)

Index: llvm/lib/CodeGen/LiveIntervals.cpp
diff -u llvm/lib/CodeGen/LiveIntervals.cpp:1.52 llvm/lib/CodeGen/LiveIntervals.cpp:1.53
--- llvm/lib/CodeGen/LiveIntervals.cpp:1.52	Mon Feb 16 22:04:20 2004
+++ llvm/lib/CodeGen/LiveIntervals.cpp	Tue Feb 17 21:35:38 2004
@@ -191,10 +191,9 @@
                 if (mop.isRegister()) {
                     unsigned reg = mop.getReg();
                     if (rep(reg) == li.reg) {
-                        if (mop.isUse())
-                            li.addRange(index, index+2);
-                        else
-                            li.addRange(index+1, index+2);
+                        unsigned start = mop.isUse() ? index : index+1;
+                        unsigned end = mop.isDef() ? index+2 : index+1;
+                        li.addRange(start, end);
                     }
                 }
             }





More information about the llvm-commits mailing list