LLVM: lib/Target/AMDGPU/AMDGPULibCalls.cpp File Reference (original) (raw)
This file does AMD library function optimizations. More...
Go to the source code of this file.
| Namespaces | |
|---|---|
| namespace | llvm |
| This is an optimization pass for GlobalISel generic memory operations. |
| Macros | |
|---|---|
| #define | DEBUG_TYPE "amdgpu-simplifylib" |
| #define | MATH_PI numbers::pi |
| #define | MATH_E numbers::e |
| #define | MATH_SQRT2 numbers::sqrt2 |
| #define | MATH_SQRT1_2 numbers::inv_sqrt2 |
| Functions | |
|---|---|
| template | |
| static CallInst * | CreateCallEx (IRB &B, FunctionCallee Callee, Value *Arg, const Twine &Name="") |
| template | |
| static CallInst * | CreateCallEx2 (IRB &B, FunctionCallee Callee, Value *Arg1, Value *Arg2, const Twine &Name="") |
| static FunctionType * | getPownType (FunctionType *FT) |
| static bool | HasNative (AMDGPULibFunc::EFuncId id) |
| static TableRef | getOptTable (AMDGPULibFunc::EFuncId id) |
| static int | getVecSize (const AMDGPULibFunc &FInfo) |
| static AMDGPULibFunc::EType | getArgType (const AMDGPULibFunc &FInfo) |
| static bool | isKnownIntegral (const Value *V, const DataLayout &DL, FastMathFlags FMF) |
| static double | llvm::log2 (double V) |
This file does AMD library function optimizations.
Definition in file AMDGPULibCalls.cpp.
◆ DEBUG_TYPE
#define DEBUG_TYPE "amdgpu-simplifylib"
◆ MATH_E
#define MATH_E numbers::e
◆ MATH_PI
#define MATH_PI numbers::pi
◆ MATH_SQRT1_2
#define MATH_SQRT1_2 numbers::inv_sqrt2
◆ MATH_SQRT2
#define MATH_SQRT2 numbers::sqrt2
◆ TableRef
◆ CreateCallEx()
◆ CreateCallEx2()
◆ getArgType()
◆ getOptTable()
| TableRef getOptTable ( AMDGPULibFunc::EFuncId id) | static |
|---|
Definition at line 350 of file AMDGPULibCalls.cpp.
References llvm::AMDGPULibFuncBase::EI_ACOS, llvm::AMDGPULibFuncBase::EI_ACOSH, llvm::AMDGPULibFuncBase::EI_ACOSPI, llvm::AMDGPULibFuncBase::EI_ASIN, llvm::AMDGPULibFuncBase::EI_ASINH, llvm::AMDGPULibFuncBase::EI_ASINPI, llvm::AMDGPULibFuncBase::EI_ATAN, llvm::AMDGPULibFuncBase::EI_ATANH, llvm::AMDGPULibFuncBase::EI_ATANPI, llvm::AMDGPULibFuncBase::EI_CBRT, llvm::AMDGPULibFuncBase::EI_COS, llvm::AMDGPULibFuncBase::EI_COSH, llvm::AMDGPULibFuncBase::EI_COSPI, llvm::AMDGPULibFuncBase::EI_ERF, llvm::AMDGPULibFuncBase::EI_ERFC, llvm::AMDGPULibFuncBase::EI_EXP, llvm::AMDGPULibFuncBase::EI_EXP10, llvm::AMDGPULibFuncBase::EI_EXP2, llvm::AMDGPULibFuncBase::EI_EXPM1, llvm::AMDGPULibFuncBase::EI_LOG, llvm::AMDGPULibFuncBase::EI_LOG10, llvm::AMDGPULibFuncBase::EI_LOG2, llvm::AMDGPULibFuncBase::EI_NCOS, llvm::AMDGPULibFuncBase::EI_NEXP2, llvm::AMDGPULibFuncBase::EI_NLOG2, llvm::AMDGPULibFuncBase::EI_NRSQRT, llvm::AMDGPULibFuncBase::EI_NSIN, llvm::AMDGPULibFuncBase::EI_NSQRT, llvm::AMDGPULibFuncBase::EI_RSQRT, llvm::AMDGPULibFuncBase::EI_SIN, llvm::AMDGPULibFuncBase::EI_SINH, llvm::AMDGPULibFuncBase::EI_SINPI, llvm::AMDGPULibFuncBase::EI_SQRT, llvm::AMDGPULibFuncBase::EI_TAN, llvm::AMDGPULibFuncBase::EI_TANH, llvm::AMDGPULibFuncBase::EI_TANPI, llvm::AMDGPULibFuncBase::EI_TGAMMA, tbl_acos, tbl_acosh, tbl_acospi, tbl_asin, tbl_asinh, tbl_asinpi, tbl_atan, tbl_atanh, tbl_atanpi, tbl_cbrt, tbl_cos, tbl_cosh, tbl_cospi, tbl_erf, tbl_erfc, tbl_exp, tbl_exp10, tbl_exp2, tbl_expm1, tbl_log, tbl_log10, tbl_log2, tbl_rsqrt, tbl_sin, tbl_sinh, tbl_sinpi, tbl_sqrt, tbl_tan, tbl_tanh, tbl_tanpi, and tbl_tgamma.
◆ getPownType()
◆ getVecSize()
◆ HasNative()
| bool HasNative ( AMDGPULibFunc::EFuncId id) | static |
|---|
Definition at line 325 of file AMDGPULibCalls.cpp.
References llvm::AMDGPULibFuncBase::EI_COS, llvm::AMDGPULibFuncBase::EI_DIVIDE, llvm::AMDGPULibFuncBase::EI_EXP, llvm::AMDGPULibFuncBase::EI_EXP10, llvm::AMDGPULibFuncBase::EI_EXP2, llvm::AMDGPULibFuncBase::EI_LOG, llvm::AMDGPULibFuncBase::EI_LOG10, llvm::AMDGPULibFuncBase::EI_LOG2, llvm::AMDGPULibFuncBase::EI_POWR, llvm::AMDGPULibFuncBase::EI_RECIP, llvm::AMDGPULibFuncBase::EI_RSQRT, llvm::AMDGPULibFuncBase::EI_SIN, llvm::AMDGPULibFuncBase::EI_SINCOS, llvm::AMDGPULibFuncBase::EI_SQRT, and llvm::AMDGPULibFuncBase::EI_TAN.
Referenced by llvm::AMDGPULibCalls::useNative().
◆ isKnownIntegral()
Definition at line 566 of file AMDGPULibCalls.cpp.
References llvm::cast(), DL, llvm::dyn_cast(), llvm::Constant::getAggregateElement(), llvm::CallBase::getIntrinsicID(), llvm::ConstantFP::getValue(), I, llvm::isa(), llvm::APFloat::isInteger(), llvm::isKnownNeverInfinity(), llvm::isKnownNeverInfOrNaN(), llvm::FastMathFlags::noInfs(), and llvm::FastMathFlags::noNaNs().
Referenced by llvm::AMDGPULibCalls::fold().
◆ EnablePreLink
| cl::opt< bool > EnablePreLink("amdgpu-prelink", cl::desc("Enable pre-link mode optimizations"), cl::init(false), cl::Hidden) ( "amdgpu-prelink" , cl::desc("Enable pre-link mode optimizations") , cl::init(false) , cl::Hidden ) | static |
|---|
◆ tbl_acos
◆ tbl_acosh
◆ tbl_acospi
◆ tbl_asin
◆ tbl_asinh
◆ tbl_asinpi
◆ tbl_atan
◆ tbl_atanh
◆ tbl_atanpi
◆ tbl_cbrt
◆ tbl_cos
◆ tbl_cosh
◆ tbl_cospi
◆ tbl_erf
◆ tbl_erfc
◆ tbl_exp
◆ tbl_exp10
◆ tbl_exp2
◆ tbl_expm1
◆ tbl_log
◆ tbl_log10
◆ tbl_log2
◆ tbl_rsqrt
◆ tbl_sin
◆ tbl_sinh
◆ tbl_sinpi
◆ tbl_sqrt
◆ tbl_tan
◆ tbl_tanh
◆ tbl_tanpi
◆ tbl_tgamma
◆ UseNative
| cl::list< std::string > UseNative("amdgpu-use-native", cl::desc("Comma separated list of functions to replace with native, or all"), cl::CommaSeparated, cl::ValueOptional, cl::Hidden) ( "amdgpu-use-native" , cl::desc("Comma separated list of functions to replace with native, or all") , cl::CommaSeparated , cl::ValueOptional , cl::Hidden ) | static |
|---|