LLVM API Documentation
#include <TargetLibraryInfo.h>
Public Member Functions | |
TargetLibraryInfo () | |
TargetLibraryInfo (const Triple &T) | |
TargetLibraryInfo (const TargetLibraryInfo &TLI) | |
bool | getLibFunc (StringRef funcName, LibFunc::Func &F) const |
bool | has (LibFunc::Func F) const |
bool | hasOptimizedCodeGen (LibFunc::Func F) const |
StringRef | getName (LibFunc::Func F) const |
void | setUnavailable (LibFunc::Func F) |
void | setAvailable (LibFunc::Func F) |
void | setAvailableWithName (LibFunc::Func F, StringRef Name) |
void | disableAllFunctions () |
Static Public Attributes | |
static char | ID |
TargetLibraryInfo - This immutable pass captures information about what library functions are available for the current target, and allows a frontend to disable optimizations through -fno-builtin etc.
Definition at line 675 of file TargetLibraryInfo.h.
Definition at line 678 of file TargetLibraryInfo.cpp.
References initialize(), and llvm::LibFunc::memset.
Definition at line 685 of file TargetLibraryInfo.cpp.
References initialize(), and llvm::LibFunc::memset.
TargetLibraryInfo::TargetLibraryInfo | ( | const TargetLibraryInfo & | TLI | ) | [explicit] |
Definition at line 692 of file TargetLibraryInfo.cpp.
References llvm::LibFunc::memcpy.
disableAllFunctions - This disables all builtins, which is used for options like -fno-builtin.
Definition at line 741 of file TargetLibraryInfo.cpp.
References llvm::LibFunc::memset.
bool TargetLibraryInfo::getLibFunc | ( | StringRef | funcName, |
LibFunc::Func & | F | ||
) | const |
getLibFunc - Search 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 717 of file TargetLibraryInfo.cpp.
References llvm::StringRef::empty(), llvm::StringRef::find(), llvm::StringRef::front(), I, llvm::StringRef::npos, llvm::LibFunc::NumLibFuncs, and llvm::StringRef::substr().
Referenced by getAllocationData(), llvm::getIntrinsicIDForCall(), llvm::isFreeCall(), llvm::LibCallSimplifier::optimizeCall(), and llvm::FastISel::selectInstruction().
StringRef llvm::TargetLibraryInfo::getName | ( | LibFunc::Func | F | ) | const [inline] |
Definition at line 742 of file TargetLibraryInfo.h.
References F(), and llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::find().
Referenced by accumulateAndSortLibcalls(), llvm::EmitFPutS(), llvm::EmitFWrite(), FindCXAAtExit(), and hasMemoryWrite().
bool llvm::TargetLibraryInfo::has | ( | LibFunc::Func | F | ) | const [inline] |
has - This function is used by optimizations that want to match on or form a given library function.
Definition at line 706 of file TargetLibraryInfo.h.
Referenced by accumulateAndSortLibcalls(), ConstantFoldScalarCall(), llvm::EmitFPutC(), llvm::EmitFPutS(), llvm::EmitFWrite(), llvm::EmitMemChr(), llvm::EmitMemCmp(), llvm::EmitMemCpyChk(), llvm::EmitPutChar(), llvm::EmitPutS(), llvm::EmitStrChr(), llvm::EmitStrCpy(), llvm::EmitStrLen(), llvm::EmitStrNCmp(), llvm::EmitStrNCpy(), llvm::EmitStrNLen(), FindCXAAtExit(), getAllocationData(), hasMemoryWrite(), hasUnaryFloatFn(), llvm::isFreeCall(), isMemsetPattern16(), and llvm::LibCallSimplifier::optimizeCall().
bool llvm::TargetLibraryInfo::hasOptimizedCodeGen | ( | LibFunc::Func | F | ) | const [inline] |
hasOptimizedCodeGen - Return true if the function is both available as a builtin and a candidate for optimized code generation.
Definition at line 712 of file TargetLibraryInfo.h.
References llvm::LibFunc::ceil, llvm::LibFunc::ceilf, llvm::LibFunc::ceill, llvm::LibFunc::copysign, llvm::LibFunc::copysignf, llvm::LibFunc::copysignl, llvm::LibFunc::cos, llvm::LibFunc::cosf, llvm::LibFunc::cosl, llvm::LibFunc::exp2, llvm::LibFunc::exp2f, llvm::LibFunc::exp2l, llvm::LibFunc::fabs, llvm::LibFunc::fabsf, llvm::LibFunc::fabsl, llvm::LibFunc::floor, llvm::LibFunc::floorf, llvm::LibFunc::floorl, llvm::LibFunc::fmax, llvm::LibFunc::fmaxf, llvm::LibFunc::fmaxl, llvm::LibFunc::fmin, llvm::LibFunc::fminf, llvm::LibFunc::fminl, llvm::LibFunc::log2, llvm::LibFunc::log2f, llvm::LibFunc::log2l, llvm::LibFunc::memchr, llvm::LibFunc::memcmp, llvm::LibFunc::nearbyint, llvm::LibFunc::nearbyintf, llvm::LibFunc::nearbyintl, llvm::LibFunc::rint, llvm::LibFunc::rintf, llvm::LibFunc::rintl, llvm::LibFunc::round, llvm::LibFunc::roundf, llvm::LibFunc::roundl, llvm::LibFunc::sin, llvm::LibFunc::sinf, llvm::LibFunc::sinl, llvm::LibFunc::sqrt, llvm::LibFunc::sqrt_finite, llvm::LibFunc::sqrtf, llvm::LibFunc::sqrtf_finite, llvm::LibFunc::sqrtl, llvm::LibFunc::sqrtl_finite, llvm::LibFunc::stpcpy, llvm::LibFunc::strcmp, llvm::LibFunc::strcpy, llvm::LibFunc::strlen, llvm::LibFunc::strnlen, llvm::LibFunc::trunc, llvm::LibFunc::truncf, and llvm::LibFunc::truncl.
Referenced by llvm::FastISel::selectInstruction().
void llvm::TargetLibraryInfo::setAvailable | ( | LibFunc::Func | F | ) | [inline] |
Definition at line 758 of file TargetLibraryInfo.h.
void llvm::TargetLibraryInfo::setAvailableWithName | ( | LibFunc::Func | F, |
StringRef | Name | ||
) | [inline] |
Definition at line 762 of file TargetLibraryInfo.h.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::end(), F(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::find(), and Name.
Referenced by initialize().
void llvm::TargetLibraryInfo::setUnavailable | ( | LibFunc::Func | F | ) | [inline] |
setUnavailable - this can be used by whatever sets up TargetLibraryInfo to ban use of specific library functions.
Definition at line 754 of file TargetLibraryInfo.h.
Referenced by initialize().
char llvm::TargetLibraryInfo::ID [static] |
Definition at line 695 of file TargetLibraryInfo.h.