|
LLVM
10.0.0
|
#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/BlockFrequencyInfo.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/ProfileSummaryInfo.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/SwiftErrorValueTracking.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/IntrinsicsAArch64.h"#include "llvm/IR/IntrinsicsWebAssembly.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 "llvm/Transforms/Utils/Local.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/IR/ConstrainedOps.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; |
| #define | INSTRUCTION(NAME, NARG, ROUND_MODE, INTRINSIC, DAGN) case Intrinsic::INTRINSIC: |
| #define | INSTRUCTION(NAME, NARG, ROUND_MODE, INTRINSIC, DAGN) |
Typedefs | |
| using | ArgCopyElisionMapTy = DenseMap< const Argument *, std::pair< const AllocaInst *, const StoreInst * > > |
Functions | |
| static Optional< CallingConv::ID > | getABIRegCopyCC (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 | findWasmUnwindDestinations (FunctionLoweringInfo &FuncInfo, const BasicBlock *EHPadBB, BranchProbability Prob, SmallVectorImpl< std::pair< MachineBasicBlock *, BranchProbability >> &UnwindDests) |
| 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, ISD::MemIndexType &IndexType, 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 SDValue | expandDivFix (unsigned Opcode, const SDLoc &DL, SDValue LHS, SDValue RHS, SDValue Scale, SelectionDAG &DAG, const TargetLowering &TLI) |
| static void | getUnderlyingArgRegs (SmallVectorImpl< std::pair< unsigned, unsigned >> &Regs, const SDValue &N) |
| static unsigned | FixedPointIntrinsicToOpcode (unsigned Intrinsic) |
| 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, 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 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 const unsigned | MaxParallelChains = 64 |
| #define DEBUG_TYPE "isel" |
Definition at line 133 of file SelectionDAGBuilder.cpp.
| #define HANDLE_INST | ( | NUM, | |
| OPCODE, | |||
| CLASS | |||
| ) | case Instruction::OPCODE: visit##OPCODE((const CLASS&)I); break; |
| #define INSTRUCTION | ( | NAME, | |
| NARG, | |||
| ROUND_MODE, | |||
| INTRINSIC, | |||
| DAGN | |||
| ) | case Intrinsic::INTRINSIC: |
| #define INSTRUCTION | ( | NAME, | |
| NARG, | |||
| ROUND_MODE, | |||
| INTRINSIC, | |||
| DAGN | |||
| ) |
| using ArgCopyElisionMapTy = DenseMap<const Argument *, std::pair<const AllocaInst *, const StoreInst *> > |
Definition at line 9467 of file SelectionDAGBuilder.cpp.
|
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 FinalizeISel 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 8718 of file SelectionDAGBuilder.cpp.
References llvm::FastMathFlags::allowReassoc(), llvm::CallingConv::AnyReg, llvm::SmallVectorImpl< T >::append(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, CallBrTy, 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::numbers::e, llvm::ISD::FADD, llvm::ISD::FMUL, From, llvm::CallBase::getArgOperand(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, CallBrTy, IterTy >::getArgument(), llvm::CallBase::getCalledValue(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, CallBrTy, 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, CallBrTy, 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, CallBrTy, 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::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().
|
static |
Definition at line 342 of file SelectionDAGBuilder.cpp.
References llvm::LLVMContext::emitError(), and I.
Referenced by getCopyFromPartsVector(), and getCopyToParts().
|
static |
Definition at line 5464 of file SelectionDAGBuilder.cpp.
References llvm::TargetLoweringBase::Custom, llvm::SelectionDAG::getContext(), llvm::TargetLoweringBase::getFixedPointOperationAction(), llvm::EVT::getIntegerVT(), llvm::SelectionDAG::getNode(), llvm::SelectionDAG::getSExtOrTrunc(), llvm::EVT::getSizeInBits(), llvm::SDValue::getValueType(), llvm::EVT::getVectorElementCount(), llvm::EVT::getVectorElementType(), llvm::EVT::getVectorVT(), llvm::SelectionDAG::getZExtOrTrunc(), llvm::EVT::isScalarInteger(), llvm::TargetLoweringBase::isTypeLegal(), llvm::EVT::isVector(), llvm::TargetLoweringBase::Legal, llvm_unreachable, llvm::ISD::SDIVFIX, and Signed.
Referenced by FixedPointIntrinsicToOpcode().
|
static |
expandExp - Lower an exp intrinsic.
Handles the special sequences for limited-precision mode.
Definition at line 5063 of file SelectionDAGBuilder.cpp.
References llvm::MVT::f32, llvm::ISD::FEXP, llvm::ISD::FMUL, llvm::SelectionDAG::getConstantFP(), getLimitedPrecisionExp2(), llvm::SelectionDAG::getNode(), llvm::SDValue::getValueType(), and llvm::numbers::log2ef.
Referenced by FixedPointIntrinsicToOpcode().
|
static |
expandExp2 - Lower an exp2 intrinsic.
Handles the special sequences for limited-precision mode.
Definition at line 5371 of file SelectionDAGBuilder.cpp.
References llvm::MVT::f32, llvm::ISD::FEXP2, getLimitedPrecisionExp2(), llvm::SelectionDAG::getNode(), and llvm::SDValue::getValueType().
Referenced by FixedPointIntrinsicToOpcode().
|
static |
expandLog - Lower a log intrinsic.
Handles the special sequences for limited-precision mode.
Definition at line 5085 of file SelectionDAGBuilder.cpp.
References llvm::ISD::BITCAST, llvm::MVT::f32, llvm::ISD::FADD, llvm::ISD::FLOG, llvm::ISD::FMUL, llvm::ISD::FSUB, llvm::SelectionDAG::getConstantFP(), GetExponent(), getF32Constant(), llvm::SelectionDAG::getNode(), GetSignificand(), llvm::SDValue::getValueType(), llvm::MVT::i32, llvm::numbers::ln2f, and X.
Referenced by FixedPointIntrinsicToOpcode().
|
static |
expandLog10 - Lower a log10 intrinsic.
Handles the special sequences for limited-precision mode.
Definition at line 5281 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 FixedPointIntrinsicToOpcode().
|
static |
expandLog2 - Lower a log2 intrinsic.
Handles the special sequences for limited-precision mode.
Definition at line 5184 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 FixedPointIntrinsicToOpcode().
|
static |
visitPow - Lower a pow intrinsic.
Handles the special sequences for limited-precision mode with x == 10.0f.
Definition at line 5383 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 FixedPointIntrinsicToOpcode().
ExpandPowI - Expand a llvm.powi intrinsic.
Definition at line 5411 of file SelectionDAGBuilder.cpp.
References llvm::countPopulation(), llvm::ISD::FDIV, llvm::ISD::FMUL, llvm::ISD::FPOWI, llvm::SelectionDAG::getConstantFP(), llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), llvm::SDValue::getValueType(), llvm::Log2_32(), and llvm::SelectionDAG::shouldOptForSize().
Referenced by FixedPointIntrinsicToOpcode().
|
static |
Scan the entry block of the function in FuncInfo for arguments that look like copies into a local alloca.
Record any copied arguments in ArgCopyElisionCandidates.
Definition at line 9473 of file SelectionDAGBuilder.cpp.
References Arg, llvm::Function::arg_size(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::count(), llvm::dbgs(), llvm::dyn_cast(), llvm::FunctionLoweringInfo::Fn, llvm::AllocaInst::getAllocatedType(), llvm::Function::getEntryBlock(), llvm::DataLayout::getTypeAllocSize(), llvm::DataLayout::getTypeStoreSize(), I, Info, llvm::DenseMapBase< SmallDenseMap< KeyT, ValueT, InlineBuckets, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::insert(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::insert(), llvm::Instruction::isCast(), LLVM_DEBUG, llvm::User::operands(), llvm::DenseMapBase< SmallDenseMap< KeyT, ValueT, InlineBuckets, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::reserve(), SI, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::size(), llvm::FunctionLoweringInfo::StaticAllocaMap, llvm::Value::stripPointerCasts(), and llvm::Unknown.
Referenced by tryToElideArgumentCopy().
|
static |
Definition at line 8047 of file SelectionDAGBuilder.cpp.
References assert(), llvm::ArrayRef< T >::begin(), llvm::ISD::BITCAST, llvm::TargetLowering::C_Immediate, llvm::TargetLowering::C_Memory, llvm::TargetLowering::C_Other, llvm::TargetLowering::C_Register, llvm::TargetLowering::C_RegisterClass, llvm::TargetLowering::C_Unknown, llvm::TargetLowering::ComputeConstraintToUse(), llvm::ComputeValueVTs(), llvm::InlineAsm::Constraint_Unknown, llvm::TargetLowering::AsmOperandInfo::ConstraintType, llvm::InlineAsm::convertMemFlagWordToMatchingFlagWord(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::numbers::e, 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, llvm::DataLayout::getABITypeAlignment(), getAddressForMemoryInput(), llvm::CallBase::getArgOperand(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, CallBrTy, IterTy >::getArgument(), llvm::InlineAsm::getAsmString(), llvm::SelectionDAG::getBasicBlock(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, CallBrTy, IterTy >::getCalledValue(), llvm::SelectionDAG::getContext(), 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, CallBrTy, IterTy >::getInstruction(), llvm::SelectionDAG::getMachineFunction(), llvm::SelectionDAG::getMDNode(), llvm::TargetLoweringBase::getMemValueType(), llvm::SelectionDAG::getMergeValues(), llvm::Instruction::getMetadata(), llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), llvm::InlineAsm::getNumOperandRegisters(), llvm::SDValue::getOpcode(), llvm::User::getOperand(), llvm::TargetLoweringBase::getPointerTy(), llvm::SelectionDAG::getPtrExtOrTrunc(), 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::getTargetBlockAddress(), llvm::SelectionDAG::getTargetConstant(), llvm::SelectionDAG::getTargetExternalSymbol(), llvm::SelectionDAG::getTargetLoweringInfo(), llvm::Value::getType(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, CallBrTy, 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::ISD::INLINEASM_BR, llvm::InlineAsm::isAlignStack(), llvm::InlineAsm::isClobber, llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, CallBrTy, IterTy >::isConvergent(), llvm::InlineAsm::isInput, llvm::InlineAsm::isMemKind(), llvm::InlineAsm::isOutput, llvm::Type::isPointerTy(), 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::TargetLowering::LowerAsmOutputForConstraint(), llvm::makeArrayRef(), llvm::ISD::MERGE_VALUES, llvm::InlineAsm::Op_FirstOperand, llvm::InlineAsm::Op_InputChain, llvm::SDNode::op_values(), llvm::MVT::Other, llvm::TargetLowering::ParseConstraints(), patchMatchingInput(), llvm::SmallVectorTemplateBase< T >::push_back(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::RegsForValue::Regs, llvm::SelectionDAG::setRoot(), llvm::SmallVectorBase::size(), llvm::ArrayRef< T >::size(), llvm::SPII::Store, llvm::ISD::TokenFactor, llvm::ISD::TRUNCATE, llvm::InlineAsm::ConstraintInfo::Type, llvm::ISD::VACOPY, llvm::ISD::VAEND, llvm::RegsForValue::ValueVTs, and llvm::ISD::VASTART.
|
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 1714 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(), findWasmUnwindDestinations(), llvm::FunctionLoweringInfo::Fn, llvm::TargetLowering::functionArgumentNeedsConsecutiveRegisters(), 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::getPtrExtOrTrunc(), 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::getValue(), llvm::SDValue::getValueType(), llvm::BranchProbability::getZero(), llvm::AttributeList::hasAttrSomewhere(), llvm::isAsynchronousEHPersonality(), llvm::EVT::isInteger(), llvm::Type::isPointerTy(), 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::setInConsecutiveRegs(), llvm::ISD::ArgFlagsTy::setInConsecutiveRegsLast(), llvm::ISD::ArgFlagsTy::setInReg(), llvm::ISD::ArgFlagsTy::setPointer(), llvm::ISD::ArgFlagsTy::setPointerAddrSpace(), llvm::SelectionDAG::setRoot(), llvm::ISD::ArgFlagsTy::setSExt(), llvm::ISD::ArgFlagsTy::setZExt(), llvm::ISD::SIGN_EXTEND, llvm::SmallVectorBase::size(), llvm::TargetLowering::supportSwiftError(), llvm::ISD::TokenFactor, llvm::RegsForValue::ValueVTs, llvm::Wasm_CXX, and llvm::ISD::ZERO_EXTEND.
Referenced by llvm::SelectionDAGBuilder::visitBitTestCase().
|
static |
Definition at line 1680 of file SelectionDAGBuilder.cpp.
References llvm::BasicBlock::getFirstNonPHI(), and llvm::FunctionLoweringInfo::MBBMap.
Referenced by findUnwindDestinations().
Definition at line 5760 of file SelectionDAGBuilder.cpp.
References llvm::MCID::Add, llvm::MachineFunction::addCodeViewAnnotation(), llvm::SelectionDAG::AddDbgLabel(), llvm::SelectionDAG::AddDbgValue(), llvm::MachineInstrBuilder::addFrameIndex(), llvm::Address, llvm::ISD::ADDROFRETURNADDR, llvm::ISD::ADJUST_TRAMPOLINE, llvm::ISD::AND, llvm::ISD::ANNOTATION_LABEL, Arg, llvm::AMDGPU::HSAMD::Kernel::Key::Args, assert(), llvm::SmallVectorTemplateCommon< T >::begin(), llvm::ISD::BITCAST, llvm::ISD::BITREVERSE, llvm::ISD::BSWAP, llvm::BuildMI(), llvm::CallingConv::C, Callee, llvm::ComputeValueVTs(), Context, 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(), llvm::ISD::DEBUGTRAP, llvm::GlobalValue::dropLLVMManglingEscape(), llvm::dyn_cast(), E, llvm::fp::ebIgnore, llvm::fp::ebMayTrap, llvm::fp::ebStrict, 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::TargetLowering::emitStackGuardXorFP(), llvm::SelectionDAGTargetInfo::EmitTargetCodeForSetTag(), llvm::StringRef::empty(), llvm::SmallVectorTemplateCommon< T >::end(), expandDivFix(), 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::ISD::FLT_ROUNDS_, llvm::ISD::FMA, llvm::ISD::FMAXIMUM, llvm::ISD::FMAXNUM, llvm::ISD::FMINIMUM, llvm::ISD::FMINNUM, llvm::ISD::FMUL, llvm::ISD::FNEARBYINT, llvm::ISD::FP_EXTEND, llvm::ISD::FP_ROUND, llvm::MipsISD::FPCmp, llvm::ISD::FRAMEADDR, llvm::ISD::FrameIndex, llvm::ISD::FRINT, llvm::ISD::FROUND, llvm::ISD::FSHL, llvm::ISD::FSHR, 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::CallBase::getArgOperand(), llvm::SelectionDAG::getAtomicMemcpy(), llvm::SelectionDAG::getAtomicMemmove(), llvm::SelectionDAG::getAtomicMemset(), llvm::AttributeList::getAttribute(), llvm::CallBase::getAttributes(), llvm::TargetLowering::getClearCacheBuiltinName(), llvm::SelectionDAG::getCondCode(), llvm::SelectionDAG::getConstant(), llvm::MachineModuleInfo::getContext(), llvm::SelectionDAG::getCopyFromReg(), llvm::MachineModuleInfo::getCurrentCallSite(), llvm::SelectionDAG::getDataLayout(), llvm::SelectionDAG::getDbgLabel(), llvm::SelectionDAG::getDbgValue(), llvm::Instruction::getDebugLoc(), llvm::MemIntrinsicBase< Derived >::getDestAlignment(), llvm::AtomicMemIntrinsic::getElementSizeInBytes(), llvm::SelectionDAG::getEntryNode(), llvm::ConstrainedFPIntrinsic::getExceptionBehavior(), llvm::DbgVariableIntrinsic::getExpression(), llvm::SelectionDAG::getExternalSymbol(), llvm::getFCmpCondCode(), llvm::MachinePointerInfo::getFixedStack(), 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::SelectionDAG::getLifetimeNode(), llvm::SelectionDAG::getLoad(), getLoadStackGuard(), llvm::SelectionDAG::getMachineFunction(), llvm::SelectionDAG::getMachineNode(), llvm::SelectionDAG::getMCSymbol(), llvm::SelectionDAG::getMDNode(), llvm::SelectionDAG::getMemBasePlusOffset(), 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::User::getOperand(), llvm::MCContext::getOrCreateFrameAllocSymbol(), llvm::GlobalValue::getParent(), llvm::GetPointerBaseWithConstantOffset(), llvm::TargetLoweringBase::getPointerTy(), llvm::MemIntrinsicBase< Derived >::getRawDest(), llvm::MemTransferBase< BaseCL >::getRawSource(), llvm::TargetLoweringBase::getRegClassFor(), llvm::SDValue::getResNo(), llvm::SelectionDAG::getRoot(), llvm::TargetLoweringBase::getSDagStackGuard(), llvm::SelectionDAG::getSelect(), llvm::SelectionDAG::getSelectionDAGInfo(), llvm::SelectionDAG::getSetCC(), llvm::EVT::getSizeInBits(), 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::getVTList(), llvm::SelectionDAG::getZExtOrTrunc(), llvm::ConstantInt::getZExtValue(), llvm::MVT::Glue, llvm::Function::hasGC(), I, llvm::MVT::i1, llvm::MVT::i16, llvm::MVT::i32, llvm::MVT::i64, llvm::ISD::INIT_TRAMPOLINE, llvm::TargetLoweringBase::isFMAFasterThanFMulAndFAdd(), llvm::isInTailCallPosition(), llvm::TargetLoweringBase::isOperationLegalOrCustom(), llvm::Triple::isOSLinux(), llvm::isPowerOf2_32(), llvm::CallInst::isTailCall(), llvm::ConstrainedFPIntrinsic::isTernaryOp(), llvm::ConstrainedFPIntrinsic::isUnaryOp(), llvm::ISD::LLRINT, llvm::ISD::LLROUND, LLVM_DEBUG, LLVM_FALLTHROUGH, llvm_unreachable, llvm::ISD::LOCAL_RECOVER, llvm::log2(), llvm::TargetLowering::LowerCallTo(), llvm::ISD::LRINT, llvm::ISD::LROUND, llvm::max(), llvm::maximum(), llvm::maxnum(), MI, llvm::MinAlign(), llvm::minimum(), llvm::minnum(), llvm::MachineMemOperand::MOLoad, llvm::MachineMemOperand::MOStore, llvm::MachineMemOperand::MOVolatile, N, llvm::CodeGenOpt::None, llvm::ISD::OR, llvm::MVT::Other, llvm::ISD::PCMARKER, prefetch, llvm::ISD::PREFETCH, llvm::SmallVectorTemplateBase< T >::push_back(), llvm::ISD::READ_REGISTER, llvm::ISD::READCYCLECOUNTER, Reg, llvm::report_fatal_error(), llvm::ISD::RETURNADDR, llvm::ISD::ROTL, llvm::ISD::ROTR, round(), llvm::ISD::SADDO, llvm::ISD::SADDSAT, llvm::ISD::SDIVFIX, llvm::MachineFunction::setCallsEHReturn(), llvm::MachineFunction::setCallsUnwindInit(), llvm::TargetLowering::CallLoweringInfo::setChain(), llvm::MachineModuleInfo::setCurrentCallSite(), llvm::TargetLowering::CallLoweringInfo::setDebugLoc(), llvm::ISD::SETEQ, llvm::MachineFrameInfo::setFunctionContextIndex(), llvm::TargetLowering::CallLoweringInfo::setLibCallee(), llvm::SelectionDAG::setRoot(), llvm::MachineFrameInfo::setStackProtectorIndex(), llvm::ISD::SHL, SI, llvm::ISD::SMULFIX, llvm::ISD::SMULFIXSAT, llvm::ISD::SMULO, llvm::sort(), llvm::ISD::SPONENTRY, llvm::ISD::SRL, llvm::ISD::SSUBO, llvm::ISD::SSUBSAT, llvm::ISD::STACKRESTORE, llvm::ISD::STACKSAVE, llvm::FPOpFusion::Strict, llvm::ISD::STRICT_FP_ROUND, llvm::ISD::STRICT_FSETCC, llvm::ISD::STRICT_FSETCCS, llvm::Value::stripInBoundsConstantOffsets(), llvm::Value::stripPointerCasts(), llvm::ISD::SUB, T1, TII, llvm::SystemZISD::TM, llvm::ISD::TRAP, llvm::ISD::UADDO, llvm::ISD::UADDSAT, llvm::ISD::UDIVFIX, llvm::ISD::UMULFIX, llvm::ISD::UMULFIXSAT, llvm::ISD::UMULO, llvm::ISD::UREM, llvm::Value::use_empty(), llvm::TargetLowering::useLoadStackGuardNode(), llvm::TargetLoweringBase::useStackGuardXorFP(), llvm::ISD::USUBO, llvm::ISD::USUBSAT, llvm::RegsForValue::ValueVTs, llvm::ISD::WRITE_REGISTER, X, llvm::Triple::x86_64, Y, and llvm::Z.
|
static |
Definition at line 171 of file SelectionDAGBuilder.cpp.
References getCopyFromPartsVector(), llvm::None, and llvm::Intrinsic::not_intrinsic.
Referenced by getUnderlyingArgRegs(), and llvm::SelectionDAGBuilder::getValueImpl().
|
static |
Get a direct memory input to behave well as an indirect operand.
This may introduce stores, hence the need for a Chain.
Definition at line 7897 of file SelectionDAGBuilder.cpp.
References llvm::MachineFrameInfo::CreateStackObject(), llvm::SelectionDAG::getConstantPool(), llvm::SelectionDAG::getDataLayout(), llvm::MachinePointerInfo::getFixedStack(), llvm::SelectionDAG::getFrameIndex(), llvm::TargetLoweringBase::getFrameIndexTy(), llvm::MachineFunction::getFrameInfo(), llvm::SelectionDAG::getMachineFunction(), llvm::TargetLoweringBase::getMemValueType(), llvm::TargetLoweringBase::getPointerTy(), llvm::SelectionDAG::getTargetLoweringInfo(), llvm::SelectionDAG::getTruncStore(), and llvm::Value::getType().
Referenced by findMatchingInlineAsmOperand().
|
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 204 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::MVT::i64, llvm::DataLayout::isBigEndian(), llvm::EVT::isFloatingPoint(), llvm::MVT::isFloatingPoint(), llvm::EVT::isInteger(), llvm::MVT::isInteger(), llvm::EVT::isVector(), llvm::MVT::isVector(), llvm::MipsISD::Lo, llvm::Log2_32(), llvm::ISD::OR, llvm::MVT::ppcf128, llvm::report_fatal_error(), llvm::ISD::SHL, std::swap(), llvm::ISD::TRUNCATE, llvm::MVT::x86mmx, and llvm::ISD::ZERO_EXTEND.
Referenced by getCopyFromPartsVector(), llvm::RegsForValue::getCopyFromRegs(), and tryToElideArgumentCopy().
|
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 361 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().
|
static |
getCopyToParts - Create a series of nodes that contain the specified value split into legal parts.
If the parts contain more bits than Val, then, for integers, ExtendKind can be used to specify how to generate the extra bits.
Definition at line 502 of file SelectionDAGBuilder.cpp.
References assert(), llvm::ISD::BITCAST, diagnosePossiblyInvalidConstraint(), llvm::ISD::EXTRACT_ELEMENT, llvm::ISD::FP_EXTEND, llvm::SelectionDAG::getContext(), getCopyToPartsVector(), llvm::SelectionDAG::getDataLayout(), llvm::EVT::getIntegerVT(), llvm::SelectionDAG::getIntPtrConstant(), llvm::SelectionDAG::getNode(), llvm::SelectionDAG::getShiftAmountConstant(), llvm::EVT::getSizeInBits(), llvm::MVT::getSizeInBits(), llvm::SelectionDAG::getTargetLoweringInfo(), llvm::SDValue::getValueType(), llvm::DataLayout::isBigEndian(), llvm::EVT::isFloatingPoint(), llvm::MVT::isFloatingPoint(), llvm::EVT::isInteger(), llvm::MVT::isInteger(), llvm::TargetLoweringBase::isTypeLegal(), llvm::EVT::isVector(), llvm::Log2_32(), llvm::reverse(), llvm::ISD::SRL, llvm::ISD::TRUNCATE, and llvm::MVT::x86mmx.
Referenced by findUnwindDestinations(), getCopyToPartsVector(), and llvm::RegsForValue::getCopyToRegs().
|
static |
getCopyToPartsVector - Create a series of nodes that contain the specified value split into legal parts.
Definition at line 662 of file SelectionDAGBuilder.cpp.
References assert(), llvm::ISD::BITCAST, llvm::EVT::bitsGE(), llvm::ISD::EXTRACT_SUBVECTOR, llvm::ISD::EXTRACT_VECTOR_ELT, llvm::SelectionDAG::getAnyExtOrTrunc(), llvm::SelectionDAG::getBitcast(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getContext(), getCopyToParts(), llvm::SelectionDAG::getDataLayout(), llvm::EVT::getIntegerVT(), llvm::SelectionDAG::getNode(), llvm::EVT::getScalarType(), llvm::EVT::getSizeInBits(), llvm::MVT::getSizeInBits(), llvm::SelectionDAG::getTargetLoweringInfo(), llvm::Optional< T >::getValue(), llvm::SDValue::getValueType(), llvm::EVT::getVectorElementType(), llvm::EVT::getVectorNumElements(), llvm::EVT::getVectorVT(), llvm::Optional< T >::hasValue(), llvm::EVT::isVector(), llvm::MVT::isVector(), and widenVectorToPartType().
Referenced by getCopyFromPartsVector(), and getCopyToParts().
|
static |
GetExponent - Get the exponent:
(float)(int)(((Op & 0x7f800000) >> 23) - 127);
where Op is the hexadecimal representation of floating point value.
Definition at line 4952 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().
|
static |
getF32Constant - Get 32-bit floating point constant.
Definition at line 4965 of file SelectionDAGBuilder.cpp.
References llvm::lltok::APFloat, llvm::MVT::f32, llvm::SelectionDAG::getConstantFP(), and llvm::APFloatBase::IEEEsingle().
Referenced by expandLog(), expandLog10(), expandLog2(), expandPow(), and getLimitedPrecisionExp2().
|
static |
Definition at line 4971 of file SelectionDAGBuilder.cpp.
References llvm::ISD::ADD, llvm::ISD::BITCAST, llvm::MVT::f32, llvm::ISD::FADD, llvm::ISD::FMUL, llvm::ISD::FP_TO_SINT, llvm::ISD::FSUB, llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getDataLayout(), getF32Constant(), llvm::SelectionDAG::getNode(), llvm::TargetLoweringBase::getPointerTy(), llvm::SelectionDAG::getTargetLoweringInfo(), llvm::MVT::i32, llvm::ISD::SHL, llvm::ISD::SINT_TO_FP, and X.
Referenced by expandExp(), expandExp2(), and expandPow().
|
static |
Create a LOAD_STACK_GUARD node, and let it carry the target specific global variable if there exists one.
Definition at line 2505 of file SelectionDAGBuilder.cpp.
References llvm::SelectionDAG::getDataLayout(), llvm::MachineFunction::getFunction(), llvm::SelectionDAG::getMachineFunction(), llvm::GlobalValue::getParent(), llvm::TargetLoweringBase::getPointerMemTy(), llvm::TargetLoweringBase::getPointerTy(), llvm::TargetLoweringBase::getSDagStackGuard(), and llvm::SelectionDAG::getTargetLoweringInfo().
Referenced by FixedPointIntrinsicToOpcode().
|
static |
Definition at line 7259 of file SelectionDAGBuilder.cpp.
References llvm::SelectionDAGBuilder::AA, llvm::ISD::ADD, llvm::TargetLoweringBase::allowsMisalignedMemoryAccesses(), assert(), llvm::TargetLowering::C_Memory, Callee, 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::EVT::getIntegerVT(), llvm::Type::getIntNTy(), llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getMemcpy(), 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.
|
static |
GetRegistersForValue - Assign registers (virtual or physical) for the specified operand.
We prefer to assign virtual registers, to allow the register allocator to handle the assignment process. However, if the asm uses features that we can't model on machineinstrs, we have SDISel do the allocation. This produces generally horrible, but correct, code.
OpInfo describes the operand RefOpInfo describes the matching operand if any, the operand otherwise
Definition at line 7943 of file SelectionDAGBuilder.cpp.
References assert(), llvm::TargetRegisterClass::begin(), llvm::ISD::BITCAST, llvm::TargetLowering::C_Memory, Context, llvm::MachineRegisterInfo::createVirtualRegister(), llvm::TargetRegisterClass::end(), llvm::SelectionDAG::getContext(), llvm::MVT::getIntegerVT(), llvm::SelectionDAG::getMachineFunction(), llvm::SelectionDAG::getNode(), llvm::TargetLoweringBase::getNumRegisters(), llvm::TargetLowering::getRegForInlineAsmConstraint(), llvm::MachineFunction::getRegInfo(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::MVT::getSizeInBits(), llvm::MachineFunction::getSubtarget(), llvm::SelectionDAG::getTargetLoweringInfo(), I, llvm::InlineAsm::isInput, llvm::MVT::isInteger(), llvm::InlineAsm::isOutput, llvm::TargetRegisterInfo::isTypeLegalForClass(), llvm::TargetRegisterInfo::legalclasstypes_begin(), llvm::MVT::Other, llvm::SmallVectorTemplateBase< T, bool >::push_back(), Register, llvm::RegsForValue::Regs, llvm::RegsForValue::RegsForValue(), and TRI.
Referenced by findMatchingInlineAsmOperand().
|
static |
Returns an AttributeList representing the attributes applied to the return value of the given call.
Definition at line 9021 of file SelectionDAGBuilder.cpp.
References llvm::AMDGPU::HSAMD::Kernel::Key::Attrs, llvm::AttributeList::get(), llvm::Type::getContext(), llvm::TargetLowering::CallLoweringInfo::IsInReg, llvm::SmallVectorTemplateBase< T >::push_back(), llvm::TargetLowering::CallLoweringInfo::RetSExt, llvm::TargetLowering::CallLoweringInfo::RetTy, llvm::AttributeList::ReturnIndex, and llvm::TargetLowering::CallLoweringInfo::RetZExt.
Referenced by llvm::TargetLowering::LowerCallTo().
|
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 4939 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().
|
static |
Definition at line 5521 of file SelectionDAGBuilder.cpp.
References llvm::SelectionDAG::AddDbgValue(), Arg, assert(), llvm::ISD::AssertSext, llvm::ISD::AssertZext, llvm::ISD::BITCAST, llvm::ISD::BUILD_PAIR, llvm::ISD::BUILD_VECTOR, llvm::BuildMI(), llvm::ISD::CONCAT_VECTORS, llvm::ISD::CopyFromReg, llvm::MachineOperand::CreateFI(), llvm::DIExpression::createFragmentExpression(), llvm::MachineOperand::CreateReg(), llvm::dyn_cast(), llvm::SmallVectorImpl< T >::emplace_back(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), llvm::SmallVectorTemplateCommon< T >::front(), llvm::MCInstrInfo::get(), llvm::UndefValue::get(), getABIRegCopyCC(), llvm::Argument::getArgNo(), llvm::SelectionDAG::getConstantDbgValue(), llvm::Value::getContext(), llvm::SelectionDAG::getDataLayout(), llvm::SelectionDAG::getDbgValue(), llvm::DIExpression::getFragmentInfo(), llvm::SelectionDAG::getFrameIndexDbgValue(), llvm::TargetSubtargetInfo::getInstrInfo(), llvm::MachineRegisterInfo::getLiveInPhysReg(), llvm::SelectionDAG::getMachineFunction(), llvm::SDValue::getNode(), llvm::SDValue::getOpcode(), llvm::SDValue::getOperand(), getReg(), llvm::MachineFunction::getRegInfo(), llvm::SDValue::getResNo(), llvm::EVT::getSizeInBits(), llvm::SelectionDAG::getSubtarget(), llvm::SelectionDAG::getTargetLoweringInfo(), llvm::Value::getType(), llvm::SDValue::getValueType(), llvm::DILocalVariable::isParameter(), llvm::MachineOperand::isReg(), llvm::DILocalVariable::isValidLocationForIntrinsic(), llvm::Register::isVirtual(), llvm::max(), N, llvm::SDNode::op_values(), llvm::peekThroughBitcasts(), Reg, llvm::RegsForValue::Regs, llvm::SmallVectorBase::size(), TII, and llvm::ISD::TRUNCATE.
|
static |
Definition at line 4373 of file SelectionDAGBuilder.cpp.
References llvm::AtomicRMWInst::Add, llvm::AtomicRMWInst::And, Arg, 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_FADD, llvm::ISD::ATOMIC_LOAD_FSUB, 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(), llvm::numbers::e, F(), llvm::AtomicRMWInst::FAdd, llvm::SelectionDAGBuilder::findValue(), llvm::AtomicRMWInst::FSub, GEP, llvm::gep_type_begin(), 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::StructLayout::getElementOffset(), llvm::SelectionDAG::getEntryNode(), llvm::SelectionDAG::getEVTAlignment(), llvm::AtomicCmpXchgInst::getFailureOrdering(), llvm::TargetLoweringBase::getFenceOperandTy(), llvm::TypeSize::getKnownMinSize(), llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getMachineFunction(), getMachineMemOperand(), llvm::MachineFunction::getMachineMemOperand(), llvm::SelectionDAG::getMaskedGather(), llvm::SelectionDAG::getMaskedLoad(), llvm::SelectionDAG::getMaskedScatter(), llvm::SelectionDAG::getMemIntrinsicNode(), llvm::TargetLoweringBase::getMemValueType(), llvm::Instruction::getMetadata(), llvm::TargetLowering::getMMOFlags(), 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::getPtrExtOrTrunc(), llvm::SelectionDAG::getRoot(), llvm::EVT::getSizeInBits(), llvm::SelectionDAG::getSplatBuildVector(), llvm::Constant::getSplatValue(), llvm::getSplatValue(), llvm::SelectionDAG::getStore(), llvm::EVT::getStoreSize(), llvm::MVT::getStoreSize(), llvm::DataLayout::getStructLayout(), llvm::generic_gep_type_iterator< ItTy >::getStructTypeOrNull(), llvm::AtomicCmpXchgInst::getSuccessOrdering(), llvm::LoadInst::getSyncScopeID(), llvm::StoreInst::getSyncScopeID(), llvm::FenceInst::getSyncScopeID(), llvm::AtomicCmpXchgInst::getSyncScopeID(), llvm::AtomicRMWInst::getSyncScopeID(), llvm::SelectionDAG::getTargetConstant(), llvm::SelectionDAG::getTargetConstantFP(), llvm::SelectionDAG::getTargetLoweringInfo(), llvm::TargetLoweringBase::getTgtMemIntrinsic(), llvm::Value::getType(), llvm::DataLayout::getTypeAllocSize(), llvm::DataLayout::getTypeStoreSize(), llvm::SelectionDAG::getUNDEF(), 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::Instruction::hasMetadata(), llvm::MVT::i1, Info, llvm::ISD::INTRINSIC_VOID, llvm::ISD::INTRINSIC_W_CHAIN, llvm::ISD::INTRINSIC_WO_CHAIN, llvm::isDereferenceablePointer(), llvm::EVT::isScalableVector(), llvm::LoadInst::isUnordered(), llvm::EVT::isVector(), llvm::Type::isVectorTy(), llvm::Type::isVoidTy(), llvm::LoadInst::isVolatile(), llvm::StoreInst::isVolatile(), llvm::AtomicCmpXchgInst::isVolatile(), llvm::AtomicRMWInst::isVolatile(), llvm_unreachable, llvm::SPII::Load, llvm::TargetLowering::lowerAtomicLoadAsLoadSDNode(), llvm::TargetLowering::lowerAtomicStoreAsStoreSDNode(), llvm::BitmaskEnumDetail::Mask(), llvm::AtomicRMWInst::Max, llvm::AtomicRMWInst::Min, llvm::MachineMemOperand::MODereferenceable, llvm::MachineMemOperand::MOInvariant, 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::CallBase::paramHasAttr(), llvm::LocationSize::precise(), llvm::TargetLowering::prepareVolatileOrAtomicLoad(), llvm::SmallVectorTemplateBase< T >::push_back(), llvm::report_fatal_error(), llvm::SelectionDAG::setRoot(), llvm::ISD::SIGNED_SCALED, llvm::AtomicRMWInst::Sub, llvm::TargetLoweringBase::supportsUnalignedAtomics(), llvm::AtomicRMWInst::UMax, llvm::AtomicRMWInst::UMin, llvm::ISD::UNINDEXED, llvm::RegsForValue::ValueVTs, llvm::AtomicRMWInst::Xchg, and llvm::AtomicRMWInst::Xor.
Definition at line 3282 of file SelectionDAGBuilder.cpp.
|
static |
Definition at line 2043 of file SelectionDAGBuilder.cpp.
References llvm::Instruction::getParent().
Referenced by getEdgeValueLocal().
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 9451 of file SelectionDAGBuilder.cpp.
References llvm::Function::front(), llvm::Argument::getParent(), llvm::Value::use_empty(), and llvm::Value::users().
Referenced by tryToElideArgumentCopy().
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 3009 of file SelectionDAGBuilder.cpp.
References llvm::MCID::Add, llvm::CmpInst::BAD_FCMP_PREDICATE, llvm::CmpInst::BAD_ICMP_PREDICATE, llvm::SDNodeFlags::copyFMF(), llvm::dbgs(), 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::getPtrExtOrTrunc(), 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(), I, llvm::MVT::i32, llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::isPowerOf2_32(), llvm::Type::isVectorTy(), llvm::ConstantInt::isZero(), LLVM_DEBUG, LLVM_FALLTHROUGH, llvm::Log2_32_Ceil(), llvm::ISD::SDIV, llvm::SDNodeFlags::setExact(), llvm::SDNodeFlags::setNoSignedWrap(), llvm::SDNodeFlags::setNoUnsignedWrap(), llvm::SDNodeFlags::setVectorReduction(), llvm::ISD::SHL, llvm::ISD::SRA, llvm::ISD::SRL, llvm::SystemZISD::TM, llvm::ISD::TRUNCATE, llvm::Value::users(), and llvm::ISD::ZERO_EXTEND.
|
static |
Make sure that the output operand OpInfo and its corresponding input operand MatchingOpInfo have compatible constraint types (otherwise error out).
Definition at line 7868 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().
|
static |
Definition at line 10483 of file SelectionDAGBuilder.cpp.
References llvm::MachineBasicBlock::addSuccessor(), assert(), llvm::ISD::BR, C, llvm::SwitchInst::cases(), llvm::SwitchCG::CC_BitTests, llvm::SwitchCG::CC_JumpTable, llvm::dbgs(), llvm::MachineBasicBlock::getBasicBlock(), llvm::BranchProbability::getCompl(), llvm::SwitchInst::getCondition(), llvm::SwitchInst::getDefaultDest(), llvm::BranchProbability::getDenominator(), llvm::BranchProbabilityInfo::getEdgeProbability(), llvm::MachineFunction::getFunction(), llvm::SwitchInst::getNumCases(), llvm::BranchProbability::getNumerator(), llvm::BranchProbability::getOne(), llvm::User::getOperand(), llvm::Instruction::getParent(), llvm::MachineBasicBlock::getParent(), llvm::BranchProbability::getZero(), llvm::Function::hasMinSize(), I, llvm::MachineBasicBlock::insert(), LLVM_DEBUG, llvm::max(), N, llvm::CodeGenOpt::None, llvm::MVT::Other, llvm::Value::print(), llvm::BranchProbability::scale(), SI, llvm::SwitchCG::sortAndRangeify(), SwitchPeelThreshold, and llvm::SystemZISD::TM.
|
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 9564 of file SelectionDAGBuilder.cpp.
References llvm::MachineBasicBlock::addSuccessor(), llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Align, Arg, llvm::Function::args(), assert(), llvm::ISD::AssertSext, llvm::ISD::AssertZext, llvm::MachineBasicBlock::begin(), llvm::BasicBlock::begin(), llvm::ISD::BUILD_PAIR, C, llvm::ComputeValueVTs(), llvm::ISD::CopyFromReg, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::count(), llvm::MachineFunction::CreateMachineBasicBlock(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::SmallVectorTemplateCommon< T >::data(), llvm::dbgs(), llvm::dyn_cast(), llvm::numbers::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::BranchProbabilityInfo::getBranchProbStackProtector(), llvm::Function::getCallingConv(), llvm::SelectionDAG::getContext(), getCopyFromParts(), llvm::SelectionDAG::getDataLayout(), llvm::MachineFunction::getDataLayout(), llvm::MachineFunction::getFrameInfo(), llvm::TypeSize::getKnownMinSize(), llvm::SDValue::getNode(), llvm::TargetLoweringBase::getNumRegisters(), llvm::Instruction::getNumSuccessors(), llvm::MachineFrameInfo::getObjectAlignment(), llvm::MachineFrameInfo::getObjectSize(), llvm::SDValue::getOpcode(), llvm::SDValue::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::Type::getPointerTo(), getReg(), llvm::Function::getReturnType(), llvm::SelectionDAG::getRoot(), llvm::EVT::getStoreSize(), llvm::MVT::getStoreSize(), llvm::Instruction::getSuccessor(), llvm::SelectionDAG::getTargetLoweringInfo(), llvm::BasicBlock::getTerminator(), llvm::DataLayout::getTypeAllocSize(), llvm::EVT::getTypeForEVT(), llvm::SDValue::getValue(), llvm::SDValue::getValueType(), I, llvm::MipsISD::Ins, llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::insert(), llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::MachineFunction::insert(), llvm::ISD::ArgFlagsTy::isByVal(), llvm::ISD::ArgFlagsTy::isInAlloca(), isOnlyUsedInEntryBlock(), llvm::Function::isVarArg(), llvm::Register::isVirtualRegister(), LLVM_DEBUG, llvm::makeArrayRef(), llvm::FunctionLoweringInfo::MF, llvm::ISD::InputArg::NoArgIndex, llvm::None, llvm::Align::None(), llvm::MVT::Other, llvm::BasicBlock::phis(), llvm::SmallVectorTemplateBase< T >::push_back(), Reg, llvm::MachineFrameInfo::RemoveStackObject(), llvm::ISD::ArgFlagsTy::setByVal(), llvm::ISD::ArgFlagsTy::setByValAlign(), llvm::ISD::ArgFlagsTy::setByValSize(), llvm::ISD::ArgFlagsTy::setCopyElisionCandidate(), 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::ArgFlagsTy::setNest(), llvm::ISD::ArgFlagsTy::setOrigAlign(), llvm::ISD::ArgFlagsTy::setPointer(), llvm::ISD::ArgFlagsTy::setPointerAddrSpace(), llvm::ISD::ArgFlagsTy::setReturned(), llvm::ISD::ArgFlagsTy::setSExt(), llvm::ISD::ArgFlagsTy::setSplit(), llvm::ISD::ArgFlagsTy::setSRet(), llvm::ISD::ArgFlagsTy::setSwiftError(), llvm::ISD::ArgFlagsTy::setSwiftSelf(), llvm::ISD::ArgFlagsTy::setZExt(), SI, llvm::SmallVectorBase::size(), llvm::FunctionLoweringInfo::StaticAllocaMap, llvm::SystemZISD::TM, llvm::ISD::TokenFactor, llvm::Value::users(), llvm::RegsForValue::ValueVTs, VI, llvm::RISCVFenceField::W, llvm::CallingConv::X86_INTR, and llvm::CallingConv::X86_VectorCall.
|
static |
Definition at line 634 of file SelectionDAGBuilder.cpp.
References llvm::numbers::e, llvm::SelectionDAG::ExtractVectorElements(), llvm::SelectionDAG::getBuildVector(), llvm::SelectionDAG::getUNDEF(), llvm::SDValue::getValueType(), llvm::EVT::getVectorElementType(), llvm::EVT::getVectorNumElements(), llvm::EVT::isVector(), and llvm::SmallVectorTemplateBase< T >::push_back().
Referenced by getCopyToPartsVector().
|
static |
LimitFloatPrecision - Generate low-precision inline sequences for some float libcalls (6, 8 or 12 bits).
Definition at line 137 of file SelectionDAGBuilder.cpp.
|
static |
Definition at line 166 of file SelectionDAGBuilder.cpp.
|
static |
Referenced by scaleCaseProbality().
1.8.13