LLVM  6.0.0svn
Macros | Typedefs | Functions | Variables
SelectionDAGBuilder.cpp File Reference
#include "SelectionDAGBuilder.h"
#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/BitVector.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/None.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Triple.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/BranchProbabilityInfo.h"
#include "llvm/Analysis/ConstantFolding.h"
#include "llvm/Analysis/EHPersonalities.h"
#include "llvm/Analysis/Loads.h"
#include "llvm/Analysis/MemoryLocation.h"
#include "llvm/Analysis/TargetLibraryInfo.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/Analysis/VectorUtils.h"
#include "llvm/CodeGen/Analysis.h"
#include "llvm/CodeGen/FunctionLoweringInfo.h"
#include "llvm/CodeGen/GCMetadata.h"
#include "llvm/CodeGen/ISDOpcodes.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineJumpTableInfo.h"
#include "llvm/CodeGen/MachineMemOperand.h"
#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/CodeGen/MachineOperand.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/MachineValueType.h"
#include "llvm/CodeGen/RuntimeLibcalls.h"
#include "llvm/CodeGen/SelectionDAG.h"
#include "llvm/CodeGen/SelectionDAGNodes.h"
#include "llvm/CodeGen/SelectionDAGTargetInfo.h"
#include "llvm/CodeGen/StackMaps.h"
#include "llvm/CodeGen/ValueTypes.h"
#include "llvm/CodeGen/WinEHFuncInfo.h"
#include "llvm/IR/Argument.h"
#include "llvm/IR/Attributes.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/CFG.h"
#include "llvm/IR/CallSite.h"
#include "llvm/IR/CallingConv.h"
#include "llvm/IR/Constant.h"
#include "llvm/IR/ConstantRange.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DebugInfoMetadata.h"
#include "llvm/IR/DebugLoc.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/GetElementPtrTypeIterator.h"
#include "llvm/IR/InlineAsm.h"
#include "llvm/IR/InstrTypes.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Metadata.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Operator.h"
#include "llvm/IR/Statepoint.h"
#include "llvm/IR/Type.h"
#include "llvm/IR/User.h"
#include "llvm/IR/Value.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCSymbol.h"
#include "llvm/Support/AtomicOrdering.h"
#include "llvm/Support/BranchProbability.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/CodeGen.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetFrameLowering.h"
#include "llvm/Target/TargetInstrInfo.h"
#include "llvm/Target/TargetIntrinsicInfo.h"
#include "llvm/Target/TargetLowering.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetOpcodes.h"
#include "llvm/Target/TargetOptions.h"
#include "llvm/Target/TargetRegisterInfo.h"
#include "llvm/Target/TargetSubtargetInfo.h"
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <cstring>
#include <iterator>
#include <limits>
#include <numeric>
#include <tuple>
#include <utility>
#include <vector>
#include "llvm/IR/Instruction.def"
#include "llvm/CodeGen/SelectionDAGISel.h"

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "isel"
 
#define HANDLE_INST(NUM, OPCODE, CLASS)   case Instruction::OPCODE: visit##OPCODE((const CLASS&)I); break;
 

Typedefs

using ArgCopyElisionMapTy = DenseMap< const Argument *, std::pair< const AllocaInst *, const StoreInst * > >
 

Functions

static bool isABIRegCopy (const Value *V)
 
static SDValue getCopyFromPartsVector (SelectionDAG &DAG, const SDLoc &DL, const SDValue *Parts, unsigned NumParts, MVT PartVT, EVT ValueVT, const Value *V, bool IsABIRegCopy)
 getCopyFromPartsVector - Create a value that contains the specified legal parts combined into the value they represent. More...
 
static SDValue getCopyFromParts (SelectionDAG &DAG, const SDLoc &DL, const SDValue *Parts, unsigned NumParts, MVT PartVT, EVT ValueVT, const Value *V, Optional< ISD::NodeType > AssertOp=None, bool IsABIRegCopy=false)
 getCopyFromParts - Create a value that contains the specified legal parts combined into the value they represent. More...
 
static void diagnosePossiblyInvalidConstraint (LLVMContext &Ctx, const Value *V, const Twine &ErrMsg)
 
static void getCopyToPartsVector (SelectionDAG &DAG, const SDLoc &DL, SDValue Val, SDValue *Parts, unsigned NumParts, MVT PartVT, const Value *V, bool IsABIRegCopy)
 getCopyToPartsVector - Create a series of nodes that contain the specified value split into legal parts. More...
 
static void getCopyToParts (SelectionDAG &DAG, const SDLoc &DL, SDValue Val, SDValue *Parts, unsigned NumParts, MVT PartVT, const Value *V, ISD::NodeType ExtendKind=ISD::ANY_EXTEND, bool IsABIRegCopy=false)
 getCopyToParts - Create a series of nodes that contain the specified value split into legal parts. More...
 
static void findUnwindDestinations (FunctionLoweringInfo &FuncInfo, const BasicBlock *EHPadBB, BranchProbability Prob, SmallVectorImpl< std::pair< MachineBasicBlock *, BranchProbability >> &UnwindDests)
 When an invoke or a cleanupret unwinds to the next EH pad, there are many places it could ultimately go. More...
 
static bool InBlock (const Value *V, const BasicBlock *BB)
 
static SDValue getLoadStackGuard (SelectionDAG &DAG, const SDLoc &DL, SDValue &Chain)
 Create a LOAD_STACK_GUARD node, and let it carry the target specific global variable if there exists one. More...
 
static bool isVectorReductionOp (const User *I)
 Checks if the given instruction performs a vector reduction, in which case we have the freedom to alter the elements in the result as long as the reduction of them stays unchanged. More...
 
static bool hasOnlySelectUsers (const Value *Cond)
 
static bool getUniformBase (const Value *&Ptr, SDValue &Base, SDValue &Index, SelectionDAGBuilder *SDB)
 
static SDValue GetSignificand (SelectionDAG &DAG, SDValue Op, const SDLoc &dl)
 GetSignificand - Get the significand and build it into a floating-point number with exponent of 1: More...
 
static SDValue GetExponent (SelectionDAG &DAG, SDValue Op, const TargetLowering &TLI, const SDLoc &dl)
 GetExponent - Get the exponent: More...
 
static SDValue getF32Constant (SelectionDAG &DAG, unsigned Flt, const SDLoc &dl)
 getF32Constant - Get 32-bit floating point constant. More...
 
static SDValue getLimitedPrecisionExp2 (SDValue t0, const SDLoc &dl, SelectionDAG &DAG)
 
static SDValue expandExp (const SDLoc &dl, SDValue Op, SelectionDAG &DAG, const TargetLowering &TLI)
 expandExp - Lower an exp intrinsic. More...
 
static SDValue expandLog (const SDLoc &dl, SDValue Op, SelectionDAG &DAG, const TargetLowering &TLI)
 expandLog - Lower a log intrinsic. More...
 
static SDValue expandLog2 (const SDLoc &dl, SDValue Op, SelectionDAG &DAG, const TargetLowering &TLI)
 expandLog2 - Lower a log2 intrinsic. More...
 
static SDValue expandLog10 (const SDLoc &dl, SDValue Op, SelectionDAG &DAG, const TargetLowering &TLI)
 expandLog10 - Lower a log10 intrinsic. More...
 
static SDValue expandExp2 (const SDLoc &dl, SDValue Op, SelectionDAG &DAG, const TargetLowering &TLI)
 expandExp2 - Lower an exp2 intrinsic. More...
 
static SDValue expandPow (const SDLoc &dl, SDValue LHS, SDValue RHS, SelectionDAG &DAG, const TargetLowering &TLI)
 visitPow - Lower a pow intrinsic. More...
 
static SDValue ExpandPowI (const SDLoc &DL, SDValue LHS, SDValue RHS, SelectionDAG &DAG)
 ExpandPowI - Expand a llvm.powi intrinsic. More...
 
static unsigned getUnderlyingArgReg (const SDValue &N)
 
static SDValue getMemCmpLoad (const Value *PtrVal, MVT LoadVT, SelectionDAGBuilder &Builder)
 
static void patchMatchingInput (const SDISelAsmOperandInfo &OpInfo, SDISelAsmOperandInfo &MatchingOpInfo, SelectionDAG &DAG)
 Make sure that the output operand OpInfo and its corresponding input operand MatchingOpInfo have compatible constraint types (otherwise error out). More...
 
static SDValue getAddressForMemoryInput (SDValue Chain, const SDLoc &Location, SDISelAsmOperandInfo &OpInfo, SelectionDAG &DAG)
 Get a direct memory input to behave well as an indirect operand. More...
 
static void GetRegistersForValue (SelectionDAG &DAG, const TargetLowering &TLI, const SDLoc &DL, SDISelAsmOperandInfo &OpInfo)
 GetRegistersForValue - Assign registers (virtual or physical) for the specified operand. More...
 
static unsigned findMatchingInlineAsmOperand (unsigned OperandNo, const std::vector< SDValue > &AsmNodeOperands)
 
static bool createVirtualRegs (SmallVector< unsigned, 4 > &Regs, unsigned NumRegs, MVT RegVT, SelectionDAG &DAG)
 Fill Regs with NumRegs new virtual registers of type RegVT. More...
 
static void addStackMapLiveVars (ImmutableCallSite CS, unsigned StartIdx, const SDLoc &DL, SmallVectorImpl< SDValue > &Ops, SelectionDAGBuilder &Builder)
 Add a stack map intrinsic call's live variable operands to a stackmap or patchpoint target node's operand list. More...
 
static AttributeList getReturnAttrs (TargetLowering::CallLoweringInfo &CLI)
 Returns an AttributeList representing the attributes applied to the return value of the given call. More...
 
static bool isOnlyUsedInEntryBlock (const Argument *A, bool FastISel)
 isOnlyUsedInEntryBlock - If the specified argument is only used in the entry block, return true. More...
 
static void findArgumentCopyElisionCandidates (const DataLayout &DL, FunctionLoweringInfo *FuncInfo, ArgCopyElisionMapTy &ArgCopyElisionCandidates)
 Scan the entry block of the function in FuncInfo for arguments that look like copies into a local alloca. More...
 
static void tryToElideArgumentCopy (FunctionLoweringInfo *FuncInfo, SmallVectorImpl< SDValue > &Chains, DenseMap< int, int > &ArgCopyElisionFrameIndexMap, SmallPtrSetImpl< const Instruction *> &ElidedArgCopyInstrs, ArgCopyElisionMapTy &ArgCopyElisionCandidates, const Argument &Arg, SDValue ArgVal, bool &ArgHasUses)
 Try to elide argument copies from memory into a local alloca. More...
 

Variables

static unsigned LimitFloatPrecision
 LimitFloatPrecision - Generate low-precision inline sequences for some float libcalls (6, 8 or 12 bits). More...
 
static cl::opt< unsigned, trueLimitFPPrecision ("limit-float-precision", cl::desc("Generate low-precision inline sequences " "for some float libcalls"), cl::location(LimitFloatPrecision), cl::init(0))
 
static const unsigned MaxParallelChains = 64
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "isel"

Definition at line 124 of file SelectionDAGBuilder.cpp.

◆ HANDLE_INST

#define HANDLE_INST (   NUM,
  OPCODE,
  CLASS 
)    case Instruction::OPCODE: visit##OPCODE((const CLASS&)I); break;

Typedef Documentation

◆ ArgCopyElisionMapTy

Definition at line 8412 of file SelectionDAGBuilder.cpp.

Function Documentation

◆ addStackMapLiveVars()

static void addStackMapLiveVars ( ImmutableCallSite  CS,
unsigned  StartIdx,
const SDLoc DL,
SmallVectorImpl< SDValue > &  Ops,
SelectionDAGBuilder Builder 
)
static

Add a stack map intrinsic call's live variable operands to a stackmap or patchpoint target node's operand list.

Constants are converted to TargetConstants purely as an optimization to avoid constant materialization and register allocation.

FrameIndex operands are converted to TargetFrameIndex so that ISEL does not generate addess computation nodes, and so ExpandISelPseudo can convert the TargetFrameIndex into a DirectMemRefOp StackMap location. This avoids address materialization and register allocation, but may also be required for correctness. If a StackMap (or PatchPoint) intrinsic directly uses an alloca in the entry block, then the runtime may assume that the alloca's StackMap location can be read immediately after compilation and that the location is valid at any point during execution (this is similar to the assumption made by the llvm.gcroot intrinsic). If the alloca's location were only available in a register, then the runtime would need to trap when execution reaches the StackMap in order to read the alloca's location.

Definition at line 7700 of file SelectionDAGBuilder.cpp.

References llvm::CallingConv::AnyReg, llvm::SmallVectorImpl< T >::append(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::arg_size(), assert(), C, Callee, llvm::ISD::CALLSEQ_END, llvm::PatchPointOpers::CCPos, llvm::ComputeValueVTs(), llvm::ISD::CopyFromReg, llvm::SelectionDAGBuilder::DAG, llvm::SelectionDAG::DeleteNode(), llvm::CallInst::getArgOperand(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getArgument(), llvm::CallInst::getCalledValue(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getCallingConv(), llvm::SelectionDAG::getCALLSEQ_END(), llvm::SelectionDAG::getCALLSEQ_START(), llvm::SelectionDAG::getContext(), llvm::SelectionDAG::getDataLayout(), llvm::Instruction::getFastMathFlags(), llvm::TargetLoweringBase::getFrameIndexTy(), llvm::SDNode::getGluedNode(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getInstruction(), llvm::SelectionDAG::getIntPtrConstant(), llvm::SelectionDAG::getMachineNode(), llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), llvm::CallInst::getNumArgOperands(), llvm::SDNode::getOpcode(), llvm::User::getOperand(), llvm::SDNode::getOperand(), llvm::SelectionDAG::getTargetConstant(), llvm::SelectionDAG::getTargetFrameIndex(), llvm::SelectionDAG::getTargetGlobalAddress(), llvm::SelectionDAG::getTargetLoweringInfo(), llvm::Value::getType(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getType(), llvm::SDValue::getValue(), llvm::SelectionDAGBuilder::getValue(), llvm::TargetLoweringBase::getValueType(), llvm::Type::getVoidTy(), llvm::SelectionDAG::getVTList(), llvm::MVT::Glue, llvm::MVT::i32, llvm::MVT::i64, llvm::PatchPointOpers::IDPos, llvm::Type::isVoidTy(), llvm_unreachable, llvm::PatchPointOpers::NArgPos, llvm::PatchPointOpers::NBytesPos, llvm::FastMathFlags::noNaNs(), llvm::MVT::Other, llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::SelectionDAG::ReplaceAllUsesOfValuesWith(), llvm::SelectionDAG::ReplaceAllUsesWith(), llvm::SDNodeFlags::setNoNaNs(), llvm::SelectionDAG::setRoot(), llvm::SmallVectorTemplateCommon< T >::size(), llvm::PatchPointOpers::TargetPos, llvm::FastMathFlags::unsafeAlgebra(), llvm::RegsForValue::ValueVTs, llvm::ISD::VECREDUCE_ADD, llvm::ISD::VECREDUCE_AND, llvm::ISD::VECREDUCE_FADD, llvm::ISD::VECREDUCE_FMAX, llvm::ISD::VECREDUCE_FMIN, llvm::ISD::VECREDUCE_FMUL, llvm::ISD::VECREDUCE_MUL, llvm::ISD::VECREDUCE_OR, llvm::ISD::VECREDUCE_SMAX, llvm::ISD::VECREDUCE_SMIN, llvm::ISD::VECREDUCE_STRICT_FADD, llvm::ISD::VECREDUCE_STRICT_FMUL, llvm::ISD::VECREDUCE_UMAX, llvm::ISD::VECREDUCE_UMIN, and llvm::ISD::VECREDUCE_XOR.

◆ createVirtualRegs()

static bool createVirtualRegs ( SmallVector< unsigned, 4 > &  Regs,
unsigned  NumRegs,
MVT  RegVT,
SelectionDAG DAG 
)
static

Fill Regs with NumRegs new virtual registers of type RegVT.

Returns
true if it has succeeded, false otherwise

Definition at line 7084 of file SelectionDAGBuilder.cpp.

References llvm::RegsForValue::append(), assert(), llvm::ISD::BITCAST, llvm::TargetLowering::C_Memory, llvm::TargetLowering::C_Other, llvm::TargetLowering::C_Register, llvm::TargetLowering::C_RegisterClass, llvm::TargetLowering::ComputeConstraintToUse(), llvm::InlineAsm::Constraint_Unknown, llvm::TargetLowering::AsmOperandInfo::ConstraintType, llvm::InlineAsm::convertMemFlagWordToMatchingFlagWord(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::LLVMContext::emitError(), llvm::SmallVectorBase::empty(), llvm::InlineAsm::Extra_AsmDialect, llvm::InlineAsm::Extra_HasSideEffects, llvm::InlineAsm::Extra_IsAlignStack, llvm::InlineAsm::Extra_IsConvergent, llvm::InlineAsm::Extra_MayLoad, llvm::InlineAsm::Extra_MayStore, findMatchingInlineAsmOperand(), first, llvm::DataLayout::getABITypeAlignment(), getAddressForMemoryInput(), llvm::CallInst::getArgOperand(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getArgument(), llvm::InlineAsm::getAsmString(), llvm::SelectionDAG::getBasicBlock(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getCalledValue(), llvm::SelectionDAG::getContext(), llvm::RegsForValue::getCopyFromRegs(), llvm::SelectionDAG::getDataLayout(), llvm::InlineAsm::getDialect(), llvm::InlineAsm::getFlagWord(), llvm::InlineAsm::getFlagWordForMatchingOp(), llvm::InlineAsm::getFlagWordForMem(), llvm::TargetLowering::getInlineAsmMemConstraint(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getInstruction(), llvm::SelectionDAG::getMachineFunction(), llvm::SelectionDAG::getMDNode(), llvm::Instruction::getMetadata(), llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), llvm::InlineAsm::getNumOperandRegisters(), llvm::User::getOperand(), llvm::TargetLoweringBase::getPointerTy(), llvm::TargetLoweringBase::getRegClassFor(), llvm::MachineFunction::getRegInfo(), llvm::TargetSubtargetInfo::getRegisterInfo(), GetRegistersForValue(), llvm::SelectionDAG::getRoot(), llvm::TargetLoweringBase::getSimpleValueType(), llvm::SelectionDAG::getSrcValue(), llvm::SelectionDAG::getStore(), llvm::SelectionDAG::getSubtarget(), llvm::SelectionDAG::getTargetConstant(), llvm::SelectionDAG::getTargetExternalSymbol(), llvm::SelectionDAG::getTargetLoweringInfo(), llvm::Value::getType(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getType(), llvm::SelectionDAG::getUNDEF(), llvm::SelectionDAG::getVAArg(), llvm::SDValue::getValue(), llvm::SDValue::getValueType(), llvm::TargetLoweringBase::getValueType(), llvm::SelectionDAG::getVTList(), llvm::MVT::Glue, llvm::InlineAsm::hasSideEffects(), llvm::MVT::i32, llvm::ISD::INLINEASM, llvm::InlineAsm::isAlignStack(), llvm::InlineAsm::isClobber, llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::isConvergent(), llvm::InlineAsm::isInput, llvm::EVT::isInteger(), llvm::InlineAsm::isMemKind(), llvm::InlineAsm::isOutput, llvm::InlineAsm::isRegDefEarlyClobberKind(), llvm::InlineAsm::isRegDefKind(), llvm::Type::isSingleValueType(), llvm::Type::isSized(), llvm::EVT::isVector(), llvm::Type::isVoidTy(), 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::TargetLowering::LowerAsmOperandForConstraint(), llvm::InlineAsm::Op_InputChain, llvm::MVT::Other, llvm::TargetLowering::ParseConstraints(), patchMatchingInput(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), llvm::RegsForValue::Regs, second, llvm::SelectionDAG::setRoot(), llvm::ISD::TokenFactor, llvm::ISD::TRUNCATE, llvm::InlineAsm::ConstraintInfo::Type, llvm::ISD::VACOPY, llvm::ISD::VAEND, and llvm::ISD::VASTART.

◆ diagnosePossiblyInvalidConstraint()

static void diagnosePossiblyInvalidConstraint ( LLVMContext Ctx,
const Value V,
const Twine ErrMsg 
)
static

Definition at line 314 of file SelectionDAGBuilder.cpp.

References llvm::LLVMContext::emitError(), and I.

Referenced by getCopyFromPartsVector(), and getCopyToParts().

◆ expandExp()

static SDValue expandExp ( const SDLoc dl,
SDValue  Op,
SelectionDAG DAG,
const TargetLowering TLI 
)
static

expandExp - Lower an exp intrinsic.

Handles the special sequences for limited-precision mode.

Definition at line 4389 of file SelectionDAGBuilder.cpp.

References llvm::MVT::f32, llvm::ISD::FEXP, llvm::ISD::FMUL, getF32Constant(), getLimitedPrecisionExp2(), llvm::SelectionDAG::getNode(), and llvm::SDValue::getValueType().

Referenced by getUnderlyingArgReg().

◆ expandExp2()

static SDValue expandExp2 ( const SDLoc dl,
SDValue  Op,
SelectionDAG DAG,
const TargetLowering TLI 
)
static

expandExp2 - Lower an exp2 intrinsic.

Handles the special sequences for limited-precision mode.

Definition at line 4697 of file SelectionDAGBuilder.cpp.

References llvm::MVT::f32, llvm::ISD::FEXP2, getLimitedPrecisionExp2(), llvm::SelectionDAG::getNode(), and llvm::SDValue::getValueType().

Referenced by getUnderlyingArgReg().

◆ expandLog()

static SDValue expandLog ( const SDLoc dl,
SDValue  Op,
SelectionDAG DAG,
const TargetLowering TLI 
)
static

expandLog - Lower a log intrinsic.

Handles the special sequences for limited-precision mode.

Definition at line 4412 of file SelectionDAGBuilder.cpp.

References llvm::ISD::BITCAST, llvm::MVT::f32, llvm::ISD::FADD, llvm::ISD::FLOG, llvm::ISD::FMUL, llvm::ISD::FSUB, GetExponent(), getF32Constant(), llvm::SelectionDAG::getNode(), GetSignificand(), llvm::SDValue::getValueType(), llvm::MVT::i32, and X.

Referenced by getUnderlyingArgReg().

◆ expandLog10()

static SDValue expandLog10 ( const SDLoc dl,
SDValue  Op,
SelectionDAG DAG,
const TargetLowering TLI 
)
static

expandLog10 - Lower a log10 intrinsic.

Handles the special sequences for limited-precision mode.

Definition at line 4607 of file SelectionDAGBuilder.cpp.

References llvm::ISD::BITCAST, llvm::MVT::f32, llvm::ISD::FADD, llvm::ISD::FLOG10, llvm::ISD::FMUL, llvm::ISD::FSUB, GetExponent(), getF32Constant(), llvm::SelectionDAG::getNode(), GetSignificand(), llvm::SDValue::getValueType(), llvm::MVT::i32, and X.

Referenced by getUnderlyingArgReg().

◆ expandLog2()

static SDValue expandLog2 ( const SDLoc dl,
SDValue  Op,
SelectionDAG DAG,
const TargetLowering TLI 
)
static

expandLog2 - Lower a log2 intrinsic.

Handles the special sequences for limited-precision mode.

Definition at line 4510 of file SelectionDAGBuilder.cpp.

References llvm::ISD::BITCAST, llvm::MVT::f32, llvm::ISD::FADD, llvm::ISD::FLOG2, llvm::ISD::FMUL, llvm::ISD::FSUB, GetExponent(), getF32Constant(), llvm::SelectionDAG::getNode(), GetSignificand(), llvm::SDValue::getValueType(), llvm::MVT::i32, and X.

Referenced by getUnderlyingArgReg().

◆ expandPow()

static SDValue expandPow ( const SDLoc dl,
SDValue  LHS,
SDValue  RHS,
SelectionDAG DAG,
const TargetLowering TLI 
)
static

visitPow - Lower a pow intrinsic.

Handles the special sequences for limited-precision mode with x == 10.0f.

Definition at line 4709 of file SelectionDAGBuilder.cpp.

References llvm::MVT::f32, llvm::ISD::FMUL, llvm::ISD::FPOW, getF32Constant(), getLimitedPrecisionExp2(), llvm::SelectionDAG::getNode(), and llvm::SDValue::getValueType().

Referenced by getUnderlyingArgReg().

◆ ExpandPowI()

static SDValue ExpandPowI ( const SDLoc DL,
SDValue  LHS,
SDValue  RHS,
SelectionDAG DAG 
)
static

◆ findArgumentCopyElisionCandidates()

static void findArgumentCopyElisionCandidates ( const DataLayout DL,
FunctionLoweringInfo FuncInfo,
ArgCopyElisionMapTy ArgCopyElisionCandidates 
)
static

◆ findMatchingInlineAsmOperand()

static unsigned findMatchingInlineAsmOperand ( unsigned  OperandNo,
const std::vector< SDValue > &  AsmNodeOperands 
)
static

◆ findUnwindDestinations()

static void findUnwindDestinations ( FunctionLoweringInfo FuncInfo,
const BasicBlock EHPadBB,
BranchProbability  Prob,
SmallVectorImpl< std::pair< MachineBasicBlock *, BranchProbability >> &  UnwindDests 
)
static

When an invoke or a cleanupret unwinds to the next EH pad, there are many places it could ultimately go.

In the IR, we have a single unwind destination, but in the machine CFG, we enumerate all the possible blocks. This function skips over imaginary basic blocks that hold catchswitch instructions, and finds all the "real" machine basic block destinations. As those destinations may not be successors of EHPadBB, here we also calculate the edge probability to those destinations. The passed-in Prob is the edge probability to EHPadBB.

Definition at line 1361 of file SelectionDAGBuilder.cpp.

References llvm::MCID::Add, llvm::ISD::ADD, llvm::ISD::ANY_EXTEND, assert(), llvm::BasicBlock::back(), llvm::FunctionLoweringInfo::BPI, llvm::classifyEHPersonality(), llvm::ISD::CLEANUPRET, llvm::ComputeValueVTs(), Context, llvm::CoreCLR, F(), llvm::FunctionLoweringInfo::Fn, llvm::Function::getAttributes(), llvm::Function::getCallingConv(), llvm::SelectionDAG::getCopyFromReg(), getCopyToParts(), llvm::SelectionDAG::getDataLayout(), llvm::BranchProbabilityInfo::getEdgeProbability(), llvm::SelectionDAG::getEntryNode(), llvm::BasicBlock::getFirstNonPHI(), llvm::MachineFunction::getFunction(), llvm::SelectionDAG::getIntPtrConstant(), llvm::SelectionDAG::getMachineFunction(), llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), llvm::User::getNumOperands(), llvm::TargetLoweringBase::getNumRegistersForCallingConv(), llvm::User::getOperand(), llvm::Instruction::getParent(), llvm::BasicBlock::getParent(), llvm::Function::getPersonalityFn(), llvm::TargetLoweringBase::getPointerTy(), llvm::SelectionDAG::getRegister(), llvm::TargetLoweringBase::getRegisterTypeForCallingConv(), llvm::SDValue::getResNo(), llvm::Function::getReturnType(), llvm::SelectionDAG::getStore(), llvm::SelectionDAG::getTargetLoweringInfo(), llvm::BasicBlock::getTerminatingDeoptimizeCall(), llvm::Value::getType(), llvm::TargetLowering::getTypeForExtReturn(), llvm::PointerType::getUnqual(), llvm::CleanupReturnInst::getUnwindDest(), llvm::SDValue::getValueType(), llvm::BranchProbability::getZero(), llvm::AttributeList::hasAttrSomewhere(), llvm::EVT::isInteger(), llvm::Function::isVarArg(), llvm::TargetLowering::LowerReturn(), llvm::FunctionLoweringInfo::MBBMap, llvm::MSVC_CXX, llvm::MVT::Other, llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::report_fatal_error(), llvm::MipsISD::Ret, llvm::AttributeList::ReturnIndex, llvm::ISD::ArgFlagsTy::setInReg(), llvm::SDNodeFlags::setNoUnsignedWrap(), llvm::SelectionDAG::setRoot(), llvm::ISD::ArgFlagsTy::setSExt(), llvm::ISD::ArgFlagsTy::setSwiftError(), llvm::ISD::ArgFlagsTy::setZExt(), llvm::ISD::SIGN_EXTEND, llvm::SmallVectorTemplateCommon< T >::size(), llvm::TargetLowering::supportSwiftError(), llvm::ISD::TokenFactor, llvm::RegsForValue::ValueVTs, and llvm::ISD::ZERO_EXTEND.

Referenced by llvm::SelectionDAGBuilder::visitBitTestCase().

◆ getAddressForMemoryInput()

static SDValue getAddressForMemoryInput ( SDValue  Chain,
const SDLoc Location,
SDISelAsmOperandInfo &  OpInfo,
SelectionDAG DAG 
)
static

◆ getCopyFromParts()

static SDValue getCopyFromParts ( SelectionDAG DAG,
const SDLoc DL,
const SDValue Parts,
unsigned  NumParts,
MVT  PartVT,
EVT  ValueVT,
const Value V,
Optional< ISD::NodeType AssertOp = None,
bool  IsABIRegCopy = false 
)
static

getCopyFromParts - Create a value that contains the specified legal parts combined into the value they represent.

If the parts combine to a type larger than ValueVT then AssertOp can be used to specify whether the extra bits are known to be zero (ISD::AssertZext) or sign extended from ValueVT (ISD::AssertSext).

Definition at line 184 of file SelectionDAGBuilder.cpp.

References llvm::ISD::ANY_EXTEND, assert(), llvm::ISD::BITCAST, llvm::EVT::bitsLT(), llvm::ISD::BUILD_PAIR, llvm::MVT::f64, llvm::ISD::FP_EXTEND, llvm::ISD::FP_ROUND, llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getContext(), getCopyFromPartsVector(), llvm::SelectionDAG::getDataLayout(), llvm::EVT::getIntegerVT(), llvm::SelectionDAG::getNode(), llvm::TargetLoweringBase::getPointerTy(), llvm::EVT::getSizeInBits(), llvm::MVT::getSizeInBits(), llvm::SelectionDAG::getTargetConstant(), llvm::SelectionDAG::getTargetLoweringInfo(), llvm::SDValue::getValueType(), llvm::SelectionDAG::getValueType(), llvm::TargetLoweringBase::hasBigEndianPartOrdering(), llvm::MipsISD::Hi, llvm::DataLayout::isBigEndian(), llvm::EVT::isFloatingPoint(), llvm::MVT::isFloatingPoint(), llvm::EVT::isInteger(), llvm::MVT::isInteger(), llvm::EVT::isVector(), llvm::MVT::isVector(), llvm_unreachable, llvm::MipsISD::Lo, llvm::Log2_32(), llvm::ISD::OR, llvm::MVT::ppcf128, llvm::ISD::SHL, std::swap(), llvm::ISD::TRUNCATE, and llvm::ISD::ZERO_EXTEND.

Referenced by getCopyFromPartsVector(), llvm::RegsForValue::getCopyFromRegs(), llvm::TargetLowering::LowerCallTo(), and tryToElideArgumentCopy().

◆ getCopyFromPartsVector()

static SDValue getCopyFromPartsVector ( SelectionDAG DAG,
const SDLoc DL,
const SDValue Parts,
unsigned  NumParts,
MVT  PartVT,
EVT  ValueVT,
const Value V,
bool  IsABIRegCopy 
)
static

getCopyFromPartsVector - Create a value that contains the specified legal parts combined into the value they represent.

If the parts combine to a type larger than ValueVT then AssertOp can be used to specify whether the extra bits are known to be zero (ISD::AssertZext) or sign extended from ValueVT (ISD::AssertSext).

Definition at line 333 of file SelectionDAGBuilder.cpp.

References assert(), llvm::ISD::BITCAST, llvm::ISD::BUILD_VECTOR, llvm::ISD::CONCAT_VECTORS, diagnosePossiblyInvalidConstraint(), llvm::ISD::EXTRACT_SUBVECTOR, llvm::SelectionDAG::getAnyExtOrTrunc(), llvm::SelectionDAG::getBitcast(), llvm::SelectionDAG::getBuildVector(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getContext(), getCopyFromParts(), getCopyToPartsVector(), llvm::SelectionDAG::getDataLayout(), llvm::SelectionDAG::getFPExtendOrRound(), llvm::SelectionDAG::getNode(), llvm::EVT::getScalarSizeInBits(), llvm::EVT::getScalarType(), llvm::SDValue::getSimpleValueType(), llvm::EVT::getSizeInBits(), llvm::MVT::getSizeInBits(), llvm::SelectionDAG::getTargetLoweringInfo(), llvm::SelectionDAG::getUNDEF(), llvm::SDValue::getValueType(), llvm::EVT::getVectorElementType(), llvm::TargetLoweringBase::getVectorIdxTy(), llvm::EVT::getVectorNumElements(), llvm::TargetLoweringBase::getVectorTypeBreakdown(), llvm::TargetLoweringBase::getVectorTypeBreakdownForCallingConv(), llvm::EVT::getVectorVT(), llvm::EVT::isFloatingPoint(), llvm::TargetLoweringBase::isTypeLegal(), and llvm::EVT::isVector().

Referenced by getCopyFromParts(), and isABIRegCopy().

◆ getCopyToParts()

static void getCopyToParts ( SelectionDAG DAG,
const SDLoc DL,
SDValue  Val,
SDValue Parts,
unsigned  NumParts,
MVT  PartVT,
const Value V,
ISD::NodeType  ExtendKind = ISD::ANY_EXTEND,
bool  IsABIRegCopy = false 
)
static

◆ getCopyToPartsVector()

static void getCopyToPartsVector ( SelectionDAG DAG,
const SDLoc DL,
SDValue  Val,
SDValue Parts,
unsigned  NumParts,
MVT  PartVT,
const Value V,
bool  IsABIRegCopy 
)
static

◆ GetExponent()

static SDValue GetExponent ( SelectionDAG DAG,
SDValue  Op,
const TargetLowering TLI,
const SDLoc dl 
)
static

GetExponent - Get the exponent:

(float)(int)(((Op & 0x7f800000) >> 23) - 127);

where Op is the hexadecimal representation of floating point value.

Definition at line 4278 of file SelectionDAGBuilder.cpp.

References llvm::ISD::AND, llvm::MVT::f32, llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getDataLayout(), llvm::SelectionDAG::getNode(), llvm::TargetLoweringBase::getPointerTy(), llvm::MVT::i32, llvm::ISD::SINT_TO_FP, llvm::ISD::SRL, and llvm::ISD::SUB.

Referenced by expandLog(), expandLog10(), and expandLog2().

◆ getF32Constant()

static SDValue getF32Constant ( SelectionDAG DAG,
unsigned  Flt,
const SDLoc dl 
)
static

◆ getLimitedPrecisionExp2()

static SDValue getLimitedPrecisionExp2 ( SDValue  t0,
const SDLoc dl,
SelectionDAG DAG 
)
static

◆ getLoadStackGuard()

static SDValue getLoadStackGuard ( SelectionDAG DAG,
const SDLoc DL,
SDValue Chain 
)
static

◆ getMemCmpLoad()

static SDValue getMemCmpLoad ( const Value PtrVal,
MVT  LoadVT,
SelectionDAGBuilder Builder 
)
static

Definition at line 6273 of file SelectionDAGBuilder.cpp.

References llvm::SelectionDAGBuilder::AA, llvm::ISD::ADD, llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Align, llvm::TargetLoweringBase::allowsMisalignedMemoryAccesses(), assert(), llvm::TargetLowering::C_Memory, Callee, llvm::computeUsesVAFloatArgument(), llvm::ConstantFoldLoadFromConstPtr(), Context, llvm::OperandBundleUser< InstrTy, OpIteratorTy >::countOperandBundlesOfType(), llvm::SelectionDAGBuilder::DAG, llvm::SelectionDAGBuilder::DL, llvm::dyn_cast(), llvm::SelectionDAGTargetInfo::EmitTargetCodeForMemchr(), llvm::SelectionDAGTargetInfo::EmitTargetCodeForMemcmp(), llvm::SelectionDAGTargetInfo::EmitTargetCodeForStrcmp(), llvm::SelectionDAGTargetInfo::EmitTargetCodeForStrcpy(), llvm::SelectionDAGTargetInfo::EmitTargetCodeForStrlen(), llvm::SelectionDAGTargetInfo::EmitTargetCodeForStrnlen(), F(), llvm::ISD::FABS, llvm::ISD::FCEIL, llvm::ISD::FCOPYSIGN, llvm::ISD::FCOS, llvm::ISD::FEXP2, llvm::ISD::FFLOOR, llvm::ISD::FLOG2, llvm::ISD::FMAXNUM, llvm::ISD::FMINNUM, llvm::ISD::FNEARBYINT, llvm::ISD::FRINT, llvm::ISD::FROUND, llvm::ISD::FSIN, llvm::ISD::FSQRT, llvm::ISD::FTRUNC, llvm::IntegerType::get(), llvm::VectorType::get(), llvm::CallInst::getArgOperand(), llvm::ConstantExpr::getBitCast(), llvm::SelectionDAG::getBitcast(), llvm::CallInst::getCalledFunction(), llvm::CallInst::getCalledValue(), llvm::SelectionDAG::getConstant(), llvm::TargetLowering::getConstraintType(), llvm::Value::getContext(), llvm::SelectionDAGBuilder::getCurSDLoc(), llvm::SelectionDAG::getDataLayout(), llvm::PointerType::getElementType(), llvm::SelectionDAG::getEntryNode(), llvm::SelectionDAG::getExternalSymbol(), llvm::EVT::getIntegerVT(), llvm::Type::getIntNTy(), llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getMachineFunction(), llvm::SelectionDAG::getMemcpy(), llvm::MachineFunction::getMMI(), llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), llvm::Type::getPointerAddressSpace(), llvm::TargetLoweringBase::getPointerTy(), llvm::SelectionDAG::getRoot(), llvm::MVT::getScalarSizeInBits(), llvm::SelectionDAG::getSelectionDAGInfo(), llvm::SelectionDAG::getSetCC(), llvm::SelectionDAG::getSExtOrTrunc(), llvm::MVT::getSizeInBits(), llvm::SelectionDAG::getTargetLoweringInfo(), llvm::Value::getType(), llvm::DataLayout::getTypeSizeInBits(), llvm::PointerType::getUnqual(), llvm::SDValue::getValue(), llvm::SelectionDAGBuilder::getValue(), llvm::SDValue::getValueType(), llvm::TargetLoweringBase::getValueType(), llvm::MVT::getVectorNumElements(), llvm::SelectionDAG::getZExtOrTrunc(), llvm::ConstantInt::getZExtValue(), llvm::TargetLoweringBase::hasFastEqualityCompare(), llvm::OperandBundleUser< InstrTy, OpIteratorTy >::hasOperandBundlesOtherThan(), llvm::MVT::i1, llvm::MVT::i16, llvm::MVT::i32, llvm::SelectionDAG::InferPtrAlignment(), info, llvm::MVT::INVALID_SIMPLE_VALUE_TYPE, llvm::CallInst::isNoBuiltin(), llvm::isOnlyUsedInZeroEqualityComparison(), llvm::Type::isSingleValueType(), llvm::Type::isSized(), llvm::CallInst::isStrictFP(), llvm::CallInst::isTailCall(), llvm::TargetLoweringBase::isTypeLegal(), llvm::MVT::isVector(), llvm::LLVMContext::OB_deopt, llvm::CallInst::onlyReadsMemory(), llvm::MVT::Other, llvm::SelectionDAGBuilder::PendingLoads, llvm::AAResults::pointsToConstantMemory(), llvm::report_fatal_error(), llvm::ISD::SETNE, llvm::SelectionDAG::setRoot(), llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Size, and llvm::SystemZISD::TM.

◆ GetRegistersForValue()

static void GetRegistersForValue ( SelectionDAG DAG,
const TargetLowering TLI,
const SDLoc DL,
SDISelAsmOperandInfo &  OpInfo 
)
static

◆ getReturnAttrs()

static AttributeList getReturnAttrs ( TargetLowering::CallLoweringInfo CLI)
static

◆ GetSignificand()

static SDValue GetSignificand ( SelectionDAG DAG,
SDValue  Op,
const SDLoc dl 
)
static

GetSignificand - Get the significand and build it into a floating-point number with exponent of 1:

Op = (Op & 0x007fffff) | 0x3f800000;

where Op is the hexadecimal representation of floating point value.

Definition at line 4265 of file SelectionDAGBuilder.cpp.

References llvm::ISD::AND, llvm::ISD::BITCAST, llvm::MVT::f32, llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getNode(), llvm::MVT::i32, and llvm::ISD::OR.

Referenced by expandLog(), expandLog10(), and expandLog2().

◆ getUnderlyingArgReg()

static unsigned getUnderlyingArgReg ( const SDValue N)
static

Definition at line 4792 of file SelectionDAGBuilder.cpp.

References llvm::ARM_AM::add, llvm::MCID::Add, llvm::ISD::ADD, llvm::MachineFunction::addCodeViewAnnotation(), llvm::SelectionDAG::AddDbgValue(), llvm::MachineInstrBuilder::addFrameIndex(), llvm::dwarf::syntax::Address, llvm::ISD::ADDROFRETURNADDR, llvm::ISD::ADJUST_TRAMPOLINE, llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Align, llvm::ISD::ANNOTATION_LABEL, Arg, llvm::AMDGPU::HSAMD::Kernel::Key::Args, assert(), llvm::ISD::AssertSext, llvm::ISD::AssertZext, llvm::SmallVectorTemplateCommon< T >::begin(), llvm::ISD::BITCAST, llvm::ISD::BITREVERSE, llvm::ISD::BSWAP, llvm::BuildMI(), llvm::CallingConv::C, llvm::ComputeValueVTs(), Context, llvm::ISD::CopyFromReg, llvm::MachineOperand::CreateFI(), llvm::DIExpression::createFragmentExpression(), llvm::MachineOperand::CreateReg(), llvm::MCContext::createTempSymbol(), llvm::ISD::CTLZ, llvm::ISD::CTLZ_ZERO_UNDEF, llvm::ISD::CTPOP, llvm::ISD::CTTZ, llvm::ISD::CTTZ_ZERO_UNDEF, llvm::StringRef::data(), llvm::dbgs(), DEBUG, llvm::ISD::DEBUGTRAP, llvm::GlobalValue::dropLLVMManglingEscape(), llvm::dyn_cast(), E, llvm::ISD::EH_DWARF_CFA, llvm::ISD::EH_RETURN, llvm::ISD::EH_SJLJ_LONGJMP, llvm::ISD::EH_SJLJ_SETJMP, llvm::ISD::EH_SJLJ_SETUP_DISPATCH, llvm::StringRef::empty(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::SmallVectorTemplateCommon< T >::end(), expandExp(), expandExp2(), expandLog(), expandLog10(), expandLog2(), expandPow(), ExpandPowI(), llvm::ExtractTypeInfo(), F(), llvm::MVT::f16, llvm::ISD::FABS, llvm::ISD::FADD, llvm::ISD::FCANONICALIZE, llvm::ISD::FCEIL, llvm::ISD::FCOPYSIGN, llvm::ISD::FCOS, llvm::ISD::FFLOOR, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), llvm::ISD::FLT_ROUNDS_, llvm::ISD::FMA, llvm::ISD::FMAXNAN, llvm::ISD::FMAXNUM, llvm::ISD::FMINNAN, llvm::ISD::FMINNUM, llvm::ISD::FMUL, llvm::ISD::FNEARBYINT, llvm::ISD::FP_EXTEND, llvm::ISD::FP_ROUND, llvm::ISD::FRAMEADDR, llvm::ISD::FRINT, llvm::ISD::FROUND, llvm::ISD::FSIN, llvm::ISD::FSQRT, llvm::ISD::FTRUNC, llvm::AttributeList::FunctionIndex, llvm::MCInstrInfo::get(), llvm::ISD::GET_DYNAMIC_AREA_OFFSET, llvm::Triple::getArch(), llvm::CallInst::getArgOperand(), llvm::AttributeList::getAttribute(), llvm::CallInst::getAttributes(), llvm::SelectionDAG::getBuildVector(), llvm::CallInst::getCalledValue(), llvm::TargetLowering::getClearCacheBuiltinName(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getConstantDbgValue(), llvm::MachineModuleInfo::getContext(), llvm::Value::getContext(), llvm::SelectionDAG::getContext(), llvm::SelectionDAG::getCopyFromReg(), llvm::MachineModuleInfo::getCurrentCallSite(), llvm::SelectionDAG::getDataLayout(), llvm::SelectionDAG::getDbgValue(), llvm::ElementUnorderedAtomicMemCpyInst::getElementSizeInBytes(), llvm::SelectionDAG::getEntryNode(), llvm::DbgInfoIntrinsic::getExpression(), llvm::SelectionDAG::getExternalSymbol(), llvm::MachinePointerInfo::getFixedStack(), llvm::SelectionDAG::getFrameIndex(), llvm::SelectionDAG::getFrameIndexDbgValue(), llvm::TargetLoweringBase::getFrameIndexTy(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getFunction(), llvm::TargetSubtargetInfo::getInstrInfo(), llvm::Type::getInt8Ty(), llvm::EVT::getIntegerVT(), llvm::DataLayout::getIntPtrType(), llvm::IntrinsicInst::getIntrinsicID(), llvm::SelectionDAG::getLabelNode(), llvm::ElementUnorderedAtomicMemCpyInst::getLength(), llvm::TargetLoweringBase::getLibcallCallingConv(), llvm::TargetLoweringBase::getLibcallName(), llvm::MachineRegisterInfo::getLiveInPhysReg(), llvm::SelectionDAG::getLoad(), getLoadStackGuard(), llvm::SelectionDAG::getMachineFunction(), llvm::SelectionDAG::getMachineNode(), llvm::SelectionDAG::getMCSymbol(), llvm::SelectionDAG::getMDNode(), llvm::SelectionDAG::getMemcpy(), llvm::RTLIB::getMEMCPY_ELEMENT_UNORDERED_ATOMIC(), llvm::SelectionDAG::getMemIntrinsicNode(), llvm::SelectionDAG::getMemmove(), llvm::RTLIB::getMEMMOVE_ELEMENT_UNORDERED_ATOMIC(), llvm::SelectionDAG::getMemset(), llvm::RTLIB::getMEMSET_ELEMENT_UNORDERED_ATOMIC(), llvm::MachineFunction::getMMI(), llvm::MachineFunction::getName(), llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), llvm::CallInst::getNumArgOperands(), llvm::SDNode::getNumValues(), llvm::SDValue::getOpcode(), llvm::User::getOperand(), llvm::SDValue::getOperand(), llvm::MCContext::getOrCreateFrameAllocSymbol(), llvm::GlobalValue::getParent(), llvm::TargetLoweringBase::getPointerTy(), llvm::ElementUnorderedAtomicMemCpyInst::getRawDest(), llvm::ElementUnorderedAtomicMemCpyInst::getRawSource(), llvm::MachineOperand::getReg(), getReg(), llvm::TargetLoweringBase::getRegClassFor(), llvm::MachineFunction::getRegInfo(), llvm::SDValue::getResNo(), llvm::DILocalVariable::getScope(), llvm::TargetLoweringBase::getSDagStackGuard(), llvm::getSizeInBits(), llvm::SelectionDAG::getSrcValue(), llvm::SelectionDAG::getStore(), llvm::DILocalScope::getSubprogram(), llvm::SelectionDAG::getSubtarget(), llvm::SelectionDAG::getTarget(), llvm::SelectionDAG::getTargetConstant(), llvm::SelectionDAG::getTargetLoweringInfo(), llvm::TargetMachine::getTargetTriple(), llvm::Value::getType(), llvm::MachineFunction::getTypeIDFor(), llvm::SelectionDAG::getUNDEF(), llvm::GetUnderlyingObjects(), llvm::DbgValueInst::getValue(), llvm::SDValue::getValue(), llvm::Attribute::getValueAsString(), llvm::SDValue::getValueType(), llvm::TargetLoweringBase::getValueType(), llvm::DbgInfoIntrinsic::getVariable(), llvm::DbgInfoIntrinsic::getVariableLocation(), llvm::Type::getVoidTy(), llvm::SelectionDAG::getVTList(), llvm::SelectionDAG::getZExtOrTrunc(), llvm::ConstantInt::getZExtValue(), llvm::MVT::Glue, llvm::Function::hasGC(), llvm::Instruction::hasNoNaNs(), I, llvm::MVT::i1, llvm::MVT::i16, llvm::MVT::i32, llvm::MVT::i64, llvm::ISD::INIT_TRAMPOLINE, llvm::ISD::INTRINSIC_WO_CHAIN, isABIRegCopy(), llvm::TargetLoweringBase::isFMAFasterThanFMulAndFAdd(), llvm::isInTailCallPosition(), llvm::TargetLoweringBase::isOperationLegalOrCustom(), llvm::Triple::isOSLinux(), llvm::MachineOperand::isReg(), llvm::CallInst::isTailCall(), llvm::ConstrainedFPIntrinsic::isTernaryOp(), llvm::ConstrainedFPIntrinsic::isUnaryOp(), llvm::DILocalVariable::isValidLocationForIntrinsic(), llvm::TargetRegisterInfo::isVirtualRegister(), llvm::ConstantInt::isZero(), llvm::ISD::LIFETIME_END, llvm::ISD::LIFETIME_START, llvm_unreachable, llvm::ISD::LOCAL_RECOVER, llvm::log2(), llvm::TargetLowering::LowerCallTo(), llvm::max(), llvm::maxnum(), MI, llvm::minnum(), llvm::MachineMemOperand::MOVolatile, N, llvm::CodeGenOpt::None, llvm::MVT::Other, llvm::ISD::PCMARKER, prefetch, llvm::ISD::PREFETCH, llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::ISD::READ_REGISTER, llvm::ISD::READCYCLECOUNTER, llvm::RegsForValue::RegCount, llvm::report_fatal_error(), llvm::ISD::RETURNADDR, round(), llvm::ISD::SADDO, llvm::MachineFunction::setCallsEHReturn(), llvm::MachineFunction::setCallsUnwindInit(), llvm::TargetLowering::CallLoweringInfo::setChain(), llvm::MachineModuleInfo::setCurrentCallSite(), llvm::TargetLowering::CallLoweringInfo::setDebugLoc(), llvm::MachineFrameInfo::setFunctionContextIndex(), llvm::TargetLowering::CallLoweringInfo::setLibCallee(), llvm::SelectionDAG::setRoot(), llvm::MachineFrameInfo::setStackProtectorIndex(), SI, llvm::ISD::SMULO, llvm::ISD::SSUBO, llvm::ISD::STACKRESTORE, llvm::ISD::STACKSAVE, llvm::FPOpFusion::Strict, llvm::ISD::STRICT_FADD, llvm::ISD::STRICT_FCOS, llvm::ISD::STRICT_FDIV, llvm::ISD::STRICT_FEXP, llvm::ISD::STRICT_FEXP2, llvm::ISD::STRICT_FLOG, llvm::ISD::STRICT_FLOG10, llvm::ISD::STRICT_FLOG2, llvm::ISD::STRICT_FMA, llvm::ISD::STRICT_FMUL, llvm::ISD::STRICT_FNEARBYINT, llvm::ISD::STRICT_FPOW, llvm::ISD::STRICT_FPOWI, llvm::ISD::STRICT_FREM, llvm::ISD::STRICT_FRINT, llvm::ISD::STRICT_FSIN, llvm::ISD::STRICT_FSQRT, llvm::ISD::STRICT_FSUB, llvm::Value::stripInBoundsConstantOffsets(), llvm::Value::stripPointerCasts(), TII, llvm::SystemZISD::TM, llvm::ISD::TRAP, TrapFuncName(), llvm::ISD::TRUNCATE, llvm::ISD::UADDO, llvm::ISD::UMULO, llvm::Value::use_empty(), llvm::TargetLowering::useLoadStackGuardNode(), llvm::TargetLoweringBase::usesUnderscoreLongJmp(), llvm::TargetLoweringBase::usesUnderscoreSetJmp(), llvm::ISD::USUBO, llvm::MVT::v2i32, llvm::RegsForValue::ValueVTs, llvm::ISD::WRITE_REGISTER, and llvm::Triple::x86_64.

◆ getUniformBase()

static bool getUniformBase ( const Value *&  Ptr,
SDValue Base,
SDValue Index,
SelectionDAGBuilder SDB 
)
static

Definition at line 3855 of file SelectionDAGBuilder.cpp.

References llvm::AtomicRMWInst::Add, llvm::AtomicRMWInst::And, assert(), llvm::ISD::ATOMIC_CMP_SWAP_WITH_SUCCESS, llvm::ISD::ATOMIC_FENCE, llvm::ISD::ATOMIC_LOAD, llvm::ISD::ATOMIC_LOAD_ADD, llvm::ISD::ATOMIC_LOAD_AND, llvm::ISD::ATOMIC_LOAD_MAX, llvm::ISD::ATOMIC_LOAD_MIN, llvm::ISD::ATOMIC_LOAD_NAND, llvm::ISD::ATOMIC_LOAD_OR, llvm::ISD::ATOMIC_LOAD_SUB, llvm::ISD::ATOMIC_LOAD_UMAX, llvm::ISD::ATOMIC_LOAD_UMIN, llvm::ISD::ATOMIC_LOAD_XOR, llvm::ISD::ATOMIC_STORE, llvm::ISD::ATOMIC_SWAP, llvm::ISD::BITCAST, llvm::ComputeValueVTs(), Context, llvm::SelectionDAGBuilder::DAG, llvm::Function::doesNotAccessMemory(), llvm::dyn_cast(), F(), llvm::SelectionDAGBuilder::findValue(), GEP, llvm::Instruction::getAAMetadata(), llvm::LoadInst::getAlignment(), llvm::StoreInst::getAlignment(), llvm::CallInst::getArgOperand(), llvm::SelectionDAG::getAtomic(), llvm::SelectionDAG::getAtomicCmpSwap(), llvm::CallInst::getCalledFunction(), llvm::AtomicCmpXchgInst::getCompareOperand(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getContext(), llvm::SelectionDAG::getDataLayout(), llvm::SelectionDAG::getEntryNode(), llvm::SelectionDAG::getEVTAlignment(), llvm::AtomicCmpXchgInst::getFailureOrdering(), llvm::TargetLoweringBase::getFenceOperandTy(), llvm::SelectionDAG::getMachineFunction(), llvm::SelectionDAG::getMaskedGather(), llvm::SelectionDAG::getMaskedLoad(), llvm::SelectionDAG::getMaskedScatter(), llvm::SelectionDAG::getMemIntrinsicNode(), llvm::Instruction::getMetadata(), llvm::AtomicCmpXchgInst::getNewValOperand(), llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), llvm::CallInst::getNumArgOperands(), llvm::SDNode::getNumValues(), llvm::AtomicRMWInst::getOperation(), llvm::LoadInst::getOrdering(), llvm::StoreInst::getOrdering(), llvm::FenceInst::getOrdering(), llvm::AtomicRMWInst::getOrdering(), llvm::LoadInst::getPointerOperand(), llvm::StoreInst::getPointerOperand(), llvm::AtomicCmpXchgInst::getPointerOperand(), llvm::AtomicRMWInst::getPointerOperand(), llvm::TargetLoweringBase::getPointerTy(), llvm::SelectionDAG::getRoot(), llvm::EVT::getSizeInBits(), llvm::SelectionDAG::getSplatBuildVector(), llvm::getSplatValue(), llvm::EVT::getStoreSize(), llvm::AtomicCmpXchgInst::getSuccessOrdering(), llvm::LoadInst::getSyncScopeID(), llvm::StoreInst::getSyncScopeID(), llvm::FenceInst::getSyncScopeID(), llvm::AtomicCmpXchgInst::getSyncScopeID(), llvm::AtomicRMWInst::getSyncScopeID(), llvm::SelectionDAG::getTargetConstant(), llvm::SelectionDAG::getTargetLoweringInfo(), llvm::TargetLoweringBase::getTgtMemIntrinsic(), llvm::Value::getType(), llvm::DataLayout::getTypeStoreSize(), llvm::AtomicRMWInst::getValOperand(), llvm::SDValue::getValue(), llvm::SelectionDAGBuilder::getValue(), llvm::StoreInst::getValueOperand(), llvm::SDValue::getValueType(), llvm::TargetLoweringBase::getValueType(), llvm::EVT::getVectorVT(), llvm::SelectionDAG::getVTList(), llvm::MVT::i1, llvm::ISD::INTRINSIC_VOID, llvm::ISD::INTRINSIC_W_CHAIN, llvm::ISD::INTRINSIC_WO_CHAIN, llvm::EVT::isVector(), llvm::Type::isVectorTy(), llvm::Type::isVoidTy(), llvm_unreachable, llvm::SPII::Load, llvm::BitmaskEnumDetail::Mask(), llvm::AtomicRMWInst::Max, llvm::LLVMContext::MD_range, llvm::AtomicRMWInst::Min, llvm::MachineMemOperand::MOLoad, llvm::MachineMemOperand::MOStore, llvm::MachineMemOperand::MOVolatile, llvm::AtomicRMWInst::Nand, llvm::ISD::NON_EXTLOAD, llvm::Function::onlyReadsMemory(), llvm::AtomicRMWInst::Or, llvm::MVT::Other, llvm::TargetLowering::prepareVolatileOrAtomicLoad(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::report_fatal_error(), llvm::SelectionDAG::setRoot(), llvm::AtomicRMWInst::Sub, llvm::AtomicRMWInst::UMax, llvm::AtomicRMWInst::UMin, llvm::RegsForValue::ValueVTs, llvm::AtomicRMWInst::Xchg, and llvm::AtomicRMWInst::Xor.

◆ hasOnlySelectUsers()

static bool hasOnlySelectUsers ( const Value Cond)
static

Definition at line 2824 of file SelectionDAGBuilder.cpp.

References llvm::MCID::Add, llvm::ISD::ADD, llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Align, llvm::alignDown(), llvm::alignTo(), llvm::all_of(), llvm::ISD::AND, Arg, AS, assert(), llvm::SmallVectorTemplateCommon< T >::begin(), llvm::ISD::BITCAST, C, llvm::ComputeLinearIndex(), llvm::ComputeValueVTs(), llvm::ISD::CONCAT_VECTORS, Context, llvm::SmallVectorTemplateCommon< T >::data(), llvm::ISD::DELETED_NODE, llvm::dyn_cast(), llvm::ISD::DYNAMIC_STACKALLOC, E, llvm::SmallVectorTemplateCommon< T >::end(), llvm::lltok::equal, llvm::ISD::EXTRACT_SUBVECTOR, llvm::ISD::EXTRACT_VECTOR_ELT, llvm::tgtok::Field, llvm::ISD::FMAXNAN, llvm::ISD::FMAXNUM, llvm::ISD::FMINNAN, llvm::ISD::FMINNUM, llvm::ISD::FP_EXTEND, llvm::ISD::FP_ROUND, llvm::ISD::FP_TO_SINT, llvm::ISD::FP_TO_UINT, llvm::gep_type_begin(), llvm::gep_type_end(), llvm::Instruction::getAAMetadata(), llvm::SelectionDAG::getAddrSpaceCast(), llvm::AllocaInst::getAlignment(), llvm::LoadInst::getAlignment(), llvm::StoreInst::getAlignment(), llvm::AllocaInst::getAllocatedType(), llvm::CallInst::getArgOperand(), llvm::AllocaInst::getArraySize(), llvm::SelectionDAG::getBuildVector(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getContext(), llvm::SelectionDAG::getCopyFromReg(), llvm::SelectionDAG::getCopyToReg(), llvm::SelectionDAG::getDataLayout(), llvm::SelectionDAG::getEntryNode(), llvm::SelectionDAG::getEVTAlignment(), llvm::TargetSubtargetInfo::getFrameLowering(), llvm::SelectionDAG::getIntPtrConstant(), llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getMachineFunction(), llvm::SelectionDAG::getMaskedStore(), llvm::Instruction::getMetadata(), llvm::TargetLowering::getMMOFlags(), llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), llvm::User::getOperand(), llvm::Type::getPointerAddressSpace(), llvm::TargetLoweringBase::getPointerTy(), llvm::SDValue::getResNo(), llvm::SelectionDAG::getRoot(), llvm::EVT::getScalarType(), llvm::Type::getScalarType(), llvm::SelectionDAG::getSExtOrTrunc(), llvm::ShuffleVectorInst::getShuffleMask(), llvm::MVT::getSizeInBits(), llvm::SelectionDAG::getSplatBuildVector(), llvm::getSplatValue(), llvm::TargetFrameLowering::getStackAlignment(), llvm::SelectionDAG::getStore(), llvm::EVT::getStoreSize(), llvm::SelectionDAG::getSubtarget(), llvm::SelectionDAG::getTargetConstant(), llvm::SelectionDAG::getTargetLoweringInfo(), llvm::Value::getType(), llvm::DataLayout::getTypeStoreSize(), llvm::SelectionDAG::getUNDEF(), llvm::SDValue::getValue(), llvm::SDValue::getValueType(), llvm::SDNode::getValueType(), llvm::TargetLoweringBase::getValueType(), llvm::EVT::getVectorElementType(), llvm::TargetLoweringBase::getVectorIdxTy(), llvm::EVT::getVectorNumElements(), llvm::SelectionDAG::getVectorShuffle(), llvm::EVT::getVectorVT(), llvm::SelectionDAG::getVTList(), llvm::SelectionDAG::getZExtOrTrunc(), I, llvm::ISD::INSERT_VECTOR_ELT, llvm::Instruction::isAtomic(), llvm::isDereferenceablePointer(), llvm::APInt::isNonNegative(), llvm::TargetLoweringBase::isNoopAddrSpaceCast(), llvm::APInt::isPowerOf2(), llvm::SDValue::isUndef(), llvm::EVT::isVector(), llvm::Type::isVectorTy(), llvm::LoadInst::isVolatile(), isVolatile(), llvm::StoreInst::isVolatile(), llvm_unreachable, llvm::APInt::logBase2(), llvm::makeArrayRef(), llvm::BitmaskEnumDetail::Mask(), llvm::matchSelectPattern(), llvm::max(), llvm::LLVMContext::MD_invariant_load, llvm::LLVMContext::MD_nontemporal, llvm::LLVMContext::MD_range, llvm::ISD::MERGE_VALUES, llvm::MachineMemOperand::MODereferenceable, llvm::MachineMemOperand::MOInvariant, llvm::MachineMemOperand::MONone, llvm::MachineMemOperand::MONonTemporal, llvm::MachineMemOperand::MOStore, llvm::MachineMemOperand::MOVolatile, llvm::ISD::MUL, N, llvm::MVT::Other, llvm::TargetLowering::prepareVolatileOrAtomicLoad(), llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::ISD::SELECT, llvm::SDNodeFlags::setNoUnsignedWrap(), llvm::SelectionDAG::setRoot(), llvm::APInt::sextOrTrunc(), llvm::ISD::SHL, llvm::ISD::SIGN_EXTEND, llvm::ISD::SINT_TO_FP, llvm::SmallVectorTemplateCommon< T, typename >::size(), llvm::SmallVectorTemplateCommon< T >::size(), llvm::ISD::SMAX, llvm::ISD::SMIN, llvm::SPF_FMAXNUM, llvm::SPF_FMINNUM, llvm::SPF_SMAX, llvm::SPF_SMIN, llvm::SPF_UMAX, llvm::SPF_UMIN, llvm::SPNB_NA, llvm::SPNB_RETURNS_ANY, llvm::SPNB_RETURNS_NAN, llvm::SPNB_RETURNS_OTHER, llvm::TargetLowering::supportSwiftError(), llvm::ISD::TokenFactor, llvm::ISD::TRUNCATE, llvm::TargetLoweringBase::TypeLegal, llvm::ISD::UINT_TO_FP, llvm::ISD::UMAX, llvm::ISD::UMIN, llvm::Value::users(), llvm::RegsForValue::ValueVTs, llvm::ISD::VSELECT, and llvm::ISD::ZERO_EXTEND.

◆ InBlock()

static bool InBlock ( const Value V,
const BasicBlock BB 
)
static

◆ isABIRegCopy()

static bool isABIRegCopy ( const Value V)
static

◆ isOnlyUsedInEntryBlock()

static bool isOnlyUsedInEntryBlock ( const Argument A,
bool  FastISel 
)
static

isOnlyUsedInEntryBlock - If the specified argument is only used in the entry block, return true.

This includes arguments used by switches, since the switch may expand into multiple basic blocks.

Definition at line 8396 of file SelectionDAGBuilder.cpp.

References llvm::Function::front(), llvm::Argument::getParent(), llvm::Value::use_empty(), and llvm::Value::users().

Referenced by tryToElideArgumentCopy().

◆ isVectorReductionOp()

static bool isVectorReductionOp ( const User I)
static

Checks if the given instruction performs a vector reduction, in which case we have the freedom to alter the elements in the result as long as the reduction of them stays unchanged.

Definition at line 2560 of file SelectionDAGBuilder.cpp.

References llvm::MCID::Add, llvm::FastMathFlags::allowContract(), llvm::FastMathFlags::allowReciprocal(), llvm::CmpInst::BAD_FCMP_PREDICATE, llvm::CmpInst::BAD_ICMP_PREDICATE, llvm::dbgs(), DEBUG, llvm::dyn_cast(), R600_InstFlag::FC, llvm::SelectionDAG::getDataLayout(), llvm::getFCmpCodeWithoutNaN(), llvm::getFCmpCondCode(), llvm::getICmpCondCode(), llvm::SelectionDAG::getNode(), llvm::Instruction::getOpcode(), llvm::User::getOperand(), llvm::SelectionDAG::getSetCC(), llvm::TargetLoweringBase::getShiftAmountTy(), llvm::EVT::getSizeInBits(), llvm::SelectionDAG::getTargetLoweringInfo(), llvm::Value::getType(), llvm::SDValue::getValueType(), llvm::TargetLoweringBase::getValueType(), llvm::Type::getVectorNumElements(), llvm::SelectionDAG::getZExtOrTrunc(), llvm::ConstantInt::getZExtValue(), I, llvm::MVT::i32, llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::Type::isVectorTy(), LLVM_FALLTHROUGH, llvm::Log2_32_Ceil(), llvm::FastMathFlags::noInfs(), llvm::FastMathFlags::noNaNs(), llvm::FastMathFlags::noSignedZeros(), llvm::ISD::SDIV, llvm::SDNodeFlags::setAllowContract(), llvm::SDNodeFlags::setAllowReciprocal(), llvm::SDNodeFlags::setExact(), llvm::SDNodeFlags::setNoInfs(), llvm::SDNodeFlags::setNoNaNs(), llvm::SDNodeFlags::setNoSignedWrap(), llvm::SDNodeFlags::setNoSignedZeros(), llvm::SDNodeFlags::setNoUnsignedWrap(), llvm::SDNodeFlags::setUnsafeAlgebra(), llvm::SDNodeFlags::setVectorReduction(), llvm::ISD::SHL, llvm::ISD::SRA, llvm::ISD::SRL, llvm::SystemZISD::TM, llvm::ISD::TRUNCATE, llvm::FastMathFlags::unsafeAlgebra(), llvm::Value::users(), and llvm::ISD::ZERO_EXTEND.

◆ patchMatchingInput()

static void patchMatchingInput ( const SDISelAsmOperandInfo &  OpInfo,
SDISelAsmOperandInfo &  MatchingOpInfo,
SelectionDAG DAG 
)
static

Make sure that the output operand OpInfo and its corresponding input operand MatchingOpInfo have compatible constraint types (otherwise error out).

Definition at line 6891 of file SelectionDAGBuilder.cpp.

References llvm::TargetLowering::getRegForInlineAsmConstraint(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::SelectionDAG::getSubtarget(), llvm::SelectionDAG::getTargetLoweringInfo(), and llvm::report_fatal_error().

Referenced by createVirtualRegs().

◆ tryToElideArgumentCopy()

static void tryToElideArgumentCopy ( FunctionLoweringInfo FuncInfo,
SmallVectorImpl< SDValue > &  Chains,
DenseMap< int, int > &  ArgCopyElisionFrameIndexMap,
SmallPtrSetImpl< const Instruction *> &  ElidedArgCopyInstrs,
ArgCopyElisionMapTy ArgCopyElisionCandidates,
const Argument Arg,
SDValue  ArgVal,
bool ArgHasUses 
)
static

Try to elide argument copies from memory into a local alloca.

Succeeds if ArgVal is a load from a suitable fixed stack object.

Definition at line 8508 of file SelectionDAGBuilder.cpp.

References llvm::MachineBasicBlock::addSuccessor(), llvm::TargetLoweringBase::areJTsAllowed(), Arg, llvm::Function::args(), assert(), llvm::ISD::AssertSext, llvm::ISD::AssertZext, llvm::MachineBasicBlock::begin(), llvm::BasicBlock::begin(), llvm::ISD::BR, llvm::ISD::BRCOND, llvm::ISD::BUILD_PAIR, C, llvm::SwitchInst::cases(), llvm::ComputeValueVTs(), llvm::ISD::CopyFromReg, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::count(), llvm::SmallPtrSetImpl< PtrType >::count(), llvm::count_if(), llvm::MachineFunction::CreateMachineBasicBlock(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::SmallVectorTemplateCommon< T >::data(), llvm::dbgs(), DEBUG, llvm::dyn_cast(), E, llvm::SmallVectorBase::empty(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::empty(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::end(), F(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::find(), findArgumentCopyElisionCandidates(), llvm::ISD::InputArg::Flags, llvm::DataLayout::getABITypeAlignment(), llvm::MachineBasicBlock::getBasicBlock(), llvm::APInt::getBitWidth(), llvm::BranchProbabilityInfo::getBranchProbStackProtector(), llvm::Function::getCallingConv(), llvm::SwitchInst::getCondition(), llvm::SelectionDAG::getContext(), getCopyFromParts(), llvm::MachineFunction::getDataLayout(), llvm::SelectionDAG::getDataLayout(), llvm::SwitchInst::getDefaultDest(), llvm::BranchProbabilityInfo::getEdgeProbability(), llvm::PointerType::getElementType(), llvm::BasicBlock::getFirstNonPHIOrDbg(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getFunction(), llvm::PHINode::getIncomingValueForBlock(), llvm::TargetLowering::getJumpTableEncoding(), llvm::TargetLoweringBase::getMinimumJumpTableEntries(), llvm::SDValue::getNode(), llvm::APInt::getNullValue(), llvm::MachineBasicBlock::getNumber(), llvm::SwitchInst::getNumCases(), llvm::TargetLoweringBase::getNumRegisters(), llvm::TerminatorInst::getNumSuccessors(), llvm::MachineFrameInfo::getObjectAlignment(), llvm::MachineFrameInfo::getObjectSize(), llvm::SDValue::getOpcode(), llvm::SDValue::getOperand(), llvm::MachineFunction::getOrCreateJumpTableInfo(), llvm::Instruction::getParent(), llvm::BasicBlock::getParent(), llvm::MachineBasicBlock::getParent(), llvm::TargetLoweringBase::getPointerTy(), getReg(), llvm::MachineFunction::getRegInfo(), llvm::Function::getReturnType(), llvm::SelectionDAG::getRoot(), llvm::EVT::getSizeInBits(), llvm::EVT::getStoreSize(), llvm::MVT::getStoreSize(), llvm::TerminatorInst::getSuccessor(), llvm::SelectionDAG::getTargetLoweringInfo(), llvm::BasicBlock::getTerminator(), llvm::Value::getType(), llvm::DataLayout::getTypeAllocSize(), llvm::EVT::getTypeForEVT(), llvm::PointerType::getUnqual(), llvm::ConstantInt::getValue(), llvm::SDValue::getValue(), llvm::SDValue::getValueType(), llvm::BranchProbability::getZero(), llvm::MipsISD::Hi, High, I, llvm::MVT::i1, llvm::MipsISD::Ins, llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::insert(), llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::MachineBasicBlock::insert(), llvm::MachineFunction::insert(), llvm::ISD::ArgFlagsTy::isByVal(), llvm::Type::isEmptyTy(), llvm::ISD::ArgFlagsTy::isInAlloca(), isOnlyUsedInEntryBlock(), llvm::TargetLoweringBase::isOperationLegal(), llvm::APInt::isPowerOf2(), llvm::APInt::isStrictlyPositive(), llvm::TargetLoweringBase::isSuitableForBitTests(), llvm::TargetLoweringBase::isSuitableForJumpTable(), llvm::Function::isVarArg(), llvm::TargetRegisterInfo::isVirtualRegister(), llvm::HexagonISD::JT, llvm::ISD::JumpTable, Kind, llvm::MipsISD::Lo, llvm::makeArrayRef(), llvm::max(), llvm::FunctionLoweringInfo::MF, N, llvm::ISD::InputArg::NoArgIndex, llvm::None, llvm::CodeGenOpt::None, llvm::MachineBasicBlock::normalizeSuccProbs(), llvm::Function::optForMinSize(), llvm::ISD::OR, llvm::MVT::Other, llvm::Value::print(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::MachineBasicBlock::push_back(), llvm::TargetLoweringBase::rangeFitsInWord(), llvm::MachineFrameInfo::RemoveStackObject(), llvm::ISD::ArgFlagsTy::setByVal(), llvm::ISD::ArgFlagsTy::setByValAlign(), llvm::ISD::ArgFlagsTy::setByValSize(), llvm::ISD::ArgFlagsTy::setCopyElisionCandidate(), llvm::ISD::SETEQ, llvm::ISD::ArgFlagsTy::setHva(), llvm::ISD::ArgFlagsTy::setHvaStart(), llvm::ISD::ArgFlagsTy::setInAlloca(), llvm::ISD::ArgFlagsTy::setInConsecutiveRegs(), llvm::ISD::ArgFlagsTy::setInReg(), llvm::MachineFrameInfo::setIsImmutableObjectIndex(), llvm::ISD::SETLE, llvm::ISD::SETLT, llvm::ISD::ArgFlagsTy::setNest(), llvm::ISD::ArgFlagsTy::setOrigAlign(), llvm::ISD::ArgFlagsTy::setSExt(), llvm::ISD::ArgFlagsTy::setSplit(), llvm::ISD::ArgFlagsTy::setSRet(), llvm::MachineBasicBlock::setSuccProbability(), llvm::ISD::ArgFlagsTy::setSwiftError(), llvm::ISD::ArgFlagsTy::setSwiftSelf(), llvm::ISD::ArgFlagsTy::setZExt(), llvm::ISD::SHL, SI, llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::size(), llvm::SmallVectorTemplateCommon< T >::size(), llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Size, llvm::APInt::slt(), llvm::CodeModel::Small, llvm::parallel::sort(), llvm::FunctionLoweringInfo::StaticAllocaMap, llvm::MachineBasicBlock::succ_begin(), llvm::MachineBasicBlock::succ_end(), std::swap(), llvm::SystemZISD::TM, llvm::ISD::TokenFactor, llvm::Value::use_empty(), llvm::Value::users(), llvm::RegsForValue::ValueVTs, VI, llvm::RISCVFenceField::W, X, llvm::CallingConv::X86_INTR, and llvm::CallingConv::X86_VectorCall.

Variable Documentation

◆ LimitFloatPrecision

unsigned LimitFloatPrecision
static

LimitFloatPrecision - Generate low-precision inline sequences for some float libcalls (6, 8 or 12 bits).

Definition at line 128 of file SelectionDAGBuilder.cpp.

◆ LimitFPPrecision

cl::opt<unsigned, true> LimitFPPrecision("limit-float-precision", cl::desc("Generate low-precision inline sequences " "for some float libcalls"), cl::location(LimitFloatPrecision), cl::init(0))
static

◆ MaxParallelChains

const unsigned MaxParallelChains = 64
static

Definition at line 151 of file SelectionDAGBuilder.cpp.