mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-23 14:25:07 +00:00
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
This commit is contained in:
@@ -133,10 +133,8 @@ private:
|
|||||||
void InitializeReg (unsigned int regNum);
|
void InitializeReg (unsigned int regNum);
|
||||||
|
|
||||||
friend class MachineInstr;
|
friend class MachineInstr;
|
||||||
friend class ValOpIterator<const MachineInstr, const Value>;
|
friend class ValOpIterator<const MachineInstr, const Value>;
|
||||||
|
friend class ValOpIterator< MachineInstr, Value>;
|
||||||
//friend class MachineInstr::val_op_const_iterator;
|
|
||||||
//friend class MachineInstr::val_op_iterator;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -243,6 +241,8 @@ public:
|
|||||||
const MachineOperand& getOperand (unsigned int i) const;
|
const MachineOperand& getOperand (unsigned int i) const;
|
||||||
MachineOperand& getOperand (unsigned int i);
|
MachineOperand& getOperand (unsigned int i);
|
||||||
|
|
||||||
|
bool operandIsDefined(unsigned int i) const;
|
||||||
|
|
||||||
void dump (unsigned int indent = 0) const;
|
void dump (unsigned int indent = 0) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -289,6 +289,12 @@ MachineInstr::getOperand(unsigned int i) const
|
|||||||
return operands[i];
|
return operands[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline bool
|
||||||
|
MachineInstr::operandIsDefined(unsigned int i) const
|
||||||
|
{
|
||||||
|
return getOperand(i).opIsDef();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class _MI, class _V>
|
template<class _MI, class _V>
|
||||||
class ValOpIterator : public std::forward_iterator<_V, ptrdiff_t> {
|
class ValOpIterator : public std::forward_iterator<_V, ptrdiff_t> {
|
||||||
@@ -448,12 +454,16 @@ MachineOperand::MachineOperandType
|
|||||||
unsigned int& getMachineRegNum,
|
unsigned int& getMachineRegNum,
|
||||||
int64_t& getImmedValue);
|
int64_t& getImmedValue);
|
||||||
|
|
||||||
|
|
||||||
ostream& operator<<(ostream& os, const MachineInstr& minstr);
|
ostream& operator<<(ostream& os, const MachineInstr& minstr);
|
||||||
|
|
||||||
|
|
||||||
ostream& operator<<(ostream& os, const MachineOperand& mop);
|
ostream& operator<<(ostream& os, const MachineOperand& mop);
|
||||||
|
|
||||||
|
|
||||||
|
void PrintMachineInstructions (Method* method);
|
||||||
|
|
||||||
|
|
||||||
//**************************************************************************/
|
//**************************************************************************/
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user