|
LLVM
7.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/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/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::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 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 TargetLowering &TLI, 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 bool | createVirtualRegs (SmallVector< unsigned, 4 > &Regs, unsigned NumRegs, MVT RegVT, SelectionDAG &DAG) |
Fill Regs with NumRegs new virtual registers of type RegVT. More... | |
| static void | addStackMapLiveVars (ImmutableCallSite CS, unsigned StartIdx, const SDLoc &DL, SmallVectorImpl< SDValue > &Ops, SelectionDAGBuilder &Builder) |
| Add a stack map intrinsic call's live variable operands to a stackmap or patchpoint target node's operand list. More... | |
| static AttributeList | getReturnAttrs (TargetLowering::CallLoweringInfo &CLI) |
| Returns an AttributeList representing the attributes applied to the return value of the given call. More... | |
| static bool | isOnlyUsedInEntryBlock (const Argument *A, bool FastISel) |
| isOnlyUsedInEntryBlock - If the specified argument is only used in the entry block, return true. More... | |
| static void | findArgumentCopyElisionCandidates (const DataLayout &DL, FunctionLoweringInfo *FuncInfo, ArgCopyElisionMapTy &ArgCopyElisionCandidates) |
| Scan the entry block of the function in FuncInfo for arguments that look like copies into a local alloca. More... | |
| static void | tryToElideArgumentCopy (FunctionLoweringInfo *FuncInfo, SmallVectorImpl< SDValue > &Chains, DenseMap< int, int > &ArgCopyElisionFrameIndexMap, SmallPtrSetImpl< const Instruction *> &ElidedArgCopyInstrs, ArgCopyElisionMapTy &ArgCopyElisionCandidates, const Argument &Arg, SDValue ArgVal, bool &ArgHasUses) |
| Try to elide argument copies from memory into a local alloca. More... | |
| 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 125 of file SelectionDAGBuilder.cpp.
| #define HANDLE_INST | ( | NUM, | |
| OPCODE, | |||
| CLASS | |||
| ) | case Instruction::OPCODE: visit##OPCODE((const CLASS&)I); break; |
| using ArgCopyElisionMapTy = DenseMap<const Argument *, std::pair<const AllocaInst *, const StoreInst *> > |
Definition at line 8712 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 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 7998 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::CallBase< InstTy >::getArgOperand(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getArgument(), llvm::CallBase< InstTy >::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< InstTy >::getNumArgOperands(), llvm::SDNode::getOpcode(), llvm::SDNode::getOperand(), llvm::CallBase< InstTy >::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, isPodLike< T >::value >::push_back(), llvm::SelectionDAG::ReplaceAllUsesOfValuesWith(), llvm::SelectionDAG::ReplaceAllUsesWith(), Result, 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.
|
static |
Fill Regs with NumRegs new virtual registers of type RegVT.
Definition at line 7338 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, findMatchingInlineAsmOperand(), first, llvm::DataLayout::getABITypeAlignment(), getAddressForMemoryInput(), llvm::CallBase< InstTy >::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::Type::getNumContainedTypes(), 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::isSingleValueType(), 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_InputChain, llvm::SDNode::ops(), llvm::MVT::Other, llvm::TargetLowering::ParseConstraints(), patchMatchingInput(), Ptr, llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::RegsForValue::Regs, llvm::SmallVectorImpl< T >::resize(), second, llvm::SelectionDAG::setRoot(), llvm::SmallVectorBase::size(), llvm::Type::subtypes(), 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.
|
static |
Definition at line 326 of file SelectionDAGBuilder.cpp.
References llvm::LLVMContext::emitError(), and I.
Referenced by getCopyFromPartsVector(), and getCopyToParts().
|
static |
expandExp - Lower an exp intrinsic.
Handles the special sequences for limited-precision mode.
Definition at line 4484 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().
|
static |
expandExp2 - Lower an exp2 intrinsic.
Handles the special sequences for limited-precision mode.
Definition at line 4792 of file SelectionDAGBuilder.cpp.
References llvm::MVT::f32, llvm::ISD::FEXP2, getLimitedPrecisionExp2(), llvm::SelectionDAG::getNode(), and llvm::SDValue::getValueType().
Referenced by getUnderlyingArgReg().
|
static |
expandLog - Lower a log intrinsic.
Handles the special sequences for limited-precision mode.
Definition at line 4507 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().
|
static |
expandLog10 - Lower a log10 intrinsic.
Handles the special sequences for limited-precision mode.
Definition at line 4702 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().
|
static |
expandLog2 - Lower a log2 intrinsic.
Handles the special sequences for limited-precision mode.
Definition at line 4605 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().
|
static |
visitPow - Lower a pow intrinsic.
Handles the special sequences for limited-precision mode with x == 10.0f.
Definition at line 4804 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 - Expand a llvm.powi intrinsic.
Definition at line 4832 of file SelectionDAGBuilder.cpp.
References llvm::countPopulation(), F(), llvm::ISD::FDIV, llvm::ISD::FMUL, llvm::ISD::FPOWI, llvm::SelectionDAG::getConstantFP(), llvm::MachineFunction::getFunction(), llvm::SelectionDAG::getMachineFunction(), llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), llvm::SDValue::getValueType(), llvm::Log2_32(), and llvm::Function::optForSize().
Referenced by getUnderlyingArgReg().
|
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 8718 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::Value::getType(), llvm::DataLayout::getTypeAllocSize(), llvm::DataLayout::getTypeStoreSize(), I, 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::Type::isEmptyTy(), 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 7319 of file SelectionDAGBuilder.cpp.
References assert(), llvm::InlineAsm::getNumOperandRegisters(), llvm::InlineAsm::isMemKind(), llvm::InlineAsm::isRegDefEarlyClobberKind(), llvm::InlineAsm::isRegDefKind(), and llvm::InlineAsm::Op_FirstOperand.
Referenced by createVirtualRegs().
|
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 1452 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::isAsynchronousEHPersonality(), llvm::EVT::isInteger(), llvm::Function::isVarArg(), llvm::TargetLowering::LowerReturn(), llvm::FunctionLoweringInfo::MBBMap, llvm::MSVC_CXX, llvm::MVT::Other, Ptr, llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::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::ISD::SIGN_EXTEND, llvm::SmallVectorBase::size(), llvm::TargetLowering::supportSwiftError(), llvm::ISD::TokenFactor, llvm::RegsForValue::ValueVTs, and llvm::ISD::ZERO_EXTEND.
Referenced by llvm::SelectionDAGBuilder::visitBitTestCase().
|
static |
Definition at line 163 of file SelectionDAGBuilder.cpp.
References getCopyFromPartsVector(), llvm::None, and llvm::Intrinsic::not_intrinsic.
Referenced by llvm::SelectionDAGBuilder::CopyValueToVirtualRegister(), llvm::SelectionDAGBuilder::getCopyFromRegs(), getUnderlyingArgReg(), 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 7158 of file SelectionDAGBuilder.cpp.
References llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Align, 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::getPointerTy(), llvm::SelectionDAG::getStore(), llvm::SelectionDAG::getTargetLoweringInfo(), and llvm::Value::getType().
Referenced by createVirtualRegs().
|
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 196 of file SelectionDAGBuilder.cpp.
References llvm::ISD::ANY_EXTEND, assert(), llvm::ISD::BITCAST, llvm::EVT::bitsLT(), llvm::ISD::BUILD_PAIR, llvm::MVT::f64, llvm::ISD::FP_EXTEND, llvm::ISD::FP_ROUND, llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getContext(), getCopyFromPartsVector(), llvm::SelectionDAG::getDataLayout(), llvm::EVT::getIntegerVT(), llvm::SelectionDAG::getNode(), llvm::TargetLoweringBase::getPointerTy(), llvm::EVT::getSizeInBits(), llvm::MVT::getSizeInBits(), llvm::SelectionDAG::getTargetConstant(), llvm::SelectionDAG::getTargetLoweringInfo(), llvm::SDValue::getValueType(), llvm::SelectionDAG::getValueType(), llvm::TargetLoweringBase::hasBigEndianPartOrdering(), llvm::MipsISD::Hi, llvm::DataLayout::isBigEndian(), llvm::EVT::isFloatingPoint(), llvm::MVT::isFloatingPoint(), llvm::EVT::isInteger(), llvm::MVT::isInteger(), llvm::EVT::isVector(), llvm::MVT::isVector(), llvm_unreachable, llvm::MipsISD::Lo, llvm::Log2_32(), llvm::ISD::OR, llvm::MVT::ppcf128, llvm::ISD::SHL, std::swap(), llvm::ISD::TRUNCATE, and llvm::ISD::ZERO_EXTEND.
Referenced by getCopyFromPartsVector(), llvm::RegsForValue::getCopyFromRegs(), llvm::TargetLowering::LowerCallTo(), and tryToElideArgumentCopy().
|
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 345 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 486 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::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(), llvm::RegsForValue::getCopyToRegs(), and llvm::TargetLowering::LowerCallTo().
|
static |
getCopyToPartsVector - Create a series of nodes that contain the specified value split into legal parts.
Definition at line 619 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::getBuildVector(), 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::SelectionDAG::getUNDEF(), llvm::Optional< T >::getValue(), llvm::SDValue::getValueType(), llvm::EVT::getVectorElementType(), llvm::MVT::getVectorElementType(), llvm::EVT::getVectorNumElements(), llvm::MVT::getVectorNumElements(), llvm::EVT::getVectorVT(), llvm::Optional< T >::hasValue(), llvm::EVT::isVector(), llvm::MVT::isVector(), and llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back().
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 4373 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 4386 of file SelectionDAGBuilder.cpp.
References llvm::lltok::APFloat, llvm::MVT::f32, llvm::SelectionDAG::getConstantFP(), and llvm::APFloatBase::IEEEsingle().
Referenced by expandExp(), expandLog(), expandLog10(), expandLog2(), expandPow(), and getLimitedPrecisionExp2().
|
static |
Definition at line 4392 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 2186 of file SelectionDAGBuilder.cpp.
References llvm::MachineFunction::allocateMemRefsArray(), llvm::SelectionDAG::getDataLayout(), llvm::SelectionDAG::getEVTAlignment(), llvm::MachineFunction::getFunction(), llvm::SelectionDAG::getMachineFunction(), llvm::MachineFunction::getMachineMemOperand(), llvm::SelectionDAG::getMachineNode(), llvm::GlobalValue::getParent(), llvm::TargetLoweringBase::getPointerTy(), llvm::TargetLoweringBase::getSDagStackGuard(), llvm::EVT::getSizeInBits(), llvm::SelectionDAG::getTargetLoweringInfo(), Global, llvm::MachineMemOperand::MODereferenceable, llvm::MachineMemOperand::MOInvariant, llvm::MachineMemOperand::MOLoad, and llvm::MachineSDNode::setMemRefs().
Referenced by getUnderlyingArgReg(), and llvm::SelectionDAGBuilder::visitSPDescriptorParent().
|
static |
Definition at line 6512 of file SelectionDAGBuilder.cpp.
References llvm::SelectionDAGBuilder::AA, llvm::ISD::ADD, llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Align, llvm::TargetLoweringBase::allowsMisalignedMemoryAccesses(), assert(), llvm::TargetLowering::C_Memory, Callee, llvm::computeUsesVAFloatArgument(), llvm::ConstantFoldLoadFromConstPtr(), Context, llvm::OperandBundleUser< InstrTy, OpIteratorTy >::countOperandBundlesOfType(), llvm::SelectionDAGBuilder::DAG, llvm::SelectionDAGBuilder::DL, llvm::dyn_cast(), llvm::SelectionDAGTargetInfo::EmitTargetCodeForMemchr(), llvm::SelectionDAGTargetInfo::EmitTargetCodeForMemcmp(), llvm::SelectionDAGTargetInfo::EmitTargetCodeForStrcmp(), llvm::SelectionDAGTargetInfo::EmitTargetCodeForStrcpy(), llvm::SelectionDAGTargetInfo::EmitTargetCodeForStrlen(), llvm::SelectionDAGTargetInfo::EmitTargetCodeForStrnlen(), F(), llvm::ISD::FABS, llvm::ISD::FCEIL, llvm::ISD::FCOPYSIGN, llvm::ISD::FCOS, llvm::ISD::FEXP2, llvm::ISD::FFLOOR, llvm::ISD::FLOG2, llvm::ISD::FMAXNUM, llvm::ISD::FMINNUM, llvm::ISD::FNEARBYINT, llvm::ISD::FRINT, llvm::ISD::FROUND, llvm::ISD::FSIN, llvm::ISD::FSQRT, llvm::ISD::FTRUNC, llvm::IntegerType::get(), llvm::VectorType::get(), llvm::CallBase< InstTy >::getArgOperand(), llvm::ConstantExpr::getBitCast(), llvm::SelectionDAG::getBitcast(), llvm::CallBase< InstTy >::getCalledFunction(), llvm::CallBase< InstTy >::getCalledValue(), llvm::SelectionDAG::getConstant(), llvm::TargetLowering::getConstraintType(), llvm::Value::getContext(), llvm::SelectionDAGBuilder::getCurSDLoc(), llvm::SelectionDAG::getDataLayout(), llvm::PointerType::getElementType(), llvm::SelectionDAG::getEntryNode(), llvm::SelectionDAG::getExternalSymbol(), llvm::EVT::getIntegerVT(), llvm::Type::getIntNTy(), llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getMachineFunction(), llvm::SelectionDAG::getMemcpy(), llvm::MachineFunction::getMMI(), llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), llvm::Type::getPointerAddressSpace(), llvm::TargetLoweringBase::getPointerTy(), llvm::SelectionDAG::getRoot(), llvm::MVT::getScalarSizeInBits(), llvm::SelectionDAG::getSelectionDAGInfo(), llvm::SelectionDAG::getSetCC(), llvm::SelectionDAG::getSExtOrTrunc(), llvm::MVT::getSizeInBits(), llvm::SelectionDAG::getTargetLoweringInfo(), llvm::Value::getType(), llvm::DataLayout::getTypeSizeInBits(), llvm::PointerType::getUnqual(), llvm::SDValue::getValue(), llvm::SelectionDAGBuilder::getValue(), llvm::SDValue::getValueType(), llvm::TargetLoweringBase::getValueType(), llvm::MVT::getVectorNumElements(), llvm::SelectionDAG::getZExtOrTrunc(), llvm::ConstantInt::getZExtValue(), llvm::TargetLoweringBase::hasFastEqualityCompare(), llvm::OperandBundleUser< InstrTy, OpIteratorTy >::hasOperandBundlesOtherThan(), llvm::MVT::i1, llvm::MVT::i16, llvm::MVT::i32, llvm::SelectionDAG::InferPtrAlignment(), info, llvm::MVT::INVALID_SIMPLE_VALUE_TYPE, llvm::CallBase< InstTy >::isNoBuiltin(), llvm::isOnlyUsedInZeroEqualityComparison(), llvm::Type::isSingleValueType(), llvm::Type::isSized(), llvm::CallBase< InstTy >::isStrictFP(), llvm::CallInst::isTailCall(), llvm::TargetLoweringBase::isTypeLegal(), llvm::MVT::isVector(), llvm::LLVMContext::OB_deopt, llvm::CallBase< InstTy >::onlyReadsMemory(), llvm::MVT::Other, llvm::SelectionDAGBuilder::PendingLoads, llvm::AAResults::pointsToConstantMemory(), Ptr, llvm::report_fatal_error(), llvm::ISD::SETNE, llvm::SelectionDAG::setRoot(), llvm::AMDGPU::HSAMD::Kernel::Arg::Key::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 7203 of file SelectionDAGBuilder.cpp.
References assert(), llvm::TargetRegisterClass::begin(), llvm::ISD::BITCAST, 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(), I, llvm::InlineAsm::isInput, llvm::MVT::isInteger(), llvm::InlineAsm::isOutput, llvm::TargetRegisterInfo::isTypeLegalForClass(), llvm::TargetRegisterInfo::legalclasstypes_begin(), llvm::MVT::Other, llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), llvm::RegsForValue::Regs, llvm::RegsForValue::RegsForValue(), and TRI.
Referenced by createVirtualRegs().
|
static |
Returns an AttributeList representing the attributes applied to the return value of the given call.
Definition at line 8299 of file SelectionDAGBuilder.cpp.
References llvm::AMDGPU::HSAMD::Kernel::Key::Attrs, llvm::AttributeList::get(), llvm::Type::getContext(), llvm::TargetLowering::CallLoweringInfo::IsInReg, llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::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 4360 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().
Definition at line 4887 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::ISD::ADDROFRETURNADDR, llvm::ISD::ADJUST_TRAMPOLINE, llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Align, llvm::ISD::ANNOTATION_LABEL, Arg, llvm::AMDGPU::HSAMD::Kernel::Key::Args, assert(), llvm::ISD::AssertSext, llvm::ISD::AssertZext, llvm::SmallVectorTemplateCommon< T >::begin(), llvm::ISD::BITCAST, llvm::ISD::BITREVERSE, llvm::ISD::BSWAP, llvm::BuildMI(), llvm::CallingConv::C, llvm::ComputeValueVTs(), Context, llvm::ISD::CopyFromReg, llvm::MachineOperand::CreateFI(), llvm::DIExpression::createFragmentExpression(), llvm::MachineOperand::CreateReg(), llvm::MCContext::createTempSymbol(), llvm::ISD::CTLZ, llvm::ISD::CTLZ_ZERO_UNDEF, llvm::ISD::CTPOP, llvm::ISD::CTTZ, llvm::ISD::CTTZ_ZERO_UNDEF, llvm::StringRef::data(), llvm::dbgs(), llvm::ISD::DEBUGTRAP, llvm::GlobalValue::dropLLVMManglingEscape(), llvm::dyn_cast(), E, llvm::ISD::EH_DWARF_CFA, llvm::ISD::EH_RETURN, llvm::ISD::EH_SJLJ_LONGJMP, llvm::ISD::EH_SJLJ_SETJMP, llvm::ISD::EH_SJLJ_SETUP_DISPATCH, llvm::TargetLowering::emitStackGuardXorFP(), llvm::StringRef::empty(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::SmallVectorTemplateCommon< T >::end(), expandExp(), expandExp2(), expandLog(), expandLog10(), expandLog2(), expandPow(), ExpandPowI(), llvm::ExtractTypeInfo(), F(), llvm::MVT::f16, llvm::ISD::FABS, llvm::ISD::FADD, llvm::ISD::FCANONICALIZE, llvm::ISD::FCEIL, llvm::ISD::FCOPYSIGN, llvm::ISD::FCOS, llvm::ISD::FFLOOR, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), llvm::ISD::FLT_ROUNDS_, llvm::ISD::FMA, llvm::ISD::FMAXNAN, llvm::ISD::FMAXNUM, llvm::ISD::FMINNAN, llvm::ISD::FMINNUM, llvm::ISD::FMUL, llvm::ISD::FNEARBYINT, for(), llvm::ISD::FP_EXTEND, llvm::ISD::FP_ROUND, llvm::ISD::FRAMEADDR, llvm::ISD::FRINT, llvm::ISD::FROUND, llvm::ISD::FSIN, llvm::ISD::FSQRT, llvm::ISD::FTRUNC, llvm::AttributeList::FunctionIndex, llvm::MCInstrInfo::get(), llvm::ISD::GET_DYNAMIC_AREA_OFFSET, getABIRegCopyCC(), llvm::Triple::getArch(), llvm::CallBase< InstTy >::getArgOperand(), llvm::SelectionDAG::getAtomicMemcpy(), llvm::SelectionDAG::getAtomicMemmove(), llvm::SelectionDAG::getAtomicMemset(), llvm::AttributeList::getAttribute(), llvm::CallBase< InstTy >::getAttributes(), llvm::SelectionDAG::getBuildVector(), llvm::CallBase< InstTy >::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::DbgInfoIntrinsic::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< InstTy >::getNumArgOperands(), llvm::SDNode::getNumValues(), llvm::SDValue::getOpcode(), llvm::SDValue::getOperand(), llvm::CallBase< InstTy >::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::DbgValueInst::getValue(), llvm::SDValue::getValue(), llvm::Attribute::getValueAsString(), llvm::SDValue::getValueType(), llvm::TargetLoweringBase::getValueType(), llvm::DbgInfoIntrinsic::getVariable(), llvm::DbgInfoIntrinsic::getVariableLocation(), llvm::EVT::getVectorNumElements(), llvm::EVT::getVectorVT(), llvm::SelectionDAG::getVRegDbgValue(), llvm::SelectionDAG::getVTList(), llvm::SelectionDAG::getZExtOrTrunc(), llvm::ConstantInt::getZExtValue(), Global, llvm::MVT::Glue, llvm::Function::hasGC(), llvm::Instruction::hasNoNaNs(), I, llvm::MVT::i1, llvm::MVT::i16, llvm::MVT::i32, llvm::MVT::i64, llvm::ISD::INIT_TRAMPOLINE, llvm::ISD::INTRINSIC_WO_CHAIN, llvm::TargetLoweringBase::isFMAFasterThanFMulAndFAdd(), llvm::isInTailCallPosition(), llvm::TargetLoweringBase::isOperationLegal(), llvm::TargetLoweringBase::isOperationLegalOrCustom(), llvm::Triple::isOSLinux(), llvm::MachineOperand::isReg(), llvm::CallInst::isTailCall(), llvm::ConstrainedFPIntrinsic::isTernaryOp(), llvm::ConstrainedFPIntrinsic::isUnaryOp(), llvm::DILocalVariable::isValidLocationForIntrinsic(), llvm::TargetRegisterInfo::isVirtualRegister(), llvm::ConstantInt::isZero(), llvm::ISD::LIFETIME_END, llvm::ISD::LIFETIME_START, LLVM_DEBUG, llvm_unreachable, llvm::ISD::LOCAL_RECOVER, llvm::log2(), llvm::TargetLowering::LowerCallTo(), llvm::max(), llvm::maxnum(), MI, llvm::MinAlign(), llvm::minnum(), llvm::MachineMemOperand::MOLoad, llvm::MachineMemOperand::MOStore, llvm::MachineMemOperand::MOVolatile, N, llvm::None, llvm::CodeGenOpt::None, llvm::ISD::OR, llvm::MVT::Other, llvm::ISD::PCMARKER, prefetch, llvm::ISD::PREFETCH, llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::ISD::READ_REGISTER, llvm::ISD::READCYCLECOUNTER, Reg, llvm::report_fatal_error(), Result, llvm::ISD::RETURNADDR, llvm::ISD::ROTL, llvm::ISD::ROTR, round(), llvm::ISD::SADDO, 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::SMULO, llvm::sort(), llvm::ISD::SRL, llvm::ISD::SSUBO, llvm::ISD::STACKRESTORE, llvm::ISD::STACKSAVE, llvm::FPOpFusion::Strict, llvm::ISD::STRICT_FADD, llvm::ISD::STRICT_FCOS, llvm::ISD::STRICT_FDIV, llvm::ISD::STRICT_FEXP, llvm::ISD::STRICT_FEXP2, llvm::ISD::STRICT_FLOG, llvm::ISD::STRICT_FLOG10, llvm::ISD::STRICT_FLOG2, llvm::ISD::STRICT_FMA, llvm::ISD::STRICT_FMUL, llvm::ISD::STRICT_FNEARBYINT, llvm::ISD::STRICT_FPOW, llvm::ISD::STRICT_FPOWI, llvm::ISD::STRICT_FREM, llvm::ISD::STRICT_FRINT, llvm::ISD::STRICT_FSIN, llvm::ISD::STRICT_FSQRT, llvm::ISD::STRICT_FSUB, llvm::Value::stripInBoundsConstantOffsets(), llvm::Value::stripPointerCasts(), llvm::ISD::SUB, T1, TII, llvm::SystemZISD::TM, llvm::ISD::TRAP, llvm::ISD::TRUNCATE, llvm::ISD::UADDO, llvm::ISD::UMULO, llvm::ISD::UREM, llvm::Value::use_empty(), llvm::TargetLowering::useLoadStackGuardNode(), llvm::TargetLoweringBase::useStackGuardXorFP(), llvm::TargetLoweringBase::usesUnderscoreLongJmp(), llvm::TargetLoweringBase::usesUnderscoreSetJmp(), llvm::ISD::USUBO, llvm::MVT::v2i32, llvm::RegsForValue::ValueVTs, llvm::ISD::WRITE_REGISTER, X, llvm::Triple::x86_64, Y, and llvm::Z.
|
static |
Definition at line 3941 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< InstTy >::getArgOperand(), llvm::SelectionDAG::getAtomic(), llvm::SelectionDAG::getAtomicCmpSwap(), llvm::CallBase< InstTy >::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< InstTy >::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, llvm::ISD::INTRINSIC_VOID, llvm::ISD::INTRINSIC_W_CHAIN, llvm::ISD::INTRINSIC_WO_CHAIN, llvm::EVT::isVector(), llvm::Type::isVectorTy(), llvm::Type::isVoidTy(), llvm_unreachable, llvm::SPII::Load, llvm::BitmaskEnumDetail::Mask(), llvm::AtomicRMWInst::Max, llvm::LLVMContext::MD_range, llvm::AtomicRMWInst::Min, llvm::MachineMemOperand::MOLoad, llvm::MachineMemOperand::MOStore, llvm::MachineMemOperand::MOVolatile, llvm::AtomicRMWInst::Nand, llvm::ISD::NON_EXTLOAD, llvm::Function::onlyReadsMemory(), llvm::AtomicRMWInst::Or, llvm::MVT::Other, llvm::TargetLowering::prepareVolatileOrAtomicLoad(), Ptr, llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::report_fatal_error(), Result, 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.
Definition at line 2913 of file SelectionDAGBuilder.cpp.
References llvm::MCID::Add, llvm::ISD::ADD, llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Align, llvm::alignDown(), llvm::alignTo(), llvm::all_of(), llvm::ISD::AND, Arg, AS, assert(), llvm::SmallVectorTemplateCommon< T >::begin(), llvm::ISD::BITCAST, C, llvm::ComputeLinearIndex(), llvm::ComputeValueVTs(), llvm::ISD::CONCAT_VECTORS, Context, llvm::SmallVectorTemplateCommon< T >::data(), llvm::ISD::DELETED_NODE, llvm::dyn_cast(), llvm::ISD::DYNAMIC_STACKALLOC, E, llvm::SmallVectorTemplateCommon< T >::end(), llvm::lltok::equal, llvm::ISD::EXTRACT_SUBVECTOR, llvm::ISD::EXTRACT_VECTOR_ELT, llvm::tgtok::Field, llvm::ISD::FMAXNAN, llvm::ISD::FMAXNUM, llvm::ISD::FMINNAN, llvm::ISD::FMINNUM, llvm::ISD::FP_EXTEND, llvm::ISD::FP_ROUND, llvm::ISD::FP_TO_SINT, llvm::ISD::FP_TO_UINT, llvm::gep_type_begin(), llvm::gep_type_end(), llvm::Instruction::getAAMetadata(), llvm::SelectionDAG::getAddrSpaceCast(), llvm::AllocaInst::getAlignment(), llvm::LoadInst::getAlignment(), llvm::StoreInst::getAlignment(), llvm::AllocaInst::getAllocatedType(), llvm::CallBase< InstTy >::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::Instruction::isAtomic(), llvm::isDereferenceablePointer(), llvm::APInt::isNonNegative(), llvm::TargetLoweringBase::isNoopAddrSpaceCast(), llvm::APInt::isPowerOf2(), llvm::SDValue::isUndef(), llvm::EVT::isVector(), llvm::Type::isVectorTy(), llvm::LoadInst::isVolatile(), isVolatile(), llvm::StoreInst::isVolatile(), llvm_unreachable, llvm::APInt::logBase2(), llvm::makeArrayRef(), llvm::BitmaskEnumDetail::Mask(), llvm::matchSelectPattern(), llvm::max(), llvm::LLVMContext::MD_invariant_load, llvm::LLVMContext::MD_nontemporal, llvm::LLVMContext::MD_range, llvm::ISD::MERGE_VALUES, llvm::MachineMemOperand::MODereferenceable, llvm::MachineMemOperand::MOInvariant, llvm::MachineMemOperand::MONone, llvm::MachineMemOperand::MONonTemporal, llvm::MachineMemOperand::MOStore, llvm::MachineMemOperand::MOVolatile, llvm::ISD::MUL, N, llvm::MVT::Other, llvm::TargetLowering::prepareVolatileOrAtomicLoad(), Ptr, llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), Result, 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.
|
static |
Definition at line 1753 of file SelectionDAGBuilder.cpp.
References llvm::Instruction::getParent().
Referenced by llvm::SelectionDAGBuilder::FindMergedConditions(), and 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 8696 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 2668 of file SelectionDAGBuilder.cpp.
References llvm::MCID::Add, llvm::CmpInst::BAD_FCMP_PREDICATE, llvm::CmpInst::BAD_ICMP_PREDICATE, 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::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 7129 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 createVirtualRegs().
|
static |
Definition at line 10136 of file SelectionDAGBuilder.cpp.
References llvm::MachineBasicBlock::addSuccessor(), assert(), llvm::ISD::BR, C, llvm::SwitchInst::cases(), llvm::dbgs(), llvm::MachineBasicBlock::getBasicBlock(), llvm::BranchProbability::getCompl(), llvm::SwitchInst::getCondition(), llvm::SwitchInst::getDefaultDest(), llvm::BranchProbability::getDenominator(), llvm::BranchProbabilityInfo::getEdgeProbability(), llvm::BasicBlock::getFirstNonPHIOrDbg(), llvm::MachineFunction::getFunction(), llvm::SwitchInst::getNumCases(), llvm::BranchProbability::getNumerator(), llvm::BranchProbability::getOne(), llvm::Instruction::getParent(), llvm::MachineBasicBlock::getParent(), llvm::BranchProbability::getZero(), I, llvm::MachineBasicBlock::insert(), LLVM_DEBUG, llvm::max(), llvm::CodeGenOpt::None, llvm::Function::optForMinSize(), llvm::MVT::Other, llvm::Value::print(), llvm::MachineBasicBlock::push_back(), llvm::BranchProbability::scale(), 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 8809 of file SelectionDAGBuilder.cpp.
References llvm::MachineBasicBlock::addSuccessor(), llvm::TargetLoweringBase::areJTsAllowed(), Arg, llvm::Function::args(), assert(), llvm::ISD::AssertSext, llvm::ISD::AssertZext, llvm::MachineBasicBlock::begin(), llvm::BasicBlock::begin(), llvm::ISD::BR, llvm::ISD::BRCOND, llvm::ISD::BUILD_PAIR, C, llvm::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::MachineFunction::getDataLayout(), llvm::SelectionDAG::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::TerminatorInst::getNumSuccessors(), llvm::MachineFrameInfo::getObjectAlignment(), llvm::MachineFrameInfo::getObjectSize(), llvm::SDValue::getOpcode(), llvm::SDValue::getOperand(), llvm::MachineFunction::getOrCreateJumpTableInfo(), llvm::Instruction::getParent(), llvm::BasicBlock::getParent(), llvm::MachineBasicBlock::getParent(), llvm::Type::getPointerTo(), llvm::TargetLoweringBase::getPointerTy(), getReg(), llvm::Function::getReturnType(), llvm::SelectionDAG::getRoot(), llvm::EVT::getSizeInBits(), llvm::EVT::getStoreSize(), llvm::MVT::getStoreSize(), llvm::TerminatorInst::getSuccessor(), llvm::SelectionDAG::getTargetLoweringInfo(), llvm::BasicBlock::getTerminator(), llvm::Value::getType(), llvm::DataLayout::getTypeAllocSize(), llvm::EVT::getTypeForEVT(), llvm::ConstantInt::getValue(), llvm::SDValue::getValue(), llvm::SDValue::getValueType(), llvm::BranchProbability::getZero(), llvm::MipsISD::Hi, High, I, llvm::MVT::i1, llvm::MipsISD::Ins, llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::insert(), llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::MachineBasicBlock::insert(), llvm::MachineFunction::insert(), llvm::ISD::ArgFlagsTy::isByVal(), llvm::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::FunctionLoweringInfo::MF, N, llvm::ISD::InputArg::NoArgIndex, llvm::None, llvm::CodeGenOpt::None, llvm::MachineBasicBlock::normalizeSuccProbs(), llvm::ISD::OR, llvm::MVT::Other, llvm::BasicBlock::phis(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::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::ISD::SHL, SI, llvm::SmallVectorBase::size(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::size(), llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Size, llvm::APInt::slt(), llvm::CodeModel::Small, llvm::sort(), llvm::FunctionLoweringInfo::StaticAllocaMap, llvm::MachineBasicBlock::succ_begin(), llvm::MachineBasicBlock::succ_end(), std::swap(), 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, and llvm::CallingConv::X86_VectorCall.
|
static |
LimitFloatPrecision - Generate low-precision inline sequences for some float libcalls (6, 8 or 12 bits).
Definition at line 129 of file SelectionDAGBuilder.cpp.
|
static |
Definition at line 158 of file SelectionDAGBuilder.cpp.
|
static |
Referenced by scaleCaseProbality().
1.8.13