LLVM 22.0.0git
llvm::InstrEmitter Class Reference

#include "CodeGen/SelectionDAG/InstrEmitter.h"

Public Types

using VRBaseMapType = SmallDenseMap<SDValue, Register, 16>

Public Member Functions

void AddDbgValueLocationOps (MachineInstrBuilder &MIB, const MCInstrDesc &DbgValDesc, ArrayRef< SDDbgOperand > Locations, VRBaseMapType &VRBaseMap)
MachineInstrEmitDbgValue (SDDbgValue *SD, VRBaseMapType &VRBaseMap)
 EmitDbgValue - Generate machine instruction for a dbg_value node.
MachineInstrEmitDbgInstrRef (SDDbgValue *SD, VRBaseMapType &VRBaseMap)
 Emit a dbg_value as a DBG_INSTR_REF.
MachineInstrEmitDbgNoLocation (SDDbgValue *SD)
 Emit a DBG_VALUE $noreg, indicating a variable has no location.
MachineInstrEmitDbgValueList (SDDbgValue *SD, VRBaseMapType &VRBaseMap)
 Emit a DBG_VALUE_LIST from the operands to SDDbgValue.
MachineInstrEmitDbgValueFromSingleOp (SDDbgValue *SD, VRBaseMapType &VRBaseMap)
 Emit a DBG_VALUE from the operands to SDDbgValue.
MachineInstrEmitDbgLabel (SDDbgLabel *SD)
 Generate machine instruction for a dbg_label node.
void EmitNode (SDNode *Node, bool IsClone, bool IsCloned, VRBaseMapType &VRBaseMap)
 EmitNode - Generate machine code for a node and needed dependencies.
MachineBasicBlockgetBlock ()
 getBlock - Return the current basic block.
MachineBasicBlock::iterator getInsertPos ()
 getInsertPos - Return the current insertion position.
 InstrEmitter (const TargetMachine &TM, MachineBasicBlock *mbb, MachineBasicBlock::iterator insertpos)
 InstrEmitter - Construct an InstrEmitter and set it to start inserting at the given position in the given block.

Static Public Member Functions

static unsigned CountResults (SDNode *Node)
 CountResults - The results of target nodes have register or immediate operands first, then an optional chain, and optional flag operands (which do not go into the machine instrs.)

Detailed Description

Definition at line 32 of file InstrEmitter.h.

Member Typedef Documentation

◆ VRBaseMapType

Constructor & Destructor Documentation

◆ InstrEmitter()

InstrEmitter::InstrEmitter ( const TargetMachine & TM,
MachineBasicBlock * mbb,
MachineBasicBlock::iterator insertpos )

InstrEmitter - Construct an InstrEmitter and set it to start inserting at the given position in the given block.

Definition at line 1453 of file InstrEmitter.cpp.

References getParent(), and llvm::MachineBasicBlock::getParent().

Member Function Documentation

◆ AddDbgValueLocationOps()

◆ CountResults()

unsigned InstrEmitter::CountResults ( SDNode * Node)
static

CountResults - The results of target nodes have register or immediate operands first, then an optional chain, and optional flag operands (which do not go into the machine instrs.)

CountResults - The results of target nodes have register or immediate operands first, then an optional chain, and optional glue operands (which do not go into the resulting MachineInstr).

Definition at line 43 of file InstrEmitter.cpp.

References N.

◆ EmitDbgInstrRef()

◆ EmitDbgLabel()

MachineInstr * InstrEmitter::EmitDbgLabel ( SDDbgLabel * SD)

Generate machine instruction for a dbg_label node.

Definition at line 977 of file InstrEmitter.cpp.

References llvm::MachineInstrBuilder::addMetadata(), assert(), llvm::BuildMI(), llvm::cast(), DL, llvm::SDDbgLabel::getDebugLoc(), llvm::SDDbgLabel::getLabel(), and II.

◆ EmitDbgNoLocation()

MachineInstr * InstrEmitter::EmitDbgNoLocation ( SDDbgValue * SD)

Emit a DBG_VALUE $noreg, indicating a variable has no location.

Definition at line 913 of file InstrEmitter.cpp.

References llvm::BuildMI(), llvm::DIExpression::convertToUndefExpression(), DL, llvm::SDDbgValue::getDebugLoc(), llvm::SDDbgValue::getExpression(), and llvm::SDDbgValue::getVariable().

Referenced by EmitDbgInstrRef(), and EmitDbgValue().

◆ EmitDbgValue()

◆ EmitDbgValueFromSingleOp()

◆ EmitDbgValueList()

◆ EmitNode()

void llvm::InstrEmitter::EmitNode ( SDNode * Node,
bool IsClone,
bool IsCloned,
VRBaseMapType & VRBaseMap )
inline

EmitNode - Generate machine code for a node and needed dependencies.

Definition at line 142 of file InstrEmitter.h.

◆ getBlock()

MachineBasicBlock * llvm::InstrEmitter::getBlock ( )
inline

getBlock - Return the current basic block.

Definition at line 151 of file InstrEmitter.h.

◆ getInsertPos()

MachineBasicBlock::iterator llvm::InstrEmitter::getInsertPos ( )
inline

getInsertPos - Return the current insertion position.

Definition at line 154 of file InstrEmitter.h.


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