[llvm-commits] CVS: llvm/lib/Target/X86/FloatingPoint.cpp Printer.cpp

Tanya Brethour tbrethou at niobe.cs.uiuc.edu
Thu Jun 24 19:14:06 PDT 2004


Changes in directory llvm/lib/Target/X86:

FloatingPoint.cpp updated: 1.37 -> 1.38
Printer.cpp updated: 1.100 -> 1.101

---
Log message:

Made a fix so that you can print out MachineInstrs that belong to a MachineBasicBlock that is not yet attached to a MachineFunction. This change includes changing the third operand (TargetMachine) to a pointer for the MachineInstr::print function. 


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

Index: llvm/lib/Target/X86/FloatingPoint.cpp
diff -u llvm/lib/Target/X86/FloatingPoint.cpp:1.37 llvm/lib/Target/X86/FloatingPoint.cpp:1.38
--- llvm/lib/Target/X86/FloatingPoint.cpp:1.37	Fri Jun 11 00:22:44 2004
+++ llvm/lib/Target/X86/FloatingPoint.cpp	Thu Jun 24 19:13:11 2004
@@ -194,7 +194,7 @@
 
     ++NumFP;  // Keep track of # of pseudo instrs
     DEBUG(std::cerr << "\nFPInst:\t";
-	  MI->print(std::cerr, MF.getTarget()));
+	  MI->print(std::cerr, &(MF.getTarget())));
 
     // Get dead variables list now because the MI pointer may be deleted as part
     // of processing!
@@ -242,7 +242,7 @@
         // Rewind to first instruction newly inserted.
         while (Start != BB.begin() && prior(Start) != PrevI) --Start;
         std::cerr << "Inserted instructions:\n\t";
-        Start->print(std::cerr, MF.getTarget());
+        Start->print(std::cerr, &MF.getTarget());
         while (++Start != next(I));
       }
       dumpStack();


Index: llvm/lib/Target/X86/Printer.cpp
diff -u llvm/lib/Target/X86/Printer.cpp:1.100 llvm/lib/Target/X86/Printer.cpp:1.101
--- llvm/lib/Target/X86/Printer.cpp:1.100	Thu Jun 17 13:17:24 2004
+++ llvm/lib/Target/X86/Printer.cpp	Thu Jun 24 19:13:11 2004
@@ -936,7 +936,7 @@
     return;
   }
   default:
-    O << "\tUNKNOWN FORM:\t\t-"; MI->print(O, TM); break;
+    O << "\tUNKNOWN FORM:\t\t-"; MI->print(O, &TM); break;
   }
 }
 





More information about the llvm-commits mailing list