aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineInstr.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-12-30 21:31:53 +0000
committerChris Lattner <sabre@nondot.org>2007-12-30 21:31:53 +0000
commite3087890ac7f2fcf4697f8e09091e9a384311b9c (patch)
tree009374dad6c6816e3042d75ece22c57ebd75acb4 /include/llvm/CodeGen/MachineInstr.h
parent1c3e1e2ed07597111f0b1b1bb93b8080c96c526b (diff)
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
Diffstat (limited to 'include/llvm/CodeGen/MachineInstr.h')
-rw-r--r--include/llvm/CodeGen/MachineInstr.h12
1 files changed, 5 insertions, 7 deletions
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