|
clang 22.0.0git
|
#include "ABIInfo.h"#include "CGBuiltin.h"#include "CGDebugInfo.h"#include "TargetInfo.h"#include "clang/Basic/TargetBuiltins.h"#include "llvm/IR/InlineAsm.h"#include "llvm/IR/IntrinsicsAArch64.h"#include "llvm/IR/IntrinsicsARM.h"#include "llvm/IR/IntrinsicsBPF.h"#include "llvm/TargetParser/AArch64TargetParser.h"#include <numeric>#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"Go to the source code of this file.
Macros | |
| #define | NEONMAP0(NameBase) |
| #define | NEONMAP1(NameBase, LLVMIntrinsic, TypeModifier) |
| #define | NEONMAP2(NameBase, LLVMIntrinsic, AltLLVMIntrinsic, TypeModifier) |
| #define | SVEMAP1(NameBase, LLVMIntrinsic, TypeModifier) |
| #define | SVEMAP2(NameBase, TypeModifier) |
| #define | GET_SVE_LLVM_INTRINSIC_MAP |
| #define | SMEMAP1(NameBase, LLVMIntrinsic, TypeModifier) |
| #define | SMEMAP2(NameBase, TypeModifier) |
| #define | GET_SME_LLVM_INTRINSIC_MAP |
Enumerations | |
| enum | { AddRetType = (1 << 0) , Add1ArgType = (1 << 1) , Add2ArgTypes = (1 << 2) , VectorizeRetType = (1 << 3) , VectorizeArgTypes = (1 << 4) , InventFloatType = (1 << 5) , UnsignedAlts = (1 << 6) , Use64BitVectors = (1 << 7) , Use128BitVectors = (1 << 8) , Vectorize1ArgType = Add1ArgType | VectorizeArgTypes , VectorRet = AddRetType | VectorizeRetType , VectorRetGetArgs01 , FpCmpzModifiers } |
| enum | SpecialRegisterAccessKind { NormalRead , VolatileRead , Write } |
Functions | |
| static std::optional< CodeGenFunction::MSVCIntrin > | translateAarch64ToMsvcIntrin (unsigned BuiltinID) |
| static std::optional< CodeGenFunction::MSVCIntrin > | translateArmToMsvcIntrin (unsigned BuiltinID) |
| static Value * | emitCallMaybeConstrainedFPBuiltin (CodeGenFunction &CGF, unsigned IntrinsicID, unsigned ConstrainedIntrinsicID, llvm::Type *Ty, ArrayRef< Value * > Args) |
| static llvm::FixedVectorType * | GetNeonType (CodeGenFunction *CGF, NeonTypeFlags TypeFlags, bool HasFastHalfType=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 * | 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) |
| Value * | readX18AsPtr (CodeGenFunction &CGF) |
| Helper for the read/write/add/inc X18 builtins: read the X18 register and return it as an i8 pointer. | |
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 GET_SME_LLVM_INTRINSIC_MAP |
| #define GET_SVE_LLVM_INTRINSIC_MAP |
| #define NEONMAP0 | ( | NameBase | ) |
| #define NEONMAP1 | ( | NameBase, | |
| LLVMIntrinsic, | |||
| TypeModifier ) |
| #define NEONMAP2 | ( | NameBase, | |
| LLVMIntrinsic, | |||
| AltLLVMIntrinsic, | |||
| TypeModifier ) |
| #define SMEMAP1 | ( | NameBase, | |
| LLVMIntrinsic, | |||
| TypeModifier ) |
| #define SMEMAP2 | ( | NameBase, | |
| TypeModifier ) |
| #define SVEMAP1 | ( | NameBase, | |
| LLVMIntrinsic, | |||
| TypeModifier ) |
| #define SVEMAP2 | ( | NameBase, | |
| TypeModifier ) |
| anonymous enum |
|
static |
Definition at line 3489 of file ARM.cpp.
References ARMMVEVectorSplat(), clang::cast(), and clang::T.
|
static |
|
static |
Definition at line 3437 of file ARM.cpp.
References clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenModule::getIntrinsic(), clang::CodeGen::CodeGenFunction::getTarget(), clang::TargetInfo::isBigEndian(), and V.
|
static |
|
static |
Definition at line 3627 of file ARM.cpp.
References Arch, clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::EmitNeonCall(), clang::CallExpr::getArg(), clang::CodeGen::CodeGenFunction::getContext(), clang::Expr::getIntegerConstantExpr(), clang::CodeGen::CodeGenModule::getIntrinsic(), GetNeonType(), clang::CallExpr::getNumArgs(), packTBLDVectorList(), and s.
Referenced by clang::CodeGen::CodeGenFunction::EmitAArch64BuiltinExpr().
|
static |
Definition at line 342 of file ARM.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, and clang::CodeGen::CodeGenModule::getIntrinsic().
Referenced by clang::CodeGen::CodeGenFunction::EmitAArch64BuiltinExpr(), and clang::CodeGen::CodeGenFunction::EmitCommonNeonBuiltinExpr().
|
static |
Definition at line 1724 of file ARM.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::cast(), clang::CodeGen::CodeGenFunction::ConvertType(), clang::CodeGen::CodeGenFunction::EmitNeonCall(), clang::CallExpr::getArg(), clang::Expr::getType(), getType(), clang::CodeGen::CodeGenFunction::LookupNeonLLVMIntrinsic(), s, and clang::CodeGen::CodeGenTypeCache::SizeTy.
Referenced by clang::CodeGen::CodeGenFunction::EmitAArch64BuiltinExpr().
|
static |
Definition at line 2597 of file ARM.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::Call, clang::cast(), clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CallExpr::getArg(), clang::CodeGen::CodeGenModule::getIntrinsic(), clang::CodeGen::CodeGenModule::getLLVMContext(), clang::Expr::IgnoreParenCasts(), NormalRead, VolatileRead, and Write.
Referenced by clang::CodeGen::CodeGenFunction::EmitAArch64BuiltinExpr(), and clang::CodeGen::CodeGenFunction::EmitARMBuiltinExpr().
|
static |
Definition at line 401 of file ARM.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().
Referenced by clang::CodeGen::CodeGenFunction::EmitAArch64BuiltinExpr(), and clang::CodeGen::CodeGenFunction::EmitCommonNeonBuiltinExpr().
|
static |
Definition at line 3396 of file ARM.cpp.
References clang::Expr::getIntegerConstantExpr(), and Integer.
|
static |
Definition at line 359 of file ARM.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::MFloat8, clang::NeonTypeFlags::Poly128, clang::NeonTypeFlags::Poly16, clang::NeonTypeFlags::Poly64, and clang::NeonTypeFlags::Poly8.
Referenced by clang::CodeGen::CodeGenFunction::EmitAArch64BuiltinExpr(), EmitAArch64TblBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitARMBuiltinExpr(), and clang::CodeGen::CodeGenFunction::EmitCommonNeonBuiltinExpr().
|
static |
Definition at line 3916 of file ARM.cpp.
References SVEBitsPerBlock.
Referenced by clang::CodeGen::CodeGenFunction::EmitAArch64SVEBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitSMELd1St1(), and clang::CodeGen::CodeGenFunction::EmitSVEPrefetchLoad().
Return true if BuiltinID is an overloaded Neon intrinsic with an extra argument that specifies the vector type.
Definition at line 2665 of file ARM.cpp.
Referenced by clang::CodeGen::CodeGenFunction::EmitARMBuiltinExpr().
|
static |
Definition at line 4455 of file ARM.cpp.
Referenced by clang::CodeGen::CodeGenFunction::EmitAArch64SVEBuiltinExpr().
|
static |
Definition at line 4449 of file ARM.cpp.
Referenced by clang::CodeGen::CodeGenFunction::EmitAArch64SVEBuiltinExpr().
|
static |
Definition at line 3407 of file ARM.cpp.
References clang::cast(), clang::Unsigned, and V.
|
static |
Definition at line 2515 of file ARM.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::cast(), clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::EmitNeonCall(), clang::CodeGen::CodeGenModule::getIntrinsic(), and getType().
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 5009 of file ARM.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.
Referenced by clang::CodeGen::CodeGenFunction::EmitAArch64BuiltinExpr().
|
static |
Definition at line 3400 of file ARM.cpp.
References clang::T, clang::Unsigned, and V.
|
static |
Definition at line 4916 of file ARM.cpp.
Referenced by clang::CodeGen::CodeGenFunction::EmitAArch64SMEBuiltinExpr().
|
static |
Definition at line 31 of file ARM.cpp.
Referenced by clang::CodeGen::CodeGenFunction::EmitAArch64BuiltinExpr().
|
static |
Definition at line 190 of file ARM.cpp.
Referenced by clang::CodeGen::CodeGenFunction::EmitARMBuiltinExpr().
|
static |
Definition at line 3463 of file ARM.cpp.
References clang::cast(), and V.
|
static |
Definition at line 3474 of file ARM.cpp.
References clang::cast().
|
static |
Definition at line 913 of file ARM.cpp.
Referenced by clang::CodeGen::CodeGenFunction::EmitAArch64BuiltinExpr().
Definition at line 1660 of file ARM.cpp.
Referenced by clang::CodeGen::CodeGenFunction::EmitAArch64BuiltinExpr().
|
static |
Definition at line 1188 of file ARM.cpp.
Referenced by clang::CodeGen::CodeGenFunction::EmitAArch64BuiltinExpr().
Definition at line 1661 of file ARM.cpp.
Referenced by clang::CodeGen::CodeGenFunction::EmitAArch64BuiltinExpr().
|
static |
Definition at line 1649 of file ARM.cpp.
Referenced by clang::CodeGen::CodeGenFunction::EmitAArch64SMEBuiltinExpr().
Definition at line 1663 of file ARM.cpp.
Referenced by clang::CodeGen::CodeGenFunction::EmitAArch64SMEBuiltinExpr().
|
static |
Definition at line 1631 of file ARM.cpp.
Referenced by clang::CodeGen::CodeGenFunction::EmitAArch64SVEBuiltinExpr().
Definition at line 1662 of file ARM.cpp.
Referenced by clang::CodeGen::CodeGenFunction::EmitAArch64SVEBuiltinExpr().
|
static |
Definition at line 594 of file ARM.cpp.
Referenced by clang::CodeGen::CodeGenFunction::EmitARMBuiltinExpr().
Definition at line 1473 of file ARM.cpp.
Referenced by clang::CodeGen::CodeGenFunction::EmitAArch64BuiltinExpr(), and clang::CodeGen::CodeGenFunction::EmitARMBuiltinExpr().
Definition at line 1658 of file ARM.cpp.
Referenced by clang::CodeGen::CodeGenFunction::EmitARMBuiltinExpr().
|
constexpr |
Definition at line 3914 of file ARM.cpp.
Referenced by clang::CodeGen::CodeGenFunction::EmitAArch64SVEBuiltinExpr(), and getSVEVectorForElementType().