LLVM  8.0.1
Macros | Typedefs | Functions | Variables
SelectionDAGBuilder.cpp File Reference
#include "SelectionDAGBuilder.h"
#include "SDNodeDbgValue.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/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/TargetFrameLowering.h"
#include "llvm/CodeGen/TargetInstrInfo.h"
#include "llvm/CodeGen/TargetLowering.h"
#include "llvm/CodeGen/TargetOpcodes.h"
#include "llvm/CodeGen/TargetRegisterInfo.h"
#include "llvm/CodeGen/TargetSubtargetInfo.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/PatternMatch.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/MachineValueType.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetIntrinsicInfo.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetOptions.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 Optional< CallingConv::IDgetABIRegCopyCC (const Value *V)
 
static SDValue getCopyFromPartsVector (SelectionDAG &DAG, const SDLoc &DL, const SDValue *Parts, unsigned NumParts, MVT PartVT, EVT ValueVT, const Value *V, Optional< CallingConv::ID > CallConv)
 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< CallingConv::ID > CC=None, Optional< ISD::NodeType > AssertOp=None)
 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, Optional< CallingConv::ID > CallConv)
 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, Optional< CallingConv::ID > CallConv=None, ISD::NodeType ExtendKind=ISD::ANY_EXTEND)
 getCopyToParts - Create a series of nodes that contain the specified value split into legal parts. More...
 
static SDValue widenVectorToPartType (SelectionDAG &DAG, SDValue Val, const SDLoc &DL, EVT PartVT)
 
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, SDValue &Scale, 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 SDLoc &DL, SDISelAsmOperandInfo &OpInfo, SDISelAsmOperandInfo &RefOpInfo)
 GetRegistersForValue - Assign registers (virtual or physical) for the specified operand. More...
 
static unsigned findMatchingInlineAsmOperand (unsigned OperandNo, const std::vector< SDValue > &AsmNodeOperands)
 
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...
 
static BranchProbability scaleCaseProbality (BranchProbability CaseProb, BranchProbability PeeledCaseProb)
 

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::Hidden, cl::init(0))
 
static cl::opt< unsignedSwitchPeelThreshold ("switch-peel-threshold", cl::Hidden, cl::init(66), cl::desc("Set the case probability threshold for peeling the case from a " "switch statement. A value greater than 100 will void this " "optimization"))
 
static const unsigned MaxParallelChains = 64
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "isel"

Definition at line 127 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 8822 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 8108 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::Intrinsic::experimental_vector_reduce_add, llvm::Intrinsic::experimental_vector_reduce_and, llvm::Intrinsic::experimental_vector_reduce_fadd, llvm::Intrinsic::experimental_vector_reduce_fmax, llvm::Intrinsic::experimental_vector_reduce_fmin, llvm::Intrinsic::experimental_vector_reduce_fmul, llvm::Intrinsic::experimental_vector_reduce_mul, llvm::Intrinsic::experimental_vector_reduce_or, llvm::Intrinsic::experimental_vector_reduce_smax, llvm::Intrinsic::experimental_vector_reduce_smin, llvm::Intrinsic::experimental_vector_reduce_umax, llvm::Intrinsic::experimental_vector_reduce_umin, llvm::Intrinsic::experimental_vector_reduce_xor, From, llvm::CallBase::getArgOperand(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getArgument(), llvm::CallBase::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::CallBase::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::FastMathFlags::isFast(), llvm::Type::isVoidTy(), llvm_unreachable, llvm::PatchPointOpers::NArgPos, llvm::PatchPointOpers::NBytesPos, llvm::MVT::Other, llvm::SmallVectorTemplateBase< T >::push_back(), llvm::SelectionDAG::ReplaceAllUsesOfValuesWith(), llvm::SelectionDAG::ReplaceAllUsesWith(), llvm::SelectionDAG::setRoot(), llvm::SmallVectorBase::size(), llvm::PatchPointOpers::TargetPos, 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.

Referenced by llvm::FastISel::selectPatchpoint(), and llvm::FastISel::selectStackmap().

◆ diagnosePossiblyInvalidConstraint()

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

Definition at line 328 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 4528 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 4836 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 4551 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 4746 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 4649 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 4848 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

Definition at line 7448 of file SelectionDAGBuilder.cpp.

References llvm::RegsForValue::append(), assert(), llvm::SmallVectorTemplateCommon< T >::begin(), llvm::ArrayRef< T >::begin(), llvm::ISD::BITCAST, llvm::TargetLowering::C_Memory, llvm::TargetLowering::C_Other, llvm::TargetLowering::C_Register, llvm::TargetLowering::C_RegisterClass, llvm::TargetLowering::ComputeConstraintToUse(), llvm::ComputeValueVTs(), llvm::InlineAsm::Constraint_Unknown, llvm::TargetLowering::AsmOperandInfo::ConstraintType, llvm::InlineAsm::convertMemFlagWordToMatchingFlagWord(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::LLVMContext::emitError(), llvm::SmallVectorBase::empty(), llvm::ArrayRef< T >::end(), llvm::InlineAsm::Extra_AsmDialect, llvm::InlineAsm::Extra_HasSideEffects, llvm::InlineAsm::Extra_IsAlignStack, llvm::InlineAsm::Extra_IsConvergent, llvm::InlineAsm::Extra_MayLoad, llvm::InlineAsm::Extra_MayStore, first, llvm::DataLayout::getABITypeAlignment(), getAddressForMemoryInput(), llvm::CallBase::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::SelectionDAG::getMergeValues(), llvm::Instruction::getMetadata(), llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), llvm::InlineAsm::getNumOperandRegisters(), llvm::SDNode::getNumOperands(), llvm::User::getOperand(), llvm::TargetLoweringBase::getPointerTy(), llvm::TargetLoweringBase::getRegClassFor(), llvm::MachineFunction::getRegInfo(), llvm::TargetSubtargetInfo::getRegisterInfo(), GetRegistersForValue(), llvm::SelectionDAG::getRoot(), llvm::TargetLoweringBase::getSimpleValueType(), llvm::EVT::getSizeInBits(), 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::getValueSizeInBits(), 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::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::makeArrayRef(), llvm::ISD::MERGE_VALUES, llvm::InlineAsm::Op_FirstOperand, llvm::InlineAsm::Op_InputChain, llvm::SDNode::ops(), llvm::MVT::Other, llvm::TargetLowering::ParseConstraints(), patchMatchingInput(), llvm::SmallVectorTemplateBase< T >::push_back(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::RegsForValue::Regs, llvm::SmallVectorImpl< T >::resize(), second, llvm::SelectionDAG::setRoot(), llvm::SmallVectorBase::size(), llvm::ISD::TokenFactor, llvm::transform(), llvm::ISD::TRUNCATE, llvm::InlineAsm::ConstraintInfo::Type, llvm::ISD::VACOPY, llvm::ISD::VAEND, llvm::RegsForValue::ValueVTs, and llvm::ISD::VASTART.

◆ 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 1480 of file SelectionDAGBuilder.cpp.

References 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::DataLayout::getAllocaAddrSpace(), 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::getMachineFunction(), llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), llvm::User::getNumOperands(), llvm::TargetLoweringBase::getNumRegistersForCallingConv(), llvm::SelectionDAG::getObjectPtrOffset(), llvm::User::getOperand(), llvm::Instruction::getParent(), llvm::BasicBlock::getParent(), llvm::Function::getPersonalityFn(), llvm::Type::getPointerTo(), 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::MachinePointerInfo::getUnknownStack(), llvm::CleanupReturnInst::getUnwindDest(), llvm::SDValue::getValueType(), llvm::BranchProbability::getZero(), llvm::AttributeList::hasAttrSomewhere(), llvm::Attribute::InReg, llvm::isAsynchronousEHPersonality(), llvm::EVT::isInteger(), llvm::Function::isVarArg(), llvm::TargetLowering::LowerReturn(), llvm::FunctionLoweringInfo::MBBMap, llvm::MSVC_CXX, llvm::MVT::Other, llvm::SmallVectorTemplateBase< T >::push_back(), llvm::report_fatal_error(), llvm::MipsISD::Ret, llvm::AttributeList::ReturnIndex, llvm::ISD::ArgFlagsTy::setInReg(), llvm::SelectionDAG::setRoot(), llvm::ISD::ArgFlagsTy::setSExt(), llvm::ISD::ArgFlagsTy::setSwiftError(), llvm::ISD::ArgFlagsTy::setZExt(), llvm::Attribute::SExt, llvm::ISD::SIGN_EXTEND, llvm::SmallVectorBase::size(), llvm::TargetLowering::supportSwiftError(), llvm::Attribute::SwiftError, llvm::ISD::TokenFactor, llvm::RegsForValue::ValueVTs, llvm::Wasm_CXX, llvm::ISD::ZERO_EXTEND, and llvm::Attribute::ZExt.

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

◆ getABIRegCopyCC()

static Optional<CallingConv::ID> getABIRegCopyCC ( const Value V)
static

◆ 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< CallingConv::ID CC = None,
Optional< ISD::NodeType AssertOp = None 
)
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 198 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(), and tryToElideArgumentCopy().

◆ getCopyFromPartsVector()

static SDValue getCopyFromPartsVector ( SelectionDAG DAG,
const SDLoc DL,
const SDValue Parts,
unsigned  NumParts,
MVT  PartVT,
EVT  ValueVT,
const Value V,
Optional< CallingConv::ID CallConv 
)
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 347 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::Optional< T >::getValue(), llvm::SDValue::getValueType(), llvm::EVT::getVectorElementType(), llvm::TargetLoweringBase::getVectorIdxTy(), llvm::EVT::getVectorNumElements(), llvm::TargetLoweringBase::getVectorTypeBreakdown(), llvm::TargetLoweringBase::getVectorTypeBreakdownForCallingConv(), llvm::EVT::getVectorVT(), llvm::Optional< T >::hasValue(), llvm::EVT::isFloatingPoint(), llvm::TargetLoweringBase::isTypeLegal(), and llvm::EVT::isVector().

Referenced by getABIRegCopyCC(), and getCopyFromParts().

◆ getCopyToParts()

static void getCopyToParts ( SelectionDAG DAG,
const SDLoc DL,
SDValue  Val,
SDValue Parts,
unsigned  NumParts,
MVT  PartVT,
const Value V,
Optional< CallingConv::ID CallConv = None,
ISD::NodeType  ExtendKind = ISD::ANY_EXTEND 
)
static

◆ getCopyToPartsVector()

static void getCopyToPartsVector ( SelectionDAG DAG,
const SDLoc DL,
SDValue  Val,
SDValue Parts,
unsigned  NumParts,
MVT  PartVT,
const Value V,
Optional< CallingConv::ID CallConv 
)
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 4417 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 6657 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::CallBase::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::CallBase::getArgOperand(), llvm::ConstantExpr::getBitCast(), llvm::SelectionDAG::getBitcast(), llvm::CallBase::getCalledFunction(), llvm::CallBase::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::CallBase::hasOperandBundlesOtherThan(), llvm::MVT::i1, llvm::MVT::i16, llvm::MVT::i32, llvm::SelectionDAG::InferPtrAlignment(), info, llvm::MVT::INVALID_SIMPLE_VALUE_TYPE, llvm::CallBase::isNoBuiltin(), llvm::isOnlyUsedInZeroEqualityComparison(), llvm::Type::isSingleValueType(), llvm::Type::isSized(), llvm::CallBase::isStrictFP(), llvm::CallInst::isTailCall(), llvm::TargetLoweringBase::isTypeLegal(), llvm::MVT::isVector(), llvm::LLVMContext::OB_deopt, llvm::CallBase::onlyReadsMemory(), llvm::MVT::Other, llvm::SelectionDAGBuilder::PendingLoads, llvm::AAResults::pointsToConstantMemory(), llvm::report_fatal_error(), llvm::ISD::SETNE, llvm::SelectionDAG::setRoot(), Size, and llvm::SystemZISD::TM.

◆ GetRegistersForValue()

static void GetRegistersForValue ( SelectionDAG DAG,
const SDLoc DL,
SDISelAsmOperandInfo &  OpInfo,
SDISelAsmOperandInfo &  RefOpInfo 
)
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 4404 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 4931 of file SelectionDAGBuilder.cpp.

References llvm::MCID::Add, llvm::ISD::ADD, llvm::MachineFunction::addCodeViewAnnotation(), llvm::SelectionDAG::AddDbgLabel(), llvm::SelectionDAG::AddDbgValue(), llvm::MachineInstrBuilder::addFrameIndex(), llvm::Address, llvm::Intrinsic::addressofreturnaddress, llvm::ISD::ADDROFRETURNADDR, llvm::Intrinsic::adjust_trampoline, llvm::ISD::ADJUST_TRAMPOLINE, llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Align, llvm::Intrinsic::annotation, llvm::ISD::ANNOTATION_LABEL, Arg, llvm::AMDGPU::HSAMD::Kernel::Key::Args, assert(), llvm::ISD::AssertSext, llvm::ISD::AssertZext, llvm::Intrinsic::assume, llvm::SmallVectorTemplateCommon< T >::begin(), llvm::ISD::BITCAST, llvm::Intrinsic::bitreverse, llvm::ISD::BITREVERSE, llvm::Intrinsic::bswap, llvm::ISD::BSWAP, llvm::BuildMI(), llvm::CallingConv::C, llvm::Intrinsic::canonicalize, llvm::Intrinsic::ceil, llvm::Intrinsic::clear_cache, llvm::Intrinsic::codeview_annotation, llvm::ComputeValueVTs(), Context, llvm::Intrinsic::convert_from_fp16, llvm::Intrinsic::convert_to_fp16, llvm::ISD::CopyFromReg, llvm::Intrinsic::copysign, llvm::Intrinsic::cos, llvm::MachineOperand::CreateFI(), llvm::DIExpression::createFragmentExpression(), llvm::MachineOperand::CreateReg(), llvm::MCContext::createTempSymbol(), llvm::Intrinsic::ctlz, llvm::ISD::CTLZ, llvm::ISD::CTLZ_ZERO_UNDEF, llvm::Intrinsic::ctpop, llvm::ISD::CTPOP, llvm::Intrinsic::cttz, llvm::ISD::CTTZ, llvm::ISD::CTTZ_ZERO_UNDEF, llvm::StringRef::data(), llvm::Intrinsic::dbg_addr, llvm::Intrinsic::dbg_declare, llvm::Intrinsic::dbg_label, llvm::Intrinsic::dbg_value, llvm::dbgs(), llvm::Intrinsic::debugtrap, llvm::ISD::DEBUGTRAP, llvm::Intrinsic::donothing, llvm::GlobalValue::dropLLVMManglingEscape(), llvm::dyn_cast(), E, llvm::ISD::EH_DWARF_CFA, llvm::Intrinsic::eh_dwarf_cfa, llvm::Intrinsic::eh_exceptioncode, llvm::Intrinsic::eh_exceptionpointer, llvm::ISD::EH_RETURN, llvm::Intrinsic::eh_return_i32, llvm::Intrinsic::eh_return_i64, llvm::Intrinsic::eh_sjlj_callsite, llvm::Intrinsic::eh_sjlj_functioncontext, llvm::Intrinsic::eh_sjlj_longjmp, llvm::ISD::EH_SJLJ_LONGJMP, llvm::ISD::EH_SJLJ_SETJMP, llvm::Intrinsic::eh_sjlj_setjmp, llvm::Intrinsic::eh_sjlj_setup_dispatch, llvm::ISD::EH_SJLJ_SETUP_DISPATCH, llvm::Intrinsic::eh_typeid_for, llvm::Intrinsic::eh_unwind_init, llvm::TargetLowering::emitStackGuardXorFP(), llvm::StringRef::empty(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::SmallVectorTemplateCommon< T >::end(), llvm::Intrinsic::exp, llvm::Intrinsic::exp2, expandExp(), expandExp2(), expandLog(), expandLog10(), expandLog2(), expandPow(), ExpandPowI(), llvm::Intrinsic::expect, llvm::Intrinsic::experimental_constrained_ceil, llvm::Intrinsic::experimental_constrained_cos, llvm::Intrinsic::experimental_constrained_exp, llvm::Intrinsic::experimental_constrained_exp2, llvm::Intrinsic::experimental_constrained_fadd, llvm::Intrinsic::experimental_constrained_fdiv, llvm::Intrinsic::experimental_constrained_floor, llvm::Intrinsic::experimental_constrained_fma, llvm::Intrinsic::experimental_constrained_fmul, llvm::Intrinsic::experimental_constrained_frem, llvm::Intrinsic::experimental_constrained_fsub, llvm::Intrinsic::experimental_constrained_log, llvm::Intrinsic::experimental_constrained_log10, llvm::Intrinsic::experimental_constrained_log2, llvm::Intrinsic::experimental_constrained_maxnum, llvm::Intrinsic::experimental_constrained_minnum, llvm::Intrinsic::experimental_constrained_nearbyint, llvm::Intrinsic::experimental_constrained_pow, llvm::Intrinsic::experimental_constrained_powi, llvm::Intrinsic::experimental_constrained_rint, llvm::Intrinsic::experimental_constrained_round, llvm::Intrinsic::experimental_constrained_sin, llvm::Intrinsic::experimental_constrained_sqrt, llvm::Intrinsic::experimental_constrained_trunc, llvm::Intrinsic::experimental_deoptimize, llvm::Intrinsic::experimental_gc_relocate, llvm::Intrinsic::experimental_gc_result, llvm::Intrinsic::experimental_gc_statepoint, llvm::Intrinsic::experimental_patchpoint_i64, llvm::Intrinsic::experimental_patchpoint_void, llvm::Intrinsic::experimental_stackmap, llvm::Intrinsic::experimental_vector_reduce_add, llvm::Intrinsic::experimental_vector_reduce_and, llvm::Intrinsic::experimental_vector_reduce_fadd, llvm::Intrinsic::experimental_vector_reduce_fmax, llvm::Intrinsic::experimental_vector_reduce_fmin, llvm::Intrinsic::experimental_vector_reduce_fmul, llvm::Intrinsic::experimental_vector_reduce_mul, llvm::Intrinsic::experimental_vector_reduce_or, llvm::Intrinsic::experimental_vector_reduce_smax, llvm::Intrinsic::experimental_vector_reduce_smin, llvm::Intrinsic::experimental_vector_reduce_umax, llvm::Intrinsic::experimental_vector_reduce_umin, llvm::Intrinsic::experimental_vector_reduce_xor, llvm::ExtractTypeInfo(), F(), llvm::MVT::f16, llvm::Intrinsic::fabs, 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::Intrinsic::floor, llvm::Intrinsic::flt_rounds, llvm::ISD::FLT_ROUNDS_, llvm::Intrinsic::fma, llvm::ISD::FMA, llvm::ISD::FMAXIMUM, llvm::ISD::FMAXNUM, llvm::ISD::FMINIMUM, llvm::ISD::FMINNUM, llvm::ISD::FMUL, llvm::Intrinsic::fmuladd, llvm::ISD::FNEARBYINT, for(), llvm::ISD::FP_EXTEND, llvm::ISD::FP_ROUND, llvm::ISD::FRAMEADDR, llvm::Intrinsic::frameaddress, llvm::ISD::FRINT, llvm::ISD::FROUND, llvm::Intrinsic::fshl, llvm::ISD::FSHL, llvm::Intrinsic::fshr, llvm::ISD::FSHR, llvm::ISD::FSIN, llvm::ISD::FSQRT, llvm::ISD::FTRUNC, llvm::AttributeList::FunctionIndex, llvm::Intrinsic::gcread, llvm::Intrinsic::gcroot, llvm::Intrinsic::gcwrite, llvm::MCInstrInfo::get(), llvm::Intrinsic::get_dynamic_area_offset, llvm::ISD::GET_DYNAMIC_AREA_OFFSET, getABIRegCopyCC(), llvm::Triple::getArch(), llvm::CallBase::getArgOperand(), llvm::SelectionDAG::getAtomicMemcpy(), llvm::SelectionDAG::getAtomicMemmove(), llvm::SelectionDAG::getAtomicMemset(), llvm::AttributeList::getAttribute(), llvm::CallBase::getAttributes(), llvm::SelectionDAG::getBuildVector(), llvm::CallBase::getCalledValue(), llvm::TargetLowering::getClearCacheBuiltinName(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getConstantDbgValue(), llvm::MachineModuleInfo::getContext(), llvm::Value::getContext(), llvm::SelectionDAG::getCopyFromReg(), llvm::MachineModuleInfo::getCurrentCallSite(), llvm::SelectionDAG::getDataLayout(), llvm::SelectionDAG::getDbgLabel(), llvm::SelectionDAG::getDbgValue(), llvm::MemIntrinsicBase< Derived >::getDestAlignment(), llvm::AtomicMemIntrinsic::getElementSizeInBytes(), llvm::SelectionDAG::getEntryNode(), llvm::DbgVariableIntrinsic::getExpression(), llvm::SelectionDAG::getExternalSymbol(), llvm::MachinePointerInfo::getFixedStack(), llvm::DIExpression::getFragmentInfo(), llvm::SelectionDAG::getFrameIndex(), llvm::SelectionDAG::getFrameIndexDbgValue(), llvm::TargetLoweringBase::getFrameIndexTy(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getFunction(), llvm::TargetSubtargetInfo::getInstrInfo(), llvm::EVT::getIntegerVT(), llvm::IntrinsicInst::getIntrinsicID(), llvm::DbgLabelInst::getLabel(), llvm::SelectionDAG::getLabelNode(), llvm::MemIntrinsicBase< Derived >::getLength(), llvm::MachineRegisterInfo::getLiveInPhysReg(), llvm::SelectionDAG::getLoad(), getLoadStackGuard(), llvm::SelectionDAG::getMachineFunction(), llvm::SelectionDAG::getMachineNode(), llvm::SelectionDAG::getMCSymbol(), llvm::SelectionDAG::getMDNode(), llvm::SelectionDAG::getMemcpy(), llvm::SelectionDAG::getMemIntrinsicNode(), llvm::SelectionDAG::getMemmove(), llvm::SelectionDAG::getMemset(), llvm::MachineFunction::getMMI(), llvm::MachineFunction::getName(), llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), llvm::CallBase::getNumArgOperands(), llvm::SDNode::getNumValues(), llvm::SDValue::getOpcode(), llvm::User::getOperand(), llvm::SDValue::getOperand(), llvm::MCContext::getOrCreateFrameAllocSymbol(), llvm::GlobalValue::getParent(), llvm::GetPointerBaseWithConstantOffset(), llvm::TargetLoweringBase::getPointerTy(), llvm::MemIntrinsicBase< Derived >::getRawDest(), llvm::MemTransferBase< BaseCL >::getRawSource(), llvm::MachineOperand::getReg(), getReg(), llvm::TargetLoweringBase::getRegClassFor(), llvm::MachineFunction::getRegInfo(), llvm::SDValue::getResNo(), llvm::SelectionDAG::getRoot(), llvm::TargetLoweringBase::getSDagStackGuard(), llvm::SelectionDAG::getSelect(), llvm::SelectionDAG::getSetCC(), llvm::MemTransferBase< BaseCL >::getSourceAlignment(), llvm::SelectionDAG::getSrcValue(), llvm::SelectionDAG::getStore(), llvm::SelectionDAG::getSubtarget(), llvm::SelectionDAG::getTarget(), llvm::SelectionDAG::getTargetConstant(), llvm::SelectionDAG::getTargetGlobalAddress(), llvm::SelectionDAG::getTargetLoweringInfo(), llvm::TargetMachine::getTargetTriple(), llvm::Value::getType(), llvm::MachineFunction::getTypeIDFor(), llvm::SelectionDAG::getUNDEF(), llvm::GetUnderlyingObjects(), llvm::SDValue::getValue(), llvm::DbgValueInst::getValue(), llvm::Attribute::getValueAsString(), llvm::SDValue::getValueType(), llvm::TargetLoweringBase::getValueType(), llvm::DbgVariableIntrinsic::getVariable(), llvm::EVT::getVectorNumElements(), llvm::EVT::getVectorVT(), llvm::SelectionDAG::getVRegDbgValue(), 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::Intrinsic::icall_branch_funnel, llvm::Intrinsic::init_trampoline, llvm::ISD::INIT_TRAMPOLINE, llvm::Intrinsic::instrprof_increment, llvm::Intrinsic::instrprof_value_profile, llvm::ISD::INTRINSIC_WO_CHAIN, llvm::Intrinsic::invariant_end, llvm::Intrinsic::invariant_start, llvm::Intrinsic::is_constant, llvm::TargetLoweringBase::isFMAFasterThanFMulAndFAdd(), llvm::isInTailCallPosition(), llvm::TargetLoweringBase::isOperationLegalOrCustom(), llvm::Triple::isOSLinux(), llvm::isPowerOf2_32(), llvm::MachineOperand::isReg(), llvm::CallInst::isTailCall(), llvm::ConstrainedFPIntrinsic::isTernaryOp(), llvm::ConstrainedFPIntrinsic::isUnaryOp(), llvm::DILocalVariable::isValidLocationForIntrinsic(), llvm::TargetRegisterInfo::isVirtualRegister(), llvm::ConstantInt::isZero(), llvm::Intrinsic::launder_invariant_group, llvm::Intrinsic::lifetime_end, llvm::ISD::LIFETIME_END, llvm::Intrinsic::lifetime_start, llvm::ISD::LIFETIME_START, LLVM_DEBUG, llvm_unreachable, llvm::ISD::LOCAL_RECOVER, llvm::Intrinsic::localescape, llvm::Intrinsic::localrecover, llvm::Intrinsic::log, llvm::Intrinsic::log10, llvm::Intrinsic::log2, llvm::Intrinsic::longjmp, llvm::TargetLowering::LowerCallTo(), llvm::Intrinsic::masked_compressstore, llvm::Intrinsic::masked_expandload, llvm::Intrinsic::masked_gather, llvm::Intrinsic::masked_load, llvm::Intrinsic::masked_scatter, llvm::Intrinsic::masked_store, llvm::max(), llvm::Intrinsic::maximum, llvm::Intrinsic::maxnum, llvm::Intrinsic::memcpy, llvm::Intrinsic::memcpy_element_unordered_atomic, llvm::Intrinsic::memmove, llvm::Intrinsic::memmove_element_unordered_atomic, llvm::Intrinsic::memset, llvm::Intrinsic::memset_element_unordered_atomic, MI, llvm::MinAlign(), llvm::Intrinsic::minimum, llvm::Intrinsic::minnum, llvm::MachineMemOperand::MOLoad, llvm::MachineMemOperand::MOStore, llvm::MachineMemOperand::MOVolatile, N, llvm::Intrinsic::nearbyint, llvm::None, llvm::CodeGenOpt::None, llvm::Intrinsic::objectsize, llvm::ISD::OR, llvm::MVT::Other, llvm::Intrinsic::pcmarker, llvm::ISD::PCMARKER, llvm::Intrinsic::pow, llvm::Intrinsic::powi, llvm::Intrinsic::prefetch, llvm::ISD::PREFETCH, llvm::Intrinsic::ptr_annotation, llvm::SmallVectorTemplateBase< T >::push_back(), llvm::ISD::READ_REGISTER, llvm::Intrinsic::read_register, llvm::Intrinsic::readcyclecounter, llvm::ISD::READCYCLECOUNTER, Reg, llvm::report_fatal_error(), llvm::ISD::RETURNADDR, llvm::Intrinsic::returnaddress, llvm::Intrinsic::rint, llvm::ISD::ROTL, llvm::ISD::ROTR, llvm::Intrinsic::round, llvm::Intrinsic::sadd_sat, llvm::Intrinsic::sadd_with_overflow, llvm::ISD::SADDO, llvm::ISD::SADDSAT, llvm::MachineFunction::setCallsEHReturn(), llvm::MachineFunction::setCallsUnwindInit(), llvm::TargetLowering::CallLoweringInfo::setChain(), llvm::MachineModuleInfo::setCurrentCallSite(), llvm::TargetLowering::CallLoweringInfo::setDebugLoc(), llvm::ISD::SETEQ, llvm::MachineFrameInfo::setFunctionContextIndex(), llvm::MachineFunction::setHasLocalEscape(), llvm::Intrinsic::setjmp, llvm::TargetLowering::CallLoweringInfo::setLibCallee(), llvm::SelectionDAG::setRoot(), llvm::MachineFrameInfo::setStackProtectorIndex(), llvm::ISD::SHL, SI, llvm::Intrinsic::sideeffect, llvm::Intrinsic::sin, llvm::Intrinsic::smul_fix, llvm::Intrinsic::smul_with_overflow, llvm::ISD::SMULFIX, llvm::ISD::SMULO, llvm::sort(), llvm::ISD::SPONENTRY, llvm::Intrinsic::sponentry, llvm::Intrinsic::sqrt, llvm::ISD::SRL, llvm::Intrinsic::ssub_sat, llvm::Intrinsic::ssub_with_overflow, llvm::ISD::SSUBO, llvm::ISD::SSUBSAT, llvm::Intrinsic::stackguard, llvm::Intrinsic::stackprotector, llvm::Intrinsic::stackrestore, llvm::ISD::STACKRESTORE, llvm::Intrinsic::stacksave, llvm::ISD::STACKSAVE, llvm::FPOpFusion::Strict, llvm::ISD::STRICT_FADD, llvm::ISD::STRICT_FCEIL, llvm::ISD::STRICT_FCOS, llvm::ISD::STRICT_FDIV, llvm::ISD::STRICT_FEXP, llvm::ISD::STRICT_FEXP2, llvm::ISD::STRICT_FFLOOR, llvm::ISD::STRICT_FLOG, llvm::ISD::STRICT_FLOG10, llvm::ISD::STRICT_FLOG2, llvm::ISD::STRICT_FMA, llvm::ISD::STRICT_FMAXNUM, llvm::ISD::STRICT_FMINNUM, 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_FROUND, llvm::ISD::STRICT_FSIN, llvm::ISD::STRICT_FSQRT, llvm::ISD::STRICT_FSUB, llvm::ISD::STRICT_FTRUNC, llvm::Intrinsic::strip_invariant_group, llvm::Value::stripInBoundsConstantOffsets(), llvm::Value::stripPointerCasts(), llvm::ISD::SUB, T1, TII, llvm::SystemZISD::TM, llvm::Intrinsic::trap, llvm::ISD::TRAP, llvm::Intrinsic::trunc, llvm::ISD::TRUNCATE, llvm::Intrinsic::uadd_sat, llvm::Intrinsic::uadd_with_overflow, llvm::ISD::UADDO, llvm::ISD::UADDSAT, llvm::Intrinsic::umul_with_overflow, llvm::ISD::UMULO, llvm::ISD::UREM, llvm::Value::use_empty(), llvm::TargetLowering::useLoadStackGuardNode(), llvm::TargetLoweringBase::useStackGuardXorFP(), llvm::TargetLoweringBase::usesUnderscoreLongJmp(), llvm::TargetLoweringBase::usesUnderscoreSetJmp(), llvm::Intrinsic::usub_sat, llvm::Intrinsic::usub_with_overflow, llvm::ISD::USUBO, llvm::ISD::USUBSAT, llvm::MVT::v2i32, llvm::Intrinsic::vacopy, llvm::Intrinsic::vaend, llvm::RegsForValue::ValueVTs, llvm::Intrinsic::var_annotation, llvm::Intrinsic::vastart, llvm::Intrinsic::wasm_landingpad_index, llvm::ISD::WRITE_REGISTER, llvm::Intrinsic::write_register, X, llvm::Triple::x86_64, llvm::Intrinsic::x86_mmx_psll_d, llvm::Intrinsic::x86_mmx_psll_q, llvm::Intrinsic::x86_mmx_psll_w, llvm::Intrinsic::x86_mmx_pslli_d, llvm::Intrinsic::x86_mmx_pslli_q, llvm::Intrinsic::x86_mmx_pslli_w, llvm::Intrinsic::x86_mmx_psra_d, llvm::Intrinsic::x86_mmx_psra_w, llvm::Intrinsic::x86_mmx_psrai_d, llvm::Intrinsic::x86_mmx_psrai_w, llvm::Intrinsic::x86_mmx_psrl_d, llvm::Intrinsic::x86_mmx_psrl_q, llvm::Intrinsic::x86_mmx_psrl_w, llvm::Intrinsic::x86_mmx_psrli_d, llvm::Intrinsic::x86_mmx_psrli_q, llvm::Intrinsic::x86_mmx_psrli_w, llvm::Intrinsic::xray_customevent, llvm::Intrinsic::xray_typedevent, Y, and llvm::Z.

◆ getUniformBase()

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

Definition at line 3979 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, C, 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::CallBase::getArgOperand(), llvm::SelectionDAG::getAtomic(), llvm::SelectionDAG::getAtomicCmpSwap(), llvm::CallBase::getCalledFunction(), llvm::AtomicCmpXchgInst::getCompareOperand(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getContext(), llvm::SelectionDAGBuilder::getCurSDLoc(), 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::CallBase::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::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::getTypeAllocSize(), 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, Info, 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::LocationSize::precise(), llvm::TargetLowering::prepareVolatileOrAtomicLoad(), llvm::SmallVectorTemplateBase< T >::push_back(), llvm::report_fatal_error(), llvm::SelectionDAG::setRoot(), llvm::AtomicRMWInst::Sub, llvm::TargetLoweringBase::supportsUnalignedAtomics(), 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 2945 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, assert(), 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::ISD::EXTRACT_SUBVECTOR, llvm::ISD::EXTRACT_VECTOR_ELT, llvm::tgtok::Field, llvm::ISD::FMAXIMUM, llvm::ISD::FMAXNUM, llvm::ISD::FMINIMUM, 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::CallBase::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::DataLayout::getIndexSizeInBits(), llvm::MVT::getIntegerVT(), 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::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::is_splat(), 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::LocationSize::precise(), llvm::TargetLowering::prepareVolatileOrAtomicLoad(), llvm::SmallVectorTemplateBase< T >::push_back(), llvm::SmallVectorTemplateBase< T, bool >::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::SmallVectorBase::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

◆ 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 8806 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

◆ 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 7274 of file SelectionDAGBuilder.cpp.

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

Referenced by findMatchingInlineAsmOperand().

◆ scaleCaseProbality()

static BranchProbability scaleCaseProbality ( BranchProbability  CaseProb,
BranchProbability  PeeledCaseProb 
)
static

◆ 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 8919 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, llvm::Attribute::ByVal, C, 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(), 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::DataLayout::getAllocaAddrSpace(), llvm::MachineBasicBlock::getBasicBlock(), llvm::APInt::getBitWidth(), llvm::BranchProbabilityInfo::getBranchProbStackProtector(), llvm::Function::getCallingConv(), llvm::SwitchInst::getCondition(), llvm::SelectionDAG::getContext(), getCopyFromParts(), llvm::SelectionDAG::getDataLayout(), llvm::MachineFunction::getDataLayout(), llvm::BranchProbabilityInfo::getEdgeProbability(), llvm::PointerType::getElementType(), llvm::MachineFunction::getFrameInfo(), llvm::TargetLowering::getJumpTableEncoding(), llvm::TargetLoweringBase::getMinimumJumpTableEntries(), llvm::SDValue::getNode(), llvm::APInt::getNullValue(), llvm::MachineBasicBlock::getNumber(), llvm::TargetLoweringBase::getNumRegisters(), llvm::Instruction::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::Type::getPointerTo(), llvm::TargetLoweringBase::getPointerTy(), getReg(), llvm::Function::getReturnType(), llvm::SelectionDAG::getRoot(), llvm::EVT::getSizeInBits(), llvm::EVT::getStoreSize(), llvm::MVT::getStoreSize(), llvm::Instruction::getSuccessor(), llvm::SelectionDAG::getTargetLoweringInfo(), llvm::BasicBlock::getTerminator(), llvm::Value::getType(), llvm::DataLayout::getTypeAllocSize(), llvm::EVT::getTypeForEVT(), llvm::ConstantInt::getValue(), llvm::SDValue::getValue(), llvm::SDValue::getValueType(), llvm::BranchProbability::getZero(), llvm::MipsISD::Hi, High, I, llvm::MVT::i1, if(), llvm::Attribute::InAlloca, llvm::Attribute::InReg, 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::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_DEBUG, llvm::MipsISD::Lo, llvm::makeArrayRef(), llvm::max(), llvm::Intrinsic::memmove, llvm::FunctionLoweringInfo::MF, N, llvm::Attribute::Nest, llvm::ISD::InputArg::NoArgIndex, llvm::None, llvm::CodeGenOpt::None, llvm::MachineBasicBlock::normalizeSuccProbs(), llvm::ISD::OR, llvm::MVT::Other, llvm::BasicBlock::phis(), llvm::SmallVectorTemplateBase< T >::push_back(), llvm::MachineBasicBlock::push_back(), llvm::TargetLoweringBase::rangeFitsInWord(), Reg, 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::Attribute::SExt, llvm::ISD::SHL, SI, Size, llvm::SmallVectorBase::size(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::size(), llvm::APInt::slt(), llvm::CodeModel::Small, llvm::sort(), llvm::FunctionLoweringInfo::StaticAllocaMap, llvm::Attribute::StructRet, llvm::MachineBasicBlock::succ_begin(), llvm::MachineBasicBlock::succ_end(), std::swap(), llvm::Attribute::SwiftError, llvm::Attribute::SwiftSelf, llvm::SystemZISD::TM, llvm::ISD::TokenFactor, UINT64_MAX, llvm::Value::use_empty(), llvm::Value::users(), llvm::RegsForValue::ValueVTs, VI, llvm::RISCVFenceField::W, X, llvm::CallingConv::X86_INTR, llvm::CallingConv::X86_VectorCall, and llvm::Attribute::ZExt.

◆ widenVectorToPartType()

static SDValue widenVectorToPartType ( SelectionDAG DAG,
SDValue  Val,
const SDLoc DL,
EVT  PartVT 
)
static

Variable Documentation

◆ LimitFloatPrecision

unsigned LimitFloatPrecision
static

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

Definition at line 131 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::Hidden, cl::init(0))
static

◆ MaxParallelChains

const unsigned MaxParallelChains = 64
static

Definition at line 160 of file SelectionDAGBuilder.cpp.

◆ SwitchPeelThreshold

cl::opt<unsigned> SwitchPeelThreshold("switch-peel-threshold", cl::Hidden, cl::init(66), cl::desc("Set the case probability threshold for peeling the case from a " "switch statement. A value greater than 100 will void this " "optimization"))
static

Referenced by scaleCaseProbality().