From 9607bb8439f237eb08432bda92e501c821a7c11b Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 30 Dec 2007 21:31:53 +0000 Subject: MachineOperand: - Add getParent() accessors. - Move SubReg out of the AuxInfo union, to make way for future changes. - Remove the getImmedValue/setImmedValue methods. - in some MachineOperand::Create* methods, stop initializing fields that are dead. MachineInstr: - Delete one copy of the MachineInstr printing code, now there is only one dump format and one copy of the code. - Make MachineOperand use the parent field to get info about preg register names if no target info is otherwise available. - Move def/use/kill/dead flag printing to the machineoperand printer, so they are always printed for an operand. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45460 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/MachineInstr.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'include/llvm/CodeGen/MachineInstr.h') diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h index aa7aff94bf..446cb8393f 100644 --- a/include/llvm/CodeGen/MachineInstr.h +++ b/include/llvm/CodeGen/MachineInstr.h @@ -150,14 +150,9 @@ public: void print(std::ostream *OS, const TargetMachine *TM) const { if (OS) print(*OS, TM); } - void print(std::ostream &OS, const TargetMachine *TM) const; - void print(std::ostream &OS) const; + void print(std::ostream &OS, const TargetMachine *TM = 0) const; void print(std::ostream *OS) const { if (OS) print(*OS); } void dump() const; - friend std::ostream& operator<<(std::ostream& os, const MachineInstr& minstr){ - minstr.print(os); - return os; - } //===--------------------------------------------------------------------===// // Accessors to add operands when building up machine instructions. @@ -202,7 +197,10 @@ private: //===----------------------------------------------------------------------===// // Debugging Support -std::ostream& operator<<(std::ostream &OS, const MachineInstr &MI); +inline std::ostream& operator<<(std::ostream &OS, const MachineInstr &MI) { + MI.print(OS); + return OS; +} } // End llvm namespace -- cgit v1.2.3