clang 20.0.0git
|
#include "ABIInfo.h"
#include "CGCUDARuntime.h"
#include "CGCXXABI.h"
#include "CGHLSLRuntime.h"
#include "CGObjCRuntime.h"
#include "CGOpenCLRuntime.h"
#include "CGRecordLayout.h"
#include "CGValue.h"
#include "CodeGenFunction.h"
#include "CodeGenModule.h"
#include "ConstantEmitter.h"
#include "PatternInit.h"
#include "TargetInfo.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Attr.h"
#include "clang/AST/Decl.h"
#include "clang/AST/Expr.h"
#include "clang/AST/OSLog.h"
#include "clang/AST/OperationKinds.h"
#include "clang/AST/Type.h"
#include "clang/Basic/TargetBuiltins.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/Basic/TargetOptions.h"
#include "clang/CodeGen/CGFunctionInfo.h"
#include "clang/Frontend/FrontendDiagnostic.h"
#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/FloatingPointMode.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/InlineAsm.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/IntrinsicsAArch64.h"
#include "llvm/IR/IntrinsicsAMDGPU.h"
#include "llvm/IR/IntrinsicsARM.h"
#include "llvm/IR/IntrinsicsBPF.h"
#include "llvm/IR/IntrinsicsDirectX.h"
#include "llvm/IR/IntrinsicsHexagon.h"
#include "llvm/IR/IntrinsicsNVPTX.h"
#include "llvm/IR/IntrinsicsPowerPC.h"
#include "llvm/IR/IntrinsicsR600.h"
#include "llvm/IR/IntrinsicsRISCV.h"
#include "llvm/IR/IntrinsicsS390.h"
#include "llvm/IR/IntrinsicsWebAssembly.h"
#include "llvm/IR/IntrinsicsX86.h"
#include "llvm/IR/MDBuilder.h"
#include "llvm/IR/MatrixBuilder.h"
#include "llvm/IR/MemoryModelRelaxationAnnotations.h"
#include "llvm/Support/AMDGPUAddrSpace.h"
#include "llvm/Support/ConvertUTF.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/ScopedPrinter.h"
#include "llvm/TargetParser/AArch64TargetParser.h"
#include "llvm/TargetParser/RISCVISAInfo.h"
#include "llvm/TargetParser/RISCVTargetParser.h"
#include "llvm/TargetParser/X86TargetParser.h"
#include <optional>
#include <utility>
#include "clang/Basic/arm_sve_builtin_cg.inc"
#include "clang/Basic/BuiltinsAArch64NeonSVEBridge_cg.def"
#include "clang/Basic/arm_sme_builtin_cg.inc"
#include "clang/Basic/arm_mve_builtin_cg.inc"
#include "clang/Basic/arm_cde_builtin_cg.inc"
#include "llvm/TargetParser/X86TargetParser.def"
#include "llvm/TargetParser/PPCTargetParser.def"
#include "clang/Basic/BuiltinsPPC.def"
#include "clang/Basic/BuiltinsHexagonMapCustomDep.def"
#include "clang/Basic/riscv_vector_builtin_cg.inc"
#include "clang/Basic/riscv_sifive_vector_builtin_cg.inc"
Go to the source code of this file.
Macros | |
#define | MUTATE_LDBL(func) |
#define | NEONMAP0(NameBase) { #NameBase, NEON::BI__builtin_neon_ ## NameBase, 0, 0, 0 } |
#define | NEONMAP1(NameBase, LLVMIntrinsic, TypeModifier) |
#define | NEONMAP2(NameBase, LLVMIntrinsic, AltLLVMIntrinsic, TypeModifier) |
#define | SVEMAP1(NameBase, LLVMIntrinsic, TypeModifier) |
#define | SVEMAP2(NameBase, TypeModifier) { #NameBase, SVE::BI__builtin_sve_##NameBase, 0, 0, TypeModifier } |
#define | GET_SVE_LLVM_INTRINSIC_MAP |
#define | SMEMAP1(NameBase, LLVMIntrinsic, TypeModifier) |
#define | SMEMAP2(NameBase, TypeModifier) { #NameBase, SME::BI__builtin_sme_##NameBase, 0, 0, TypeModifier } |
#define | GET_SME_LLVM_INTRINSIC_MAP |
#define | X86_VENDOR(ENUM, STRING) .Case(STRING, {0u, static_cast<unsigned>(llvm::X86::ENUM)}) |
#define | X86_CPU_TYPE_ALIAS(ENUM, ALIAS) .Case(ALIAS, {1u, static_cast<unsigned>(llvm::X86::ENUM)}) |
#define | X86_CPU_TYPE(ENUM, STR) .Case(STR, {1u, static_cast<unsigned>(llvm::X86::ENUM)}) |
#define | X86_CPU_SUBTYPE_ALIAS(ENUM, ALIAS) .Case(ALIAS, {2u, static_cast<unsigned>(llvm::X86::ENUM)}) |
#define | X86_CPU_SUBTYPE(ENUM, STR) .Case(STR, {2u, static_cast<unsigned>(llvm::X86::ENUM)}) |
#define | INTRINSIC_X86_XSAVE_ID(NAME) |
#define | PPC_CPU(NAME, Linux_SUPPORT_METHOD, LinuxID, AIX_SUPPORT_METHOD, AIXID) .Case(NAME, {Linux_SUPPORT_METHOD, LinuxID, AIX_SUPPORT_METHOD, AIXID}) |
#define | PPC_AIX_FEATURE(NAME, DESC, SUPPORT_METHOD, INDEX, MASK, COMP_OP, VALUE) .Case(NAME, {SUPPORT_METHOD, INDEX, MASK, COMP_OP, VALUE}) |
#define | PPC_LNX_FEATURE(Name, Description, EnumName, Bitmask, FA_WORD) .Case(Name, {FA_WORD, Bitmask}) |
#define | CUSTOM_BUILTIN(Name, Intr, Types, Accumulate, Feature) case PPC::BI__builtin_##Name: |
#define | CUSTOM_BUILTIN(Name, Intr, Types, Acc, Feature) |
#define | INTRINSIC_WITH_CC(NAME) |
#define | MMA_INTR(geom_op_type, layout) Intrinsic::nvvm_wmma_##geom_op_type##_##layout##_stride |
#define | MMA_LDST(n, geom_op_type) { n, MMA_INTR(geom_op_type, col), MMA_INTR(geom_op_type, row) } |
#define | MMA_VARIANTS(geom, type) |
#define | MMA_SATF_VARIANTS(geom, type) |
#define | MMA_VARIANTS_I4(geom, type) |
#define | MMA_VARIANTS_B1_XOR(geom, type) |
#define | MMA_VARIANTS_B1_AND(geom, type) |
#define | CUSTOM_BUILTIN_MAPPING(x, s) { Hexagon::BI__builtin_HEXAGON_##x, Intrinsic::hexagon_##x, s }, |
Functions | |
static void | initializeAlloca (CodeGenFunction &CGF, AllocaInst *AI, Value *Size, Align AlignmentInBytes) |
static Value * | handleHlslClip (const CallExpr *E, CodeGenFunction *CGF) |
static Value * | handleHlslSplitdouble (const CallExpr *E, CodeGenFunction *CGF) |
static Value * | handleAsDoubleBuiltin (CodeGenFunction &CGF, const CallExpr *E) |
Value * | readX18AsPtr (CodeGenFunction &CGF) |
Helper for the read/write/add/inc X18 builtins: read the X18 register and return it as an i8 pointer. | |
static Value * | EmitToInt (CodeGenFunction &CGF, llvm::Value *V, QualType T, llvm::IntegerType *IntType) |
Emit the conversions required to turn the given value into an integer of the given size. | |
static Value * | EmitFromInt (CodeGenFunction &CGF, llvm::Value *V, QualType T, llvm::Type *ResultType) |
static Address | CheckAtomicAlignment (CodeGenFunction &CGF, const CallExpr *E) |
static Value * | MakeBinaryAtomicValue (CodeGenFunction &CGF, llvm::AtomicRMWInst::BinOp Kind, const CallExpr *E, AtomicOrdering Ordering=AtomicOrdering::SequentiallyConsistent) |
Utility to insert an atomic instruction based on Intrinsic::ID and the expression node. | |
static Value * | EmitNontemporalStore (CodeGenFunction &CGF, const CallExpr *E) |
static Value * | EmitNontemporalLoad (CodeGenFunction &CGF, const CallExpr *E) |
static RValue | EmitBinaryAtomic (CodeGenFunction &CGF, llvm::AtomicRMWInst::BinOp Kind, const CallExpr *E) |
static RValue | EmitBinaryAtomicPost (CodeGenFunction &CGF, llvm::AtomicRMWInst::BinOp Kind, const CallExpr *E, Instruction::BinaryOps Op, bool Invert=false) |
Utility to insert an atomic instruction based Intrinsic::ID and the expression node, where the return value is the result of the operation. | |
static Value * | MakeAtomicCmpXchgValue (CodeGenFunction &CGF, const CallExpr *E, bool ReturnBool) |
Utility to insert an atomic cmpxchg instruction. | |
static Value * | EmitAtomicCmpXchgForMSIntrin (CodeGenFunction &CGF, const CallExpr *E, AtomicOrdering SuccessOrdering=AtomicOrdering::SequentiallyConsistent) |
This function should be invoked to emit atomic cmpxchg for Microsoft's _InterlockedCompareExchange* intrinsics which have the following signature: T _InterlockedCompareExchange(T volatile *Destination,
T Exchange,
T Comparand);. | |
static Value * | EmitAtomicCmpXchg128ForMSIntrin (CodeGenFunction &CGF, const CallExpr *E, AtomicOrdering SuccessOrdering) |
static Value * | EmitAtomicIncrementValue (CodeGenFunction &CGF, const CallExpr *E, AtomicOrdering Ordering=AtomicOrdering::SequentiallyConsistent) |
static Value * | EmitAtomicDecrementValue (CodeGenFunction &CGF, const CallExpr *E, AtomicOrdering Ordering=AtomicOrdering::SequentiallyConsistent) |
static Value * | EmitISOVolatileLoad (CodeGenFunction &CGF, const CallExpr *E) |
static Value * | EmitISOVolatileStore (CodeGenFunction &CGF, const CallExpr *E) |
static Value * | emitUnaryMaybeConstrainedFPBuiltin (CodeGenFunction &CGF, const CallExpr *E, unsigned IntrinsicID, unsigned ConstrainedIntrinsicID) |
static Value * | emitBinaryMaybeConstrainedFPBuiltin (CodeGenFunction &CGF, const CallExpr *E, unsigned IntrinsicID, unsigned ConstrainedIntrinsicID) |
static Value * | emitBinaryExpMaybeConstrainedFPBuiltin (CodeGenFunction &CGF, const CallExpr *E, llvm::Intrinsic::ID IntrinsicID, llvm::Intrinsic::ID ConstrainedIntrinsicID) |
static Value * | emitTernaryMaybeConstrainedFPBuiltin (CodeGenFunction &CGF, const CallExpr *E, unsigned IntrinsicID, unsigned ConstrainedIntrinsicID) |
static Value * | emitCallMaybeConstrainedFPBuiltin (CodeGenFunction &CGF, unsigned IntrinsicID, unsigned ConstrainedIntrinsicID, llvm::Type *Ty, ArrayRef< Value * > Args) |
template<unsigned N> | |
static Value * | emitBuiltinWithOneOverloadedType (CodeGenFunction &CGF, const CallExpr *E, unsigned IntrinsicID, llvm::StringRef Name="") |
static Value * | emitQuaternaryBuiltin (CodeGenFunction &CGF, const CallExpr *E, unsigned IntrinsicID) |
static Value * | emitFPIntBuiltin (CodeGenFunction &CGF, const CallExpr *E, unsigned IntrinsicID) |
static Value * | emitMaybeConstrainedFPToIntRoundBuiltin (CodeGenFunction &CGF, const CallExpr *E, unsigned IntrinsicID, unsigned ConstrainedIntrinsicID) |
static Value * | emitFrexpBuiltin (CodeGenFunction &CGF, const CallExpr *E, llvm::Intrinsic::ID IntrinsicID) |
static Value * | EmitFAbs (CodeGenFunction &CGF, Value *V) |
EmitFAbs - Emit a call to @llvm.fabs(). | |
static Value * | EmitSignBit (CodeGenFunction &CGF, Value *V) |
Emit the computation of the sign bit for a floating point value. | |
static bool | HasNoIndirectArgumentsOrResults (CGFunctionInfo const &FnInfo) |
Checks no arguments or results are passed indirectly in the ABI (i.e. | |
static RValue | emitLibraryCall (CodeGenFunction &CGF, const FunctionDecl *FD, const CallExpr *E, llvm::Constant *calleeValue) |
static llvm::Value * | EmitOverflowIntrinsic (CodeGenFunction &CGF, const llvm::Intrinsic::ID IntrinsicID, llvm::Value *X, llvm::Value *Y, llvm::Value *&Carry) |
Emit a call to llvm. | |
static Value * | emitRangedBuiltin (CodeGenFunction &CGF, unsigned IntrinsicID, int low, int high) |
static WidthAndSignedness | getIntegerWidthAndSignedness (const clang::ASTContext &context, const clang::QualType Type) |
static struct WidthAndSignedness | EncompassingIntegerType (ArrayRef< struct WidthAndSignedness > Types) |
static bool | areBOSTypesCompatible (int From, int To) |
Checks if using the result of __builtin_object_size(p, From ) in place of __builtin_object_size(p, To ) is correct. | |
static llvm::Value * | getDefaultBuiltinObjectSizeResult (unsigned Type, llvm::IntegerType *ResType) |
static unsigned | CountCountedByAttrs (const RecordDecl *RD) |
static char | bitActionToX86BTCode (BitTest::ActionKind A) |
static llvm::Value * | EmitX86BitTestIntrinsic (CodeGenFunction &CGF, BitTest BT, const CallExpr *E, Value *BitBase, Value *BitPos) |
static llvm::AtomicOrdering | getBitTestAtomicOrdering (BitTest::InterlockingKind I) |
static llvm::Value * | EmitBitTestIntrinsic (CodeGenFunction &CGF, unsigned BuiltinID, const CallExpr *E) |
Emit a _bittest* intrinsic. | |
static llvm::Value * | emitPPCLoadReserveIntrinsic (CodeGenFunction &CGF, unsigned BuiltinID, const CallExpr *E) |
static RValue | EmitMSVCRTSetJmp (CodeGenFunction &CGF, MSVCSetJmpKind SJKind, const CallExpr *E) |
MSVC handles setjmp a bit differently on different platforms. | |
static std::optional< CodeGenFunction::MSVCIntrin > | translateArmToMsvcIntrin (unsigned BuiltinID) |
static std::optional< CodeGenFunction::MSVCIntrin > | translateAarch64ToMsvcIntrin (unsigned BuiltinID) |
static std::optional< CodeGenFunction::MSVCIntrin > | translateX86ToMsvcIntrin (unsigned BuiltinID) |
static Value * | EmitAbs (CodeGenFunction &CGF, Value *ArgValue, bool HasNSW) |
static Value * | EmitOverflowCheckedAbs (CodeGenFunction &CGF, const CallExpr *E, bool SanitizeOverflow) |
static CanQualType | getOSLogArgType (ASTContext &C, int Size) |
Get the argument type for arguments to os_log_helper. | |
static bool | isSpecialUnsignedMultiplySignedResult (unsigned BuiltinID, WidthAndSignedness Op1Info, WidthAndSignedness Op2Info, WidthAndSignedness ResultInfo) |
static RValue | EmitCheckedUnsignedMultiplySignedResult (CodeGenFunction &CGF, const clang::Expr *Op1, WidthAndSignedness Op1Info, const clang::Expr *Op2, WidthAndSignedness Op2Info, const clang::Expr *ResultArg, QualType ResultQTy, WidthAndSignedness ResultInfo) |
static bool | isSpecialMixedSignMultiply (unsigned BuiltinID, WidthAndSignedness Op1Info, WidthAndSignedness Op2Info, WidthAndSignedness ResultInfo) |
Determine if a binop is a checked mixed-sign multiply we can specialize. | |
static RValue | EmitCheckedMixedSignMultiply (CodeGenFunction &CGF, const clang::Expr *Op1, WidthAndSignedness Op1Info, const clang::Expr *Op2, WidthAndSignedness Op2Info, const clang::Expr *ResultArg, QualType ResultQTy, WidthAndSignedness ResultInfo) |
Emit a checked mixed-sign multiply. | |
static bool | TypeRequiresBuiltinLaunderImp (const ASTContext &Ctx, QualType Ty, llvm::SmallPtrSetImpl< const Decl * > &Seen) |
static bool | TypeRequiresBuiltinLaunder (CodeGenModule &CGM, QualType Ty) |
Determine if the specified type requires laundering by checking if it is a dynamic class type or contains a subobject which is a dynamic class type. | |
static unsigned | mutateLongDoubleBuiltin (unsigned BuiltinID) |
static Value * | tryUseTestFPKind (CodeGenFunction &CGF, unsigned BuiltinID, Value *V) |
static RValue | EmitHipStdParUnsupportedBuiltin (CodeGenFunction *CGF, const FunctionDecl *FD) |
static Value * | EmitTargetArchBuiltinExpr (CodeGenFunction *CGF, unsigned BuiltinID, const CallExpr *E, ReturnValueSlot ReturnValue, llvm::Triple::ArchType Arch) |
static llvm::FixedVectorType * | GetNeonType (CodeGenFunction *CGF, NeonTypeFlags TypeFlags, bool HasLegalHalfType=true, bool V1Ty=false, bool AllowBFloatArgsAndRet=true) |
static llvm::VectorType * | GetFloatNeonType (CodeGenFunction *CGF, NeonTypeFlags IntTypeFlags) |
static const ARMVectorIntrinsicInfo * | findARMVectorIntrinsicInMap (ArrayRef< ARMVectorIntrinsicInfo > IntrinsicMap, unsigned BuiltinID, bool &MapProvenSorted) |
static Value * | EmitCommonNeonSISDBuiltinExpr (CodeGenFunction &CGF, const ARMVectorIntrinsicInfo &SISDInfo, SmallVectorImpl< Value * > &Ops, const CallExpr *E) |
static Value * | packTBLDVectorList (CodeGenFunction &CGF, ArrayRef< Value * > Ops, Value *ExtOp, Value *IndexOp, llvm::Type *ResTy, unsigned IntID, const char *Name) |
static Value * | EmitAMDGCNBallotForExec (CodeGenFunction &CGF, const CallExpr *E, llvm::Type *RegisterType, llvm::Type *ValueType, bool isExecHi) |
static Value * | EmitSpecialRegisterBuiltin (CodeGenFunction &CGF, const CallExpr *E, llvm::Type *RegisterType, llvm::Type *ValueType, SpecialRegisterAccessKind AccessKind, StringRef SysReg="") |
static bool | HasExtraNeonArgument (unsigned BuiltinID) |
Return true if BuiltinID is an overloaded Neon intrinsic with an extra argument that specifies the vector type. | |
template<typename Integer > | |
static Integer | GetIntegerConstantValue (const Expr *E, ASTContext &Context) |
static llvm::Value * | SignOrZeroExtend (CGBuilderTy &Builder, llvm::Value *V, llvm::Type *T, bool Unsigned) |
static llvm::Value * | MVEImmediateShr (CGBuilderTy &Builder, llvm::Value *V, uint32_t Shift, bool Unsigned) |
static llvm::Value * | ARMMVEVectorSplat (CGBuilderTy &Builder, llvm::Value *V) |
static llvm::Value * | ARMMVEVectorReinterpret (CGBuilderTy &Builder, CodeGenFunction *CGF, llvm::Value *V, llvm::Type *DestType) |
static llvm::Value * | VectorUnzip (CGBuilderTy &Builder, llvm::Value *V, bool Odd) |
static llvm::Value * | VectorZip (CGBuilderTy &Builder, llvm::Value *V0, llvm::Value *V1) |
template<unsigned HighBit, unsigned OtherBits> | |
static llvm::Value * | ARMMVEConstantSplat (CGBuilderTy &Builder, llvm::Type *VT) |
static llvm::Value * | ARMMVEVectorElementReverse (CGBuilderTy &Builder, llvm::Value *V, unsigned ReverseWidth) |
static Value * | EmitAArch64TblBuiltinExpr (CodeGenFunction &CGF, unsigned BuiltinID, const CallExpr *E, SmallVectorImpl< Value * > &Ops, llvm::Triple::ArchType Arch) |
static llvm::ScalableVectorType * | getSVEVectorForElementType (llvm::Type *EltTy) |
static void | InsertExplicitZeroOperand (CGBuilderTy &Builder, llvm::Type *Ty, SmallVectorImpl< Value * > &Ops) |
static void | InsertExplicitUndefOperand (CGBuilderTy &Builder, llvm::Type *Ty, SmallVectorImpl< Value * > &Ops) |
static void | swapCommutativeSMEOperands (unsigned BuiltinID, SmallVectorImpl< Value * > &Ops) |
static Value * | getMaskVecValue (CodeGenFunction &CGF, Value *Mask, unsigned NumElts) |
static Value * | EmitX86MaskedStore (CodeGenFunction &CGF, ArrayRef< Value * > Ops, Align Alignment) |
static Value * | EmitX86MaskedLoad (CodeGenFunction &CGF, ArrayRef< Value * > Ops, Align Alignment) |
static Value * | EmitX86ExpandLoad (CodeGenFunction &CGF, ArrayRef< Value * > Ops) |
static Value * | EmitX86CompressExpand (CodeGenFunction &CGF, ArrayRef< Value * > Ops, bool IsCompress) |
static Value * | EmitX86CompressStore (CodeGenFunction &CGF, ArrayRef< Value * > Ops) |
static Value * | EmitX86MaskLogic (CodeGenFunction &CGF, Instruction::BinaryOps Opc, ArrayRef< Value * > Ops, bool InvertLHS=false) |
static Value * | EmitX86FunnelShift (CodeGenFunction &CGF, Value *Op0, Value *Op1, Value *Amt, bool IsRight) |
static Value * | EmitX86vpcom (CodeGenFunction &CGF, ArrayRef< Value * > Ops, bool IsSigned) |
static Value * | EmitX86Select (CodeGenFunction &CGF, Value *Mask, Value *Op0, Value *Op1) |
static Value * | EmitX86ScalarSelect (CodeGenFunction &CGF, Value *Mask, Value *Op0, Value *Op1) |
static Value * | EmitX86MaskedCompareResult (CodeGenFunction &CGF, Value *Cmp, unsigned NumElts, Value *MaskIn) |
static Value * | EmitX86MaskedCompare (CodeGenFunction &CGF, unsigned CC, bool Signed, ArrayRef< Value * > Ops) |
static Value * | EmitX86ConvertToMask (CodeGenFunction &CGF, Value *In) |
static Value * | EmitX86ConvertIntToFp (CodeGenFunction &CGF, const CallExpr *E, ArrayRef< Value * > Ops, bool IsSigned) |
static Value * | EmitX86FMAExpr (CodeGenFunction &CGF, const CallExpr *E, ArrayRef< Value * > Ops, unsigned BuiltinID, bool IsAddSub) |
static Value * | EmitScalarFMAExpr (CodeGenFunction &CGF, const CallExpr *E, MutableArrayRef< Value * > Ops, Value *Upper, bool ZeroMask=false, unsigned PTIdx=0, bool NegAcc=false) |
static Value * | EmitX86Muldq (CodeGenFunction &CGF, bool IsSigned, ArrayRef< Value * > Ops) |
static Value * | EmitX86Ternlog (CodeGenFunction &CGF, bool ZeroMask, ArrayRef< Value * > Ops) |
static Value * | EmitX86SExtMask (CodeGenFunction &CGF, Value *Op, llvm::Type *DstTy) |
static Value * | EmitX86CvtF16ToFloatExpr (CodeGenFunction &CGF, ArrayRef< Value * > Ops, llvm::Type *DstTy) |
static Value * | loadRISCVFeatureBits (unsigned Index, CGBuilderTy &Builder, CodeGenModule &CGM) |
static Intrinsic::ID | getDotProductIntrinsic (CGHLSLRuntime &RT, QualType QT) |
static Intrinsic::ID | getFirstBitHighIntrinsic (CGHLSLRuntime &RT, QualType QT) |
static Value * | EmitSystemZIntrinsicWithCC (CodeGenFunction &CGF, unsigned IntrinsicID, const CallExpr *E) |
Handle a SystemZ function in which the final argument is a pointer to an int that receives the post-instruction CC value. | |
static std::pair< Intrinsic::ID, unsigned > | getIntrinsicForHexagonNonClangBuiltin (unsigned BuiltinID) |
Variables | |
static const ARMVectorIntrinsicInfo | ARMSIMDIntrinsicMap [] |
static const ARMVectorIntrinsicInfo | AArch64SIMDIntrinsicMap [] |
static const ARMVectorIntrinsicInfo | AArch64SISDIntrinsicMap [] |
static const std::pair< unsigned, unsigned > | NEONEquivalentIntrinsicMap [] |
static const ARMVectorIntrinsicInfo | AArch64SVEIntrinsicMap [] |
static const ARMVectorIntrinsicInfo | AArch64SMEIntrinsicMap [] |
static bool | NEONSIMDIntrinsicsProvenSorted = false |
static bool | AArch64SIMDIntrinsicsProvenSorted = false |
static bool | AArch64SISDIntrinsicsProvenSorted = false |
static bool | AArch64SVEIntrinsicsProvenSorted = false |
static bool | AArch64SMEIntrinsicsProvenSorted = false |
constexpr unsigned | SVEBitsPerBlock = 128 |
#define CUSTOM_BUILTIN | ( | Name, | |
Intr, | |||
Types, | |||
Acc, | |||
Feature | |||
) |
#define CUSTOM_BUILTIN | ( | Name, | |
Intr, | |||
Types, | |||
Accumulate, | |||
Feature | |||
) | case PPC::BI__builtin_##Name: |
#define CUSTOM_BUILTIN_MAPPING | ( | x, | |
s | |||
) | { Hexagon::BI__builtin_HEXAGON_##x, Intrinsic::hexagon_##x, s }, |
#define GET_SME_LLVM_INTRINSIC_MAP |
#define GET_SVE_LLVM_INTRINSIC_MAP |
#define INTRINSIC_WITH_CC | ( | NAME | ) |
#define INTRINSIC_X86_XSAVE_ID | ( | NAME | ) |
#define MMA_INTR | ( | geom_op_type, | |
layout | |||
) | Intrinsic::nvvm_wmma_##geom_op_type##_##layout##_stride |
Definition at line 20863 of file CGBuiltin.cpp.
#define MMA_LDST | ( | n, | |
geom_op_type | |||
) | { n, MMA_INTR(geom_op_type, col), MMA_INTR(geom_op_type, row) } |
Definition at line 20865 of file CGBuiltin.cpp.
#define MMA_SATF_VARIANTS | ( | geom, | |
type | |||
) |
#define MMA_VARIANTS | ( | geom, | |
type | |||
) |
#define MMA_VARIANTS_B1_AND | ( | geom, | |
type | |||
) |
#define MMA_VARIANTS_B1_XOR | ( | geom, | |
type | |||
) |
#define MMA_VARIANTS_I4 | ( | geom, | |
type | |||
) |
#define MUTATE_LDBL | ( | func | ) |
#define NEONMAP0 | ( | NameBase | ) | { #NameBase, NEON::BI__builtin_neon_ ## NameBase, 0, 0, 0 } |
Definition at line 6948 of file CGBuiltin.cpp.
#define NEONMAP1 | ( | NameBase, | |
LLVMIntrinsic, | |||
TypeModifier | |||
) |
Definition at line 6951 of file CGBuiltin.cpp.
#define NEONMAP2 | ( | NameBase, | |
LLVMIntrinsic, | |||
AltLLVMIntrinsic, | |||
TypeModifier | |||
) |
Definition at line 6955 of file CGBuiltin.cpp.
#define PPC_AIX_FEATURE | ( | NAME, | |
DESC, | |||
SUPPORT_METHOD, | |||
INDEX, | |||
MASK, | |||
COMP_OP, | |||
VALUE | |||
) | .Case(NAME, {SUPPORT_METHOD, INDEX, MASK, COMP_OP, VALUE}) |
#define PPC_CPU | ( | NAME, | |
Linux_SUPPORT_METHOD, | |||
LinuxID, | |||
AIX_SUPPORT_METHOD, | |||
AIXID | |||
) | .Case(NAME, {Linux_SUPPORT_METHOD, LinuxID, AIX_SUPPORT_METHOD, AIXID}) |
#define PPC_LNX_FEATURE | ( | Name, | |
Description, | |||
EnumName, | |||
Bitmask, | |||
FA_WORD | |||
) | .Case(Name, {FA_WORD, Bitmask}) |
#define SMEMAP1 | ( | NameBase, | |
LLVMIntrinsic, | |||
TypeModifier | |||
) |
Definition at line 7962 of file CGBuiltin.cpp.
#define SMEMAP2 | ( | NameBase, | |
TypeModifier | |||
) | { #NameBase, SME::BI__builtin_sme_##NameBase, 0, 0, TypeModifier } |
Definition at line 7968 of file CGBuiltin.cpp.
#define SVEMAP1 | ( | NameBase, | |
LLVMIntrinsic, | |||
TypeModifier | |||
) |
Definition at line 7944 of file CGBuiltin.cpp.
#define SVEMAP2 | ( | NameBase, | |
TypeModifier | |||
) | { #NameBase, SVE::BI__builtin_sve_##NameBase, 0, 0, TypeModifier } |
Definition at line 7950 of file CGBuiltin.cpp.
#define X86_CPU_SUBTYPE | ( | ENUM, | |
STR | |||
) | .Case(STR, {2u, static_cast<unsigned>(llvm::X86::ENUM)}) |
#define X86_CPU_SUBTYPE_ALIAS | ( | ENUM, | |
ALIAS | |||
) | .Case(ALIAS, {2u, static_cast<unsigned>(llvm::X86::ENUM)}) |
#define X86_CPU_TYPE | ( | ENUM, | |
STR | |||
) | .Case(STR, {1u, static_cast<unsigned>(llvm::X86::ENUM)}) |
#define X86_CPU_TYPE_ALIAS | ( | ENUM, | |
ALIAS | |||
) | .Case(ALIAS, {1u, static_cast<unsigned>(llvm::X86::ENUM)}) |
#define X86_VENDOR | ( | ENUM, | |
STRING | |||
) | .Case(STRING, {0u, static_cast<unsigned>(llvm::X86::ENUM)}) |
anonymous enum |
Definition at line 6909 of file CGBuiltin.cpp.
|
strong |
Definition at line 1632 of file CGBuiltin.cpp.
Enumerator | |
---|---|
NormalRead | |
VolatileRead | |
Write |
Definition at line 8900 of file CGBuiltin.cpp.
Checks if using the result of __builtin_object_size(p, From
) in place of __builtin_object_size(p, To
) is correct.
Definition at line 1008 of file CGBuiltin.cpp.
|
static |
Definition at line 9817 of file CGBuiltin.cpp.
References ARMMVEVectorSplat(), and clang::T.
|
static |
Definition at line 9829 of file CGBuiltin.cpp.
References V.
|
static |
Definition at line 9765 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenModule::getIntrinsic(), clang::CodeGen::CodeGenFunction::getTarget(), clang::TargetInfo::isBigEndian(), and V.
|
static |
|
static |
Definition at line 1393 of file CGBuiltin.cpp.
Referenced by EmitX86BitTestIntrinsic().
|
static |
Definition at line 358 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::CGM, E, clang::CodeGen::CodeGenFunction::EmitPointerWithAlignment(), clang::CharUnits::fromQuantity(), clang::CodeGen::Address::getAlignment(), clang::Stmt::getBeginLoc(), clang::CodeGen::CodeGenFunction::getContext(), clang::CodeGen::CodeGenModule::getDiags(), clang::CodeGen::Address::getElementType(), clang::CharUnits::getQuantity(), clang::ASTContext::getTypeSizeInChars(), clang::DiagnosticsEngine::Report(), clang::ASTContext::VoidPtrTy, and clang::CodeGen::Address::withAlignment().
Referenced by EmitAtomicCmpXchgForMSIntrin(), EmitAtomicDecrementValue(), EmitAtomicIncrementValue(), EmitBinaryAtomicPost(), MakeAtomicCmpXchgValue(), and MakeBinaryAtomicValue().
|
static |
Definition at line 1068 of file CGBuiltin.cpp.
References CountCountedByAttrs(), clang::RecordDecl::fields(), clang::Type::getAsRecordDecl(), clang::Type::isRecordType(), and clang::Num.
Referenced by CountCountedByAttrs().
|
static |
Definition at line 9955 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, E, clang::CodeGen::CodeGenFunction::EmitNeonCall(), clang::Function, clang::CodeGen::CodeGenFunction::getContext(), clang::Expr::getIntegerConstantExpr(), clang::CodeGen::CodeGenModule::getIntrinsic(), GetNeonType(), packTBLDVectorList(), clang::Result, and s.
|
static |
Definition at line 2246 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder.
Referenced by EmitOverflowCheckedAbs().
|
static |
Definition at line 8908 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::Call, clang::CodeGen::CodeGenFunction::CGM, clang::Function, clang::CodeGen::CodeGenModule::getIntrinsic(), and clang::CodeGen::CodeGenTypeCache::Int32Ty.
|
static |
Definition at line 568 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CGBuilderTy::CreateAtomicCmpXchg(), clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CGBuilderTy::CreateStore(), E, clang::CodeGen::CodeGenFunction::EmitPointerWithAlignment(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CodeGen::CodeGenFunction::getContext(), clang::CodeGen::CodeGenFunction::getLLVMContext(), clang::CodeGen::CodeGenTypeCache::Int8Ty, clang::Success, clang::ASTContext::toCharUnitsFromBits(), and clang::CodeGen::Address::withElementType().
|
static |
This function should be invoked to emit atomic cmpxchg for Microsoft's _InterlockedCompareExchange* intrinsics which have the following signature: T _InterlockedCompareExchange(T volatile *Destination, T Exchange, T Comparand);.
Whereas the llvm 'cmpxchg' instruction has the following syntax: cmpxchg *Destination, Comparand, Exchange. So we need to swap Comparand and Exchange when invoking CreateAtomicCmpXchg. That is the reason we could not use the above utility function MakeAtomicCmpXchgValue since it expects the arguments to be already swapped.
Definition at line 513 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, CheckAtomicAlignment(), clang::CodeGen::CGBuilderTy::CreateAtomicCmpXchg(), E, clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CodeGen::CodeGenFunction::getContext(), clang::Type::getPointeeType(), clang::Expr::getType(), clang::ASTContext::hasSameUnqualifiedType(), clang::CodeGen::CodeGenTypeCache::IntPtrTy, clang::Type::isPointerType(), and clang::Result.
|
static |
Definition at line 632 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, CheckAtomicAlignment(), clang::CodeGen::CodeGenFunction::ConvertType(), clang::CodeGen::CGBuilderTy::CreateAtomicRMW(), E, clang::Expr::getType(), clang::Type::isPointerType(), and clang::Result.
|
static |
Definition at line 621 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, CheckAtomicAlignment(), clang::CodeGen::CodeGenFunction::ConvertType(), clang::CodeGen::CGBuilderTy::CreateAtomicRMW(), E, clang::Expr::getType(), clang::Type::isPointerType(), and clang::Result.
|
static |
Definition at line 419 of file CGBuiltin.cpp.
References E, clang::CodeGen::RValue::get(), and MakeBinaryAtomicValue().
|
static |
Utility to insert an atomic instruction based Intrinsic::ID and the expression node, where the return value is the result of the operation.
Definition at line 428 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, CheckAtomicAlignment(), clang::CodeGen::CGBuilderTy::CreateAtomicRMW(), E, EmitFromInt(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), EmitToInt(), clang::CodeGen::RValue::get(), clang::CodeGen::CodeGenFunction::getContext(), clang::CodeGen::CodeGenFunction::getLLVMContext(), clang::Type::getPointeeType(), clang::Expr::getType(), clang::ASTContext::getTypeSize(), clang::ASTContext::hasSameUnqualifiedType(), clang::Type::isPointerType(), clang::Result, and clang::T.
|
static |
Definition at line 705 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, E, clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::Function, and clang::CodeGen::CodeGenModule::getIntrinsic().
|
static |
Definition at line 688 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, E, clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::Function, and clang::CodeGen::CodeGenModule::getIntrinsic().
|
static |
Emit a _bittest* intrinsic.
These intrinsics take a pointer to an array of bits and a bit position and read and optionally modify the bit at that position. The position index can be arbitrarily large, i.e. it can be larger than 31 or 63, so we need an indexed load in the general case.
Definition at line 1454 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CGBuilderTy::CreateAtomicRMW(), clang::CodeGen::CGBuilderTy::CreateInBoundsGEP(), clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CGBuilderTy::CreateStore(), E, clang::CodeGen::CodeGenFunction::EmitScalarExpr(), EmitX86BitTestIntrinsic(), getBitTestAtomicOrdering(), clang::CodeGen::CodeGenFunction::getTarget(), clang::TargetInfo::getTriple(), clang::Value::getType(), clang::CodeGen::CodeGenTypeCache::Int8Ty, and clang::CharUnits::One().
|
static |
Definition at line 765 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, E, clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::Function, and clang::CodeGen::CodeGenModule::getIntrinsic().
|
static |
Definition at line 744 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::Function, and clang::CodeGen::CodeGenModule::getIntrinsic().
|
static |
Emit a checked mixed-sign multiply.
This is a cheaper specialization of the generic checked-binop irgen.
Definition at line 2533 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CGBuilderTy::CreateStore(), EmitOverflowIntrinsic(), clang::CodeGen::CodeGenFunction::EmitPointerWithAlignment(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CodeGen::CodeGenFunction::EmitToMemory(), clang::CodeGen::RValue::get(), clang::CodeGen::Address::getElementType(), clang::Type::getPointeeType(), clang::Expr::getType(), isSpecialMixedSignMultiply(), clang::QualType::isVolatileQualified(), clang::Result, clang::Signed, and clang::Unsigned.
|
static |
Definition at line 2487 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CGBuilderTy::CreateStore(), EmitOverflowIntrinsic(), clang::CodeGen::CodeGenFunction::EmitPointerWithAlignment(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CodeGen::CodeGenFunction::EmitToMemory(), clang::CodeGen::RValue::get(), clang::Type::getPointeeType(), clang::Expr::getType(), isSpecialUnsignedMultiplySignedResult(), clang::QualType::isVolatileQualified(), and clang::Result.
|
static |
Definition at line 8045 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::ConvertType(), E, clang::CodeGen::CodeGenFunction::EmitNeonCall(), clang::Function, clang::Expr::getType(), clang::CodeGen::CodeGenFunction::LookupNeonLLVMIntrinsic(), clang::Result, s, and clang::CodeGen::CodeGenTypeCache::SizeTy.
|
static |
EmitFAbs - Emit a call to @llvm.fabs().
Definition at line 839 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::Call, clang::CodeGen::CodeGenFunction::CGM, clang::Function, clang::CodeGen::CodeGenModule::getIntrinsic(), and V.
|
static |
Definition at line 790 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, E, clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::Function, and clang::CodeGen::CodeGenModule::getIntrinsic().
|
static |
Definition at line 820 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::Call, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::ConvertType(), E, clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CodeGen::CodeGenFunction::EmitStoreOfScalar(), clang::CodeGen::CodeGenModule::getIntrinsic(), clang::Type::getPointeeType(), clang::Expr::getType(), and clang::CodeGen::CodeGenFunction::MakeNaturalAlignAddrLValue().
|
static |
Definition at line 347 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::EmitFromMemory(), clang::T, and V.
Referenced by EmitBinaryAtomicPost(), MakeAtomicCmpXchgValue(), and MakeBinaryAtomicValue().
|
static |
Definition at line 2754 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::RValue::get(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::CodeGenModule::getModule(), clang::NamedDecl::getNameAsString(), and clang::CodeGen::CodeGenModule::getTypes().
|
static |
Definition at line 645 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CGBuilderTy::CreateAlignedLoad(), E, clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CodeGen::CodeGenFunction::getContext(), clang::CodeGen::CodeGenFunction::getLLVMContext(), clang::Type::getPointeeType(), clang::CharUnits::getQuantity(), clang::Expr::getType(), and clang::ASTContext::getTypeSizeInChars().
|
static |
Definition at line 657 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CGBuilderTy::CreateAlignedStore(), E, clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CodeGen::CodeGenFunction::getContext(), clang::Type::getPointeeType(), clang::Expr::getType(), and clang::ASTContext::getTypeSizeInChars().
|
static |
Definition at line 893 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::ASTContext::BuiltinInfo, clang::Call, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenModule::DecorateInstructionWithTBAA(), E, clang::CodeGen::CodeGenFunction::EmitCall(), clang::CodeGen::CGCallee::forDirect(), clang::FunctionDecl::getBuiltinID(), clang::CodeGen::CodeGenFunction::getContext(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::CodeGen::CodeGenModule::getTBAAAccessInfo(), clang::Expr::getType(), HasNoIndirectArgumentsOrResults(), clang::ASTContext::IntTy, and clang::Builtin::Context::isConstWithoutErrnoAndExceptions().
|
static |
Definition at line 802 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::ConvertType(), E, clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::Function, clang::CodeGen::CodeGenModule::getIntrinsic(), and clang::Expr::getType().
|
static |
MSVC handles setjmp a bit differently on different platforms.
On every architecture except 32-bit x86, the frame address is passed. On x86, extra parameters can be passed as variadic arguments, but we always pass none.
Definition at line 1590 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenTypeCache::AllocaInt8PtrTy, clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), E, clang::CodeGen::CodeGenFunction::EmitRuntimeCallOrInvoke(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CodeGen::RValue::get(), clang::CodeGen::CodeGenModule::getIntrinsic(), clang::CodeGen::CodeGenFunction::getLLVMContext(), clang::CodeGen::CodeGenFunction::getTarget(), clang::TargetInfo::getTriple(), clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::CodeGenTypeCache::Int8PtrTy, and clang::CodeGen::CodeGenTypeCache::IntTy.
|
static |
Definition at line 411 of file CGBuiltin.cpp.
References E, clang::CodeGen::CodeGenFunction::EmitLoadOfScalar(), clang::CodeGen::CodeGenFunction::EmitPointerWithAlignment(), clang::Expr::getExprLoc(), clang::Expr::getType(), clang::CodeGen::CodeGenFunction::MakeAddrLValue(), and clang::CodeGen::LValue::setNontemporal().
|
static |
Definition at line 400 of file CGBuiltin.cpp.
References E, clang::CodeGen::CodeGenFunction::EmitPointerWithAlignment(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CodeGen::CodeGenFunction::EmitStoreOfScalar(), clang::CodeGen::CodeGenFunction::EmitToMemory(), clang::Expr::getType(), clang::CodeGen::CodeGenFunction::MakeAddrLValue(), and clang::CodeGen::LValue::setNontemporal().
|
static |
Definition at line 2252 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, E, EmitAbs(), clang::CodeGen::CodeGenFunction::EmitCheck(), clang::CodeGen::CodeGenFunction::EmitCheckSourceLocation(), clang::CodeGen::CodeGenFunction::EmitCheckTypeDescriptor(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CodeGen::CodeGenFunction::EmitTrapCheck(), clang::Expr::getExprLoc(), clang::Expr::getType(), clang::Value::getType(), and clang::Result.
|
static |
Emit a call to llvm.
{sadd,uadd,ssub,usub,smul,umul}.with.overflow.* depending on IntrinsicID.
Definition at line 931 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::Function, clang::CodeGen::CodeGenModule::getIntrinsic(), and X.
Referenced by EmitCheckedMixedSignMultiply(), and EmitCheckedUnsignedMultiplySignedResult().
|
static |
Definition at line 1529 of file CGBuiltin.cpp.
References clang::Asm, clang::CodeGen::CodeGenFunction::Builder, E, clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::TargetInfo::getClobbers(), clang::CodeGen::CodeGenFunction::getLLVMContext(), clang::CodeGen::CodeGenFunction::getTarget(), clang::CodeGen::CodeGenTypeCache::Int16Ty, clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::CodeGenTypeCache::Int64Ty, clang::CodeGen::CodeGenTypeCache::Int8Ty, and clang::CodeGen::CodeGenTypeCache::UnqualPtrTy.
|
static |
Definition at line 778 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, E, clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::Function, and clang::CodeGen::CodeGenModule::getIntrinsic().
|
static |
Definition at line 946 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::Call, clang::CodeGen::CodeGenFunction::CGM, clang::Function, and clang::CodeGen::CodeGenModule::getIntrinsic().
|
static |
Definition at line 14638 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, E, EmitX86ScalarSelect(), clang::Function, clang::CodeGen::CodeGenModule::getIntrinsic(), and clang::Value::getType().
|
static |
Emit the computation of the sign bit for a floating point value.
Returns the i1 sign bit value.
Definition at line 848 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::C, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenModule::getLLVMContext(), clang::CodeGen::CodeGenFunction::getTarget(), clang::TargetInfo::isBigEndian(), and V.
|
static |
Definition at line 8929 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::Call, clang::CodeGen::CodeGenFunction::CGM, E, clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CodeGen::CodeGenModule::getIntrinsic(), clang::CodeGen::CodeGenModule::getLLVMContext(), clang::Expr::IgnoreParenCasts(), NormalRead, VolatileRead, and clang::Write.
|
static |
Handle a SystemZ function in which the final argument is a pointer to an int that receives the post-instruction CC value.
At the LLVM level this is represented as a function that returns a {result, cc} pair.
Definition at line 20446 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::Call, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CGBuilderTy::CreateStore(), E, clang::CodeGen::CodeGenFunction::EmitPointerWithAlignment(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::Function, and clang::CodeGen::CodeGenModule::getIntrinsic().
|
static |
Definition at line 6709 of file CGBuiltin.cpp.
References E, clang::CodeGen::CodeGenFunction::EmitAArch64BuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitAMDGPUBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitARMBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitBPFBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitHexagonBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitNVPTXBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitPPCBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitRISCVBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitSystemZBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitWebAssemblyBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitX86BuiltinExpr(), clang::CodeGen::CodeGenFunction::getLangOpts(), clang::CodeGen::CodeGenFunction::getTarget(), and clang::TargetInfo::getTriple().
|
static |
Definition at line 725 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, E, clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::Function, and clang::CodeGen::CodeGenModule::getIntrinsic().
|
static |
Emit the conversions required to turn the given value into an integer of the given size.
Definition at line 336 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::EmitToMemory(), clang::T, and V.
Referenced by EmitBinaryAtomicPost(), MakeAtomicCmpXchgValue(), and MakeBinaryAtomicValue().
|
static |
Definition at line 671 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, E, clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::Function, and clang::CodeGen::CodeGenModule::getIntrinsic().
|
static |
Definition at line 1403 of file CGBuiltin.cpp.
References clang::Asm, bitActionToX86BTCode(), clang::CodeGen::CodeGenFunction::Builder, E, clang::TargetInfo::getClobbers(), clang::CodeGen::CodeGenFunction::getContext(), clang::CodeGen::CodeGenFunction::getLLVMContext(), clang::CodeGen::CodeGenFunction::getTarget(), clang::Expr::getType(), clang::ASTContext::getTypeSize(), and clang::CodeGen::CodeGenTypeCache::Int8Ty.
Referenced by EmitBitTestIntrinsic().
|
static |
Definition at line 14232 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenModule::getIntrinsic(), and getMaskVecValue().
|
static |
Definition at line 14245 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenModule::getIntrinsic(), and getMaskVecValue().
|
static |
Definition at line 14420 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, E, EmitX86Select(), clang::Function, and clang::CodeGen::CodeGenModule::getIntrinsic().
|
static |
Definition at line 14415 of file CGBuiltin.cpp.
References EmitX86MaskedCompare().
|
static |
|
static |
Definition at line 14219 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenModule::getIntrinsic(), and getMaskVecValue().
|
static |
Definition at line 14441 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::C, clang::CodeGen::CodeGenFunction::CGM, E, EmitX86Select(), clang::Function, clang::CodeGen::CodeGenModule::getIntrinsic(), and clang::Value::getType().
|
static |
Definition at line 14271 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::Function, clang::CodeGen::CodeGenModule::getIntrinsic(), and clang::Value::getType().
|
static |
Definition at line 14380 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, EmitX86MaskedCompareResult(), and clang::Signed.
Referenced by EmitX86ConvertToMask().
|
static |
Definition at line 14357 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::C, clang::CodeGen::CodeGenFunction::getLLVMContext(), and getMaskVecValue().
Referenced by EmitX86MaskedCompare().
|
static |
Definition at line 14208 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, and getMaskVecValue().
|
static |
Definition at line 14197 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, and getMaskVecValue().
|
static |
Definition at line 14257 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, and getMaskVecValue().
|
static |
Definition at line 14696 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, and clang::CodeGen::CodeGenTypeCache::Int64Ty.
|
static |
Definition at line 14343 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::C, and clang::Value::getType().
Referenced by EmitScalarFMAExpr().
|
static |
Definition at line 14329 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::C, getMaskVecValue(), and clang::Value::getType().
Referenced by EmitX86ConvertIntToFp(), EmitX86CvtF16ToFloatExpr(), EmitX86FMAExpr(), and EmitX86Ternlog().
|
static |
Definition at line 14753 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, and getMaskVecValue().
|
static |
Definition at line 14725 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, EmitX86Select(), and clang::CodeGen::CodeGenModule::getIntrinsic().
|
static |
Definition at line 14289 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, and clang::Value::getType().
|
static |
Definition at line 976 of file CGBuiltin.cpp.
References clang::Signed.
|
static |
Definition at line 7987 of file CGBuiltin.cpp.
|
static |
Definition at line 1439 of file CGBuiltin.cpp.
Referenced by EmitBitTestIntrinsic().
|
static |
Definition at line 1016 of file CGBuiltin.cpp.
|
static |
Definition at line 19128 of file CGBuiltin.cpp.
References clang::Type::isFloatingType(), clang::Type::isSignedIntegerType(), and clang::Type::isUnsignedIntegerType().
|
static |
Definition at line 19137 of file CGBuiltin.cpp.
References clang::Type::hasSignedIntegerRepresentation(), and clang::Type::hasUnsignedIntegerRepresentation().
|
static |
Definition at line 6824 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenTypeCache::DoubleTy, clang::CodeGen::CodeGenTypeCache::FloatTy, clang::NeonTypeFlags::getEltType(), clang::CodeGen::CodeGenTypeCache::HalfTy, clang::NeonTypeFlags::Int16, clang::NeonTypeFlags::Int32, clang::NeonTypeFlags::Int64, and clang::NeonTypeFlags::isQuad().
|
static |
Definition at line 9724 of file CGBuiltin.cpp.
References E, and clang::Expr::getIntegerConstantExpr().
|
static |
Definition at line 964 of file CGBuiltin.cpp.
References clang::ASTContext::getIntWidth(), clang::Type::isIntegerType(), clang::Type::isSignedIntegerType(), and clang::Signed.
|
static |
Definition at line 22679 of file CGBuiltin.cpp.
References CUSTOM_BUILTIN_MAPPING.
|
static |
Definition at line 14177 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, and clang::Value::getType().
Referenced by EmitX86CompressExpand(), EmitX86CompressStore(), EmitX86ExpandLoad(), EmitX86MaskedCompareResult(), EmitX86MaskedLoad(), EmitX86MaskedStore(), EmitX86MaskLogic(), EmitX86Select(), and EmitX86SExtMask().
|
static |
Definition at line 6783 of file CGBuiltin.cpp.
References clang::NeonTypeFlags::BFloat16, clang::CodeGen::CodeGenTypeCache::BFloatTy, clang::CodeGen::CodeGenTypeCache::DoubleTy, clang::NeonTypeFlags::Float16, clang::NeonTypeFlags::Float32, clang::NeonTypeFlags::Float64, clang::CodeGen::CodeGenTypeCache::FloatTy, clang::NeonTypeFlags::getEltType(), clang::CodeGen::CodeGenTypeCache::HalfTy, clang::NeonTypeFlags::Int16, clang::CodeGen::CodeGenTypeCache::Int16Ty, clang::NeonTypeFlags::Int32, clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::NeonTypeFlags::Int64, clang::CodeGen::CodeGenTypeCache::Int64Ty, clang::NeonTypeFlags::Int8, clang::CodeGen::CodeGenTypeCache::Int8Ty, clang::NeonTypeFlags::isQuad(), clang::NeonTypeFlags::Poly128, clang::NeonTypeFlags::Poly16, clang::NeonTypeFlags::Poly64, and clang::NeonTypeFlags::Poly8.
Referenced by EmitAArch64TblBuiltinExpr().
|
static |
Get the argument type for arguments to os_log_helper.
Definition at line 2286 of file CGBuiltin.cpp.
References clang::C.
|
static |
Definition at line 10243 of file CGBuiltin.cpp.
References SVEBitsPerBlock.
|
static |
Definition at line 212 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenTypeCache::DoubleTy, E, clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::Type::getAs(), clang::CodeGen::CodeGenModule::getTarget(), clang::TargetInfo::getTriple(), clang::Expr::getType(), clang::Type::hasUnsignedIntegerRepresentation(), and clang::Type::isVectorType().
|
static |
Definition at line 101 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::createBasicBlock(), clang::CodeGen::CodeGenFunction::CurFn, E, clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CodeGen::CodeGenTypeCache::FloatTy, clang::Type::getAs(), clang::CodeGen::CodeGenModule::getHLSLRuntime(), clang::CodeGen::CodeGenModule::getTarget(), clang::TargetInfo::getTriple(), clang::Expr::getType(), and clang::CodeGen::CodeGenTypeCache::VoidTy.
|
static |
Definition at line 142 of file CGBuiltin.cpp.
References clang::TargetCXXABI::areArgsDestroyedLeftToRightInCallee(), clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CGBuilderTy::CreateStore(), E, clang::CodeGen::CodeGenFunction::EmitHLSLOutArgExpr(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CodeGen::CodeGenFunction::EmitWritebacks(), clang::CodeGen::LValue::getAddress(), clang::Type::getAs(), clang::TargetInfo::getCXXABI(), clang::CodeGen::CodeGenFunction::getTarget(), clang::CodeGen::CodeGenModule::getTarget(), clang::TargetInfo::getTriple(), clang::Expr::getType(), clang::Value::getType(), clang::CodeGen::CodeGenTypeCache::Int32Ty, and clang::CodeGen::CallArgList::reverseWritebacks().
Return true if BuiltinID is an overloaded Neon intrinsic with an extra argument that specifies the vector type.
Definition at line 8997 of file CGBuiltin.cpp.
|
static |
Checks no arguments or results are passed indirectly in the ABI (i.e.
via a hidden pointer). This is used to check annotating FP libcalls (that could set errno
) with "int" TBAA metadata is safe. If any floating-point arguments are passed indirectly, setup for the call could be incorrectly optimized out.
Definition at line 882 of file CGBuiltin.cpp.
References clang::CodeGen::CGFunctionInfo::arguments(), and clang::CodeGen::CGFunctionInfo::getReturnInfo().
Referenced by emitLibraryCall().
|
static |
Definition at line 78 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CGBuilderTy::CreateMemSet(), clang::CodeGen::CodeGenFunction::getLangOpts(), clang::CodeGen::CodeGenModule::getLLVMContext(), clang::CodeGen::initializationPatternFor(), and clang::CodeGen::CodeGenModule::stopAutoInit().
|
static |
Definition at line 10764 of file CGBuiltin.cpp.
|
static |
Definition at line 10758 of file CGBuiltin.cpp.
|
static |
Determine if a binop is a checked mixed-sign multiply we can specialize.
Definition at line 2521 of file CGBuiltin.cpp.
Referenced by EmitCheckedMixedSignMultiply().
|
static |
Definition at line 2479 of file CGBuiltin.cpp.
Referenced by EmitCheckedUnsignedMultiplySignedResult().
|
static |
Definition at line 15000 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenModule::CreateRuntimeVariable(), and clang::CharUnits::fromQuantity().
|
static |
Utility to insert an atomic cmpxchg instruction.
CGF | The current codegen function. |
E | Builtin call expression to convert to cmpxchg. arg0 - address to operate on arg1 - value to compare with arg2 - new value |
ReturnBool | Specifies whether to return success flag of cmpxchg result or the old value. |
Note: In order to lower Microsoft's _InterlockedCompareExchange* intrinsics invoke the function EmitAtomicCmpXchgForMSIntrin.
Definition at line 473 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, CheckAtomicAlignment(), clang::CodeGen::CodeGenFunction::ConvertType(), clang::CodeGen::CGBuilderTy::CreateAtomicCmpXchg(), E, EmitFromInt(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), EmitToInt(), clang::CodeGen::CodeGenFunction::getContext(), clang::CodeGen::CodeGenFunction::getLLVMContext(), clang::Expr::getType(), clang::ASTContext::getTypeSize(), and clang::T.
|
static |
Utility to insert an atomic instruction based on Intrinsic::ID and the expression node.
Definition at line 376 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, CheckAtomicAlignment(), clang::CodeGen::CGBuilderTy::CreateAtomicRMW(), E, EmitFromInt(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), EmitToInt(), clang::CodeGen::CodeGenFunction::getContext(), clang::CodeGen::CodeGenFunction::getLLVMContext(), clang::Type::getPointeeType(), clang::Expr::getType(), clang::ASTContext::getTypeSize(), clang::ASTContext::hasSameUnqualifiedType(), clang::Type::isPointerType(), clang::Result, and clang::T.
Referenced by EmitBinaryAtomic().
Definition at line 2672 of file CGBuiltin.cpp.
References acos, acosh, asin, asinh, atan, atan2, atanh, cbrt, ceil, copysign, cos, cosh, erf, erfc, exp, exp2, expm1, fabs, fdim, floor, fma, fmax, fmin, fmod, frexp, hypot, ilogb, ldexp, lgamma, llrint, llround, log, log10, log1p, log2, logb, lrint, lround, modf(), MUTATE_LDBL, nan(), nearbyint, nextafter, nexttoward, pow, remainder, remquo, rint, round, scalbln, scalbn, sin, sinh, sqrt, tan, tanh, tgamma, and trunc.
|
static |
Definition at line 9735 of file CGBuiltin.cpp.
References clang::Unsigned, and V.
|
static |
Definition at line 8827 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::EmitNeonCall(), clang::Function, and clang::CodeGen::CodeGenModule::getIntrinsic().
Referenced by EmitAArch64TblBuiltinExpr().
Value * readX18AsPtr | ( | CodeGenFunction & | CGF | ) |
Helper for the read/write/add/inc X18 builtins: read the X18 register and return it as an i8 pointer.
Definition at line 249 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenModule::getIntrinsic(), clang::CodeGen::CodeGenModule::getLLVMContext(), clang::CodeGen::CodeGenTypeCache::Int64Ty, and clang::CodeGen::CodeGenTypeCache::Int8PtrTy.
|
static |
Definition at line 9728 of file CGBuiltin.cpp.
References clang::T, clang::Unsigned, and V.
|
static |
Definition at line 11231 of file CGBuiltin.cpp.
|
static |
Definition at line 1827 of file CGBuiltin.cpp.
|
static |
Definition at line 1676 of file CGBuiltin.cpp.
|
static |
Definition at line 1986 of file CGBuiltin.cpp.
|
static |
Definition at line 2743 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::getTargetHooks(), clang::Result, clang::CodeGen::TargetCodeGenInfo::testFPKind(), and V.
|
static |
Determine if the specified type requires laundering by checking if it is a dynamic class type or contains a subobject which is a dynamic class type.
Definition at line 2649 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::CodeGenModule::getContext(), and TypeRequiresBuiltinLaunderImp().
|
static |
Definition at line 2621 of file CGBuiltin.cpp.
References clang::ASTContext::getAsArrayType(), clang::Type::getAsCXXRecordDecl(), clang::ASTContext::getBaseElementType(), and TypeRequiresBuiltinLaunderImp().
Referenced by TypeRequiresBuiltinLaunder(), and TypeRequiresBuiltinLaunderImp().
|
static |
Definition at line 9791 of file CGBuiltin.cpp.
References V.
|
static |
Definition at line 9802 of file CGBuiltin.cpp.
|
static |
Definition at line 7279 of file CGBuiltin.cpp.
Definition at line 7981 of file CGBuiltin.cpp.
|
static |
Definition at line 7554 of file CGBuiltin.cpp.
Definition at line 7982 of file CGBuiltin.cpp.
|
static |
Definition at line 7970 of file CGBuiltin.cpp.
Definition at line 7984 of file CGBuiltin.cpp.
|
static |
Definition at line 7952 of file CGBuiltin.cpp.
Definition at line 7983 of file CGBuiltin.cpp.
|
static |
Definition at line 6960 of file CGBuiltin.cpp.
Definition at line 7794 of file CGBuiltin.cpp.
Definition at line 7979 of file CGBuiltin.cpp.
|
constexpr |
Definition at line 10241 of file CGBuiltin.cpp.
Referenced by getSVEVectorForElementType().