LLVM 20.0.0git
|
#include "llvm/Analysis/TargetLibraryInfo.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Module.h"
#include "llvm/InitializePasses.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/TargetParser/Triple.h"
#include "llvm/Analysis/TargetLibraryInfo.def"
#include "llvm/Analysis/VecFuncs.def"
Go to the source code of this file.
Macros | |
#define | TLI_DEFINE_STRING |
#define | TLI_DEFINE_SIG |
#define | TLI_DEFINE_ACCELERATE_VECFUNCS |
#define | TLI_DEFINE_DARWIN_LIBSYSTEM_M_VECFUNCS |
#define | TLI_DEFINE_LIBMVEC_X86_VECFUNCS |
#define | TLI_DEFINE_MASSV_VECFUNCS |
#define | TLI_DEFINE_SVML_VECFUNCS |
#define | TLI_DEFINE_SLEEFGNUABI_VF2_VECFUNCS |
#define | TLI_DEFINE_VECFUNC(SCAL, VEC, VF, VABI_PREFIX) {SCAL, VEC, VF, /* MASK = */ false, VABI_PREFIX}, |
#define | TLI_DEFINE_SLEEFGNUABI_VF4_VECFUNCS |
#define | TLI_DEFINE_VECFUNC(SCAL, VEC, VF, VABI_PREFIX) {SCAL, VEC, VF, /* MASK = */ false, VABI_PREFIX}, |
#define | TLI_DEFINE_SLEEFGNUABI_SCALABLE_VECFUNCS |
#define | TLI_DEFINE_VECFUNC(SCAL, VEC, VF, MASK, VABI_PREFIX) {SCAL, VEC, VF, MASK, VABI_PREFIX}, |
#define | TLI_DEFINE_ARMPL_VECFUNCS |
#define | TLI_DEFINE_VECFUNC(SCAL, VEC, VF, MASK, VABI_PREFIX) {SCAL, VEC, VF, MASK, VABI_PREFIX}, |
#define | TLI_DEFINE_AMDLIBM_VECFUNCS |
#define | TLI_DEFINE_VECFUNC(SCAL, VEC, VF, MASK, VABI_PREFIX) {SCAL, VEC, VF, MASK, VABI_PREFIX}, |
Typedefs | |
typedef std::array< FuncArgTypeID, 8 > | FuncProtoTy |
Enumerations | |
enum | FuncArgTypeID : char { Void = 0 , Bool , Int16 , Int32 , Int , IntPlus , Long , IntX , Int64 , LLong , SizeT , SSizeT , Flt , Dbl , LDbl , Floating , Ptr , Struct , Ellip , Same } |
Variables | |
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::DarwinLibSystemM, "Darwin_libsystem_m", "Darwin libsystem_m"), clEnumValN(TargetLibraryInfoImpl::LIBMVEC_X86, "LIBMVEC-X86", "GLIBC Vector Math library"), clEnumValN(TargetLibraryInfoImpl::MASSV, "MASSV", "IBM MASS vector library"), clEnumValN(TargetLibraryInfoImpl::SVML, "SVML", "Intel SVML library"), clEnumValN(TargetLibraryInfoImpl::SLEEFGNUABI, "sleefgnuabi", "SIMD Library for Evaluating Elementary Functions"), clEnumValN(TargetLibraryInfoImpl::ArmPL, "ArmPL", "Arm Performance Libraries"), clEnumValN(TargetLibraryInfoImpl::AMDLIBM, "AMDLIBM", "AMD vector math library"))) |
static const FuncProtoTy | Signatures [] |
static const VecDesc | VecFuncs_Accelerate [] |
static const VecDesc | VecFuncs_DarwinLibSystemM [] |
static const VecDesc | VecFuncs_LIBMVEC_X86 [] |
static const VecDesc | VecFuncs_MASSV [] |
static const VecDesc | VecFuncs_SVML [] |
static const VecDesc | VecFuncs_SLEEFGNUABI_VF2 [] |
static const VecDesc | VecFuncs_SLEEFGNUABI_VF4 [] |
static const VecDesc | VecFuncs_SLEEFGNUABI_VFScalable [] |
static const VecDesc | VecFuncs_ArmPL [] |
const VecDesc | VecFuncs_AMDLIBM [] |
#define TLI_DEFINE_ACCELERATE_VECFUNCS |
#define TLI_DEFINE_AMDLIBM_VECFUNCS |
#define TLI_DEFINE_ARMPL_VECFUNCS |
#define TLI_DEFINE_DARWIN_LIBSYSTEM_M_VECFUNCS |
#define TLI_DEFINE_LIBMVEC_X86_VECFUNCS |
#define TLI_DEFINE_MASSV_VECFUNCS |
#define TLI_DEFINE_SIG |
#define TLI_DEFINE_SLEEFGNUABI_SCALABLE_VECFUNCS |
#define TLI_DEFINE_SLEEFGNUABI_VF2_VECFUNCS |
#define TLI_DEFINE_SLEEFGNUABI_VF4_VECFUNCS |
#define TLI_DEFINE_STRING |
#define TLI_DEFINE_SVML_VECFUNCS |
#define TLI_DEFINE_VECFUNC | ( | SCAL, | |
VEC, | |||
VF, | |||
MASK, | |||
VABI_PREFIX | |||
) | {SCAL, VEC, VF, MASK, VABI_PREFIX}, |
#define TLI_DEFINE_VECFUNC | ( | SCAL, | |
VEC, | |||
VF, | |||
MASK, | |||
VABI_PREFIX | |||
) | {SCAL, VEC, VF, MASK, VABI_PREFIX}, |
#define TLI_DEFINE_VECFUNC | ( | SCAL, | |
VEC, | |||
VF, | |||
MASK, | |||
VABI_PREFIX | |||
) | {SCAL, VEC, VF, MASK, VABI_PREFIX}, |
#define TLI_DEFINE_VECFUNC | ( | SCAL, | |
VEC, | |||
VF, | |||
VABI_PREFIX | |||
) | {SCAL, VEC, VF, /* MASK = */ false, VABI_PREFIX}, |
#define TLI_DEFINE_VECFUNC | ( | SCAL, | |
VEC, | |||
VF, | |||
VABI_PREFIX | |||
) | {SCAL, VEC, VF, /* MASK = */ false, VABI_PREFIX}, |
typedef std::array<FuncArgTypeID, 8> FuncProtoTy |
Definition at line 83 of file TargetLibraryInfo.cpp.
enum FuncArgTypeID : char |
Enumerator | |
---|---|
Void | |
Bool | |
Int16 | |
Int32 | |
Int | |
IntPlus | |
Long | |
IntX | |
Int64 | |
LLong | |
SizeT | |
SSizeT | |
Flt | |
Dbl | |
LDbl | |
Floating | |
Ptr | |
Struct | |
Ellip | |
Same |
Definition at line 60 of file TargetLibraryInfo.cpp.
|
static |
Definition at line 979 of file TargetLibraryInfo.cpp.
References Idx, llvm::NumLibFuncs, and llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::reserve().
Referenced by llvm::TargetLibraryInfoImpl::getLibFunc().
Definition at line 1240 of file TargetLibraryInfo.cpp.
Referenced by llvm::TargetLibraryInfoImpl::addVectorizableFunctions().
Definition at line 1244 of file TargetLibraryInfo.cpp.
Referenced by llvm::TargetLibraryInfoImpl::addVectorizableFunctions().
Definition at line 1248 of file TargetLibraryInfo.cpp.
References LHS.
Referenced by llvm::TargetLibraryInfoImpl::getVectorMappingInfo(), llvm::TargetLibraryInfoImpl::getWidestVF(), and llvm::TargetLibraryInfoImpl::isFunctionVectorizable().
Definition at line 111 of file TargetLibraryInfo.cpp.
Referenced by initializeLibCalls().
Definition at line 93 of file TargetLibraryInfo.cpp.
References llvm::Triple::x86.
Referenced by initializeLibCalls().
|
static |
Initialize the set of available library functions based on the specified target triple.
This should be carefully written so that a missing target triple gets a sane set of defaults.
Definition at line 901 of file TargetLibraryInfo.cpp.
References initializeBase(), and initializeLibCalls().
Referenced by llvm::OProfileWrapper::op_close_agent(), llvm::OProfileWrapper::op_major_version(), llvm::OProfileWrapper::op_minor_version(), llvm::OProfileWrapper::op_open_agent(), llvm::OProfileWrapper::op_unload_native_code(), llvm::OProfileWrapper::op_write_debug_line_info(), llvm::OProfileWrapper::op_write_native_code(), and llvm::TargetLibraryInfoImpl::TargetLibraryInfoImpl().
|
static |
Definition at line 164 of file TargetLibraryInfo.cpp.
References llvm::TargetLibraryInfo::initExtensionsForTriple(), llvm::TargetLibraryInfoImpl::setIntSize(), llvm::TargetLibraryInfoImpl::setShouldExtI32Param(), llvm::TargetLibraryInfoImpl::setShouldExtI32Return(), llvm::TargetLibraryInfoImpl::setShouldSignExtI32Param(), and llvm::TargetLibraryInfoImpl::setShouldSignExtI32Return().
Referenced by initialize(), and llvm::TargetLibraryInfoImpl::TargetLibraryInfoImpl().
|
static |
Initialize the set of available library functions based on the specified target triple.
This should be carefully written so that a missing target triple gets a sane set of defaults.
Definition at line 184 of file TargetLibraryInfo.cpp.
References llvm::Triple::aarch64, llvm::TargetLibraryInfoImpl::addVectorizableFunctionsFromVecLib(), llvm::Triple::arm, ClVectorLibrary, llvm::Triple::Darwin, llvm::TargetLibraryInfoImpl::disableAllFunctions(), llvm::Triple::Emscripten, llvm::Triple::FreeBSD, hasBcmp(), hasSinCosPiStret(), llvm::Triple::IOS, llvm::Triple::Linux, llvm::Triple::MacOSX, llvm::TargetLibraryInfoImpl::setAvailable(), llvm::TargetLibraryInfoImpl::setAvailableWithName(), llvm::TargetLibraryInfoImpl::setUnavailable(), llvm::Triple::tce, llvm::Triple::TvOS, llvm::Version, llvm::Triple::WatchOS, llvm::Triple::x86, llvm::Triple::x86_64, llvm::Triple::xcore, and llvm::Triple::XROS.
Referenced by initialize().
|
static |
Definition at line 121 of file TargetLibraryInfo.cpp.
References llvm::CallingConv::ARM_AAPCS, llvm::CallingConv::ARM_AAPCS_VFP, llvm::CallingConv::ARM_APCS, llvm::CallingConv::C, and CC.
|
static |
Definition at line 1052 of file TargetLibraryInfo.cpp.
References F, llvm::StructType::get(), llvm::PointerType::get(), and llvm::Type::getIntNTy().
|
static |
Definition at line 1005 of file TargetLibraryInfo.cpp.
References Bool, Dbl, Floating, Flt, llvm::Type::getPrimitiveSizeInBits(), Int, Int16, Int32, Int64, IntPlus, IntX, llvm::Type::isDoubleTy(), llvm::Type::isFloatingPointTy(), llvm::Type::isFloatTy(), llvm::Type::isIntegerTy(), llvm::Type::isPointerTy(), llvm::Type::isStructTy(), llvm::Type::isVoidTy(), LDbl, LLong, llvm_unreachable, Long, Ptr, SizeT, SSizeT, Struct, and Void.
Definition at line 967 of file TargetLibraryInfo.cpp.
References llvm::StringRef::contains(), llvm::GlobalValue::dropLLVMManglingEscape(), and llvm::StringRef::empty().
Referenced by llvm::TargetLibraryInfoImpl::getLibFunc(), llvm::TargetLibraryInfoImpl::getVectorMappingInfo(), llvm::TargetLibraryInfoImpl::getWidestVF(), and llvm::TargetLibraryInfoImpl::isFunctionVectorizable().
|
static |
Referenced by initializeLibCalls().
|
static |
Definition at line 85 of file TargetLibraryInfo.cpp.
Referenced by llvm::BalancedPartitioning::moveGain().
Definition at line 1260 of file TargetLibraryInfo.cpp.
Referenced by llvm::TargetLibraryInfoImpl::addVectorizableFunctionsFromVecLib().
Definition at line 1320 of file TargetLibraryInfo.cpp.
Referenced by llvm::TargetLibraryInfoImpl::addVectorizableFunctionsFromVecLib().
Definition at line 1312 of file TargetLibraryInfo.cpp.
Referenced by llvm::TargetLibraryInfoImpl::addVectorizableFunctionsFromVecLib().
Definition at line 1266 of file TargetLibraryInfo.cpp.
Referenced by llvm::TargetLibraryInfoImpl::addVectorizableFunctionsFromVecLib().
Definition at line 1272 of file TargetLibraryInfo.cpp.
Referenced by llvm::TargetLibraryInfoImpl::addVectorizableFunctionsFromVecLib().
Definition at line 1278 of file TargetLibraryInfo.cpp.
Referenced by llvm::TargetLibraryInfoImpl::addVectorizableFunctionsFromVecLib().
Definition at line 1290 of file TargetLibraryInfo.cpp.
Referenced by llvm::TargetLibraryInfoImpl::addVectorizableFunctionsFromVecLib().
Definition at line 1297 of file TargetLibraryInfo.cpp.
Referenced by llvm::TargetLibraryInfoImpl::addVectorizableFunctionsFromVecLib().
Definition at line 1304 of file TargetLibraryInfo.cpp.
Referenced by llvm::TargetLibraryInfoImpl::addVectorizableFunctionsFromVecLib().
Definition at line 1284 of file TargetLibraryInfo.cpp.
Referenced by llvm::TargetLibraryInfoImpl::addVectorizableFunctionsFromVecLib().