24 "No vector functions library"),
26 "Accelerate framework"),
28 "Intel SVML library")));
31 #define TLI_DEFINE_STRING
32 #include "llvm/Analysis/TargetLibraryInfo.def"
63 "TargetLibraryInfoImpl function names must be sorted");
65 bool ShouldExtI32Param =
false, ShouldExtI32Return =
false,
66 ShouldSignExtI32Param =
false;
71 ShouldExtI32Param =
true;
72 ShouldExtI32Return =
true;
78 ShouldSignExtI32Param =
true;
112 }
else if (T.
isiOS()) {
485 memset(AvailableArray, -1,
sizeof(AvailableArray));
492 memset(AvailableArray, -1,
sizeof(AvailableArray));
498 : CustomNames(TLI.CustomNames), ShouldExtI32Param(TLI.ShouldExtI32Param),
499 ShouldExtI32Return(TLI.ShouldExtI32Return),
500 ShouldSignExtI32Param(TLI.ShouldSignExtI32Param) {
501 memcpy(AvailableArray, TLI.AvailableArray,
sizeof(AvailableArray));
502 VectorDescs = TLI.VectorDescs;
503 ScalarDescs = TLI.ScalarDescs;
507 : CustomNames(std::move(TLI.CustomNames)),
508 ShouldExtI32Param(TLI.ShouldExtI32Param),
509 ShouldExtI32Return(TLI.ShouldExtI32Return),
510 ShouldSignExtI32Param(TLI.ShouldSignExtI32Param) {
513 VectorDescs = TLI.VectorDescs;
514 ScalarDescs = TLI.ScalarDescs;
518 CustomNames = TLI.CustomNames;
519 ShouldExtI32Param = TLI.ShouldExtI32Param;
520 ShouldExtI32Return = TLI.ShouldExtI32Return;
521 ShouldSignExtI32Param = TLI.ShouldSignExtI32Param;
522 memcpy(AvailableArray, TLI.AvailableArray,
sizeof(AvailableArray));
527 CustomNames = std::move(TLI.CustomNames);
528 ShouldExtI32Param = TLI.ShouldExtI32Param;
529 ShouldExtI32Return = TLI.ShouldExtI32Return;
530 ShouldSignExtI32Param = TLI.ShouldSignExtI32Param;
549 StringRef const *Start = &StandardNames[0];
553 if (funcName.
empty())
560 if (I != End && *I == funcName) {
567 bool TargetLibraryInfoImpl::isValidProtoForLibFunc(
const FunctionType &FTy,
573 auto IsSizeTTy = [SizeTTy](
Type *Ty) {
574 return SizeTTy ? Ty == SizeTTy : Ty->
isIntegerTy();
584 case LibFunc_strrchr:
592 case LibFunc_strtoul:
593 case LibFunc_strtoll:
594 case LibFunc_strtold:
595 case LibFunc_strtoull:
596 return ((NumParams == 2 || NumParams == 3) &&
604 case LibFunc_strncat:
610 case LibFunc_strcpy_chk:
611 case LibFunc_stpcpy_chk:
622 case LibFunc_strncpy_chk:
623 case LibFunc_stpncpy_chk:
628 case LibFunc_strncpy:
629 case LibFunc_stpncpy:
635 case LibFunc_strxfrm:
644 case LibFunc_strncmp:
651 case LibFunc_strcspn:
656 case LibFunc_strcoll:
657 case LibFunc_strcasecmp:
658 case LibFunc_strncasecmp:
667 case LibFunc_strpbrk:
673 case LibFunc_strtok_r:
677 case LibFunc_setvbuf:
680 case LibFunc_strndup:
685 case LibFunc_statvfs:
686 case LibFunc_siprintf:
687 case LibFunc_sprintf:
690 case LibFunc_snprintf:
693 case LibFunc_setitimer:
706 case LibFunc_memrchr:
716 case LibFunc_memcpy_chk:
717 case LibFunc_memmove_chk:
723 case LibFunc_mempcpy:
724 case LibFunc_memmove:
730 case LibFunc_memset_chk:
741 case LibFunc_memccpy:
743 case LibFunc_memalign:
745 case LibFunc_realloc:
746 case LibFunc_reallocf:
755 case LibFunc_realpath:
760 case LibFunc_readlink:
780 case LibFunc_getpwnam:
781 case LibFunc_iprintf:
787 case LibFunc_under_IO_getc:
789 case LibFunc_unsetenv:
795 case LibFunc_clearerr:
796 case LibFunc_closedir:
797 case LibFunc_ctermid:
803 case LibFunc_flockfile:
806 case LibFunc_fseeko64:
808 case LibFunc_fsetpos:
810 case LibFunc_ftello64:
812 case LibFunc_ftrylockfile:
813 case LibFunc_funlockfile:
815 case LibFunc_getc_unlocked:
816 case LibFunc_getlogin_r:
834 case LibFunc_fstatvfs:
852 case LibFunc_fiprintf:
853 case LibFunc_fprintf:
857 case LibFunc_fgetpos:
860 case LibFunc_getchar:
863 return (NumParams == 1 && FTy.
getParamType(0) == PCharTy);
864 case LibFunc_getitimer:
883 case LibFunc_vsscanf:
886 case LibFunc_vfscanf:
891 case LibFunc_vprintf:
893 case LibFunc_vfprintf:
894 case LibFunc_vsprintf:
897 case LibFunc_vsnprintf:
902 case LibFunc_opendir:
905 case LibFunc_tmpfile:
922 case LibFunc_dunder_strdup:
923 case LibFunc_dunder_strndup:
926 case LibFunc_dunder_strtok_r:
928 case LibFunc_under_IO_putc:
930 case LibFunc_dunder_isoc99_scanf:
933 case LibFunc_lstat64:
934 case LibFunc_statvfs64:
937 case LibFunc_dunder_isoc99_sscanf:
940 case LibFunc_fopen64:
944 case LibFunc_tmpfile64:
946 case LibFunc_fstat64:
947 case LibFunc_fstatvfs64:
951 case LibFunc_gettimeofday:
964 case LibFunc_msvc_new_int:
966 case LibFunc_msvc_new_longlong:
968 case LibFunc_msvc_new_array_int:
970 case LibFunc_msvc_new_array_longlong:
974 case LibFunc_ZnwjRKSt9nothrow_t:
976 case LibFunc_ZnwmRKSt9nothrow_t:
978 case LibFunc_ZnajRKSt9nothrow_t:
980 case LibFunc_ZnamRKSt9nothrow_t:
982 case LibFunc_msvc_new_int_nothrow:
984 case LibFunc_msvc_new_longlong_nothrow:
986 case LibFunc_msvc_new_array_int_nothrow:
988 case LibFunc_msvc_new_array_longlong_nothrow:
996 case LibFunc_msvc_delete_array_ptr32:
998 case LibFunc_msvc_delete_array_ptr64:
1000 case LibFunc_msvc_delete_ptr32:
1002 case LibFunc_msvc_delete_ptr64:
1006 case LibFunc_ZdaPvRKSt9nothrow_t:
1008 case LibFunc_ZdaPvj:
1010 case LibFunc_ZdaPvm:
1012 case LibFunc_ZdlPvRKSt9nothrow_t:
1014 case LibFunc_ZdlPvj:
1016 case LibFunc_ZdlPvm:
1018 case LibFunc_msvc_delete_array_ptr32_int:
1020 case LibFunc_msvc_delete_array_ptr32_nothrow:
1022 case LibFunc_msvc_delete_array_ptr64_longlong:
1024 case LibFunc_msvc_delete_array_ptr64_nothrow:
1026 case LibFunc_msvc_delete_ptr32_int:
1028 case LibFunc_msvc_delete_ptr32_nothrow:
1030 case LibFunc_msvc_delete_ptr64_longlong:
1032 case LibFunc_msvc_delete_ptr64_nothrow:
1035 case LibFunc_memset_pattern16:
1036 return (!FTy.
isVarArg() && NumParams == 3 &&
1041 case LibFunc_cxa_guard_abort:
1042 case LibFunc_cxa_guard_acquire:
1043 case LibFunc_cxa_guard_release:
1044 case LibFunc_nvvm_reflect:
1047 case LibFunc_sincospi_stret:
1048 case LibFunc_sincospif_stret:
1052 case LibFunc_acos_finite:
1054 case LibFunc_acosf_finite:
1056 case LibFunc_acosh_finite:
1057 case LibFunc_acoshf:
1058 case LibFunc_acoshf_finite:
1059 case LibFunc_acoshl:
1060 case LibFunc_acoshl_finite:
1062 case LibFunc_acosl_finite:
1064 case LibFunc_asin_finite:
1066 case LibFunc_asinf_finite:
1068 case LibFunc_asinhf:
1069 case LibFunc_asinhl:
1071 case LibFunc_asinl_finite:
1075 case LibFunc_atanh_finite:
1076 case LibFunc_atanhf:
1077 case LibFunc_atanhf_finite:
1078 case LibFunc_atanhl:
1079 case LibFunc_atanhl_finite:
1090 case LibFunc_cosh_finite:
1092 case LibFunc_coshf_finite:
1094 case LibFunc_coshl_finite:
1097 case LibFunc_exp10_finite:
1098 case LibFunc_exp10f:
1099 case LibFunc_exp10f_finite:
1100 case LibFunc_exp10l:
1101 case LibFunc_exp10l_finite:
1103 case LibFunc_exp2_finite:
1105 case LibFunc_exp2f_finite:
1107 case LibFunc_exp2l_finite:
1109 case LibFunc_exp_finite:
1111 case LibFunc_expf_finite:
1113 case LibFunc_expl_finite:
1115 case LibFunc_expm1f:
1116 case LibFunc_expm1l:
1121 case LibFunc_floorf:
1122 case LibFunc_floorl:
1124 case LibFunc_log10_finite:
1125 case LibFunc_log10f:
1126 case LibFunc_log10f_finite:
1127 case LibFunc_log10l:
1128 case LibFunc_log10l_finite:
1130 case LibFunc_log1pf:
1131 case LibFunc_log1pl:
1133 case LibFunc_log2_finite:
1135 case LibFunc_log2f_finite:
1137 case LibFunc_log2l_finite:
1139 case LibFunc_log_finite:
1144 case LibFunc_logf_finite:
1146 case LibFunc_logl_finite:
1147 case LibFunc_nearbyint:
1148 case LibFunc_nearbyintf:
1149 case LibFunc_nearbyintl:
1154 case LibFunc_roundf:
1155 case LibFunc_roundl:
1159 case LibFunc_sinh_finite:
1161 case LibFunc_sinhf_finite:
1163 case LibFunc_sinhl_finite:
1166 case LibFunc_sqrt_finite:
1168 case LibFunc_sqrtf_finite:
1170 case LibFunc_sqrtl_finite:
1178 case LibFunc_truncf:
1179 case LibFunc_truncl:
1184 case LibFunc_atan2_finite:
1185 case LibFunc_atan2f:
1186 case LibFunc_atan2f_finite:
1187 case LibFunc_atan2l:
1188 case LibFunc_atan2l_finite:
1198 case LibFunc_copysign:
1199 case LibFunc_copysignf:
1200 case LibFunc_copysignl:
1202 case LibFunc_pow_finite:
1204 case LibFunc_powf_finite:
1206 case LibFunc_powl_finite:
1212 case LibFunc_ldexpf:
1213 case LibFunc_ldexpl:
1227 case LibFunc_isdigit:
1228 case LibFunc_isascii:
1229 case LibFunc_toascii:
1230 case LibFunc_putchar:
1240 case LibFunc_cxa_atexit:
1251 case LibFunc_sinpif:
1252 case LibFunc_cospif:
1256 case LibFunc_strnlen:
1261 case LibFunc_posix_memalign:
1266 case LibFunc_wcslen:
1286 memset(AvailableArray, 0,
sizeof(AvailableArray));
1306 VectorDescs.insert(VectorDescs.end(), Fns.
begin(), Fns.
end());
1309 ScalarDescs.insert(ScalarDescs.end(), Fns.
begin(), Fns.
end());
1319 {
"ceilf",
"vceilf", 4},
1320 {
"fabsf",
"vfabsf", 4},
1321 {
"llvm.fabs.f32",
"vfabsf", 4},
1322 {
"floorf",
"vfloorf", 4},
1323 {
"sqrtf",
"vsqrtf", 4},
1324 {
"llvm.sqrt.f32",
"vsqrtf", 4},
1327 {
"expf",
"vexpf", 4},
1328 {
"llvm.exp.f32",
"vexpf", 4},
1329 {
"expm1f",
"vexpm1f", 4},
1330 {
"logf",
"vlogf", 4},
1331 {
"llvm.log.f32",
"vlogf", 4},
1332 {
"log1pf",
"vlog1pf", 4},
1333 {
"log10f",
"vlog10f", 4},
1334 {
"llvm.log10.f32",
"vlog10f", 4},
1335 {
"logbf",
"vlogbf", 4},
1338 {
"sinf",
"vsinf", 4},
1339 {
"llvm.sin.f32",
"vsinf", 4},
1340 {
"cosf",
"vcosf", 4},
1341 {
"llvm.cos.f32",
"vcosf", 4},
1342 {
"tanf",
"vtanf", 4},
1343 {
"asinf",
"vasinf", 4},
1344 {
"acosf",
"vacosf", 4},
1345 {
"atanf",
"vatanf", 4},
1348 {
"sinhf",
"vsinhf", 4},
1349 {
"coshf",
"vcoshf", 4},
1350 {
"tanhf",
"vtanhf", 4},
1351 {
"asinhf",
"vasinhf", 4},
1352 {
"acoshf",
"vacoshf", 4},
1353 {
"atanhf",
"vatanhf", 4},
1360 {
"sin",
"__svml_sin2", 2},
1361 {
"sin",
"__svml_sin4", 4},
1362 {
"sin",
"__svml_sin8", 8},
1364 {
"sinf",
"__svml_sinf4", 4},
1365 {
"sinf",
"__svml_sinf8", 8},
1366 {
"sinf",
"__svml_sinf16", 16},
1368 {
"cos",
"__svml_cos2", 2},
1369 {
"cos",
"__svml_cos4", 4},
1370 {
"cos",
"__svml_cos8", 8},
1372 {
"cosf",
"__svml_cosf4", 4},
1373 {
"cosf",
"__svml_cosf8", 8},
1374 {
"cosf",
"__svml_cosf16", 16},
1376 {
"pow",
"__svml_pow2", 2},
1377 {
"pow",
"__svml_pow4", 4},
1378 {
"pow",
"__svml_pow8", 8},
1380 {
"powf",
"__svml_powf4", 4},
1381 {
"powf",
"__svml_powf8", 8},
1382 {
"powf",
"__svml_powf16", 16},
1384 {
"__pow_finite",
"__svml_pow2", 2 },
1385 {
"__pow_finite",
"__svml_pow4", 4 },
1386 {
"__pow_finite",
"__svml_pow8", 8 },
1388 {
"__powf_finite",
"__svml_powf4", 4 },
1389 {
"__powf_finite",
"__svml_powf8", 8 },
1390 {
"__powf_finite",
"__svml_powf16", 16 },
1392 {
"llvm.pow.f64",
"__svml_pow2", 2},
1393 {
"llvm.pow.f64",
"__svml_pow4", 4},
1394 {
"llvm.pow.f64",
"__svml_pow8", 8},
1396 {
"llvm.pow.f32",
"__svml_powf4", 4},
1397 {
"llvm.pow.f32",
"__svml_powf8", 8},
1398 {
"llvm.pow.f32",
"__svml_powf16", 16},
1400 {
"exp",
"__svml_exp2", 2},
1401 {
"exp",
"__svml_exp4", 4},
1402 {
"exp",
"__svml_exp8", 8},
1404 {
"expf",
"__svml_expf4", 4},
1405 {
"expf",
"__svml_expf8", 8},
1406 {
"expf",
"__svml_expf16", 16},
1408 {
"__exp_finite",
"__svml_exp2", 2 },
1409 {
"__exp_finite",
"__svml_exp4", 4 },
1410 {
"__exp_finite",
"__svml_exp8", 8 },
1412 {
"__expf_finite",
"__svml_expf4", 4 },
1413 {
"__expf_finite",
"__svml_expf8", 8 },
1414 {
"__expf_finite",
"__svml_expf16", 16 },
1416 {
"llvm.exp.f64",
"__svml_exp2", 2},
1417 {
"llvm.exp.f64",
"__svml_exp4", 4},
1418 {
"llvm.exp.f64",
"__svml_exp8", 8},
1420 {
"llvm.exp.f32",
"__svml_expf4", 4},
1421 {
"llvm.exp.f32",
"__svml_expf8", 8},
1422 {
"llvm.exp.f32",
"__svml_expf16", 16},
1424 {
"log",
"__svml_log2", 2},
1425 {
"log",
"__svml_log4", 4},
1426 {
"log",
"__svml_log8", 8},
1428 {
"logf",
"__svml_logf4", 4},
1429 {
"logf",
"__svml_logf8", 8},
1430 {
"logf",
"__svml_logf16", 16},
1432 {
"__log_finite",
"__svml_log2", 2 },
1433 {
"__log_finite",
"__svml_log4", 4 },
1434 {
"__log_finite",
"__svml_log8", 8 },
1436 {
"__logf_finite",
"__svml_logf4", 4 },
1437 {
"__logf_finite",
"__svml_logf8", 8 },
1438 {
"__logf_finite",
"__svml_logf16", 16 },
1440 {
"llvm.log.f64",
"__svml_log2", 2},
1441 {
"llvm.log.f64",
"__svml_log4", 4},
1442 {
"llvm.log.f64",
"__svml_log8", 8},
1444 {
"llvm.log.f32",
"__svml_logf4", 4},
1445 {
"llvm.log.f32",
"__svml_logf8", 8},
1446 {
"llvm.log.f32",
"__svml_logf16", 16},
1458 if (funcName.
empty())
1461 std::vector<VecDesc>::const_iterator
I = std::lower_bound(
1462 VectorDescs.begin(), VectorDescs.end(), funcName,
1464 return I != VectorDescs.end() &&
StringRef(I->ScalarFnName) == funcName;
1468 unsigned VF)
const {
1472 std::vector<VecDesc>::const_iterator
I = std::lower_bound(
1474 while (I != VectorDescs.end() &&
StringRef(I->ScalarFnName) ==
F) {
1475 if (I->VectorizationFactor == VF)
1476 return I->VectorFnName;
1483 unsigned &VF)
const {
1488 std::vector<VecDesc>::const_iterator
I = std::lower_bound(
1490 if (I == VectorDescs.end() ||
StringRef(I->VectorFnName) !=
F)
1492 VF = I->VectorizationFactor;
1493 return I->ScalarFnName;
1514 std::unique_ptr<TargetLibraryInfoImpl> &Impl =
1532 if (
auto *ShortWChar = cast_or_null<ConstantAsMetadata>(
1534 return cast<ConstantInt>(ShortWChar->getValue())->getZExtValue();
1558 "Target Library Information",
false,
true)
OSType getOS() const
getOS - Get the parsed operating system type of this triple.
A parsed version of the target data layout string in and methods for querying it. ...
const_iterator end(StringRef path)
Get end iterator over path.
static bool compareByVectorFnName(const VecDesc &LHS, const VecDesc &RHS)
static std::string normalize(StringRef Str)
normalize - Turn an arbitrary machine specification into the canonical triple form (or something sens...
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
const_iterator begin(StringRef path, Style style=Style::native)
Get begin iterator over path.
void setShouldExtI32Return(bool Val)
Set to true iff i32 results from library functions should have signext or zeroext attributes if they ...
void addVectorizableFunctions(ArrayRef< VecDesc > Fns)
Add a set of scalar -> vector mappings, queryable via getVectorizedFunction and getScalarizedFunction...
A Module instance is used to store all the information related to an LLVM module. ...
unsigned getNumParams() const
Return the number of fixed parameters this function type requires.
static StringRef sanitizeFunctionName(StringRef funcName)
VectorLibrary
List of known vector-functions libraries.
void initializeTargetLibraryInfoWrapperPassPass(PassRegistry &)
bool isMacOSXVersionLT(unsigned Major, unsigned Minor=0, unsigned Micro=0) const
isMacOSXVersionLT - Comparison function for checking OS X version compatibility, which handles suppor...
void setShouldExtI32Param(bool Val)
Set to true iff i32 parameters to library functions should have signext or zeroext attributes if they...
void disableAllFunctions()
Disables all builtins.
TargetLibraryInfoWrapperPass()
static unsigned getTargetWCharSize(const Triple &T)
Returns size of the default wchar_t type on target T.
bool isDoubleTy() const
Return true if this is 'double', a 64-bit IEEE fp type.
Implementation of the target library information.
bool isFunctionVectorizable(StringRef F, unsigned VF) const
Return true if the function F has a vector equivalent with vectorization factor VF.
const std::string & getTargetTriple() const
Get the target triple which is a string describing the target host.
bool isOSWindows() const
Tests whether the OS is Windows.
StringRef getName() const
Return a constant reference to the value's name.
bool isOSCygMing() const
Tests for either Cygwin or MinGW OS.
StringRef getVectorizedFunction(StringRef F, unsigned VF) const
Return the name of the equivalent of F, vectorized with factor VF.
bool isMacOSX() const
isMacOSX - Is this a Mac OS X triple.
bool isOSLinux() const
Tests whether the OS is Linux.
Class to represent function types.
LLVMContext & getContext() const
Return the LLVMContext in which this type was uniqued.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
bool isFloatingPointTy() const
Return true if this is one of the six floating-point types.
ArchType getArch() const
getArch - Get the parsed architecture type of this triple.
void setShouldSignExtI32Param(bool Val)
Set to true iff i32 parameters to library functions should have signext attribute if they correspond ...
TargetLibraryInfo run(Module &M, ModuleAnalysisManager &)
void setUnavailable(LibFunc F)
Forces a function to be marked as unavailable.
ValuesClass values(OptsTy...Options)
Helper to build a ValuesClass by forwarding a variable number of arguments as an initializer list to ...
bool isiOS() const
Is this an iOS triple.
Type * getParamType(unsigned i) const
Parameter type accessors.
initializer< Ty > init(const Ty &Val)
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE size_t find(char C, size_t From=0) const
Search for the first character C in the string.
The instances of the Type class are immutable: once they are created, they are never changed...
This is an important class for using LLVM in a threaded context.
FunctionType * getFunctionType() const
Returns the FunctionType for me.
static cl::opt< TargetLibraryInfoImpl::VectorLibrary > ClVectorLibrary("vector-library", cl::Hidden, cl::desc("Vector functions library"), cl::init(TargetLibraryInfoImpl::NoLibrary), cl::values(clEnumValN(TargetLibraryInfoImpl::NoLibrary,"none","No vector functions library"), clEnumValN(TargetLibraryInfoImpl::Accelerate,"Accelerate","Accelerate framework"), clEnumValN(TargetLibraryInfoImpl::SVML,"SVML","Intel SVML library")))
bool getLibFunc(StringRef funcName, LibFunc &F) const
Searches for a particular function name.
This file contains the declarations for the subclasses of Constant, which represent the different fla...
bool isFloatTy() const
Return true if this is 'float', a 32-bit IEEE fp type.
static bool compareByScalarFnName(const VecDesc &LHS, const VecDesc &RHS)
bool isWatchOS() const
Is this an Apple watchOS triple.
static const unsigned End
bool isPointerTy() const
True if this is an instance of PointerType.
static PointerType * getInt8PtrTy(LLVMContext &C, unsigned AS=0)
Triple - Helper class for working with autoconf configuration names.
#define INITIALIZE_PASS(passName, arg, name, cfg, analysis)
bool isOSDarwin() const
isOSDarwin - Is this a "Darwin" OS (OS X, iOS, or watchOS).
Metadata * getModuleFlag(StringRef Key) const
Return the corresponding value if Key appears in module flags, otherwise return null.
IntegerType * getIntPtrType(LLVMContext &C, unsigned AddressSpace=0) const
Returns an integer type with size at least as big as that of a pointer in the given address space...
static bool hasSinCosPiStret(const Triple &T)
ImmutablePass class - This class is used to provide information that does not need to be run...
Describes a possible vectorization of a function.
Provides information about what library functions are available for the current target.
StringRef getScalarizedFunction(StringRef F, unsigned &VF) const
Return the name of the equivalent of F, scalarized.
TargetLibraryInfoImpl & operator=(const TargetLibraryInfoImpl &TLI)
bool isArch16Bit() const
Test whether the architecture is 16-bit.
void addVectorizableFunctionsFromVecLib(enum VectorLibrary VecLib)
Calls addVectorizableFunctions with a known preset of functions for the given vector library...
static StringRef dropLLVMManglingEscape(StringRef Name)
If the given string begins with the GlobalValue name mangling escape character '\1', drop it.
static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, ArrayRef< StringRef > StandardNames)
initialize - Initialize the set of available library functions based on the specified target triple...
bool isIntegerTy() const
True if this is an instance of IntegerType.
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE bool empty() const
empty - Check if the string is empty.
bool isOSVersionLT(unsigned Major, unsigned Minor=0, unsigned Micro=0) const
isOSVersionLT - Helper function for doing comparisons against version numbers included in the target ...
#define clEnumValN(ENUMVAL, FLAGNAME, DESC)
llvm_unreachable("Unknown RegBank!")
bool isNVPTX() const
Tests whether the target is NVPTX (32- or 64-bit).
const DataLayout & getDataLayout() const
Get the data layout for the module's target platform.
static bool compareWithVectorFnName(const VecDesc &LHS, StringRef S)
Type * getReturnType() const
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
Module * getParent()
Get the module that this global value is contained inside of...
void setAvailableWithName(LibFunc F, StringRef Name)
Forces a function to be marked as available and provide an alternate name that must be used...
#define LLVM_FALLTHROUGH
LLVM_FALLTHROUGH - Mark fallthrough cases in switch statements.
unsigned getWCharSize(const Module &M) const
Returns the size of the wchar_t type in bytes.
StringRef - Represent a constant reference to a string, i.e.
A container for analyses that lazily runs them and caches their results.
void sort(Policy policy, RandomAccessIterator Start, RandomAccessIterator End, const Comparator &Comp=Comparator())
bool isPS4() const
Tests whether the target is the PS4 platform.
void setAvailable(LibFunc F)
Forces a function to be marked as available.
A special type used by analysis passes to provide an address that identifies that particular analysis...
static bool compareWithScalarFnName(const VecDesc &LHS, StringRef S)