diff options
author | Vikram S. Adve <vadve@cs.uiuc.edu> | 2001-08-28 23:11:46 +0000 |
---|---|---|
committer | Vikram S. Adve <vadve@cs.uiuc.edu> | 2001-08-28 23:11:46 +0000 |
commit | 136c9f4062b0fe6d864ebc2bc2b0cbada931a28e (patch) | |
tree | 4121a7362f14564d4a683612461de86a2995f915 /include/llvm/CodeGen/MachineInstr.h | |
parent | 24084be5f2c94f0a988d5c8d302047b69b21a9a8 (diff) |
Added function MachineInstr::operandIsDefined(i) and decl for
function PrintMachineInstructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@399 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineInstr.h')
-rw-r--r-- | include/llvm/CodeGen/MachineInstr.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h index 83c29ed939..fbb3106810 100644 --- a/include/llvm/CodeGen/MachineInstr.h +++ b/include/llvm/CodeGen/MachineInstr.h @@ -133,10 +133,8 @@ private: void InitializeReg (unsigned int regNum); friend class MachineInstr; - friend class ValOpIterator<const MachineInstr, const Value>; - - //friend class MachineInstr::val_op_const_iterator; - //friend class MachineInstr::val_op_iterator; + friend class ValOpIterator<const MachineInstr, const Value>; + friend class ValOpIterator< MachineInstr, Value>; }; @@ -243,6 +241,8 @@ public: const MachineOperand& getOperand (unsigned int i) const; MachineOperand& getOperand (unsigned int i); + bool operandIsDefined(unsigned int i) const; + void dump (unsigned int indent = 0) const; public: @@ -289,6 +289,12 @@ MachineInstr::getOperand(unsigned int i) const return operands[i]; } +inline bool +MachineInstr::operandIsDefined(unsigned int i) const +{ + return getOperand(i).opIsDef(); +} + template<class _MI, class _V> class ValOpIterator : public std::forward_iterator<_V, ptrdiff_t> { @@ -448,12 +454,16 @@ MachineOperand::MachineOperandType unsigned int& getMachineRegNum, int64_t& getImmedValue); + ostream& operator<<(ostream& os, const MachineInstr& minstr); ostream& operator<<(ostream& os, const MachineOperand& mop); +void PrintMachineInstructions (Method* method); + + //**************************************************************************/ #endif |