class MIBundleBuilder
Declaration
class MIBundleBuilder { /* full declaration omitted */ };
Description
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.
Declared at: llvm/include/llvm/CodeGen/MachineInstrBuilder.h:544
Member Variables
- private llvm::MachineBasicBlock& MBB
- private MachineBasicBlock::instr_iterator Begin
- private MachineBasicBlock::instr_iterator End
Method Overview
- public MIBundleBuilder(llvm::MachineBasicBlock & BB, MachineBasicBlock::iterator Pos)
- public MIBundleBuilder(llvm::MachineBasicBlock & BB, MachineBasicBlock::iterator B, MachineBasicBlock::iterator E)
- public MIBundleBuilder(llvm::MachineInstr * MI)
- public llvm::MIBundleBuilder & append(llvm::MachineInstr * MI)
- public MachineBasicBlock::instr_iterator begin() const
- public bool empty() const
- public MachineBasicBlock::instr_iterator end() const
- public llvm::MachineBasicBlock & getMBB() const
- public llvm::MIBundleBuilder & insert(MachineBasicBlock::instr_iterator I, llvm::MachineInstr * MI)
- public llvm::MIBundleBuilder & prepend(llvm::MachineInstr * MI)
Methods
¶MIBundleBuilder(llvm::MachineBasicBlock& BB,
MachineBasicBlock::iterator Pos)
MIBundleBuilder(llvm::MachineBasicBlock& BB,
MachineBasicBlock::iterator Pos)
Description
Create an MIBundleBuilder that inserts instructions into a new bundle in BB above the bundle or instruction at Pos.
Declared at: llvm/include/llvm/CodeGen/MachineInstrBuilder.h:552
Parameters
¶MIBundleBuilder(llvm::MachineBasicBlock& BB,
MachineBasicBlock::iterator B,
MachineBasicBlock::iterator E)
MIBundleBuilder(llvm::MachineBasicBlock& BB,
MachineBasicBlock::iterator B,
MachineBasicBlock::iterator E)
Description
Create a bundle from the sequence of instructions between B and E.
Declared at: llvm/include/llvm/CodeGen/MachineInstrBuilder.h:556
Parameters
¶MIBundleBuilder(llvm::MachineInstr* MI)
MIBundleBuilder(llvm::MachineInstr* MI)
Description
Create an MIBundleBuilder representing an existing instruction or bundle that has MI as its head.
Declared at: llvm/include/llvm/CodeGen/MachineInstrBuilder.h:570
Parameters
¶llvm::MIBundleBuilder& append(
llvm::MachineInstr* MI)
llvm::MIBundleBuilder& append(
llvm::MachineInstr* MI)
Description
Insert MI into MBB by appending it to the instructions in the bundle. MI will become the last instruction in the bundle.
Declared at: llvm/include/llvm/CodeGen/MachineInstrBuilder.h:617
Parameters
¶MachineBasicBlock::instr_iterator begin() const
MachineBasicBlock::instr_iterator begin() const
Description
Return an iterator to the first bundled instruction.
Declared at: llvm/include/llvm/CodeGen/MachineInstrBuilder.h:582
¶bool empty() const
bool empty() const
Description
Return true if no instructions have been inserted in this bundle yet. Empty bundles aren't representable in a MachineBasicBlock.
Declared at: llvm/include/llvm/CodeGen/MachineInstrBuilder.h:579
¶MachineBasicBlock::instr_iterator end() const
MachineBasicBlock::instr_iterator end() const
Description
Return an iterator beyond the last bundled instruction.
Declared at: llvm/include/llvm/CodeGen/MachineInstrBuilder.h:585
¶llvm::MachineBasicBlock& getMBB() const
llvm::MachineBasicBlock& getMBB() const
Description
Return a reference to the basic block containing this bundle.
Declared at: llvm/include/llvm/CodeGen/MachineInstrBuilder.h:575
¶llvm::MIBundleBuilder& insert(
MachineBasicBlock::instr_iterator I,
llvm::MachineInstr* MI)
llvm::MIBundleBuilder& insert(
MachineBasicBlock::instr_iterator I,
llvm::MachineInstr* MI)
Description
Insert MI into this bundle before I which must point to an instruction in the bundle, or end().
Declared at: llvm/include/llvm/CodeGen/MachineInstrBuilder.h:589
Parameters
¶llvm::MIBundleBuilder& prepend(
llvm::MachineInstr* MI)
llvm::MIBundleBuilder& prepend(
llvm::MachineInstr* MI)
Description
Insert MI into MBB by prepending it to the instructions in the bundle. MI will become the first instruction in the bundle.
Declared at: llvm/include/llvm/CodeGen/MachineInstrBuilder.h:611