|
LLVM 22.0.0git
|
Helper class for constructing bundles of MachineInstrs. More...
#include "llvm/CodeGen/MachineInstrBuilder.h"
Public Member Functions | |
| MIBundleBuilder (MachineBasicBlock &BB, MachineBasicBlock::iterator Pos) | |
| Create an MIBundleBuilder that inserts instructions into a new bundle in BB above the bundle or instruction at Pos. | |
| MIBundleBuilder (MachineBasicBlock &BB, MachineBasicBlock::iterator B, MachineBasicBlock::iterator E) | |
| Create a bundle from the sequence of instructions between B and E. | |
| MIBundleBuilder (MachineInstr *MI) | |
| Create an MIBundleBuilder representing an existing instruction or bundle that has MI as its head. | |
| MachineBasicBlock & | getMBB () const |
| Return a reference to the basic block containing this bundle. | |
| bool | empty () const |
| Return true if no instructions have been inserted in this bundle yet. | |
| MachineBasicBlock::instr_iterator | begin () const |
| Return an iterator to the first bundled instruction. | |
| MachineBasicBlock::instr_iterator | end () const |
| Return an iterator beyond the last bundled instruction. | |
| MIBundleBuilder & | insert (MachineBasicBlock::instr_iterator I, MachineInstr *MI) |
| Insert MI into this bundle before I which must point to an instruction in the bundle, or end(). | |
| MIBundleBuilder & | prepend (MachineInstr *MI) |
| Insert MI into MBB by prepending it to the instructions in the bundle. | |
| MIBundleBuilder & | append (MachineInstr *MI) |
| Insert MI into MBB by appending it to the instructions in the bundle. | |
Helper class for constructing bundles of MachineInstrs.
MIBundleBuilder can create a bundle from scratch by inserting new MachineInstrs one at a time, or it can create a bundle from a sequence of existing MachineInstrs in a basic block.
Definition at line 596 of file MachineInstrBuilder.h.
|
inline |
Create an MIBundleBuilder that inserts instructions into a new bundle in BB above the bundle or instruction at Pos.
Definition at line 604 of file MachineInstrBuilder.h.
|
inline |
|
inlineexplicit |
Create an MIBundleBuilder representing an existing instruction or bundle that has MI as its head.
Definition at line 622 of file MachineInstrBuilder.h.
References llvm::getBundleEnd(), getParent(), and MI.
|
inline |
Insert MI into MBB by appending it to the instructions in the bundle.
MI will become the last instruction in the bundle.
Definition at line 669 of file MachineInstrBuilder.h.
References end(), insert(), MI, and MIBundleBuilder().
Referenced by llvm::SIInstrInfo::expandPostRAPseudo(), and for().
|
inline |
Return an iterator to the first bundled instruction.
Definition at line 634 of file MachineInstrBuilder.h.
Referenced by llvm::SITargetLowering::bundleInstWithWaitcnt(), llvm::SIInstrInfo::expandPostRAPseudo(), and prepend().
|
inline |
Return true if no instructions have been inserted in this bundle yet.
Empty bundles aren't representable in a MachineBasicBlock.
Definition at line 631 of file MachineInstrBuilder.h.
Referenced by insert().
|
inline |
Return an iterator beyond the last bundled instruction.
Definition at line 637 of file MachineInstrBuilder.h.
Referenced by append().
|
inline |
Return a reference to the basic block containing this bundle.
Definition at line 627 of file MachineInstrBuilder.h.
|
inline |
Insert MI into this bundle before I which must point to an instruction in the bundle, or end().
Definition at line 641 of file MachineInstrBuilder.h.
References llvm::MachineInstr::BundledPred, llvm::MachineInstr::BundledSucc, empty(), I, insert(), MI, and MIBundleBuilder().
|
inline |
Insert MI into MBB by prepending it to the instructions in the bundle.
MI will become the first instruction in the bundle.
Definition at line 663 of file MachineInstrBuilder.h.
References begin(), insert(), MI, and MIBundleBuilder().
Referenced by llvm::finalizeBundle().