25#define GET_TARGET_LIBRARY_INFO_STRING_TABLE
26#include "llvm/Analysis/TargetLibraryInfo.inc"
29 assert(!VectorFnName.empty() &&
"Vector function name must not be empty.");
32 Out << VABIPrefix <<
"_" << ScalarFnName <<
"(" << VectorFnName <<
")";
33 return std::string(Out.str());
36#define GET_TARGET_LIBRARY_INFO_SIGNATURE_TABLE
37#include "llvm/Analysis/TargetLibraryInfo.inc"
48 if (
T.isMacOSX() &&
T.isMacOSXVersionLT(10, 9))
51 if (
T.isiOS() &&
T.isOSVersionLT(7, 0))
61 return TT.isGNUEnvironment() || TT.isMusl();
64 return TT.isOSFreeBSD() || TT.isOSSolaris();
83 if (!FuncTy->getReturnType()->isPointerTy() &&
84 !FuncTy->getReturnType()->isIntegerTy() &&
85 !FuncTy->getReturnType()->isVoidTy())
88 for (
auto *Param : FuncTy->params()) {
89 if (!Param->isPointerTy() && !Param->isIntegerTy())
105 return ::isCallingConvCCompatible(
F->getCallingConv(),
106 F->getParent()->getTargetTriple(),
107 F->getFunctionType());
111 bool &ShouldExtI32Return,
112 bool &ShouldSignExtI32Param,
113 bool &ShouldSignExtI32Return,
116 ShouldExtI32Param, ShouldExtI32Return, ShouldSignExtI32Param,
117 ShouldSignExtI32Return,
T);
121 bool &ShouldZExtBoolReturn,
124 ShouldZExtBoolParam, ShouldZExtBoolReturn,
T);
128 bool ShouldExtI32Param, ShouldExtI32Return;
129 bool ShouldSignExtI32Param, ShouldSignExtI32Return;
131 ShouldExtI32Param, ShouldExtI32Return, ShouldSignExtI32Param,
132 ShouldSignExtI32Return,
T);
187 if (
T.isMacOSXVersionLT(10, 5)) {
192 }
else if (
T.isiOS()) {
193 if (
T.isOSVersionLT(3, 0)) {
198 }
else if (!
T.isWatchOS()) {
219 !
T.isMacOSXVersionLT(10, 7)) {
244 if (
T.isOSWindows() && !
T.isOSCygMing()) {
250 bool hasPartialC99 =
true;
251 if (
T.isKnownWindowsMSVCEnvironment()) {
253 hasPartialC99 = (Version.getMajor() == 0 || Version.getMajor() >= 19);
259 bool hasPartialFloat = (isARM ||
263 if (!hasPartialFloat) {
322 if (!hasPartialC99) {
423 if (
T.isOSWindows() && !
T.isWindowsCygwinEnvironment()) {
465 if (
T.isOSMSVCRT()) {
503 TLI.
setUnavailable(LibFunc_ZnwmSt11align_val_tRKSt9nothrow_t12__hot_cold_t);
506 TLI.
setUnavailable(LibFunc_ZnamSt11align_val_tRKSt9nothrow_t12__hot_cold_t);
541 if (
T.isMacOSXVersionLT(10, 9)) {
554 if (!
T.isWatchOS() &&
555 (
T.isOSVersionLT(7, 0) || (
T.isOSVersionLT(9, 0) &&
T.isX86()))) {
617 if (!
T.isOSFreeBSD()) {
625 if (!
T.isOSLinux() || !
T.isGNUEnvironment()) {
633 if (!
T.isAndroid() && !
T.isMusl())
697 if ((
T.isOSLinux() &&
T.isGNUEnvironment()) ||
698 (
T.isAndroid() && !
T.isAndroidVersionLT(28))) {
840 if (
T.isOSFreeBSD()) {
923 return T.isOSDarwin() ||
T.isAndroid() ||
T.isGNUEnvironment() ||
933 memset(AvailableArray, -1,
sizeof(AvailableArray));
935 initialize(*
this,
T, StandardNamesStrTable, VecLib);
939 : CustomNames(TLI.CustomNames), ShouldExtI32Param(TLI.ShouldExtI32Param),
940 ShouldExtI32Return(TLI.ShouldExtI32Return),
941 ShouldSignExtI32Param(TLI.ShouldSignExtI32Param),
942 ShouldSignExtI32Return(TLI.ShouldSignExtI32Return),
943 SizeOfInt(TLI.SizeOfInt), IsErrnoFunctionCall(TLI.IsErrnoFunctionCall) {
944 memcpy(AvailableArray, TLI.AvailableArray,
sizeof(AvailableArray));
945 VectorDescs = TLI.VectorDescs;
946 ScalarDescs = TLI.ScalarDescs;
950 : CustomNames(
std::
move(TLI.CustomNames)),
951 ShouldExtI32Param(TLI.ShouldExtI32Param),
952 ShouldExtI32Return(TLI.ShouldExtI32Return),
953 ShouldSignExtI32Param(TLI.ShouldSignExtI32Param),
954 ShouldSignExtI32Return(TLI.ShouldSignExtI32Return),
955 SizeOfInt(TLI.SizeOfInt), IsErrnoFunctionCall(TLI.IsErrnoFunctionCall) {
956 std::move(std::begin(TLI.AvailableArray), std::end(TLI.AvailableArray),
958 VectorDescs = TLI.VectorDescs;
959 ScalarDescs = TLI.ScalarDescs;
963 CustomNames = TLI.CustomNames;
964 ShouldExtI32Param = TLI.ShouldExtI32Param;
965 ShouldExtI32Return = TLI.ShouldExtI32Return;
966 ShouldSignExtI32Param = TLI.ShouldSignExtI32Param;
967 ShouldSignExtI32Return = TLI.ShouldSignExtI32Return;
968 SizeOfInt = TLI.SizeOfInt;
969 IsErrnoFunctionCall = TLI.IsErrnoFunctionCall;
970 memcpy(AvailableArray, TLI.AvailableArray,
sizeof(AvailableArray));
975 CustomNames = std::move(TLI.CustomNames);
976 ShouldExtI32Param = TLI.ShouldExtI32Param;
977 ShouldExtI32Return = TLI.ShouldExtI32Return;
978 ShouldSignExtI32Param = TLI.ShouldSignExtI32Param;
979 ShouldSignExtI32Return = TLI.ShouldSignExtI32Return;
980 SizeOfInt = TLI.SizeOfInt;
981 IsErrnoFunctionCall = TLI.IsErrnoFunctionCall;
982 std::move(std::begin(TLI.AvailableArray), std::end(TLI.AvailableArray),
1002 Indices.
reserve(LibFunc::NumLibFuncs);
1003 for (
const auto &Func : StandardNames)
1004 Indices[Func] =
static_cast<LibFunc
>(Idx++);
1010 if (funcName.
empty())
1016 if (
auto Loc = Indices.
find(funcName);
Loc != Indices.
end())
1024 unsigned SizeTBits) {
1027 return Ty->isVoidTy();
1029 return Ty->isIntegerTy(8);
1031 return Ty->isIntegerTy(16);
1033 return Ty->isIntegerTy(32);
1035 return Ty->isIntegerTy(IntBits);
1037 return Ty->isIntegerTy() && Ty->getPrimitiveSizeInBits() >= IntBits;
1039 return Ty->isIntegerTy();
1042 return Ty->isIntegerTy() && Ty->getPrimitiveSizeInBits() >= IntBits;
1044 return Ty->isIntegerTy(64);
1046 return Ty->isIntegerTy(64);
1049 return Ty->isIntegerTy(SizeTBits);
1051 return Ty->isFloatTy();
1053 return Ty->isDoubleTy();
1056 return Ty->isFloatingPointTy();
1058 return Ty->isFloatingPointTy();
1060 return Ty->isPointerTy();
1062 return Ty->isStructTy();
1072 int SizeTSizeBits) {
1074 case LibFunc_size_returning_new: {
1075 if (FTy.getNumParams() != 1 ||
1076 !FTy.getParamType(0)->isIntegerTy(SizeTSizeBits)) {
1080 case LibFunc_size_returning_new_hot_cold: {
1081 if (FTy.getNumParams() != 2 ||
1082 !FTy.getParamType(0)->isIntegerTy(SizeTSizeBits) ||
1083 !FTy.getParamType(1)->isIntegerTy(8)) {
1087 case LibFunc_size_returning_new_aligned: {
1088 if (FTy.getNumParams() != 2 ||
1089 !FTy.getParamType(0)->isIntegerTy(SizeTSizeBits) ||
1090 !FTy.getParamType(1)->isIntegerTy(SizeTSizeBits)) {
1094 case LibFunc_size_returning_new_aligned_hot_cold:
1095 if (FTy.getNumParams() != 3 ||
1096 !FTy.getParamType(0)->isIntegerTy(SizeTSizeBits) ||
1097 !FTy.getParamType(1)->isIntegerTy(SizeTSizeBits) ||
1098 !FTy.getParamType(2)->isIntegerTy(8)) {
1106 auto &Context = M.getContext();
1109 Type *RetTy = FTy.getReturnType();
1117bool TargetLibraryInfoImpl::isValidProtoForLibFunc(
const FunctionType &FTy,
1120 unsigned NumParams = FTy.getNumParams();
1126 case LibFunc_cabsl: {
1127 Type *RetTy = FTy.getReturnType();
1131 Type *ParamTy = FTy.getParamType(0);
1138 else if (NumParams == 2)
1139 return ParamTy == RetTy && FTy.getParamType(1) == RetTy;
1145 case LibFunc_sincos_stret:
1146 case LibFunc_sincosf_stret:
1147 case LibFunc_sincospi_stret:
1148 case LibFunc_sincospif_stret: {
1152 Type *RetTy = FTy.getReturnType();
1153 Type *ParamTy = FTy.getParamType(0);
1155 if (Ty->getNumElements() != 2)
1157 return (Ty->getElementType(0) == ParamTy &&
1158 Ty->getElementType(1) == ParamTy);
1162 if (Ty->getNumElements() != 2)
1164 return Ty->getElementType() == ParamTy;
1171 case LibFunc_size_returning_new:
1172 case LibFunc_size_returning_new_hot_cold:
1173 case LibFunc_size_returning_new_aligned:
1174 case LibFunc_size_returning_new_aligned_hot_cold:
1187 Type *Ty = FTy.getReturnType(), *LastTy = Ty;
1188 const auto *ProtoTypes = &SignatureTable[SignatureOffset[
F]];
1189 for (
auto TyID = ProtoTypes[Idx]; TyID != NoFuncArgType;
1190 TyID = ProtoTypes[++
Idx]) {
1191 if (TyID == NoFuncArgType)
1194 if (TyID == Ellip) {
1198 assert(ProtoTypes[Idx] == NoFuncArgType ||
1199 ProtoTypes[Idx + 1] == NoFuncArgType);
1200 return FTy.isFunctionVarArg();
1204 assert(Idx != 0 &&
"Type ID 'Same' must not be first!");
1208 if (!Ty || !
matchType(TyID, Ty, IntBits, SizeTBits))
1213 if (Idx == NumParams) {
1220 Ty = FTy.getParamType(Idx);
1225 return Idx == NumParams + 1 && !FTy.isFunctionVarArg();
1236 assert(M &&
"Expecting FDecl to be connected to a Module.");
1238 if (FDecl.LibFuncCache == Function::UnknownLibFunc)
1241 if (FDecl.LibFuncCache == NotLibFunc)
1244 if (!isValidProtoForLibFunc(*FDecl.
getFunctionType(), FDecl.LibFuncCache, *M))
1247 return FDecl.LibFuncCache;
1252 if (Opcode != Instruction::FRem || (!Ty->isDoubleTy() && !Ty->isFloatTy()))
1255 return Ty->isDoubleTy() ? LibFunc_fmod : LibFunc_fmodf;
1259 memset(AvailableArray, 0,
sizeof(AvailableArray));
1263 return LHS.getScalarFnName() <
RHS.getScalarFnName();
1267 return LHS.getVectorFnName() <
RHS.getVectorFnName();
1271 return LHS.getScalarFnName() < S;
1289#define TLI_DEFINE_ACCELERATE_VECFUNCS
1290#include "llvm/Analysis/VecFuncs.def"
1291#undef TLI_DEFINE_ACCELERATE_VECFUNCS
1295#define TLI_DEFINE_DARWIN_LIBSYSTEM_M_VECFUNCS
1296#include "llvm/Analysis/VecFuncs.def"
1297#undef TLI_DEFINE_DARWIN_LIBSYSTEM_M_VECFUNCS
1301#define TLI_DEFINE_LIBMVEC_X86_VECFUNCS
1302#include "llvm/Analysis/VecFuncs.def"
1303#undef TLI_DEFINE_LIBMVEC_X86_VECFUNCS
1307#define TLI_DEFINE_LIBMVEC_AARCH64_VECFUNCS
1308#define TLI_DEFINE_VECFUNC(SCAL, VEC, VF, MASK, VABI_PREFIX, CC) \
1309 {SCAL, VEC, VF, MASK, VABI_PREFIX, CC},
1310#include "llvm/Analysis/VecFuncs.def"
1311#undef TLI_DEFINE_LIBMVEC_AARCH64_VECFUNCS
1315#define TLI_DEFINE_MASSV_VECFUNCS
1316#include "llvm/Analysis/VecFuncs.def"
1317#undef TLI_DEFINE_MASSV_VECFUNCS
1321#define TLI_DEFINE_SVML_VECFUNCS
1322#include "llvm/Analysis/VecFuncs.def"
1323#undef TLI_DEFINE_SVML_VECFUNCS
1327#define TLI_DEFINE_SLEEFGNUABI_VF2_VECFUNCS
1328#define TLI_DEFINE_VECFUNC(SCAL, VEC, VF, VABI_PREFIX) \
1329 {SCAL, VEC, VF, false, VABI_PREFIX, std::nullopt},
1330#include "llvm/Analysis/VecFuncs.def"
1331#undef TLI_DEFINE_SLEEFGNUABI_VF2_VECFUNCS
1334#define TLI_DEFINE_SLEEFGNUABI_VF4_VECFUNCS
1335#define TLI_DEFINE_VECFUNC(SCAL, VEC, VF, VABI_PREFIX) \
1336 {SCAL, VEC, VF, false, VABI_PREFIX, std::nullopt},
1337#include "llvm/Analysis/VecFuncs.def"
1338#undef TLI_DEFINE_SLEEFGNUABI_VF4_VECFUNCS
1341#define TLI_DEFINE_SLEEFGNUABI_SCALABLE_VECFUNCS
1342#define TLI_DEFINE_VECFUNC(SCAL, VEC, VF, MASK, VABI_PREFIX) \
1343 {SCAL, VEC, VF, MASK, VABI_PREFIX, std::nullopt},
1344#include "llvm/Analysis/VecFuncs.def"
1345#undef TLI_DEFINE_SLEEFGNUABI_SCALABLE_VECFUNCS
1349#define TLI_DEFINE_SLEEFGNUABI_SCALABLE_VECFUNCS_RISCV
1350#define TLI_DEFINE_VECFUNC(SCAL, VEC, VF, MASK, VABI_PREFIX) \
1351 {SCAL, VEC, VF, MASK, VABI_PREFIX, std::nullopt},
1352#include "llvm/Analysis/VecFuncs.def"
1353#undef TLI_DEFINE_SLEEFGNUABI_SCALABLE_VECFUNCS_RISCV
1357#define TLI_DEFINE_ARMPL_VECFUNCS
1358#define TLI_DEFINE_VECFUNC(SCAL, VEC, VF, MASK, VABI_PREFIX, CC) \
1359 {SCAL, VEC, VF, MASK, VABI_PREFIX, CC},
1360#include "llvm/Analysis/VecFuncs.def"
1361#undef TLI_DEFINE_ARMPL_VECFUNCS
1365#define TLI_DEFINE_AMDLIBM_VECFUNCS
1366#define TLI_DEFINE_VECFUNC(SCAL, VEC, VF, MASK, VABI_PREFIX) \
1367 {SCAL, VEC, VF, MASK, VABI_PREFIX, std::nullopt},
1368#include "llvm/Analysis/VecFuncs.def"
1369#undef TLI_DEFINE_AMDLIBM_VECFUNCS
1384 switch (TargetTriple.
getArch()) {
1407 switch (TargetTriple.
getArch()) {
1423 switch (TargetTriple.
getArch()) {
1444 if (funcName.
empty())
1447 std::vector<VecDesc>::const_iterator
I =
1449 return I != VectorDescs.end() &&
StringRef(
I->getScalarFnName()) == funcName;
1467 std::vector<VecDesc>::const_iterator
I =
1469 while (
I != VectorDescs.end() &&
StringRef(
I->getScalarFnName()) ==
F) {
1470 if ((
I->getVectorizationFactor() == VF) && (
I->isMasked() ==
Masked))
1479 if (!BaselineInfoImpl)
1486 M.getModuleFlag(
"wchar_size")))
1501 return M.getDataLayout().getIndexSizeInBits(0);
1522 "Target Library Information",
false,
true)
1535 if (ScalarF.
empty())
1538 std::vector<VecDesc>::const_iterator
I =
1540 while (
I != VectorDescs.end() &&
StringRef(
I->getScalarFnName()) == ScalarF) {
1542 I->getVectorizationFactor().isScalable() ? &ScalableVF : &FixedVF;
1544 *VF =
I->getVectorizationFactor();
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
This file contains the declarations for the subclasses of Constant, which represent the different fla...
This file defines the DenseMap class.
Module.h This file contains the declarations for the Module class.
#define INITIALIZE_PASS(passName, arg, name, cfg, analysis)
This file defines the SmallString class.
static bool hasSinCosPiStret(const Triple &T)
static bool isCallingConvCCompatible(CallingConv::ID CC, const Triple &TT, FunctionType *FuncTy)
static constexpr VecDesc VecFuncs_SLEEFGNUABI_VFScalableRISCV[]
static StringRef sanitizeFunctionName(StringRef funcName)
static constexpr VecDesc VecFuncs_SLEEFGNUABI_VF2[]
static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, const llvm::StringTable &StandardNames, VectorLibrary VecLib)
Initialize the set of available library functions based on the specified target triple.
static constexpr VecDesc VecFuncs_LIBMVEC_X86[]
static bool matchType(FuncArgTypeID ArgTy, const Type *Ty, unsigned IntBits, unsigned SizeTBits)
static constexpr VecDesc VecFuncs_SLEEFGNUABI_VF4[]
static bool hasBcmp(const Triple &TT)
static void initializeLibCalls(TargetLibraryInfoImpl &TLI, const Triple &T, const llvm::StringTable &StandardNames, VectorLibrary VecLib)
Initialize the set of available library functions based on the specified target triple.
static void initializeBase(TargetLibraryInfoImpl &TLI, const Triple &T)
static bool compareByScalarFnName(const VecDesc &LHS, const VecDesc &RHS)
static bool compareByVectorFnName(const VecDesc &LHS, const VecDesc &RHS)
constexpr VecDesc VecFuncs_AMDLIBM[]
static bool initializeIsErrnoFunctionCall(const Triple &T)
static constexpr VecDesc VecFuncs_SVML[]
static DenseMap< StringRef, LibFunc > buildIndexMap(const llvm::StringTable &StandardNames)
static constexpr VecDesc VecFuncs_Accelerate[]
static bool isValidProtoForSizeReturningNew(const FunctionType &FTy, LibFunc F, const Module &M, int SizeTSizeBits)
static constexpr VecDesc VecFuncs_ArmPL[]
static constexpr VecDesc VecFuncs_LIBMVEC_AARCH64[]
static constexpr VecDesc VecFuncs_MASSV[]
static bool compareWithScalarFnName(const VecDesc &LHS, StringRef S)
static constexpr VecDesc VecFuncs_SLEEFGNUABI_VFScalable[]
static constexpr VecDesc VecFuncs_DarwinLibSystemM[]
Represent a constant reference to an array (0 or more elements consecutively in memory),...
static LLVM_ABI ArrayType * get(Type *ElementType, uint64_t NumElements)
This static method is the primary way to construct an ArrayType.
Base class for all callable instructions (InvokeInst and CallInst) Holds everything related to callin...
CallingConv::ID getCallingConv() const
FunctionType * getFunctionType() const
iterator find(const_arg_type_t< KeyT > Val)
void reserve(size_type NumEntries)
Grow the DenseMap so that it can contain at least NumEntries items before resizing again.
static constexpr ElementCount getScalable(ScalarTy MinVal)
static constexpr ElementCount getFixed(ScalarTy MinVal)
Class to represent function types.
FunctionType * getFunctionType() const
Returns the FunctionType for me.
bool isIntrinsic() const
isIntrinsic - Returns true if the function's name starts with "llvm.".
static StringRef dropLLVMManglingEscape(StringRef Name)
If the given string begins with the GlobalValue name mangling escape character '\1',...
Module * getParent()
Get the module that this global value is contained inside of...
LLVM_ABI const Module * getModule() const
Return the module owning the function this instruction belongs to or nullptr it the function does not...
A Module instance is used to store all the information related to an LLVM module.
const Triple & getTargetTriple() const
Get the target triple which is a string describing the target host.
static LLVM_ABI PointerType * get(LLVMContext &C, unsigned AddressSpace)
This constructs an opaque pointer to an object in a numbered address space.
SmallString - A SmallString is just a SmallVector with methods and accessors that make it work better...
Represent a constant reference to a string, i.e.
constexpr bool empty() const
Check if the string is empty.
bool contains(StringRef Other) const
Return true if the given string is a substring of *this, and false otherwise.
A table of densely packed, null-terminated strings indexed by offset.
static LLVM_ABI StructType * get(LLVMContext &Context, ArrayRef< Type * > Elements, bool isPacked=false)
This static method is the primary way to create a literal StructType.
LLVM_ABI TargetLibraryInfo run(const Function &F, FunctionAnalysisManager &)
Implementation of the target library information.
void setShouldExtI32Param(bool Val)
Set to true iff i32 parameters to library functions should have signext or zeroext attributes if they...
void setShouldExtI32Return(bool Val)
Set to true iff i32 results from library functions should have signext or zeroext attributes if they ...
LLVM_ABI unsigned getWCharSize(const Module &M) const
Returns the size of the wchar_t type in bytes.
LLVM_ABI void getWidestVF(StringRef ScalarF, ElementCount &FixedVF, ElementCount &Scalable) const
Returns the largest vectorization factor used in the list of vector functions.
bool isFunctionVectorizable(StringRef F, const ElementCount &VF) const
Return true if the function F has a vector equivalent with vectorization factor VF.
void setShouldSignExtI32Param(bool Val)
Set to true iff i32 parameters to library functions should have signext attribute if they correspond ...
void setAvailableWithName(LibFunc F, StringRef Name)
Forces a function to be marked as available and provide an alternate name that must be used.
TargetLibraryInfoImpl()=delete
unsigned getIntSize() const
Get size of a C-level int or unsigned int, in bits.
LLVM_ABI void addVectorizableFunctionsFromVecLib(enum VectorLibrary VecLib, const llvm::Triple &TargetTriple)
Calls addVectorizableFunctions with a known preset of functions for the given vector library.
void setIntSize(unsigned Bits)
Initialize the C-level size of an integer.
LLVM_ABI unsigned getSizeTSize(const Module &M) const
Returns the size of the size_t type in bits.
LLVM_ABI void addVectorizableFunctions(ArrayRef< VecDesc > Fns)
Add a set of scalar -> vector mappings, queryable via getVectorizedFunction and getScalarizedFunction...
LLVM_ABI const VecDesc * getVectorMappingInfo(StringRef F, const ElementCount &VF, bool Masked) const
Return a pointer to a VecDesc object holding all info for scalar to vector mappings in TLI for the eq...
static LLVM_ABI bool isCallingConvCCompatible(CallBase *CI)
Returns true if call site / callee has cdecl-compatible calling conventions.
void setShouldSignExtI32Return(bool Val)
Set to true iff i32 results from library functions should have signext attribute if they correspond t...
LLVM_ABI TargetLibraryInfoImpl & operator=(const TargetLibraryInfoImpl &TLI)
LLVM_ABI void disableAllFunctions()
Disables all builtins.
void setUnavailable(LibFunc F)
Forces a function to be marked as unavailable.
LLVM_ABI LibFunc getLibFunc(StringRef funcName) const
Searches for a particular function name.
LLVM_ABI StringRef getVectorizedFunction(StringRef F, const ElementCount &VF, bool Masked) const
Return the name of the equivalent of F, vectorized with factor VF.
void setAvailable(LibFunc F)
Forces a function to be marked as available.
TargetLibraryInfoWrapperPass()
The default constructor should not be used and is only for pass manager initialization purposes.
Provides information about what library functions are available for the current target.
static LLVM_ABI void initBoolExtensionsForTriple(bool &ShouldZExtBoolParam, bool &ShouldZExtBoolReturn, const Triple &T)
static LLVM_ABI void initExtensionsForTriple(bool &ShouldExtI32Param, bool &ShouldExtI32Return, bool &ShouldSignExtI32Param, bool &ShouldSignExtI32Return, const Triple &T)
Triple - Helper class for working with autoconf configuration names.
ArchType getArch() const
Get the parsed architecture type of this triple.
LLVM_ABI unsigned getDefaultWCharSize() const
Returns the default wchar_t size (in bytes) for this target triple.
The instances of the Type class are immutable: once they are created, they are never changed.
bool isArrayTy() const
True if this is an instance of ArrayType.
Type * getArrayElementType() const
LLVM_ABI uint64_t getArrayNumElements() const
bool isFloatingPointTy() const
Return true if this is one of the floating-point types.
static LLVM_ABI IntegerType * getIntNTy(LLVMContext &C, unsigned N)
LLVM_ABI StringRef getName() const
Return a constant reference to the value's name.
Provides info so a possible vectorization of a function can be computed.
LLVM_ABI std::string getVectorFunctionABIVariantString() const
Returns a vector function ABI variant string on the form: ZGV<isa><mask><vlen><vparams><scalarname>(<...
StringRef getVectorFnName() const
Represents a version number in the form major[.minor[.subminor[.build]]].
static constexpr bool isKnownGT(const FixedOrScalableQuantity &LHS, const FixedOrScalableQuantity &RHS)
A raw_ostream that writes to an SmallVector or SmallString.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
@ ARM_APCS
ARM Procedure Calling Standard (obsolete, but still used on some targets).
@ ARM_AAPCS
ARM Architecture Procedure Calling Standard calling convention (aka EABI).
@ ARM_AAPCS_VFP
Same as ARM_AAPCS, but uses hard floating point ABI.
@ C
The default llvm calling convention, compatible with C.
This is an optimization pass for GlobalISel generic memory operations.
decltype(auto) dyn_cast(const From &Val)
dyn_cast<X> - Return the argument parameter cast to the specified type.
void append_range(Container &C, Range &&R)
Wrapper function to append range R to container C.
auto cast_or_null(const Y &Val)
void sort(IteratorTy Start, IteratorTy End)
auto lower_bound(R &&Range, T &&Value)
Provide wrappers to std::lower_bound which take ranges instead of having to pass begin/end explicitly...
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
decltype(auto) cast(const From &Val)
cast<X> - Return the argument parameter cast to the specified type.
VectorLibrary
List of known vector-functions libraries.
AnalysisManager< Function > FunctionAnalysisManager
Convenience typedef for the Function analysis manager.
Implement std::hash so that hash_code can be used in STL containers.
A special type used by analysis passes to provide an address that identifies that particular analysis...
static LLVM_ABI void initExtensionsForTriple(bool &ShouldExtI32Param, bool &ShouldExtI32Return, bool &ShouldSignExtI32Param, bool &ShouldSignExtI32Return, const Triple &T)
Determine the extension attributes needed for i32 parameters and returns corresponding to C-level int...
static LLVM_ABI void initBoolExtensionsForTriple(bool &ShouldZExtBoolParam, bool &ShouldZExtBoolReturn, const Triple &T)
Determine whether bool parameters and returns need zeroext on T.