[llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineInstr.h

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


Changes in directory llvm/include/llvm/CodeGen:

MachineInstr.h updated: 1.149 -> 1.150

---
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:  (+8 -2)

Index: llvm/include/llvm/CodeGen/MachineInstr.h
diff -u llvm/include/llvm/CodeGen/MachineInstr.h:1.149 llvm/include/llvm/CodeGen/MachineInstr.h:1.150
--- llvm/include/llvm/CodeGen/MachineInstr.h:1.149	Sun May 23 22:14:18 2004
+++ llvm/include/llvm/CodeGen/MachineInstr.h	Thu Jun 24 19:13:06 2004
@@ -308,7 +308,13 @@
     // code.' It's not clear where the duplication is.
     assert(hasAllocatedReg() && "This operand cannot have a register number!");
     regNum = Reg;
-  }    
+  }  
+
+  void setValueReg(Value *val) {
+    assert(getVRegValueOrNull() != 0 && "Original operand must of type Value*");
+    contents.value = val;
+  }
+  
   void setImmedValue(int immVal) {
     assert(isImmediate() && "Wrong MachineOperand mutator");
     contents.immedVal = immVal;
@@ -465,7 +471,7 @@
   //
   // Debugging support
   //
-  void print(std::ostream &OS, const TargetMachine &TM) const;
+  void print(std::ostream &OS, const TargetMachine *TM) const;
   void dump() const;
   friend std::ostream& operator<<(std::ostream& os, const MachineInstr& minstr);
 





More information about the llvm-commits mailing list