class SelectionDAGBuilder

Declaration

class SelectionDAGBuilder { /* full declaration omitted */ };

Description

SelectionDAGBuilder - This is the common target-independent lowering implementation that is parameterized by a TargetLowering object.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:94

Member Variables

private const llvm::Instruction* CurInst = nullptr
The current instruction being visited.
private DenseMap<const llvm::Value*, llvm::SDValue> NodeMap
private DenseMap<const llvm::Value*, llvm::SDValue> UnusedArgNodeMap
Maps argument value for unused arguments. This is used to preserve debug information for incoming arguments.
private MapVector<const llvm::Value*, llvm::SelectionDAGBuilder:: DanglingDebugInfoVector> DanglingDebugInfoMap
Keeps track of dbg_values for which we have not yet seen the referent. We defer handling these until we do see it.
public SmallVector<llvm::SDValue, 8> PendingLoads
Loads are not emitted to the program immediately. We bunch them up and then emit token factor nodes when possible. This allows us to get simple disambiguation between loads without worrying about alias analysis.
public llvm::StatepointLoweringState StatepointLowering
State used while lowering a statepoint sequence (gc_statepoint, gc_relocate, and gc_result). See StatepointLowering.hpp/cpp for details.
private SmallVector<llvm::SDValue, 8> PendingExports
CopyToReg nodes that copy values to virtual registers for export to other blocks need to be emitted before any terminator instruction, but they have no other ordering requirements. We bunch them up and the emit a single tokenfactor for them just before terminator instructions.
private SmallVector<llvm::SDValue, 8> PendingConstrainedFP
Similar to loads, nodes corresponding to constrained FP intrinsics are bunched up and emitted when necessary. These can be moved across each other and any (normal) memory operation (load or store), but not across calls or instructions having unspecified side effects. As a special case, constrained FP intrinsics using fpexcept.strict may not be deleted even if otherwise unused, so they need to be chained before any terminator instruction (like PendingExports). We track the latter set of nodes in a separate list.
private SmallVector<llvm::SDValue, 8> PendingConstrainedFPStrict
private unsigned int SDNodeOrder
A unique monotonically increasing number used to order the SDNodes we create.
private const llvm::TargetMachine& TM
public llvm::SelectionDAG& DAG
public llvm::AAResults* AA = nullptr
public const llvm::TargetLibraryInfo* LibInfo
public std::unique_ptr<SDAGSwitchLowering> SL
public llvm::StackProtectorDescriptor SPDescriptor
A StackProtectorDescriptor structure used to communicate stack protector information in between SelectBasicBlock and FinishBasicBlock.
public DenseMap<const llvm::Constant*, unsigned int> ConstantsOut
public llvm::FunctionLoweringInfo& FuncInfo
Information about the function as a whole.
public llvm::SwiftErrorValueTracking& SwiftError
Information about the swifterror values used throughout the function.
public llvm::GCFunctionInfo* GFI
Garbage collection metadata for the function.
public DenseMap<llvm::MachineBasicBlock*, SmallVector<unsigned int, 4>> LPadToCallSiteMap
Map a landing pad to the call site indexes.
public bool HasTailCall = false
This is set to true if a call in the current block has been translated as a tail call. In this case, no subsequent DAG nodes should be created.
public llvm::LLVMContext* Context
public static const unsigned int LowestSDNodeOrder = 1
Lowest valid SDNodeOrder. The special case 0 is reserved for scheduling nodes without a corresponding SDNode.

Method Overview

  • public void CopyToExportRegsIfNeeded(const llvm::Value * V)
  • public void CopyValueToVirtualRegister(const llvm::Value * V, unsigned int Reg, ISD::NodeType ExtendType = ISD::ANY_EXTEND)
  • public void EmitBranchForMergedCondition(const llvm::Value * Cond, llvm::MachineBasicBlock * TBB, llvm::MachineBasicBlock * FBB, llvm::MachineBasicBlock * CurBB, llvm::MachineBasicBlock * SwitchBB, llvm::BranchProbability TProb, llvm::BranchProbability FProb, bool InvertCond)
  • private bool EmitFuncArgumentDbgValue(const llvm::Value * V, llvm::DILocalVariable * Variable, llvm::DIExpression * Expr, llvm::DILocation * DL, llvm::SelectionDAGBuilder::FuncArgumentDbgValueKind Kind, const llvm::SDValue & N)
  • public void ExportFromCurrentBlock(const llvm::Value * V)
  • public void FindMergedConditions(const llvm::Value * Cond, llvm::MachineBasicBlock * TBB, llvm::MachineBasicBlock * FBB, llvm::MachineBasicBlock * CurBB, llvm::MachineBasicBlock * SwitchBB, Instruction::BinaryOps Opc, llvm::BranchProbability TProb, llvm::BranchProbability FProb, bool InvertCond)
  • private void HandlePHINodesInSuccessorBlocks(const llvm::BasicBlock * LLVMBB)
  • public llvm::SDValue LowerAsSTATEPOINT(llvm::SelectionDAGBuilder::StatepointLoweringInfo & SI)
  • public void LowerCallSiteWithDeoptBundle(const llvm::CallBase * Call, llvm::SDValue Callee, const llvm::BasicBlock * EHPadBB)
  • public void LowerCallSiteWithDeoptBundleImpl(const llvm::CallBase * Call, llvm::SDValue Callee, const llvm::BasicBlock * EHPadBB, bool VarArgDisallowed, bool ForceVoidReturnTy)
  • public void LowerCallTo(const llvm::CallBase & CB, llvm::SDValue Callee, bool IsTailCall, bool IsMustTailCall, const llvm::BasicBlock * EHPadBB = nullptr)
  • public void LowerDeoptimizeCall(const llvm::CallInst * CI)
  • public void LowerDeoptimizingReturn()
  • public void LowerStatepoint(const llvm::GCStatepointInst & I, const llvm::BasicBlock * EHPadBB = nullptr)
  • private llvm::MachineBasicBlock * NextBlock(llvm::MachineBasicBlock * MBB)
  • public SelectionDAGBuilder(llvm::SelectionDAG & dag, llvm::FunctionLoweringInfo & funcinfo, llvm::SwiftErrorValueTracking & swifterror, CodeGenOpt::Level ol)
  • public bool ShouldEmitAsBranches(const std::vector<SwitchCG::CaseBlock> & Cases)
  • public void UpdateSplitBlock(llvm::MachineBasicBlock * First, llvm::MachineBasicBlock * Last)
  • public void addDanglingDebugInfo(const llvm::DbgValueInst * DI, llvm::DebugLoc DL, unsigned int Order)
  • private void addSuccessorWithProb(llvm::MachineBasicBlock * Src, llvm::MachineBasicBlock * Dst, llvm::BranchProbability Prob = BranchProbability::getUnknown())
  • private unsigned int caseClusterRank(const SwitchCG::CaseCluster & CC, SwitchCG::CaseClusterIt First, SwitchCG::CaseClusterIt Last)
  • public void clear()
  • public void clearDanglingDebugInfo()
  • public void dropDanglingDebugInfo(const llvm::DILocalVariable * Variable, const llvm::DIExpression * Expr)
  • private void emitInlineAsmError(const llvm::CallBase & Call, const llvm::Twine & Message)
  • public llvm::SDValue getControlRoot()
  • public llvm::SDValue getCopyFromRegs(const llvm::Value * V, llvm::Type * Ty)
  • public llvm::DebugLoc getCurDebugLoc() const
  • public llvm::SDLoc getCurSDLoc() const
  • private llvm::SDDbgValue * getDbgValue(llvm::SDValue N, llvm::DILocalVariable * Variable, llvm::DIExpression * Expr, const llvm::DebugLoc & dl, unsigned int DbgSDNodeOrder)
  • private llvm::BranchProbability getEdgeProbability(const llvm::MachineBasicBlock * Src, const llvm::MachineBasicBlock * Dst) const
  • public llvm::MVT getFrameIndexTy()
  • public llvm::SDValue getMemoryRoot()
  • public llvm::SDValue getNonRegisterValue(const llvm::Value * V)
  • public llvm::SDValue getRoot()
  • public llvm::SDValue getValue(const llvm::Value * V)
  • public llvm::SDValue getValueImpl(const llvm::Value * V)
  • public bool handleDebugValue(ArrayRef<const llvm::Value *> Values, llvm::DILocalVariable * Var, llvm::DIExpression * Expr, llvm::DebugLoc CurDL, llvm::DebugLoc InstDL, unsigned int Order, bool IsVariadic)
  • public void init(llvm::GCFunctionInfo * gfi, llvm::AAResults * AA, const llvm::TargetLibraryInfo * li)
  • public bool isExportableFromCurrentBlock(const llvm::Value * V, const llvm::BasicBlock * FromBB)
  • private void lowerCallToExternalSymbol(const llvm::CallInst & I, const char * FunctionName)
  • private llvm::SDValue lowerEndEH(llvm::SDValue Chain, const llvm::InvokeInst * II, const llvm::BasicBlock * EHPadBB, llvm::MCSymbol * BeginLabel)
  • public std::pair<SDValue, SDValue> lowerInvokable(TargetLowering::CallLoweringInfo & CLI, const llvm::BasicBlock * EHPadBB = nullptr)
  • public llvm::SDValue lowerRangeToAssertZExt(llvm::SelectionDAG & DAG, const llvm::Instruction & I, llvm::SDValue Op)
  • private llvm::SDValue lowerStartEH(llvm::SDValue Chain, const llvm::BasicBlock * EHPadBB, llvm::MCSymbol *& BeginLabel)
  • private void lowerWorkItem(SwitchCG::SwitchWorkListItem W, llvm::Value * Cond, llvm::MachineBasicBlock * SwitchMBB, llvm::MachineBasicBlock * DefaultMBB)
  • private llvm::MachineBasicBlock * peelDominantCaseCluster(const llvm::SwitchInst & SI, SwitchCG::CaseClusterVector & Clusters, llvm::BranchProbability & PeeledCaseProb)
  • public void populateCallLoweringInfo(TargetLowering::CallLoweringInfo & CLI, const llvm::CallBase * Call, unsigned int ArgIdx, unsigned int NumArgs, llvm::SDValue Callee, llvm::Type * ReturnTy, bool IsPatchPoint)
  • private void processIntegerCallValue(const llvm::Instruction & I, llvm::SDValue Value, bool IsSigned)
  • public void resolveDanglingDebugInfo(const llvm::Value * V, llvm::SDValue Val)
  • public void resolveOrClearDbgInfo()
  • public void salvageUnresolvedDbgValue(llvm::SelectionDAGBuilder::DanglingDebugInfo & DDI)
  • public void setUnusedArgValue(const llvm::Value * V, llvm::SDValue NewN)
  • public void setValue(const llvm::Value * V, llvm::SDValue NewN)
  • private void splitWorkItem(SwitchCG::SwitchWorkList & WorkList, const SwitchCG::SwitchWorkListItem & W, llvm::Value * Cond, llvm::MachineBasicBlock * SwitchMBB)
  • private void updateDAGForMaybeTailCall(llvm::SDValue MaybeTC)
  • private llvm::SDValue updateRoot(SmallVectorImpl<llvm::SDValue> & Pending)
  • public void visit(unsigned int Opcode, const llvm::User & I)
  • public void visit(const llvm::Instruction & I)
  • private void visitAShr(const llvm::User & I)
  • private void visitAdd(const llvm::User & I)
  • private void visitAddrSpaceCast(const llvm::User & I)
  • private void visitAlloca(const llvm::AllocaInst & I)
  • private void visitAnd(const llvm::User & I)
  • private void visitAtomicCmpXchg(const llvm::AtomicCmpXchgInst & I)
  • private void visitAtomicLoad(const llvm::LoadInst & I)
  • private void visitAtomicRMW(const llvm::AtomicRMWInst & I)
  • private void visitAtomicStore(const llvm::StoreInst & I)
  • private void visitBinary(const llvm::User & I, unsigned int Opcode)
  • private bool visitBinaryFloatCall(const llvm::CallInst & I, unsigned int Opcode)
  • private void visitBitCast(const llvm::User & I)
  • public void visitBitTestCase(SwitchCG::BitTestBlock & BB, llvm::MachineBasicBlock * NextMBB, llvm::BranchProbability BranchProbToNext, unsigned int Reg, SwitchCG::BitTestCase & B, llvm::MachineBasicBlock * SwitchBB)
  • public void visitBitTestHeader(SwitchCG::BitTestBlock & B, llvm::MachineBasicBlock * SwitchBB)
  • private void visitBr(const llvm::BranchInst & I)
  • private void visitCall(const llvm::CallInst & I)
  • private void visitCallBr(const llvm::CallBrInst & I)
  • private void visitCatchPad(const llvm::CatchPadInst & I)
  • private void visitCatchRet(const llvm::CatchReturnInst & I)
  • private void visitCatchSwitch(const llvm::CatchSwitchInst & I)
  • private void visitCleanupPad(const llvm::CleanupPadInst & CPI)
  • private void visitCleanupRet(const llvm::CleanupReturnInst & I)
  • private void visitConstrainedFPIntrinsic(const llvm::ConstrainedFPIntrinsic & FPI)
  • private void visitExtractElement(const llvm::User & I)
  • private void visitExtractValue(const llvm::ExtractValueInst & I)
  • private void visitFAdd(const llvm::User & I)
  • private void visitFCmp(const llvm::User & I)
  • private void visitFDiv(const llvm::User & I)
  • private void visitFMul(const llvm::User & I)
  • private void visitFNeg(const llvm::User & I)
  • private void visitFPExt(const llvm::User & I)
  • private void visitFPToSI(const llvm::User & I)
  • private void visitFPToUI(const llvm::User & I)
  • private void visitFPTrunc(const llvm::User & I)
  • private void visitFRem(const llvm::User & I)
  • private void visitFSub(const llvm::User & I)
  • private void visitFence(const llvm::FenceInst & I)
  • private void visitFreeze(const llvm::FreezeInst & I)
  • private void visitGCRelocate(const llvm::GCRelocateInst & Relocate)
  • private void visitGCResult(const llvm::GCResultInst & I)
  • private void visitGetElementPtr(const llvm::User & I)
  • private void visitICmp(const llvm::User & I)
  • private void visitIndirectBr(const llvm::IndirectBrInst & I)
  • private void visitInlineAsm(const llvm::CallBase & Call, const llvm::BasicBlock * EHPadBB = nullptr)
  • private void visitInsertElement(const llvm::User & I)
  • private void visitInsertValue(const llvm::InsertValueInst & I)
  • private void visitIntToPtr(const llvm::User & I)
  • private void visitIntrinsicCall(const llvm::CallInst & I, unsigned int Intrinsic)
  • private void visitInvoke(const llvm::InvokeInst & I)
  • public void visitJumpTable(SwitchCG::JumpTable & JT)
  • public void visitJumpTableHeader(SwitchCG::JumpTable & JT, SwitchCG::JumpTableHeader & JTH, llvm::MachineBasicBlock * SwitchBB)
  • private void visitLShr(const llvm::User & I)
  • private void visitLandingPad(const llvm::LandingPadInst & LP)
  • private void visitLoad(const llvm::LoadInst & I)
  • private void visitLoadFromSwiftError(const llvm::LoadInst & I)
  • private void visitMaskedGather(const llvm::CallInst & I)
  • private void visitMaskedLoad(const llvm::CallInst & I, bool IsExpanding = false)
  • private void visitMaskedScatter(const llvm::CallInst & I)
  • private void visitMaskedStore(const llvm::CallInst & I, bool IsCompressing = false)
  • private bool visitMemChrCall(const llvm::CallInst & I)
  • private bool visitMemCmpBCmpCall(const llvm::CallInst & I)
  • private bool visitMemPCpyCall(const llvm::CallInst & I)
  • private void visitMul(const llvm::User & I)
  • private void visitOr(const llvm::User & I)
  • private void visitPHI(const llvm::PHINode & I)
  • private void visitPatchpoint(const llvm::CallBase & CB, const llvm::BasicBlock * EHPadBB = nullptr)
  • private void visitPtrToInt(const llvm::User & I)
  • private void visitResume(const llvm::ResumeInst & I)
  • private void visitRet(const llvm::ReturnInst & I)
  • private void visitSDiv(const llvm::User & I)
  • private void visitSExt(const llvm::User & I)
  • private void visitSIToFP(const llvm::User & I)
  • public void visitSPDescriptorFailure(llvm::StackProtectorDescriptor & SPD)
  • public void visitSPDescriptorParent(llvm::StackProtectorDescriptor & SPD, llvm::MachineBasicBlock * ParentBB)
  • private void visitSRem(const llvm::User & I)
  • private void visitSelect(const llvm::User & I)
  • private void visitShift(const llvm::User & I, unsigned int Opcode)
  • private void visitShl(const llvm::User & I)
  • private void visitShuffleVector(const llvm::User & I)
  • private void visitStackmap(const llvm::CallInst & I)
  • private void visitStepVector(const llvm::CallInst & I)
  • private void visitStore(const llvm::StoreInst & I)
  • private void visitStoreToSwiftError(const llvm::StoreInst & I)
  • private bool visitStrCmpCall(const llvm::CallInst & I)
  • private bool visitStrCpyCall(const llvm::CallInst & I, bool isStpcpy)
  • private bool visitStrLenCall(const llvm::CallInst & I)
  • private bool visitStrNLenCall(const llvm::CallInst & I)
  • private void visitSub(const llvm::User & I)
  • private void visitSwitch(const llvm::SwitchInst & I)
  • public void visitSwitchCase(SwitchCG::CaseBlock & CB, llvm::MachineBasicBlock * SwitchBB)
  • private void visitTargetIntrinsic(const llvm::CallInst & I, unsigned int Intrinsic)
  • private void visitTrunc(const llvm::User & I)
  • private void visitUDiv(const llvm::User & I)
  • private void visitUIToFP(const llvm::User & I)
  • private void visitURem(const llvm::User & I)
  • private void visitUnary(const llvm::User & I, unsigned int Opcode)
  • private bool visitUnaryFloatCall(const llvm::CallInst & I, unsigned int Opcode)
  • private void visitUnreachable(const llvm::UnreachableInst & I)
  • private void visitUserOp1(const llvm::Instruction & I)
  • private void visitUserOp2(const llvm::Instruction & I)
  • private void visitVAArg(const llvm::VAArgInst & I)
  • private void visitVACopy(const llvm::CallInst & I)
  • private void visitVAEnd(const llvm::CallInst & I)
  • private void visitVAStart(const llvm::CallInst & I)
  • private void visitVPCmp(const llvm::VPCmpIntrinsic & VPIntrin)
  • private void visitVPLoadGather(const llvm::VPIntrinsic & VPIntrin, llvm::EVT VT, SmallVector<llvm::SDValue, 7> & OpValues, bool IsGather)
  • private void visitVPStoreScatter(const llvm::VPIntrinsic & VPIntrin, SmallVector<llvm::SDValue, 7> & OpValues, bool IsScatter)
  • private void visitVPStridedLoad(const llvm::VPIntrinsic & VPIntrin, llvm::EVT VT, SmallVectorImpl<llvm::SDValue> & OpValues)
  • private void visitVPStridedStore(const llvm::VPIntrinsic & VPIntrin, SmallVectorImpl<llvm::SDValue> & OpValues)
  • private void visitVectorPredicationIntrinsic(const llvm::VPIntrinsic & VPIntrin)
  • private void visitVectorReduce(const llvm::CallInst & I, unsigned int Intrinsic)
  • private void visitVectorReverse(const llvm::CallInst & I)
  • private void visitVectorSplice(const llvm::CallInst & I)
  • private void visitXor(const llvm::User & I)
  • private void visitZExt(const llvm::User & I)

Methods

void CopyToExportRegsIfNeeded(
    const llvm::Value* V)

Description

CopyToExportRegsIfNeeded - If the given value has virtual registers created for it, emit nodes to copy the value into the virtual registers.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:356

Parameters

const llvm::Value* V

void CopyValueToVirtualRegister(
    const llvm::Value* V,
    unsigned int Reg,
    ISD::NodeType ExtendType = ISD::ANY_EXTEND)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:287

Parameters

const llvm::Value* V
unsigned int Reg
ISD::NodeType ExtendType = ISD::ANY_EXTEND

void EmitBranchForMergedCondition(
    const llvm::Value* Cond,
    llvm::MachineBasicBlock* TBB,
    llvm::MachineBasicBlock* FBB,
    llvm::MachineBasicBlock* CurBB,
    llvm::MachineBasicBlock* SwitchBB,
    llvm::BranchProbability TProb,
    llvm::BranchProbability FProb,
    bool InvertCond)

Description

EmitBranchForMergedCondition - Helper method for FindMergedConditions. This function emits a branch and is used at the leaves of an OR or an AND operator tree.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:348

Parameters

const llvm::Value* Cond
llvm::MachineBasicBlock* TBB
llvm::MachineBasicBlock* FBB
llvm::MachineBasicBlock* CurBB
llvm::MachineBasicBlock* SwitchBB
llvm::BranchProbability TProb
llvm::BranchProbability FProb
bool InvertCond

bool EmitFuncArgumentDbgValue(
    const llvm::Value* V,
    llvm::DILocalVariable* Variable,
    llvm::DIExpression* Expr,
    llvm::DILocation* DL,
    llvm::SelectionDAGBuilder::
        FuncArgumentDbgValueKind Kind,
    const llvm::SDValue& N)

Description

If V is an function argument then create corresponding DBG_VALUE machine instruction for it now. At the end of instruction selection, they will be inserted to the entry BB.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:623

Parameters

const llvm::Value* V
llvm::DILocalVariable* Variable
llvm::DIExpression* Expr
llvm::DILocation* DL
llvm::SelectionDAGBuilder:: FuncArgumentDbgValueKind Kind
const llvm::SDValue& N

void ExportFromCurrentBlock(const llvm::Value* V)

Description

ExportFromCurrentBlock - If this condition isn't known to be exported from the current basic block, add it to ValueMap now so that we'll get a CopyTo/FromReg.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:357

Parameters

const llvm::Value* V

void FindMergedConditions(
    const llvm::Value* Cond,
    llvm::MachineBasicBlock* TBB,
    llvm::MachineBasicBlock* FBB,
    llvm::MachineBasicBlock* CurBB,
    llvm::MachineBasicBlock* SwitchBB,
    Instruction::BinaryOps Opc,
    llvm::BranchProbability TProb,
    llvm::BranchProbability FProb,
    bool InvertCond)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:343

Parameters

const llvm::Value* Cond
llvm::MachineBasicBlock* TBB
llvm::MachineBasicBlock* FBB
llvm::MachineBasicBlock* CurBB
llvm::MachineBasicBlock* SwitchBB
Instruction::BinaryOps Opc
llvm::BranchProbability TProb
llvm::BranchProbability FProb
bool InvertCond

void HandlePHINodesInSuccessorBlocks(
    const llvm::BasicBlock* LLVMBB)

Description

Handle PHI nodes in successor blocks. Emit code into the SelectionDAG to ensure constants are generated when needed. Remember the virtual registers that need to be added to the Machine PHI nodes as input. We cannot just directly add them, because expansion might result in multiple MBB's for one BB. As such, the start of the BB might correspond to a different MBB than the end.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:607

Parameters

const llvm::BasicBlock* LLVMBB

llvm::SDValue LowerAsSTATEPOINT(
    llvm::SelectionDAGBuilder::
        StatepointLoweringInfo& SI)

Description

Lower \p SLI into a STATEPOINT instruction.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:424

Parameters

llvm::SelectionDAGBuilder::StatepointLoweringInfo& SI

void LowerCallSiteWithDeoptBundle(
    const llvm::CallBase* Call,
    llvm::SDValue Callee,
    const llvm::BasicBlock* EHPadBB)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:431

Parameters

const llvm::CallBase* Call
llvm::SDValue Callee
const llvm::BasicBlock* EHPadBB

void LowerCallSiteWithDeoptBundleImpl(
    const llvm::CallBase* Call,
    llvm::SDValue Callee,
    const llvm::BasicBlock* EHPadBB,
    bool VarArgDisallowed,
    bool ForceVoidReturnTy)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:437

Parameters

const llvm::CallBase* Call
llvm::SDValue Callee
const llvm::BasicBlock* EHPadBB
bool VarArgDisallowed
bool ForceVoidReturnTy

void LowerCallTo(
    const llvm::CallBase& CB,
    llvm::SDValue Callee,
    bool IsTailCall,
    bool IsMustTailCall,
    const llvm::BasicBlock* EHPadBB = nullptr)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:358

Parameters

const llvm::CallBase& CB
llvm::SDValue Callee
bool IsTailCall
bool IsMustTailCall
const llvm::BasicBlock* EHPadBB = nullptr

void LowerDeoptimizeCall(const llvm::CallInst* CI)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:434

Parameters

const llvm::CallInst* CI

void LowerDeoptimizingReturn()

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:435

void LowerStatepoint(
    const llvm::GCStatepointInst& I,
    const llvm::BasicBlock* EHPadBB = nullptr)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:428

Parameters

const llvm::GCStatepointInst& I
const llvm::BasicBlock* EHPadBB = nullptr

llvm::MachineBasicBlock* NextBlock(
    llvm::MachineBasicBlock* MBB)

Description

Return the next block after MBB, or nullptr if there is none.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:629

Parameters

llvm::MachineBasicBlock* MBB

SelectionDAGBuilder(
    llvm::SelectionDAG& dag,
    llvm::FunctionLoweringInfo& funcinfo,
    llvm::SwiftErrorValueTracking& swifterror,
    CodeGenOpt::Level ol)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:241

Parameters

llvm::SelectionDAG& dag
llvm::FunctionLoweringInfo& funcinfo
llvm::SwiftErrorValueTracking& swifterror
CodeGenOpt::Level ol

bool ShouldEmitAsBranches(
    const std::vector<SwitchCG::CaseBlock>& Cases)

Description

If the set of cases should be emitted as a series of branches, return true. If we should emit this as a bunch of and/or'd together conditions, return false.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:354

Parameters

const std::vector<SwitchCG::CaseBlock>& Cases

void UpdateSplitBlock(
    llvm::MachineBasicBlock* First,
    llvm::MachineBasicBlock* Last)

Description

When an MBB was split during scheduling, update the references that need to refer to the last resulting block.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:377

Parameters

llvm::MachineBasicBlock* First
llvm::MachineBasicBlock* Last

void addDanglingDebugInfo(
    const llvm::DbgValueInst* DI,
    llvm::DebugLoc DL,
    unsigned int Order)

Description

Register a dbg_value which relies on a Value which we have not yet seen.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:299

Parameters

const llvm::DbgValueInst* DI
llvm::DebugLoc DL
unsigned int Order

void addSuccessorWithProb(
    llvm::MachineBasicBlock* Src,
    llvm::MachineBasicBlock* Dst,
    llvm::BranchProbability Prob =
        BranchProbability::getUnknown())

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:462

Parameters

llvm::MachineBasicBlock* Src
llvm::MachineBasicBlock* Dst
llvm::BranchProbability Prob = BranchProbability::getUnknown()

unsigned int caseClusterRank(
    const SwitchCG::CaseCluster& CC,
    SwitchCG::CaseClusterIt First,
    SwitchCG::CaseClusterIt Last)

Description

Determine the rank by weight of CC in [First,Last]. If CC has more weight than each cluster in the range, its rank is 0.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:164

Parameters

const SwitchCG::CaseCluster& CC
SwitchCG::CaseClusterIt First
SwitchCG::CaseClusterIt Last

void clear()

Description

Clear out the current SelectionDAG and the associated state and prepare this SelectionDAGBuilder object to be used for a new block. This doesn't clear out information about additional blocks that are needed to complete switch lowering or PHI node updating; that information is cleared out as it is consumed.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:255

void clearDanglingDebugInfo()

Description

Clear the dangling debug information map. This function is separated from the clear so that debug information that is dangling in a basic block can be properly resolved in a different basic block. This allows the SelectionDAG to resolve dangling debug information attached to PHI nodes.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:261

void dropDanglingDebugInfo(
    const llvm::DILocalVariable* Variable,
    const llvm::DIExpression* Expr)

Description

If we have dangling debug info that describes \p Variable, or an overlapping part of variable considering the \p Expr, then this method will drop that debug info as it isn't valid any longer.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:305

Parameters

const llvm::DILocalVariable* Variable
const llvm::DIExpression* Expr

void emitInlineAsmError(
    const llvm::CallBase& Call,
    const llvm::Twine& Message)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:609

Parameters

const llvm::CallBase& Call
const llvm::Twine& Message

llvm::SDValue getControlRoot()

Description

Similar to getRoot, but instead of flushing all the PendingLoad items, flush all the PendingExports (and PendingConstrainedFPStrict) items. It is necessary to do this before emitting a terminator instruction.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:277

llvm::SDValue getCopyFromRegs(
    const llvm::Value* V,
    llvm::Type* Ty)

Description

If there was virtual register allocated for the value V emit CopyFromReg of the specified type Ty. Return empty SDValue() otherwise.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:296

Parameters

const llvm::Value* V
llvm::Type* Ty

llvm::DebugLoc getCurDebugLoc() const

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:283

llvm::SDLoc getCurSDLoc() const

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:279

llvm::SDDbgValue* getDbgValue(
    llvm::SDValue N,
    llvm::DILocalVariable* Variable,
    llvm::DIExpression* Expr,
    const llvm::DebugLoc& dl,
    unsigned int DbgSDNodeOrder)

Description

Return the appropriate SDDbgValue based on N.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:636

Parameters

llvm::SDValue N
llvm::DILocalVariable* Variable
llvm::DIExpression* Expr
const llvm::DebugLoc& dl
unsigned int DbgSDNodeOrder

llvm::BranchProbability getEdgeProbability(
    const llvm::MachineBasicBlock* Src,
    const llvm::MachineBasicBlock* Dst) const

Description

Return branch probability calculated by BranchProbabilityInfo for IR blocks.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:460

Parameters

const llvm::MachineBasicBlock* Src
const llvm::MachineBasicBlock* Dst

llvm::MVT getFrameIndexTy()

Description

Returns the type of FrameIndex and TargetFrameIndex nodes.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:443

llvm::SDValue getMemoryRoot()

Description

Return the current virtual root of the Selection DAG, flushing any PendingLoad items. This must be done before emitting a store or any other memory node that may need to be ordered after any prior load instructions.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:266

llvm::SDValue getNonRegisterValue(
    const llvm::Value* V)

Description

getNonRegisterValue - Return an SDValue for the given Value, but don't look in FuncInfo.ValueMap for a virtual register.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:328

Parameters

const llvm::Value* V

llvm::SDValue getRoot()

Description

Similar to getMemoryRoot, but also flushes PendingConstrainedFP(Strict) items. This must be done before emitting any call other any other node that may need to be ordered after FP instructions due to other side effects.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:272

llvm::SDValue getValue(const llvm::Value* V)

Description

getValue - Return an SDValue for the given Value.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:326

Parameters

const llvm::Value* V

llvm::SDValue getValueImpl(const llvm::Value* V)

Description

getValueImpl - Helper function for getValue and getNonRegisterValue. Create an SDValue for the given value.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:329

Parameters

const llvm::Value* V

bool handleDebugValue(
    ArrayRef<const llvm::Value*> Values,
    llvm::DILocalVariable* Var,
    llvm::DIExpression* Expr,
    llvm::DebugLoc CurDL,
    llvm::DebugLoc InstDL,
    unsigned int Order,
    bool IsVariadic)

Description

For a given list of Values, attempt to create and record a SDDbgValue in the SelectionDAG.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:319

Parameters

ArrayRef<const llvm::Value*> Values
llvm::DILocalVariable* Var
llvm::DIExpression* Expr
llvm::DebugLoc CurDL
llvm::DebugLoc InstDL
unsigned int Order
bool IsVariadic

void init(llvm::GCFunctionInfo* gfi,
          llvm::AAResults* AA,
          const llvm::TargetLibraryInfo* li)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:247

Parameters

llvm::GCFunctionInfo* gfi
llvm::AAResults* AA
const llvm::TargetLibraryInfo* li

bool isExportableFromCurrentBlock(
    const llvm::Value* V,
    const llvm::BasicBlock* FromBB)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:355

Parameters

const llvm::Value* V
const llvm::BasicBlock* FromBB

void lowerCallToExternalSymbol(
    const llvm::CallInst& I,
    const char* FunctionName)

Description

Lowers CallInst to an external symbol.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:641

Parameters

const llvm::CallInst& I
const char* FunctionName

llvm::SDValue lowerEndEH(
    llvm::SDValue Chain,
    const llvm::InvokeInst* II,
    const llvm::BasicBlock* EHPadBB,
    llvm::MCSymbol* BeginLabel)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:645

Parameters

llvm::SDValue Chain
const llvm::InvokeInst* II
const llvm::BasicBlock* EHPadBB
llvm::MCSymbol* BeginLabel

std::pair<SDValue, SDValue> lowerInvokable(
    TargetLowering::CallLoweringInfo& CLI,
    const llvm::BasicBlock* EHPadBB = nullptr)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:372

Parameters

TargetLowering::CallLoweringInfo& CLI
const llvm::BasicBlock* EHPadBB = nullptr

llvm::SDValue lowerRangeToAssertZExt(
    llvm::SelectionDAG& DAG,
    const llvm::Instruction& I,
    llvm::SDValue Op)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:363

Parameters

llvm::SelectionDAG& DAG
const llvm::Instruction& I
llvm::SDValue Op

llvm::SDValue lowerStartEH(
    llvm::SDValue Chain,
    const llvm::BasicBlock* EHPadBB,
    llvm::MCSymbol*& BeginLabel)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:643

Parameters

llvm::SDValue Chain
const llvm::BasicBlock* EHPadBB
llvm::MCSymbol*& BeginLabel

void lowerWorkItem(
    SwitchCG::SwitchWorkListItem W,
    llvm::Value* Cond,
    llvm::MachineBasicBlock* SwitchMBB,
    llvm::MachineBasicBlock* DefaultMBB)

Description

Lower W.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:174

Parameters

SwitchCG::SwitchWorkListItem W
llvm::Value* Cond
llvm::MachineBasicBlock* SwitchMBB
llvm::MachineBasicBlock* DefaultMBB

llvm::MachineBasicBlock* peelDominantCaseCluster(
    const llvm::SwitchInst& SI,
    SwitchCG::CaseClusterVector& Clusters,
    llvm::BranchProbability& PeeledCaseProb)

Description

Peel the top probability case if it exceeds the threshold

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:180

Parameters

const llvm::SwitchInst& SI
SwitchCG::CaseClusterVector& Clusters
llvm::BranchProbability& PeeledCaseProb

void populateCallLoweringInfo(
    TargetLowering::CallLoweringInfo& CLI,
    const llvm::CallBase* Call,
    unsigned int ArgIdx,
    unsigned int NumArgs,
    llvm::SDValue Callee,
    llvm::Type* ReturnTy,
    bool IsPatchPoint)

Description

Populate a CallLowerinInfo (into \p CLI) based on the properties of the call being lowered. This is a helper for lowering intrinsics that follow a target calling convention or require stack pointer adjustment. Only a subset of the intrinsic's operands need to participate in the calling convention.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:366

Parameters

TargetLowering::CallLoweringInfo& CLI
const llvm::CallBase* Call
unsigned int ArgIdx
unsigned int NumArgs
llvm::SDValue Callee
llvm::Type* ReturnTy
bool IsPatchPoint

void processIntegerCallValue(
    const llvm::Instruction& I,
    llvm::SDValue Value,
    bool IsSigned)

Description

Record the value for an instruction that produces an integer result, converting the type where necessary.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:604

Parameters

const llvm::Instruction& I
llvm::SDValue Value
bool IsSigned

void resolveDanglingDebugInfo(
    const llvm::Value* V,
    llvm::SDValue Val)

Description

If we saw an earlier dbg_value referring to V, generate the debug data structures now that we've seen its definition.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:310

Parameters

const llvm::Value* V
llvm::SDValue Val

void resolveOrClearDbgInfo()

Description

Evict any dangling debug information, attempting to salvage it first.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:324

void salvageUnresolvedDbgValue(
    llvm::SelectionDAGBuilder::DanglingDebugInfo&
        DDI)

Description

For the given dangling debuginfo record, perform last-ditch efforts to resolve the debuginfo to something that is represented in this DAG. If this cannot be done, produce an Undef debug value record.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:315

Parameters

llvm::SelectionDAGBuilder::DanglingDebugInfo& DDI

void setUnusedArgValue(const llvm::Value* V,
                       llvm::SDValue NewN)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:337

Parameters

const llvm::Value* V
llvm::SDValue NewN

void setValue(const llvm::Value* V,
              llvm::SDValue NewN)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:331

Parameters

const llvm::Value* V
llvm::SDValue NewN

void splitWorkItem(
    SwitchCG::SwitchWorkList& WorkList,
    const SwitchCG::SwitchWorkListItem& W,
    llvm::Value* Cond,
    llvm::MachineBasicBlock* SwitchMBB)

Description

Emit comparison and split W into two subtrees.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:169

Parameters

SwitchCG::SwitchWorkList& WorkList
const SwitchCG::SwitchWorkListItem& W
llvm::Value* Cond
llvm::MachineBasicBlock* SwitchMBB

void updateDAGForMaybeTailCall(
    llvm::SDValue MaybeTC)

Description

Update the DAG and DAG builder with the relevant information after a new root node has been created which could be a tail call.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:633

Parameters

llvm::SDValue MaybeTC

llvm::SDValue updateRoot(
    SmallVectorImpl<llvm::SDValue>& Pending)

Description

Update root to include all chains from the Pending list.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:156

Parameters

SmallVectorImpl<llvm::SDValue>& Pending

void visit(unsigned int Opcode,
           const llvm::User& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:292

Parameters

unsigned int Opcode
const llvm::User& I

void visit(const llvm::Instruction& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:290

Parameters

const llvm::Instruction& I

void visitAShr(const llvm::User& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:509

Parameters

const llvm::User& I

void visitAdd(const llvm::User& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:492

Parameters

const llvm::User& I

void visitAddrSpaceCast(const llvm::User& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:525

Parameters

const llvm::User& I

void visitAlloca(const llvm::AllocaInst& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:538

Parameters

const llvm::AllocaInst& I

void visitAnd(const llvm::User& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:504

Parameters

const llvm::User& I

void visitAtomicCmpXchg(
    const llvm::AtomicCmpXchgInst& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:545

Parameters

const llvm::AtomicCmpXchgInst& I

void visitAtomicLoad(const llvm::LoadInst& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:559

Parameters

const llvm::LoadInst& I

void visitAtomicRMW(const llvm::AtomicRMWInst& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:546

Parameters

const llvm::AtomicRMWInst& I

void visitAtomicStore(const llvm::StoreInst& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:560

Parameters

const llvm::StoreInst& I

void visitBinary(const llvm::User& I,
                 unsigned int Opcode)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:490

Parameters

const llvm::User& I
unsigned int Opcode

bool visitBinaryFloatCall(const llvm::CallInst& I,
                          unsigned int Opcode)

Description

See if we can lower a binary floating-point operation into an SDNode with the specified Opcode. If so, return true and lower it. Otherwise return false, and it will be lowered like a normal call. The caller already checked that \p I calls the appropriate LibFunc with a correct prototype.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:558

Parameters

const llvm::CallInst& I
unsigned int Opcode

void visitBitCast(const llvm::User& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:524

Parameters

const llvm::User& I

void visitBitTestCase(
    SwitchCG::BitTestBlock& BB,
    llvm::MachineBasicBlock* NextMBB,
    llvm::BranchProbability BranchProbToNext,
    unsigned int Reg,
    SwitchCG::BitTestCase& B,
    llvm::MachineBasicBlock* SwitchBB)

Description

visitBitTestCase - this function produces one "bit test"

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:473

Parameters

SwitchCG::BitTestBlock& BB
llvm::MachineBasicBlock* NextMBB
llvm::BranchProbability BranchProbToNext
unsigned int Reg
SwitchCG::BitTestCase& B
llvm::MachineBasicBlock* SwitchBB

void visitBitTestHeader(
    SwitchCG::BitTestBlock& B,
    llvm::MachineBasicBlock* SwitchBB)

Description

visitBitTestHeader - This function emits necessary code to produce value suitable for "bit tests"

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:471

Parameters

SwitchCG::BitTestBlock& B
llvm::MachineBasicBlock* SwitchBB

void visitBr(const llvm::BranchInst& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:450

Parameters

const llvm::BranchInst& I

void visitCall(const llvm::CallInst& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:549

Parameters

const llvm::CallInst& I

void visitCallBr(const llvm::CallBrInst& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:484

Parameters

const llvm::CallBrInst& I

void visitCatchPad(const llvm::CatchPadInst& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:457

Parameters

const llvm::CatchPadInst& I

void visitCatchRet(const llvm::CatchReturnInst& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:456

Parameters

const llvm::CatchReturnInst& I

void visitCatchSwitch(
    const llvm::CatchSwitchInst& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:455

Parameters

const llvm::CatchSwitchInst& I

void visitCleanupPad(
    const llvm::CleanupPadInst& CPI)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:458

Parameters

const llvm::CleanupPadInst& CPI

void visitCleanupRet(
    const llvm::CleanupReturnInst& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:454

Parameters

const llvm::CleanupReturnInst& I

void visitConstrainedFPIntrinsic(
    const llvm::ConstrainedFPIntrinsic& FPI)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:569

Parameters

const llvm::ConstrainedFPIntrinsic& FPI

void visitExtractElement(const llvm::User& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:527

Parameters

const llvm::User& I

void visitExtractValue(
    const llvm::ExtractValueInst& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:531

Parameters

const llvm::ExtractValueInst& I

void visitFAdd(const llvm::User& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:493

Parameters

const llvm::User& I

void visitFCmp(const llvm::User& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:511

Parameters

const llvm::User& I

void visitFDiv(const llvm::User& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:503

Parameters

const llvm::User& I

void visitFMul(const llvm::User& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:497

Parameters

const llvm::User& I

void visitFNeg(const llvm::User& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:488

Parameters

const llvm::User& I

void visitFPExt(const llvm::User& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:517

Parameters

const llvm::User& I

void visitFPToSI(const llvm::User& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:519

Parameters

const llvm::User& I

void visitFPToUI(const llvm::User& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:518

Parameters

const llvm::User& I

void visitFPTrunc(const llvm::User& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:516

Parameters

const llvm::User& I

void visitFRem(const llvm::User& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:500

Parameters

const llvm::User& I

void visitFSub(const llvm::User& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:495

Parameters

const llvm::User& I

void visitFence(const llvm::FenceInst& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:547

Parameters

const llvm::FenceInst& I

void visitFreeze(const llvm::FreezeInst& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:563

Parameters

const llvm::FreezeInst& I

void visitGCRelocate(
    const llvm::GCRelocateInst& Relocate)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:589

Parameters

const llvm::GCRelocateInst& Relocate

void visitGCResult(const llvm::GCResultInst& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:590

Parameters

const llvm::GCResultInst& I

void visitGetElementPtr(const llvm::User& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:535

Parameters

const llvm::User& I

void visitICmp(const llvm::User& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:510

Parameters

const llvm::User& I

void visitIndirectBr(
    const llvm::IndirectBrInst& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:452

Parameters

const llvm::IndirectBrInst& I

void visitInlineAsm(
    const llvm::CallBase& Call,
    const llvm::BasicBlock* EHPadBB = nullptr)

Description

visitInlineAsm - Handle a call to an InlineAsm object.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:565

Parameters

const llvm::CallBase& Call
const llvm::BasicBlock* EHPadBB = nullptr

void visitInsertElement(const llvm::User& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:528

Parameters

const llvm::User& I

void visitInsertValue(
    const llvm::InsertValueInst& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:532

Parameters

const llvm::InsertValueInst& I

void visitIntToPtr(const llvm::User& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:523

Parameters

const llvm::User& I

void visitIntrinsicCall(const llvm::CallInst& I,
                        unsigned int Intrinsic)

Description

Lower the call to the specified intrinsic function.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:567

Parameters

const llvm::CallInst& I
unsigned int Intrinsic

void visitInvoke(const llvm::InvokeInst& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:483

Parameters

const llvm::InvokeInst& I

void visitJumpTable(SwitchCG::JumpTable& JT)

Description

visitJumpTable - Emit JumpTable node in the current MBB

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:476

Parameters

SwitchCG::JumpTable& JT

void visitJumpTableHeader(
    SwitchCG::JumpTable& JT,
    SwitchCG::JumpTableHeader& JTH,
    llvm::MachineBasicBlock* SwitchBB)

Description

visitJumpTableHeader - This function emits necessary code to produce index in the JumpTable from switch case.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:477

Parameters

SwitchCG::JumpTable& JT
SwitchCG::JumpTableHeader& JTH
llvm::MachineBasicBlock* SwitchBB

void visitLShr(const llvm::User& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:508

Parameters

const llvm::User& I

void visitLandingPad(
    const llvm::LandingPadInst& LP)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:533

Parameters

const llvm::LandingPadInst& LP

void visitLoad(const llvm::LoadInst& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:539

Parameters

const llvm::LoadInst& I

void visitLoadFromSwiftError(
    const llvm::LoadInst& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:561

Parameters

const llvm::LoadInst& I

void visitMaskedGather(const llvm::CallInst& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:543

Parameters

const llvm::CallInst& I

void visitMaskedLoad(const llvm::CallInst& I,
                     bool IsExpanding = false)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:541

Parameters

const llvm::CallInst& I
bool IsExpanding = false

void visitMaskedScatter(const llvm::CallInst& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:544

Parameters

const llvm::CallInst& I

void visitMaskedStore(const llvm::CallInst& I,
                      bool IsCompressing = false)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:542

Parameters

const llvm::CallInst& I
bool IsCompressing = false

bool visitMemChrCall(const llvm::CallInst& I)

Description

See if we can lower a memchr call into an optimized form. If so, return true and lower it. Otherwise return false, and it will be lowered like a normal call. The caller already checked that \p I calls the appropriate LibFunc with a correct prototype.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:552

Parameters

const llvm::CallInst& I

bool visitMemCmpBCmpCall(const llvm::CallInst& I)

Description

See if we can lower a memcmp/bcmp call into an optimized form. If so, return true and lower it. Otherwise return false, and it will be lowered like a normal call. The caller already checked that \p I calls the appropriate LibFunc with a correct prototype.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:550

Parameters

const llvm::CallInst& I

bool visitMemPCpyCall(const llvm::CallInst& I)

Description

See if we can lower a mempcpy call into an optimized form. If so, return true and lower it. Otherwise return false, and it will be lowered like a normal call. The caller already checked that \p I calls the appropriate LibFunc with a correct prototype.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:551

Parameters

const llvm::CallInst& I

void visitMul(const llvm::User& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:496

Parameters

const llvm::User& I

void visitOr(const llvm::User& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:505

Parameters

const llvm::User& I

void visitPHI(const llvm::PHINode& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:548

Parameters

const llvm::PHINode& I

void visitPatchpoint(
    const llvm::CallBase& CB,
    const llvm::BasicBlock* EHPadBB = nullptr)

Description

Lower llvm.experimental.patchpoint directly to its target opcode.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:586

Parameters

const llvm::CallBase& CB
const llvm::BasicBlock* EHPadBB = nullptr

void visitPtrToInt(const llvm::User& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:522

Parameters

const llvm::User& I

void visitResume(const llvm::ResumeInst& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:485

Parameters

const llvm::ResumeInst& I

void visitRet(const llvm::ReturnInst& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:449

Parameters

const llvm::ReturnInst& I

void visitSDiv(const llvm::User& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:502

Parameters

const llvm::User& I

void visitSExt(const llvm::User& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:515

Parameters

const llvm::User& I

void visitSIToFP(const llvm::User& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:521

Parameters

const llvm::User& I

void visitSPDescriptorFailure(
    llvm::StackProtectorDescriptor& SPD)

Description

Codegen the failure basic block for a stack protector check. A failure stack protector machine basic block consists simply of a call to __stack_chk_fail(). For a high level explanation of how this fits into the stack protector generation see the comment on the declaration of class StackProtectorDescriptor.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:470

Parameters

llvm::StackProtectorDescriptor& SPD

void visitSPDescriptorParent(
    llvm::StackProtectorDescriptor& SPD,
    llvm::MachineBasicBlock* ParentBB)

Description

Codegen a new tail for a stack protector check ParentMBB which has had its tail spliced into a stack protector check success bb. For a high level explanation of how this fits into the stack protector generation see the comment on the declaration of class StackProtectorDescriptor.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:468

Parameters

llvm::StackProtectorDescriptor& SPD
llvm::MachineBasicBlock* ParentBB

void visitSRem(const llvm::User& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:499

Parameters

const llvm::User& I

void visitSelect(const llvm::User& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:536

Parameters

const llvm::User& I

void visitShift(const llvm::User& I,
                unsigned int Opcode)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:491

Parameters

const llvm::User& I
unsigned int Opcode

void visitShl(const llvm::User& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:507

Parameters

const llvm::User& I

void visitShuffleVector(const llvm::User& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:529

Parameters

const llvm::User& I

void visitStackmap(const llvm::CallInst& I)

Description

Lower llvm.experimental.stackmap.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:585

Parameters

const llvm::CallInst& I

void visitStepVector(const llvm::CallInst& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:595

Parameters

const llvm::CallInst& I

void visitStore(const llvm::StoreInst& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:540

Parameters

const llvm::StoreInst& I

void visitStoreToSwiftError(
    const llvm::StoreInst& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:562

Parameters

const llvm::StoreInst& I

bool visitStrCmpCall(const llvm::CallInst& I)

Description

See if we can lower a strcmp call into an optimized form. If so, return true and lower it, otherwise return false and it will be lowered like a normal call. The caller already checked that \p I calls the appropriate LibFunc with a correct prototype.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:554

Parameters

const llvm::CallInst& I

bool visitStrCpyCall(const llvm::CallInst& I,
                     bool isStpcpy)

Description

See if we can lower a strcpy call into an optimized form. If so, return true and lower it, otherwise return false and it will be lowered like a normal call. The caller already checked that \p I calls the appropriate LibFunc with a correct prototype.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:553

Parameters

const llvm::CallInst& I
bool isStpcpy

bool visitStrLenCall(const llvm::CallInst& I)

Description

See if we can lower a strlen call into an optimized form. If so, return true and lower it, otherwise return false and it will be lowered like a normal call. The caller already checked that \p I calls the appropriate LibFunc with a correct prototype.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:555

Parameters

const llvm::CallInst& I

bool visitStrNLenCall(const llvm::CallInst& I)

Description

See if we can lower a strnlen call into an optimized form. If so, return true and lower it, otherwise return false and it will be lowered like a normal call. The caller already checked that \p I calls the appropriate LibFunc with a correct prototype.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:556

Parameters

const llvm::CallInst& I

void visitSub(const llvm::User& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:494

Parameters

const llvm::User& I

void visitSwitch(const llvm::SwitchInst& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:451

Parameters

const llvm::SwitchInst& I

void visitSwitchCase(
    SwitchCG::CaseBlock& CB,
    llvm::MachineBasicBlock* SwitchBB)

Description

visitSwitchCase - Emits the necessary code to represent a single node in the binary search tree resulting from lowering a switch instruction.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:467

Parameters

SwitchCG::CaseBlock& CB
llvm::MachineBasicBlock* SwitchBB

void visitTargetIntrinsic(const llvm::CallInst& I,
                          unsigned int Intrinsic)

Description

visitTargetIntrinsic - Lower a call of a target intrinsic to an INTRINSIC node.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:568

Parameters

const llvm::CallInst& I
unsigned int Intrinsic

void visitTrunc(const llvm::User& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:513

Parameters

const llvm::User& I

void visitUDiv(const llvm::User& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:501

Parameters

const llvm::User& I

void visitUIToFP(const llvm::User& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:520

Parameters

const llvm::User& I

void visitURem(const llvm::User& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:498

Parameters

const llvm::User& I

void visitUnary(const llvm::User& I,
                unsigned int Opcode)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:487

Parameters

const llvm::User& I
unsigned int Opcode

bool visitUnaryFloatCall(const llvm::CallInst& I,
                         unsigned int Opcode)

Description

See if we can lower a unary floating-point operation into an SDNode with the specified Opcode. If so, return true and lower it, otherwise return false and it will be lowered like a normal call. The caller already checked that \p I calls the appropriate LibFunc with a correct prototype.

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:557

Parameters

const llvm::CallInst& I
unsigned int Opcode

void visitUnreachable(
    const llvm::UnreachableInst& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:453

Parameters

const llvm::UnreachableInst& I

void visitUserOp1(const llvm::Instruction& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:597

Parameters

const llvm::Instruction& I

void visitUserOp2(const llvm::Instruction& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:600

Parameters

const llvm::Instruction& I

void visitVAArg(const llvm::VAArgInst& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:582

Parameters

const llvm::VAArgInst& I

void visitVACopy(const llvm::CallInst& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:584

Parameters

const llvm::CallInst& I

void visitVAEnd(const llvm::CallInst& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:583

Parameters

const llvm::CallInst& I

void visitVAStart(const llvm::CallInst& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:581

Parameters

const llvm::CallInst& I

void visitVPCmp(
    const llvm::VPCmpIntrinsic& VPIntrin)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:578

Parameters

const llvm::VPCmpIntrinsic& VPIntrin

void visitVPLoadGather(
    const llvm::VPIntrinsic& VPIntrin,
    llvm::EVT VT,
    SmallVector<llvm::SDValue, 7>& OpValues,
    bool IsGather)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:570

Parameters

const llvm::VPIntrinsic& VPIntrin
llvm::EVT VT
SmallVector<llvm::SDValue, 7>& OpValues
bool IsGather

void visitVPStoreScatter(
    const llvm::VPIntrinsic& VPIntrin,
    SmallVector<llvm::SDValue, 7>& OpValues,
    bool IsScatter)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:572

Parameters

const llvm::VPIntrinsic& VPIntrin
SmallVector<llvm::SDValue, 7>& OpValues
bool IsScatter

void visitVPStridedLoad(
    const llvm::VPIntrinsic& VPIntrin,
    llvm::EVT VT,
    SmallVectorImpl<llvm::SDValue>& OpValues)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:574

Parameters

const llvm::VPIntrinsic& VPIntrin
llvm::EVT VT
SmallVectorImpl<llvm::SDValue>& OpValues

void visitVPStridedStore(
    const llvm::VPIntrinsic& VPIntrin,
    SmallVectorImpl<llvm::SDValue>& OpValues)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:576

Parameters

const llvm::VPIntrinsic& VPIntrin
SmallVectorImpl<llvm::SDValue>& OpValues

void visitVectorPredicationIntrinsic(
    const llvm::VPIntrinsic& VPIntrin)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:579

Parameters

const llvm::VPIntrinsic& VPIntrin

void visitVectorReduce(const llvm::CallInst& I,
                       unsigned int Intrinsic)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:592

Parameters

const llvm::CallInst& I
unsigned int Intrinsic

void visitVectorReverse(const llvm::CallInst& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:593

Parameters

const llvm::CallInst& I

void visitVectorSplice(const llvm::CallInst& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:594

Parameters

const llvm::CallInst& I

void visitXor(const llvm::User& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:506

Parameters

const llvm::User& I

void visitZExt(const llvm::User& I)

Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:514

Parameters

const llvm::User& I