LLVM  6.0.0svn
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, unsigned > &VRBaseMap)
 EmitDbgValue - Generate machine instruction for a dbg_value node. More...
 
void EmitNode (SDNode *Node, bool IsClone, bool IsCloned, DenseMap< SDValue, unsigned > &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 (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 29 of file InstrEmitter.h.

Constructor & Destructor Documentation

◆ InstrEmitter()

InstrEmitter::InstrEmitter ( 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 1068 of file InstrEmitter.cpp.

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

References llvm::SDNode::getNumValues(), llvm::SDNode::getValueType(), llvm::MVT::Glue, N, and llvm::MVT::Other.

Referenced by countOperands(), EmitDbgValue(), and RemoveUnusedGlue().

◆ EmitDbgValue()

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

EmitDbgValue - Generate machine instruction for a dbg_value node.

Definition at line 674 of file InstrEmitter.cpp.

References llvm::MachineInstrBuilder::addCImm(), llvm::MachineInstrBuilder::addExternalSymbol(), llvm::MachineInstrBuilder::addFPImm(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addMetadata(), llvm::MachineInstrBuilder::addReg(), llvm::TargetLowering::AdjustInstrPostInstrSelection(), llvm::ISD::ANNOTATION_LABEL, llvm::CallingConv::AnyReg, llvm::SmallVectorImpl< T >::append(), assert(), llvm::SmallVectorTemplateCommon< T, typename >::back(), llvm::BuildMI(), llvm::PatchPointOpers::CCPos, llvm::SDDbgValue::CONST, llvm::ISD::CopyFromReg, llvm::ISD::CopyToReg, countOperands(), CountResults(), llvm::RegState::Debug, llvm::RegState::Define, llvm::SDNode::dump(), llvm::dyn_cast(), llvm::RegState::EarlyClobber, llvm::ISD::EH_LABEL, llvm::SmallVectorBase::empty(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::ISD::EntryToken, F(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::find(), llvm::MachineInstr::findRegisterDefOperand(), llvm::SDDbgValue::FRAMEIX, llvm::MCInstrInfo::get(), llvm::SDDbgValue::getConst(), llvm::SDNode::getConstantOperandVal(), llvm::SDDbgValue::getDebugLoc(), llvm::SDNode::getDebugLoc(), llvm::SDDbgValue::getExpression(), llvm::SDDbgValue::getFrameIx(), llvm::SDNode::getGluedUser(), llvm::MCInstrDesc::getImplicitDefs(), llvm::MCInstrDesc::getImplicitUses(), llvm::getImplRegState(), llvm::FrameIndexSDNode::getIndex(), llvm::SDDbgValue::getKind(), llvm::InlineAsm::getKind(), llvm::SDNode::getMachineOpcode(), llvm::MCInstrDesc::getNumDefs(), llvm::MCInstrDesc::getNumImplicitDefs(), llvm::MCInstrDesc::getNumImplicitUses(), llvm::InlineAsm::getNumOperandRegisters(), llvm::SDValue::getNumOperands(), llvm::MCInstrDesc::getNumOperands(), llvm::MachineInstr::getNumOperands(), llvm::SDNode::getNumOperands(), llvm::SDNode::getNumValues(), llvm::SDNode::getOpcode(), llvm::SDNode::getOperand(), getReg(), llvm::SDDbgValue::getResNo(), llvm::TargetLowering::getScratchRegisters(), llvm::SDDbgValue::getSDNode(), llvm::object::getSymbol(), llvm::SDValue::getValueType(), llvm::SDNode::getValueType(), llvm::SDDbgValue::getVariable(), llvm::MVT::Glue, llvm::SDNode::hasAnyUseOfValue(), I, llvm::RegState::ImplicitDefine, llvm::ISD::INLINEASM, llvm::MachineBasicBlock::insert(), llvm::SDDbgValue::isIndirect(), llvm::TargetRegisterInfo::isPhysicalRegister(), llvm::InlineAsm::isUseOperandTiedToDef(), llvm::MCInstrDesc::isVariadic(), llvm::InlineAsm::Kind_Clobber, llvm::InlineAsm::Kind_Imm, llvm::InlineAsm::Kind_Mem, llvm::InlineAsm::Kind_RegDef, llvm::InlineAsm::Kind_RegDefEarlyClobber, llvm::InlineAsm::Kind_RegUse, llvm::ISD::LIFETIME_END, llvm::ISD::LIFETIME_START, llvm_unreachable, llvm::ISD::MERGE_VALUES, llvm::InlineAsm::Op_AsmString, llvm::InlineAsm::Op_ExtraInfo, llvm::InlineAsm::Op_FirstOperand, llvm::InlineAsm::Op_MDNode, llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), llvm::MachineInstr::readsRegister(), llvm::SDDbgValue::SDNODE, llvm::MachineOperand::setIsEarlyClobber(), llvm::MachineInstr::tieOperands(), and llvm::ISD::TokenFactor.

Referenced by llvm::ScheduleDAGSDNodes::EmitSchedule(), and ProcessSDDbgValues().

◆ EmitNode()

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

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

Definition at line 118 of file InstrEmitter.h.

References llvm::SDNode::isMachineOpcode().

Referenced by llvm::ScheduleDAGSDNodes::EmitSchedule(), and findGluedUser().

◆ getBlock()

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

getBlock - Return the current basic block.

Definition at line 127 of file InstrEmitter.h.

Referenced by llvm::ScheduleDAGSDNodes::EmitSchedule(), findGluedUser(), ProcessSDDbgValues(), and ProcessSourceNode().

◆ getInsertPos()

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

getInsertPos - Return the current insertion position.

Definition at line 130 of file InstrEmitter.h.

Referenced by llvm::ScheduleDAGSDNodes::EmitSchedule(), findGluedUser(), ProcessSDDbgValues(), and ProcessSourceNode().


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