Go to the documentation of this file.
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();
122 InstrE =
MI.getParent()->instr_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();
204 inline iterator_range<ConstMIBundleOperands>
This is an optimization pass for GlobalISel generic memory operations.
iterator_range< T > make_range(T x, T y)
Convenience function for iterating over sub-ranges.
bool Tied
Tied - Uses and defs must use the same register.
bool FullyRead
Reg or a super-register is read. The full register is read.
MIBundleOperands(MachineInstr &MI)
bool Reads
Reads - One of the operands read the virtual register.
bool finalizeBundles(MachineFunction &MF)
finalizeBundles - Finalize instruction bundles in the specified MachineFunction.
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...
Reg
All possible values of the reg field in the ModR/M byte.
ValueT & operator*() const
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
bool FullyDefined
Reg or a super-register is defined.
iterator_range< MIBundleOperands > mi_bundle_ops(MachineInstr &MI)
unsigned const TargetRegisterInfo * TRI
PhysRegInfo AnalyzePhysRegInBundle(const MachineInstr &MI, Register Reg, const TargetRegisterInfo *TRI)
AnalyzePhysRegInBundle - Analyze how the current instruction or bundle uses a physical register.
Instructions::const_iterator const_instr_iterator
bool Killed
There is a use operand of reg or a super-register with kill flag set.
MachineBasicBlock::instr_iterator getBundleEnd(MachineBasicBlock::instr_iterator I)
Returns an iterator pointing beyond the bundle containing I.
amdgpu Simplify well known AMD library false FunctionCallee Value * Arg
bool Clobbered
There is a regmask operand indicating Reg is clobbered.
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...
bool Read
Reg or one of its aliases is read.
MachineOperand class - Representation of each machine instruction operand.
bool Writes
Writes - One of the operands writes the virtual register.
ConstMIBundleOperands(const MachineInstr &MI)
MIBundleOperands - Iterate over all operands in a bundle of machine instructions.
iterator_range< ConstMIBundleOperands > const_mi_bundle_ops(const MachineInstr &MI)
Representation of each machine instruction.
static MIBundleOperands end(const MachineBasicBlock &MBB)
Returns an iterator past the last iteration.
VirtRegInfo AnalyzeVirtRegInBundle(MachineInstr &MI, Register Reg, SmallVectorImpl< std::pair< MachineInstr *, unsigned >> *Ops=nullptr)
AnalyzeVirtRegInBundle - Analyze how the current instruction or bundle uses a virtual register.
CRTP base class which implements the entire standard iterator facade in terms of a minimal subset of ...
bool isValid() const
isValid - Returns true until all the operands have been visited.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
Information about how a physical register Reg is used by a set of operands.
bool Defined
Reg or one of its aliases is defined.
MachineBasicBlock::instr_iterator getBundleStart(MachineBasicBlock::instr_iterator I)
Returns an iterator to the first instruction in the bundle containing I.
Wrapper class representing virtual and physical registers.
void operator++()
Preincrement. Move to the next operand.
ConstMIBundleOperands - Iterate over all operands in a const bundle of machine instructions.
Instructions::iterator instr_iterator
ValueT * operator->() const
MIBundleOperandIteratorBase - Iterator that visits all operands in a bundle of MachineInstrs.
A range adaptor for a pair of iterators.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
bool operator==(const MIBundleOperandIteratorBase &Arg) const
static ConstMIBundleOperands end(const MachineBasicBlock &MBB)
Returns an iterator past the last iteration.
VirtRegInfo - Information about a virtual register used by a set of operands.
unsigned getOperandNo() const
getOperandNo - Returns the number of the current operand relative to its instruction.
MIBundleOperandIteratorBase(MachineInstr &MI)
MIBundleOperandIteratorBase - Create an iterator that visits all operands on MI, or all operands on e...
bool PartialDeadDef
Reg is Defined and all defs of reg or an overlapping register are dead.