LLVM
8.0.1
|
MachineOperandIteratorBase - Iterator that can visit all operands on a MachineInstr, or all operands on a bundle of MachineInstrs. More...
#include "llvm/CodeGen/MachineInstrBundle.h"
Classes | |
struct | PhysRegInfo |
Information about how a physical register Reg is used by a set of operands. More... | |
struct | VirtRegInfo |
VirtRegInfo - Information about a virtual register used by a set of operands. More... | |
Public Member Functions | |
bool | isValid () const |
isValid - Returns true until all the operands have been visited. More... | |
void | operator++ () |
Preincrement. Move to the next operand. More... | |
unsigned | getOperandNo () const |
getOperandNo - Returns the number of the current operand relative to its instruction. More... | |
VirtRegInfo | analyzeVirtReg (unsigned Reg, SmallVectorImpl< std::pair< MachineInstr *, unsigned > > *Ops=nullptr) |
analyzeVirtReg - Analyze how the current instruction or bundle uses a virtual register. More... | |
PhysRegInfo | analyzePhysReg (unsigned Reg, const TargetRegisterInfo *TRI) |
analyzePhysReg - Analyze how the current instruction or bundle uses a physical register. More... | |
Protected Member Functions | |
MachineOperandIteratorBase (MachineInstr &MI, bool WholeBundle) | |
MachineOperandIteratorBase - Create an iterator that visits all operands on MI, or all operands on every instruction in the bundle containing MI. More... | |
MachineOperand & | deref () const |
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 92 of file MachineInstrBundle.h.
|
inlineexplicitprotected |
MachineOperandIteratorBase - Create an iterator that visits all operands on MI, or all operands on every instruction in the bundle containing MI.
MI | The instruction to examine. |
WholeBundle | When true, visit all operands on the entire bundle. |
Definition at line 115 of file MachineInstrBundle.h.
References llvm::getBundleStart(), llvm::ilist_node_impl< OptionsT >::getIterator(), llvm::MachineInstr::getParent(), and llvm::MachineBasicBlock::instr_end().
MachineOperandIteratorBase::PhysRegInfo MachineOperandIteratorBase::analyzePhysReg | ( | unsigned | Reg, |
const TargetRegisterInfo * | TRI | ||
) |
analyzePhysReg - Analyze how the current instruction or bundle uses a physical register.
This function should not be called after operator++(), it expects a fresh iterator.
Reg | The physical register to analyze. |
Definition at line 315 of file MachineInstrBundle.cpp.
References assert(), llvm::MachineOperandIteratorBase::PhysRegInfo::Clobbered, llvm::MachineOperand::clobbersPhysReg(), llvm::MachineOperandIteratorBase::PhysRegInfo::DeadDef, llvm::MachineOperandIteratorBase::PhysRegInfo::Defined, llvm::MachineOperandIteratorBase::PhysRegInfo::FullyDefined, llvm::MachineOperandIteratorBase::PhysRegInfo::FullyRead, llvm::MachineOperand::getReg(), llvm::MachineOperand::isDead(), llvm::MachineOperand::isDef(), llvm::MachineOperand::isKill(), llvm::TargetRegisterInfo::isPhysicalRegister(), llvm::MachineOperand::isReg(), llvm::MachineOperand::isRegMask(), llvm::MCRegisterInfo::isSuperRegisterEq(), llvm::MachineOperandIteratorBase::PhysRegInfo::Killed, llvm::MachineOperandIteratorBase::PhysRegInfo::PartialDeadDef, llvm::MachineOperandIteratorBase::PhysRegInfo::Read, llvm::MachineOperand::readsReg(), and llvm::TargetRegisterInfo::regsOverlap().
Referenced by llvm::MachineBasicBlock::computeRegisterLiveness(), dumpMachineInstrRangeWithSlotIndex(), and parseCond().
MachineOperandIteratorBase::VirtRegInfo MachineOperandIteratorBase::analyzeVirtReg | ( | unsigned | Reg, |
SmallVectorImpl< std::pair< MachineInstr *, unsigned > > * | Ops = nullptr |
||
) |
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.
Reg | The virtual register to analyze. |
Ops | When set, this vector will receive an (MI, OpNum) entry for each operand referring to Reg. |
Definition at line 286 of file MachineInstrBundle.cpp.
References llvm::MachineOperand::getParent(), llvm::MachineOperand::getReg(), if(), llvm::MachineOperand::isDef(), llvm::MachineOperand::isReg(), llvm::MachineInstr::isRegTiedToDefOperand(), llvm::MachineOperandIteratorBase::VirtRegInfo::Reads, llvm::MachineOperand::readsReg(), Reg, llvm::MachineOperandIteratorBase::VirtRegInfo::Tied, and llvm::MachineOperandIteratorBase::VirtRegInfo::Writes.
Referenced by isFullCopyOf(), and isFullUndefDef().
|
inlineprotected |
Definition at line 129 of file MachineInstrBundle.h.
Referenced by llvm::MIOperands::operator*(), llvm::ConstMIOperands::operator*(), llvm::MIBundleOperands::operator*(), llvm::ConstMIBundleOperands::operator*(), llvm::MIOperands::operator->(), llvm::ConstMIOperands::operator->(), llvm::MIBundleOperands::operator->(), and llvm::ConstMIBundleOperands::operator->().
|
inline |
getOperandNo - Returns the number of the current operand relative to its instruction.
Definition at line 145 of file MachineInstrBundle.h.
|
inline |
isValid - Returns true until all the operands have been visited.
Definition at line 133 of file MachineInstrBundle.h.
Referenced by dumpMachineInstrRangeWithSlotIndex(), getLiveLanesAt(), llvm::MachineInstr::getRegClassConstraintEffectForVReg(), matchPair(), operator++(), llvm::recomputeLivenessFlags(), and llvm::LiveIntervals::HMEditor::updateAllRanges().
|
inline |
Preincrement. Move to the next operand.
Definition at line 136 of file MachineInstrBundle.h.