LLVM  8.0.1
Public Member Functions | List of all members
llvm::MIBundleBuilder Class Reference

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. More...
 
 MIBundleBuilder (MachineBasicBlock &BB, MachineBasicBlock::iterator B, MachineBasicBlock::iterator E)
 Create a bundle from the sequence of instructions between B and E. More...
 
 MIBundleBuilder (MachineInstr *MI)
 Create an MIBundleBuilder representing an existing instruction or bundle that has MI as its head. More...
 
MachineBasicBlockgetMBB () const
 Return a reference to the basic block containing this bundle. More...
 
bool empty () const
 Return true if no instructions have been inserted in this bundle yet. More...
 
MachineBasicBlock::instr_iterator begin () const
 Return an iterator to the first bundled instruction. More...
 
MachineBasicBlock::instr_iterator end () const
 Return an iterator beyond the last bundled instruction. More...
 
MIBundleBuilderinsert (MachineBasicBlock::instr_iterator I, MachineInstr *MI)
 Insert MI into this bundle before I which must point to an instruction in the bundle, or end(). More...
 
MIBundleBuilderprepend (MachineInstr *MI)
 Insert MI into MBB by prepending it to the instructions in the bundle. More...
 
MIBundleBuilderappend (MachineInstr *MI)
 Insert MI into MBB by appending it to the instructions in the bundle. More...
 

Detailed 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.

Definition at line 503 of file MachineInstrBuilder.h.

Constructor & Destructor Documentation

◆ MIBundleBuilder() [1/3]

llvm::MIBundleBuilder::MIBundleBuilder ( MachineBasicBlock BB,
MachineBasicBlock::iterator  Pos 
)
inline

Create an MIBundleBuilder that inserts instructions into a new bundle in BB above the bundle or instruction at Pos.

Definition at line 511 of file MachineInstrBuilder.h.

◆ MIBundleBuilder() [2/3]

llvm::MIBundleBuilder::MIBundleBuilder ( MachineBasicBlock BB,
MachineBasicBlock::iterator  B,
MachineBasicBlock::iterator  E 
)
inline

Create a bundle from the sequence of instructions between B and E.

Definition at line 515 of file MachineInstrBuilder.h.

References assert(), B, llvm::MachineInstr::bundleWithPred(), and MI.

◆ MIBundleBuilder() [3/3]

llvm::MIBundleBuilder::MIBundleBuilder ( MachineInstr MI)
inlineexplicit

Create an MIBundleBuilder representing an existing instruction or bundle that has MI as its head.

Definition at line 529 of file MachineInstrBuilder.h.

Member Function Documentation

◆ append()

MIBundleBuilder& llvm::MIBundleBuilder::append ( MachineInstr 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 576 of file MachineInstrBuilder.h.

References llvm::sys::path::end().

Referenced by emitGPDisp(), llvm::SIInstrInfo::expandPostRAPseudo(), and for().

◆ begin()

MachineBasicBlock::instr_iterator llvm::MIBundleBuilder::begin ( ) const
inline

Return an iterator to the first bundled instruction.

Definition at line 541 of file MachineInstrBuilder.h.

Referenced by llvm::SIInstrInfo::expandPostRAPseudo().

◆ empty()

bool llvm::MIBundleBuilder::empty ( ) const
inline

Return true if no instructions have been inserted in this bundle yet.

Empty bundles aren't representable in a MachineBasicBlock.

Definition at line 538 of file MachineInstrBuilder.h.

◆ end()

MachineBasicBlock::instr_iterator llvm::MIBundleBuilder::end ( ) const
inline

Return an iterator beyond the last bundled instruction.

Definition at line 544 of file MachineInstrBuilder.h.

◆ getMBB()

MachineBasicBlock& llvm::MIBundleBuilder::getMBB ( ) const
inline

Return a reference to the basic block containing this bundle.

Definition at line 534 of file MachineInstrBuilder.h.

◆ insert()

MIBundleBuilder& llvm::MIBundleBuilder::insert ( MachineBasicBlock::instr_iterator  I,
MachineInstr MI 
)
inline

◆ prepend()

MIBundleBuilder& llvm::MIBundleBuilder::prepend ( MachineInstr MI)
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 570 of file MachineInstrBuilder.h.

References llvm::sys::path::begin().

Referenced by llvm::finalizeBundle().


The documentation for this class was generated from the following file: