LLVM API Documentation
#include <MachineInstrBundle.h>

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) | |
| 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 94 of file MachineInstrBundle.h.
| 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.
| MI | The instruction to examine. |
| WholeBundle | When 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.
| 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 282 of file MachineInstrBundle.cpp.
References llvm::MachineOperandIteratorBase::PhysRegInfo::Clobbers, llvm::MachineOperand::clobbersPhysReg(), llvm::MachineOperandIteratorBase::PhysRegInfo::Defines, llvm::MachineOperandIteratorBase::PhysRegInfo::DefinesDead, deref(), llvm::MachineOperand::getReg(), if(), llvm::MachineOperand::isDead(), llvm::MachineOperand::isDef(), llvm::MachineOperand::isKill(), llvm::TargetRegisterInfo::isPhysicalRegister(), llvm::MachineOperand::isReg(), llvm::MachineOperand::isRegMask(), llvm::MCRegisterInfo::isSubRegister(), isValid(), llvm::MachineOperandIteratorBase::PhysRegInfo::Kills, llvm::MachineOperandIteratorBase::PhysRegInfo::Reads, llvm::MachineOperandIteratorBase::PhysRegInfo::ReadsOverlap, llvm::MachineOperand::readsReg(), and llvm::TargetRegisterInfo::regsOverlap().
Referenced by llvm::MachineBasicBlock::computeRegisterLiveness().
| 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 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.
| MachineOperand& llvm::MachineOperandIteratorBase::deref | ( | ) | const [inline, protected] |
Definition at line 131 of file MachineInstrBundle.h.
Referenced by analyzePhysReg(), analyzeVirtReg(), 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->().
| unsigned llvm::MachineOperandIteratorBase::getOperandNo | ( | ) | const [inline] |
getOperandNo - Returns the number of the current operand relative to its instruction.
Definition at line 147 of file MachineInstrBundle.h.
Referenced by analyzeVirtReg().
| bool llvm::MachineOperandIteratorBase::isValid | ( | ) | const [inline] |
isValid - Returns true until all the operands have been visited.
Definition at line 135 of file MachineInstrBundle.h.
Referenced by analyzePhysReg(), analyzeVirtReg(), collectOperands(), getDataDeps(), llvm::MachineInstr::getRegClassConstraintEffectForVReg(), operator++(), RemoveKills(), llvm::LivePhysRegs::stepBackward(), llvm::LivePhysRegs::stepForward(), llvm::LiveIntervals::HMEditor::updateAllRanges(), updatePhysDepsDownwards(), updatePhysDepsUpwards(), and UpdatePredRedefs().
| void llvm::MachineOperandIteratorBase::operator++ | ( | ) | [inline] |
Preincrement. Move to the next operand.
Definition at line 138 of file MachineInstrBundle.h.
References isValid().