15 #ifndef LLVM_CODEGEN_MACHINEINSTRBUNDLE_H
16 #define LLVM_CODEGEN_MACHINEINSTRBUNDLE_H
48 while (I->isBundledWithPred())
55 while (I->isBundledWithPred())
64 while (I->isBundledWithSucc())
73 while (I->isBundledWithSucc())
103 if (++InstrI == InstrE || !InstrI->isInsideBundle())
105 OpI = InstrI->operands_begin();
106 OpE = InstrI->operands_end();
122 InstrI = InstrE =
MI;
125 OpI = InstrI->operands_begin();
126 OpE = InstrI->operands_end();
139 assert(
isValid() &&
"Cannot advance MIOperands beyond the last operand");
148 return OpI - InstrI->operands_begin();
MachineBasicBlock::instr_iterator getBundleEnd(MachineInstr *MI)
Return an iterator pointing beyond the bundle containing MI.
instr_iterator instr_end()
bool Tied
Tied - Uses and defs must use the same register.
MachineOperand & operator*() const
MachineOperandIteratorBase(MachineInstr *MI, bool WholeBundle)
MachineOperandIteratorBase - Create an iterator that visits all operands on MI, or all operands on ev...
Instructions::const_iterator const_instr_iterator
MIBundleOperands - Iterate over all operands in a bundle of machine instructions. ...
MachineOperand & deref() const
const MachineOperand * operator->() const
Instructions::iterator instr_iterator
void operator++()
Preincrement. Move to the next operand.
VirtRegInfo analyzeVirtReg(unsigned Reg, SmallVectorImpl< std::pair< MachineInstr *, unsigned > > *Ops=nullptr)
analyzeVirtReg - Analyze how the current instruction or bundle uses a virtual register.
bool Clobbers
Clobbers - Reg or an overlapping register is defined, or a regmask clobbers Reg.
MachineOperand * operator->() const
bool DefinesDead
DefinesDead - All defs of a Reg or a super-register are dead.
const MachineOperand & operator*() const
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
Reg
All possible values of the reg field in the ModR/M byte.
ConstMIBundleOperands(const MachineInstr *MI)
MIBundleOperands(MachineInstr *MI)
PhysRegInfo analyzePhysReg(unsigned Reg, const TargetRegisterInfo *TRI)
analyzePhysReg - Analyze how the current instruction or bundle uses a physical register.
VirtRegInfo - Information about a virtual register used by a set of operands.
const MachineBasicBlock * getParent() const
bool Kills
There is a kill of Reg or a super-register.
bool ReadsOverlap
ReadsOverlap - Reg or an overlapping register is read.
bool Writes
Writes - One of the operands writes the virtual register.
MachineOperand * operator->() const
MIOperands(MachineInstr *MI)
bool Reads
Reads - One of the operands read the virtual register.
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
ConstMIBundleOperands - Iterate over all operands in a const bundle of machine instructions.
MachineOperand class - Representation of each machine instruction operand.
MachineOperand & operator*() const
bool finalizeBundles(MachineFunction &MF)
finalizeBundles - Finalize instruction bundles in the specified MachineFunction.
MIOperands - Iterate over operands of a single instruction.
bool Reads
Reads - Read or a super-register is read.
ConstMIOperands(const MachineInstr *MI)
ConstMIOperands - Iterate over operands of a single const instruction.
MachineInstr * getBundleStart(MachineInstr *MI)
getBundleStart - Returns the first instruction in the bundle containing MI.
const MachineOperand * operator->() const
Representation of each machine instruction.
bool Defines
Defines - Reg or a super-register is defined.
PhysRegInfo - Information about a physical register used by a set of operands.
bool isValid() const
isValid - Returns true until all the operands have been visited.
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...
MachineOperandIteratorBase - Iterator that can visit all operands on a MachineInstr, or all operands on a bundle of MachineInstrs.
const MachineOperand & operator*() const
unsigned getOperandNo() const
getOperandNo - Returns the number of the current operand relative to its instruction.