llvm::BuildMI

BuildMI overloads

Synopses

Declared in <llvm/CodeGen/MachineInstrBuilder.h>

Builder interface. Specify how to create the initial instruction itself.

MachineInstrBuilder
BuildMI(
    MachineFunction& MF,
    MIMetadata const& MIMD,
    MCInstrDesc const& MCID);
» more...

This version of the builder inserts the newly-built instruction at the end of the given MachineBasicBlock, and does NOT take a destination register.

MachineInstrBuilder
BuildMI(
    MachineBasicBlock* BB,
    MIMetadata const& MIMD,
    MCInstrDesc const& MCID);
» more...

Insert a new instruction before I without a destination register.

MachineInstrBuilder
BuildMI(
    MachineBasicBlock& BB,
    MachineBasicBlock::instr_iterator I,
    MIMetadata const& MIMD,
    MCInstrDesc const& MCID);
» more...

Insert a new instruction before I without a destination register.

MachineInstrBuilder
BuildMI(
    MachineBasicBlock& BB,
    MachineBasicBlock::iterator I,
    MIMetadata const& MIMD,
    MCInstrDesc const& MCID);
» more...

Insert a new instruction before I without a destination register.

MachineInstrBuilder
BuildMI(
    MachineBasicBlock& BB,
    MachineInstr& I,
    MIMetadata const& MIMD,
    MCInstrDesc const& MCID);
» more...

Insert a new instruction before I without a destination register.

MachineInstrBuilder
BuildMI(
    MachineBasicBlock& BB,
    MachineInstr* I,
    MIMetadata const& MIMD,
    MCInstrDesc const& MCID);
» more...

This version of the builder sets up the first operand as a destination virtual register.

MachineInstrBuilder
BuildMI(
    MachineFunction& MF,
    MIMetadata const& MIMD,
    MCInstrDesc const& MCID,
    Register DestReg);
» more...

Append a new instruction with a destination register to BB.

MachineInstrBuilder
BuildMI(
    MachineBasicBlock* BB,
    MIMetadata const& MIMD,
    MCInstrDesc const& MCID,
    Register DestReg);
» more...

Insert a new instruction with a destination register before I.

MachineInstrBuilder
BuildMI(
    MachineBasicBlock& BB,
    MachineBasicBlock::instr_iterator I,
    MIMetadata const& MIMD,
    MCInstrDesc const& MCID,
    Register DestReg);
» more...

Insert a new instruction with a destination register before I.

MachineInstrBuilder
BuildMI(
    MachineBasicBlock& BB,
    MachineBasicBlock::iterator I,
    MIMetadata const& MIMD,
    MCInstrDesc const& MCID,
    Register DestReg);
» more...

Insert a new instruction with a destination register before I.

MachineInstrBuilder
BuildMI(
    MachineBasicBlock& BB,
    MachineInstr& I,
    MIMetadata const& MIMD,
    MCInstrDesc const& MCID,
    Register DestReg);
» more...

Insert a new instruction with a destination register before I.

MachineInstrBuilder
BuildMI(
    MachineBasicBlock& BB,
    MachineInstr* I,
    MIMetadata const& MIMD,
    MCInstrDesc const& MCID,
    Register DestReg);
» more...

Build a DBG_VALUE for a register or a register-indirect address.

MachineInstrBuilder
BuildMI(
    MachineFunction& MF,
    DebugLoc const& DL,
    MCInstrDesc const& MCID,
    bool IsIndirect,
    Register Reg,
    MDNode const* Variable,
    MDNode const* Expr);
» more...

This version of the builder builds a DBG_VALUE or DBG_VALUE_LIST intrinsic for a MachineOperand.

MachineInstrBuilder
BuildMI(
    MachineFunction& MF,
    DebugLoc const& DL,
    MCInstrDesc const& MCID,
    bool IsIndirect,
    ArrayRef<MachineOperand> MOs,
    MDNode const* Variable,
    MDNode const* Expr);
» more...

This version of the builder builds a DBG_VALUE intrinsic for either a value in a register or a register-indirect address and inserts it at position I.

MachineInstrBuilder
BuildMI(
    MachineBasicBlock& BB,
    MachineBasicBlock::iterator I,
    DebugLoc const& DL,
    MCInstrDesc const& MCID,
    bool IsIndirect,
    Register Reg,
    MDNode const* Variable,
    MDNode const* Expr);
» more...

This version of the builder builds a DBG_VALUE, DBG_INSTR_REF, or DBG_VALUE_LIST intrinsic for a machine operand and inserts it at position I.

MachineInstrBuilder
BuildMI(
    MachineBasicBlock& BB,
    MachineBasicBlock::iterator I,
    DebugLoc const& DL,
    MCInstrDesc const& MCID,
    bool IsIndirect,
    ArrayRef<MachineOperand> MOs,
    MDNode const* Variable,
    MDNode const* Expr);
» more...

Return Value

  • Builder for the newly created instruction.
  • Builder for the newly created DBG_VALUE.
  • Builder for the newly created debug instruction.

Parameters

NameDescription
MFMachine function that will own the new instruction.
MIMDDebug location and related metadata for the instruction.
MCIDOpcode descriptor for the new instruction.
BBBasic block that receives the instruction at the end.
IInsertion point; the instruction is placed before this iterator.
DestRegDestination virtual register used as the first operand.
DLDebug location for the new instruction.
IsIndirectTrue if the DBG_VALUE is a register-indirect address.
RegRegister that holds the value or the indirect address.
VariableMetadata node identifying the source variable.
ExprExpression that computes the variable from the operands.
MOsOperands that locate the debug value.