LLVM  12.0.0git
Public Member Functions | Static Public Member Functions | List of all members
llvm::InstrEmitter Class Reference

#include "CodeGen/SelectionDAG/InstrEmitter.h"

Public Member Functions

MachineInstrEmitDbgValue (SDDbgValue *SD, DenseMap< SDValue, Register > &VRBaseMap)
 EmitDbgValue - Generate machine instruction for a dbg_value node. More...
 
MachineInstrEmitDbgInstrRef (SDDbgValue *SD, DenseMap< SDValue, Register > &VRBaseMap)
 Attempt to emit a dbg_value as a DBG_INSTR_REF. More...
 
MachineInstrEmitDbgLabel (SDDbgLabel *SD)
 Generate machine instruction for a dbg_label node. More...
 
void EmitNode (SDNode *Node, bool IsClone, bool IsCloned, DenseMap< SDValue, Register > &VRBaseMap)
 EmitNode - Generate machine code for a node and needed dependencies. More...
 
MachineBasicBlockgetBlock ()
 getBlock - Return the current basic block. More...
 
MachineBasicBlock::iterator getInsertPos ()
 getInsertPos - Return the current insertion position. More...
 
 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. More...
 

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.) More...
 

Detailed Description

Definition at line 30 of file InstrEmitter.h.

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 1256 of file InstrEmitter.cpp.

References llvm::TargetMachine::Options, and llvm::TargetOptions::ValueTrackingVariableLocations.

Member Function Documentation

◆ 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 46 of file InstrEmitter.cpp.

Referenced by EmitDbgLabel().

◆ EmitDbgInstrRef()

MachineInstr * InstrEmitter::EmitDbgInstrRef ( SDDbgValue SD,
DenseMap< SDValue, Register > &  VRBaseMap 
)

◆ EmitDbgLabel()

MachineInstr * InstrEmitter::EmitDbgLabel ( SDDbgLabel SD)

Generate machine instruction for a dbg_label node.

Definition at line 827 of file InstrEmitter.cpp.

References llvm::MachineInstrBuilder::addMetadata(), llvm::TargetLowering::AdjustInstrPostInstrSelection(), llvm::ISD::ANNOTATION_LABEL, llvm::CallingConv::AnyReg, llvm::SmallVectorImpl< T >::append(), assert(), llvm::BuildMI(), llvm::PatchPointOpers::CCPos, llvm::ISD::CopyFromReg, llvm::ISD::CopyToReg, countOperands(), CountResults(), llvm::tgtok::Def, llvm::SDNode::dump(), llvm::numbers::e, llvm::RegState::EarlyClobber, llvm::ISD::EH_LABEL, llvm::SmallVectorBase< SmallVectorSizeType< T > >::empty(), llvm::ISD::EntryToken, F(), llvm::MCInstrInfo::get(), llvm::SDNode::getConstantOperandVal(), llvm::SDDbgLabel::getDebugLoc(), llvm::SDNode::getDebugLoc(), llvm::StatepointOpers::getFirstGCPtrIdx(), llvm::SDNode::getFlags(), llvm::SDNode::getGluedUser(), llvm::MCInstrDesc::getImplicitDefs(), llvm::MCInstrDesc::getImplicitUses(), llvm::SDDbgLabel::getLabel(), llvm::SDValue::getMachineOpcode(), llvm::SDNode::getMachineOpcode(), llvm::StackMaps::getNextMetaArgIdx(), llvm::MCInstrDesc::getNumDefs(), llvm::MCInstrDesc::getNumImplicitDefs(), llvm::MCInstrDesc::getNumImplicitUses(), llvm::MCInstrDesc::getNumOperands(), llvm::SDNode::getNumValues(), llvm::SDNode::getOpcode(), llvm::MachineInstr::getOperand(), llvm::SDNode::getOperand(), getReg(), llvm::TargetLowering::getScratchRegisters(), llvm::MachineFunction::getTarget(), llvm::SDNode::getValueType(), llvm::MVT::Glue, llvm::SDNodeFlags::hasAllowContract(), llvm::SDNodeFlags::hasAllowReassociation(), llvm::SDNodeFlags::hasAllowReciprocal(), llvm::SDNode::hasAnyUseOfValue(), llvm::SDNodeFlags::hasApproximateFuncs(), llvm::SDNodeFlags::hasExact(), llvm::SDNodeFlags::hasNoFPExcept(), llvm::SDNodeFlags::hasNoInfs(), llvm::SDNodeFlags::hasNoNaNs(), llvm::SDNodeFlags::hasNoSignedWrap(), llvm::SDNodeFlags::hasNoSignedZeros(), llvm::SDNodeFlags::hasNoUnsignedWrap(), llvm::RegState::ImplicitDefine, llvm::MachineBasicBlock::insert(), llvm::SDValue::isMachineOpcode(), llvm::Register::isPhysical(), llvm::MachineOperand::isReg(), llvm::MCInstrDesc::isVariadic(), llvm::Register::isVirtualRegister(), llvm_unreachable, llvm::ISD::MERGE_VALUES, MI, llvm::SmallVectorTemplateBase< T >::push_back(), Reg, llvm::MachineInstr::setFlag(), llvm::MachineInstr::tieOperands(), llvm::ISD::TokenFactor, llvm::LLVMTargetMachine::usesPhysRegsForValues(), and llvm::MCInstrDesc::variadicOpsAreDefs().

◆ EmitDbgValue()

MachineInstr * InstrEmitter::EmitDbgValue ( SDDbgValue SD,
DenseMap< SDValue, Register > &  VRBaseMap 
)

◆ EmitNode()

void llvm::InstrEmitter::EmitNode ( SDNode Node,
bool  IsClone,
bool  IsCloned,
DenseMap< SDValue, Register > &  VRBaseMap 
)
inline

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

Definition at line 125 of file InstrEmitter.h.

References llvm::SDNode::isMachineOpcode().

◆ getBlock()

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

getBlock - Return the current basic block.

Definition at line 134 of file InstrEmitter.h.

References MBB.

Referenced by ProcessSDDbgValues().

◆ getInsertPos()

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

getInsertPos - Return the current insertion position.

Definition at line 137 of file InstrEmitter.h.

References llvm::SystemZISD::TM.

Referenced by ProcessSDDbgValues().


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