LLVM: llvm::TargetLibraryInfoImpl Class Reference (original) (raw)
Implementation of the target library information. More...
#include "[llvm/Analysis/TargetLibraryInfo.h](TargetLibraryInfo%5F8h%5Fsource.html)"
| Public Member Functions | |
|---|---|
| TargetLibraryInfoImpl ()=delete | |
| LLVM_ABI | TargetLibraryInfoImpl (const Triple &T, VectorLibrary VecLib=VectorLibrary::NoLibrary) |
| LLVM_ABI | TargetLibraryInfoImpl (const TargetLibraryInfoImpl &TLI) |
| LLVM_ABI | TargetLibraryInfoImpl (TargetLibraryInfoImpl &&TLI) |
| LLVM_ABI TargetLibraryInfoImpl & | operator= (const TargetLibraryInfoImpl &TLI) |
| LLVM_ABI TargetLibraryInfoImpl & | operator= (TargetLibraryInfoImpl &&TLI) |
| LLVM_ABI bool | getLibFunc (StringRef funcName, LibFunc &F) const |
| Searches for a particular function name. | |
| LLVM_ABI bool | getLibFunc (const Function &FDecl, LibFunc &F) const |
| Searches for a particular function name, also checking that its type is valid for the library function matching that name. | |
| LLVM_ABI bool | getLibFunc (unsigned int Opcode, Type *Ty, LibFunc &F) const |
| Searches for a function name using an Instruction Opcode. | |
| void | setUnavailable (LibFunc F) |
| Forces a function to be marked as unavailable. | |
| void | setAvailable (LibFunc F) |
| Forces a function to be marked as available. | |
| void | setAvailableWithName (LibFunc F, StringRef Name) |
| Forces a function to be marked as available and provide an alternate name that must be used. | |
| LLVM_ABI void | disableAllFunctions () |
| Disables all builtins. | |
| LLVM_ABI void | addVectorizableFunctions (ArrayRef< VecDesc > Fns) |
| Add a set of scalar -> vector mappings, queryable via getVectorizedFunction and getScalarizedFunction. | |
| LLVM_ABI void | addVectorizableFunctionsFromVecLib (enum VectorLibrary VecLib, const llvm::Triple &TargetTriple) |
| Calls addVectorizableFunctions with a known preset of functions for the given vector library. | |
| bool | isFunctionVectorizable (StringRef F, const ElementCount &VF) const |
| Return true if the function F has a vector equivalent with vectorization factor VF. | |
| LLVM_ABI bool | isFunctionVectorizable (StringRef F) const |
| Return true if the function F has a vector equivalent with any vectorization factor. | |
| LLVM_ABI StringRef | getVectorizedFunction (StringRef F, const ElementCount &VF, bool Masked) const |
| Return the name of the equivalent of F, vectorized with factor VF. | |
| 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 equivalent of F, vectorized with factor VF. | |
| void | setShouldExtI32Param (bool Val) |
| Set to true iff i32 parameters to library functions should have signext or zeroext attributes if they correspond to C-level int or unsigned int, respectively. | |
| void | setShouldExtI32Return (bool Val) |
| Set to true iff i32 results from library functions should have signext or zeroext attributes if they correspond to C-level int or unsigned int, respectively. | |
| void | setShouldSignExtI32Param (bool Val) |
| Set to true iff i32 parameters to library functions should have signext attribute if they correspond to C-level int or unsigned int. | |
| void | setShouldSignExtI32Return (bool Val) |
| Set to true iff i32 results from library functions should have signext attribute if they correspond to C-level int or unsigned int. | |
| LLVM_ABI unsigned | getWCharSize (const Module &M) const |
| Returns the size of the wchar_t type in bytes or 0 if the size is unknown. | |
| LLVM_ABI unsigned | getSizeTSize (const Module &M) const |
| Returns the size of the size_t type in bits. | |
| unsigned | getIntSize () const |
| Get size of a C-level int or unsigned int, in bits. | |
| void | setIntSize (unsigned Bits) |
| Initialize the C-level size of an integer. | |
| LLVM_ABI void | getWidestVF (StringRef ScalarF, ElementCount &FixedVF, ElementCount &Scalable) const |
| Returns the largest vectorization factor used in the list of vector functions. |
| Friends | |
|---|---|
| class | TargetLibraryInfo |
Implementation of the target library information.
This class constructs tables that hold the target library information and make it available. However, it is somewhat expensive to compute and only depends on the triple. So users typically interact with the [TargetLibraryInfo](classllvm%5F1%5F1TargetLibraryInfo.html "Provides information about what library functions are available for the current target.") wrapper below.
Definition at line 83 of file TargetLibraryInfo.h.
| llvm::TargetLibraryInfoImpl::TargetLibraryInfoImpl ( ) | delete |
|---|
◆ TargetLibraryInfoImpl() [2/4]
◆ TargetLibraryInfoImpl() [3/4]
◆ TargetLibraryInfoImpl() [4/4]
◆ addVectorizableFunctions()
| void TargetLibraryInfoImpl::addVectorizableFunctions | ( | ArrayRef< VecDesc > | Fns | ) |
|---|
◆ addVectorizableFunctionsFromVecLib()
Calls addVectorizableFunctions with a known preset of functions for the given vector library.
Definition at line 1339 of file TargetLibraryInfo.cpp.
References llvm::Triple::aarch64, llvm::Triple::aarch64_be, llvm::Accelerate, addVectorizableFunctions(), llvm::AMDLIBM, llvm::ArmPL, llvm::DarwinLibSystemM, llvm::Triple::getArch(), llvm::LIBMVEC, llvm::MASSV, llvm::NoLibrary, llvm::Triple::riscv64, llvm::SLEEFGNUABI, llvm::SVML, VecFuncs_Accelerate, VecFuncs_AMDLIBM, VecFuncs_ArmPL, VecFuncs_DarwinLibSystemM, VecFuncs_LIBMVEC_AARCH64, VecFuncs_LIBMVEC_X86, VecFuncs_MASSV, VecFuncs_SLEEFGNUABI_VF2, VecFuncs_SLEEFGNUABI_VF4, VecFuncs_SLEEFGNUABI_VFScalable, VecFuncs_SLEEFGNUABI_VFScalableRISCV, VecFuncs_SVML, llvm::Triple::x86, and llvm::Triple::x86_64.
Referenced by llvm::driver::createTLII(), and initializeLibCalls().
◆ disableAllFunctions()
| void TargetLibraryInfoImpl::disableAllFunctions | ( | ) |
|---|
◆ getIntSize()
| unsigned llvm::TargetLibraryInfoImpl::getIntSize ( ) const | inline |
|---|
◆ getLibFunc() [1/3]
◆ getLibFunc() [2/3]
| bool TargetLibraryInfoImpl::getLibFunc | ( | StringRef | funcName, |
|---|---|---|---|
| LibFunc & | F ) const |
Searches for a particular function name.
If it is one of the known library functions, return true and set F to the corresponding value.
Definition at line 984 of file TargetLibraryInfo.cpp.
References buildIndexMap(), llvm::StringRef::empty(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), F, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), and sanitizeFunctionName().
Referenced by getLibFunc().
◆ getLibFunc() [3/3]
| bool TargetLibraryInfoImpl::getLibFunc | ( | unsigned int | Opcode, |
|---|---|---|---|
| Type * | Ty, | ||
| LibFunc & | F ) const |
◆ getSizeTSize()
◆ getVectorizedFunction()
◆ getVectorMappingInfo()
◆ getWCharSize()
◆ getWidestVF()
◆ isCallingConvCCompatible() [1/2]
| bool TargetLibraryInfoImpl::isCallingConvCCompatible ( CallBase * CI) | static |
|---|
◆ isCallingConvCCompatible() [2/2]
| bool TargetLibraryInfoImpl::isCallingConvCCompatible ( Function * Callee) | static |
|---|
◆ isFunctionVectorizable() [1/2]
| bool TargetLibraryInfoImpl::isFunctionVectorizable | ( | StringRef | F | ) | const |
|---|
◆ isFunctionVectorizable() [2/2]
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ setAvailable()
| void llvm::TargetLibraryInfoImpl::setAvailable ( LibFunc F) | inline |
|---|
◆ setAvailableWithName()
| void llvm::TargetLibraryInfoImpl::setAvailableWithName ( LibFunc F, StringRef Name ) | inline |
|---|
◆ setIntSize()
| void llvm::TargetLibraryInfoImpl::setIntSize ( unsigned Bits) | inline |
|---|
◆ setShouldExtI32Param()
| void llvm::TargetLibraryInfoImpl::setShouldExtI32Param ( bool Val) | inline |
|---|
Set to true iff i32 parameters to library functions should have signext or zeroext attributes if they correspond to C-level int or unsigned int, respectively.
Definition at line 210 of file TargetLibraryInfo.h.
Referenced by initializeBase().
◆ setShouldExtI32Return()
| void llvm::TargetLibraryInfoImpl::setShouldExtI32Return ( bool Val) | inline |
|---|
Set to true iff i32 results from library functions should have signext or zeroext attributes if they correspond to C-level int or unsigned int, respectively.
Definition at line 217 of file TargetLibraryInfo.h.
Referenced by initializeBase().
◆ setShouldSignExtI32Param()
| void llvm::TargetLibraryInfoImpl::setShouldSignExtI32Param ( bool Val) | inline |
|---|
Set to true iff i32 parameters to library functions should have signext attribute if they correspond to C-level int or unsigned int.
Definition at line 223 of file TargetLibraryInfo.h.
Referenced by initializeBase().
◆ setShouldSignExtI32Return()
| void llvm::TargetLibraryInfoImpl::setShouldSignExtI32Return ( bool Val) | inline |
|---|
Set to true iff i32 results from library functions should have signext attribute if they correspond to C-level int or unsigned int.
Definition at line 229 of file TargetLibraryInfo.h.
Referenced by initializeBase().
◆ setUnavailable()
| void llvm::TargetLibraryInfoImpl::setUnavailable ( LibFunc F) | inline |
|---|
◆ TargetLibraryInfo
The documentation for this class was generated from the following files:
- include/llvm/Analysis/TargetLibraryInfo.h
- lib/Analysis/TargetLibraryInfo.cpp