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

Alkis Evlogimenos alkis at niobe.cs.uiuc.edu
Sat Feb 21 23:48:00 PST 2004


Changes in directory llvm/lib/CodeGen:

RegAllocLinearScan.cpp updated: 1.54 -> 1.55
LiveIntervals.cpp updated: 1.60 -> 1.61

---
Log message:

Print basic block boundaries in machine instruction debug output.


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

Index: llvm/lib/CodeGen/RegAllocLinearScan.cpp
diff -u llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.54 llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.55
--- llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.54	Fri Feb 20 00:41:12 2004
+++ llvm/lib/CodeGen/RegAllocLinearScan.cpp	Sat Feb 21 23:46:04 2004
@@ -360,6 +360,7 @@
     DEBUG(
         for (MachineFunction::iterator mbbi = mf_->begin(), mbbe = mf_->end();
              mbbi != mbbe; ++mbbi) {
+            std::cerr << mbbi->getBasicBlock()->getName() << ":\n";
             for (MachineBasicBlock::iterator mii = mbbi->begin(),
                      mie = mbbi->end(); mii != mie; ++mii) {
                 unsigned index = li_->getInstructionIndex(mii);


Index: llvm/lib/CodeGen/LiveIntervals.cpp
diff -u llvm/lib/CodeGen/LiveIntervals.cpp:1.60 llvm/lib/CodeGen/LiveIntervals.cpp:1.61
--- llvm/lib/CodeGen/LiveIntervals.cpp:1.60	Sat Feb 21 22:05:12 2004
+++ llvm/lib/CodeGen/LiveIntervals.cpp	Sat Feb 21 23:46:04 2004
@@ -171,10 +171,13 @@
                     std::ostream_iterator<Interval>(std::cerr, "\n")));
     DEBUG(std::cerr << "********** MACHINEINSTRS **********\n");
     DEBUG(
-        for (unsigned i = 0; i != i2miMap_.size(); ++i) {
-            if (const MachineInstr* mi = i2miMap_[i]) {
-                std:: cerr << i * InstrSlots::NUM << '\t';
-                mi->print(std::cerr, *tm_);
+        for (MachineFunction::iterator mbbi = mf_->begin(), mbbe = mf_->end();
+             mbbi != mbbe; ++mbbi) {
+            std::cerr << mbbi->getBasicBlock()->getName() << ":\n";
+            for (MachineBasicBlock::iterator mii = mbbi->begin(),
+                     mie = mbbi->end(); mii != mie; ++mii) {
+                std::cerr << getInstructionIndex(mii) << '\t';
+                mii->print(std::cerr, *tm_);
             }
         });
 





More information about the llvm-commits mailing list