LLVM 20.0.0git
Public Member Functions | Protected Member Functions | List of all members
llvm::MIBundleOperandIteratorBase< ValueT > Class Template Reference

MIBundleOperandIteratorBase - Iterator that visits all operands in a bundle of MachineInstrs. More...

#include "llvm/CodeGen/MachineInstrBundle.h"

Inheritance diagram for llvm::MIBundleOperandIteratorBase< ValueT >:
Inheritance graph
[legend]

Public Member Functions

bool isValid () const
 isValid - Returns true until all the operands have been visited.
 
void operator++ ()
 Preincrement. Move to the next operand.
 
ValueToperator* () const
 
ValueToperator-> () const
 
bool operator== (const MIBundleOperandIteratorBase &Arg) const
 
unsigned getOperandNo () const
 getOperandNo - Returns the number of the current operand relative to its instruction.
 
- Public Member Functions inherited from llvm::iterator_facade_base< MIBundleOperandIteratorBase< ValueT >, std::forward_iterator_tag, ValueT >
MIBundleOperandIteratorBase< ValueToperator+ (std::ptrdiff_t n) const
 
MIBundleOperandIteratorBase< ValueToperator- (std::ptrdiff_t n) const
 
MIBundleOperandIteratorBase< ValueT > & operator++ ()
 
MIBundleOperandIteratorBase< ValueToperator++ (int)
 
MIBundleOperandIteratorBase< ValueT > & operator-- ()
 
MIBundleOperandIteratorBase< ValueToperator-- (int)
 
bool operator!= (const MIBundleOperandIteratorBase< ValueT > &RHS) const
 
bool operator> (const MIBundleOperandIteratorBase< ValueT > &RHS) const
 
bool operator<= (const MIBundleOperandIteratorBase< ValueT > &RHS) const
 
bool operator>= (const MIBundleOperandIteratorBase< ValueT > &RHS) const
 
PointerProxy operator-> () const
 
ReferenceProxy operator[] (std::ptrdiff_t n) const
 

Protected Member Functions

 MIBundleOperandIteratorBase (MachineInstr &MI)
 MIBundleOperandIteratorBase - Create an iterator that visits all operands on MI, or all operands on every instruction in the bundle containing MI.
 
 MIBundleOperandIteratorBase (MachineBasicBlock::instr_iterator InstrE, MachineInstr::mop_iterator OpE)
 Constructor for an iterator past the last iteration: both instruction iterators point to the end of the BB and OpI == OpE.
 

Additional Inherited Members

- Public Types inherited from llvm::iterator_facade_base< MIBundleOperandIteratorBase< ValueT >, std::forward_iterator_tag, ValueT >
using iterator_category = std::forward_iterator_tag
 
using value_type = ValueT
 
using difference_type = std::ptrdiff_t
 
using pointer = ValueT *
 
using reference = ValueT &
 
- Protected Types inherited from llvm::iterator_facade_base< MIBundleOperandIteratorBase< ValueT >, std::forward_iterator_tag, ValueT >
enum  
 

Detailed Description

template<typename ValueT>
class llvm::MIBundleOperandIteratorBase< ValueT >

MIBundleOperandIteratorBase - Iterator that visits all operands in 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

◆ MIBundleOperandIteratorBase() [1/2]

template<typename ValueT >
llvm::MIBundleOperandIteratorBase< ValueT >::MIBundleOperandIteratorBase ( MachineInstr MI)
inlineexplicitprotected

MIBundleOperandIteratorBase - 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.

Definition at line 120 of file MachineInstrBundle.h.

References llvm::getBundleStart(), and MI.

◆ MIBundleOperandIteratorBase() [2/2]

template<typename ValueT >
llvm::MIBundleOperandIteratorBase< ValueT >::MIBundleOperandIteratorBase ( MachineBasicBlock::instr_iterator  InstrE,
MachineInstr::mop_iterator  OpE 
)
inlineexplicitprotected

Constructor for an iterator past the last iteration: both instruction iterators point to the end of the BB and OpI == OpE.

Definition at line 130 of file MachineInstrBundle.h.

Member Function Documentation

◆ getOperandNo()

template<typename ValueT >
unsigned llvm::MIBundleOperandIteratorBase< ValueT >::getOperandNo ( ) const
inline

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

Definition at line 158 of file MachineInstrBundle.h.

◆ isValid()

template<typename ValueT >
bool llvm::MIBundleOperandIteratorBase< ValueT >::isValid ( ) const
inline

◆ operator*()

template<typename ValueT >
ValueT & llvm::MIBundleOperandIteratorBase< ValueT >::operator* ( ) const
inline

Definition at line 145 of file MachineInstrBundle.h.

◆ operator++()

template<typename ValueT >
void llvm::MIBundleOperandIteratorBase< ValueT >::operator++ ( )
inline

Preincrement. Move to the next operand.

Definition at line 139 of file MachineInstrBundle.h.

References assert(), and llvm::MIBundleOperandIteratorBase< ValueT >::isValid().

◆ operator->()

template<typename ValueT >
ValueT * llvm::MIBundleOperandIteratorBase< ValueT >::operator-> ( ) const
inline

Definition at line 146 of file MachineInstrBundle.h.

◆ operator==()

template<typename ValueT >
bool llvm::MIBundleOperandIteratorBase< ValueT >::operator== ( const MIBundleOperandIteratorBase< ValueT > &  Arg) const
inline

Definition at line 148 of file MachineInstrBundle.h.


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