LLVM API Documentation

Classes | Public Member Functions | Protected Member Functions
llvm::MachineOperandIteratorBase Class Reference

#include <MachineInstrBundle.h>

Inheritance diagram for llvm::MachineOperandIteratorBase:
Inheritance graph
[legend]

List of all members.

Classes

struct  PhysRegInfo
struct  VirtRegInfo

Public Member Functions

bool isValid () const
 isValid - Returns true until all the operands have been visited.
void operator++ ()
 Preincrement. Move to the next operand.
unsigned getOperandNo () const
VirtRegInfo analyzeVirtReg (unsigned Reg, SmallVectorImpl< std::pair< MachineInstr *, unsigned > > *Ops=nullptr)
PhysRegInfo analyzePhysReg (unsigned Reg, const TargetRegisterInfo *TRI)

Protected Member Functions

 MachineOperandIteratorBase (MachineInstr *MI, bool WholeBundle)
MachineOperandderef () const

Detailed Description

MachineOperandIteratorBase - Iterator that can visit all operands on a MachineInstr, or all operands on a bundle of MachineInstrs. This class is not intended to be used directly, use one of the sub-classes instead.

Intended use:

for (MIBundleOperands MIO(MI); MIO.isValid(); ++MIO) { if (!MIO->isReg()) continue; ... }

Definition at line 94 of file MachineInstrBundle.h.


Constructor & Destructor Documentation

llvm::MachineOperandIteratorBase::MachineOperandIteratorBase ( MachineInstr MI,
bool  WholeBundle 
) [inline, explicit, protected]

MachineOperandIteratorBase - Create an iterator that visits all operands on MI, or all operands on every instruction in the bundle containing MI.

Parameters:
MIThe instruction to examine.
WholeBundleWhen true, visit all operands on the entire bundle.

Definition at line 117 of file MachineInstrBundle.h.

References llvm::getBundleStart(), llvm::MachineInstr::getParent(), llvm::MachineBasicBlock::instr_end(), and llvm::AArch64CC::MI.


Member Function Documentation

analyzeVirtReg - Analyze how the current instruction or bundle uses a virtual register. This function should not be called after operator++(), it expects a fresh iterator.

Parameters:
RegThe virtual register to analyze.
OpsWhen set, this vector will receive an (MI, OpNum) entry for each operand referring to Reg.
Returns:
A filled-in RegInfo struct.

Definition at line 253 of file MachineInstrBundle.cpp.

References deref(), getOperandNo(), llvm::MachineOperand::getParent(), llvm::MachineOperand::getReg(), if(), llvm::MachineOperand::isDef(), llvm::MachineOperand::isReg(), llvm::MachineInstr::isRegTiedToDefOperand(), isValid(), llvm::MachineOperandIteratorBase::VirtRegInfo::Reads, llvm::MachineOperand::readsReg(), llvm::MachineOperandIteratorBase::VirtRegInfo::Tied, and llvm::MachineOperandIteratorBase::VirtRegInfo::Writes.

getOperandNo - Returns the number of the current operand relative to its instruction.

Definition at line 147 of file MachineInstrBundle.h.

Referenced by analyzeVirtReg().

void llvm::MachineOperandIteratorBase::operator++ ( ) [inline]

Preincrement. Move to the next operand.

Definition at line 138 of file MachineInstrBundle.h.

References isValid().


The documentation for this class was generated from the following files: