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

Alkis Evlogimenos alkis at cs.uiuc.edu
Thu Nov 13 03:51:01 PST 2003


Changes in directory llvm/lib/CodeGen:

RegAllocLinearScan.cpp updated: 1.1.2.11 -> 1.1.2.12

---
Log message:

Add assertion in reservePhysicalRegister.


---
Diffs of the changes:  (+2 -1)

Index: llvm/lib/CodeGen/RegAllocLinearScan.cpp
diff -u llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.1.2.11 llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.1.2.12
--- llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.1.2.11	Wed Nov 12 00:49:55 2003
+++ llvm/lib/CodeGen/RegAllocLinearScan.cpp	Thu Nov 13 03:49:50 2003
@@ -508,7 +508,8 @@
           << mri_->getName(physReg) << '\n');
     // if this register holds a value spill it
     unsigned virtReg = p2vMap_[physReg];
-    if (virtReg != 0 && virtReg != physReg) {
+    if (virtReg != 0) {
+        assert(virtReg != physReg && "reserving an already reserved phus reg?");
         // remove interval from active
         for (IntervalPtrs::iterator i = active_.begin(), e = active_.end();
              i != e; ++i) {





More information about the llvm-commits mailing list