14 #ifndef LLVM_CODEGEN_MACHINEINSTRBUNDLE_H 15 #define LLVM_CODEGEN_MACHINEINSTRBUNDLE_H 46 while (I->isBundledWithPred())
54 while (I->isBundledWithPred())
62 while (I->isBundledWithSucc())
71 while (I->isBundledWithSucc())
93 template <
typename ValueT>
96 std::forward_iterator_tag, ValueT> {
105 if (++InstrI == InstrE || !InstrI->isInsideBundle()) {
109 OpI = InstrI->operands_begin();
110 OpE = InstrI->operands_end();
123 OpI = InstrI->operands_begin();
124 OpE = InstrI->operands_end();
132 : InstrI(InstrE), InstrE(InstrE), OpI(OpE), OpE(OpE) {}
140 assert(
isValid() &&
"Cannot advance MIOperands beyond the last operand");
152 return InstrI == Arg.InstrI &&
153 (OpI == Arg.OpI || (OpI == OpE && Arg.OpI == Arg.OpE));
159 return OpI - InstrI->operands_begin();
MIBundleOperandIteratorBase(MachineInstr &MI)
MIBundleOperandIteratorBase - Create an iterator that visits all operands on MI, or all operands on e...
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 t...
instr_iterator instr_end()
This class represents lattice values for constants.
MIBundleOperands - Iterate over all operands in a bundle of machine instructions. ...
bool isValid() const
isValid - Returns true until all the operands have been visited.
VirtRegInfo AnalyzeVirtRegInBundle(MachineInstr &MI, unsigned Reg, SmallVectorImpl< std::pair< MachineInstr *, unsigned >> *Ops=nullptr)
AnalyzeVirtRegInBundle - Analyze how the current instruction or bundle uses a virtual register...
PhysRegInfo AnalyzePhysRegInBundle(const MachineInstr &MI, unsigned Reg, const TargetRegisterInfo *TRI)
AnalyzePhysRegInBundle - Analyze how the current instruction or bundle uses a physical register...
unsigned const TargetRegisterInfo * TRI
MIBundleOperandIteratorBase - Iterator that visits all operands in a bundle of MachineInstrs.
ValueT & operator*() const
unsigned getOperandNo() const
getOperandNo - Returns the number of the current operand relative to its instruction.
ConstMIBundleOperands(const MachineInstr &MI)
iterator_range< ConstMIBundleOperands > const_mi_bundle_ops(const MachineInstr &MI)
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
bool Killed
There is a use operand of reg or a super-register with kill flag set.
MachineBasicBlock::instr_iterator getBundleStart(MachineBasicBlock::instr_iterator I)
Returns an iterator to the first instruction in the bundle containing I.
bool Reads
Reads - One of the operands read the virtual register.
bool Defined
Reg or one of its aliases is defined.
CRTP base class which implements the entire standard iterator facade in terms of a minimal subset of ...
MIBundleOperands(MachineInstr &MI)
bool Read
Reg or one of its aliases is read.
bool FullyDefined
Reg or a super-register is defined.
amdgpu Simplify well known AMD library false FunctionCallee Value * Arg
self_iterator getIterator()
static ConstMIBundleOperands end(const MachineBasicBlock &MBB)
Returns an iterator past the last iteration.
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
iterator_range< T > make_range(T x, T y)
Convenience function for iterating over sub-ranges.
Information about how a physical register Reg is used by a set of operands.
ConstMIBundleOperands - Iterate over all operands in a const bundle of machine instructions.
MachineOperand class - Representation of each machine instruction operand.
iterator_range< MIBundleOperands > mi_bundle_ops(MachineInstr &MI)
bool finalizeBundles(MachineFunction &MF)
finalizeBundles - Finalize instruction bundles in the specified MachineFunction.
bool Tied
Tied - Uses and defs must use the same register.
A range adaptor for a pair of iterators.
const MachineBasicBlock * getParent() const
Representation of each machine instruction.
static MIBundleOperands end(const MachineBasicBlock &MBB)
Returns an iterator past the last iteration.
bool PartialDeadDef
Reg is Defined and all defs of reg or an overlapping register are dead.
Instructions::iterator instr_iterator
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
VirtRegInfo - Information about a virtual register used by a set of operands.
ValueT * operator->() const
bool operator==(const MIBundleOperandIteratorBase &Arg) const
bool Writes
Writes - One of the operands writes the virtual register.
MachineBasicBlock::instr_iterator getBundleEnd(MachineBasicBlock::instr_iterator I)
Returns an iterator pointing beyond the bundle containing I.
void finalizeBundle(MachineBasicBlock &MBB, MachineBasicBlock::instr_iterator FirstMI, MachineBasicBlock::instr_iterator LastMI)
finalizeBundle - Finalize a machine instruction bundle which includes a sequence of instructions star...
void operator++()
Preincrement. Move to the next operand.
Instructions::const_iterator const_instr_iterator
bool Clobbered
There is a regmask operand indicating Reg is clobbered.
bool FullyRead
Reg or a super-register is read. The full register is read.