LLVM 20.0.0git
|
This file does AMD library function optimizations. More...
#include "AMDGPU.h"
#include "AMDGPULibFunc.h"
#include "GCNSubtarget.h"
#include "llvm/Analysis/AssumptionCache.h"
#include "llvm/Analysis/TargetLibraryInfo.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/IR/AttributeMask.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/IntrinsicsAMDGPU.h"
#include "llvm/IR/MDBuilder.h"
#include "llvm/IR/PatternMatch.h"
#include "llvm/InitializePasses.h"
#include <cmath>
Go to the source code of this file.
Classes | |
class | llvm::AMDGPULibCalls |
struct | TableEntry |
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 |
Typedefs | |
using | TableRef = ArrayRef< TableEntry > |
Functions | |
template<typename IRB > | |
static CallInst * | CreateCallEx (IRB &B, FunctionCallee Callee, Value *Arg, const Twine &Name="") |
template<typename IRB > | |
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.
#define DEBUG_TYPE "amdgpu-simplifylib" |
Definition at line 30 of file AMDGPULibCalls.cpp.
#define MATH_E numbers::e |
Definition at line 46 of file AMDGPULibCalls.cpp.
#define MATH_PI numbers::pi |
Definition at line 45 of file AMDGPULibCalls.cpp.
#define MATH_SQRT1_2 numbers::inv_sqrt2 |
Definition at line 48 of file AMDGPULibCalls.cpp.
#define MATH_SQRT2 numbers::sqrt2 |
Definition at line 47 of file AMDGPULibCalls.cpp.
using TableRef = ArrayRef<TableEntry> |
Definition at line 355 of file AMDGPULibCalls.cpp.
|
static |
Definition at line 153 of file AMDGPULibCalls.cpp.
|
static |
Definition at line 162 of file AMDGPULibCalls.cpp.
|
inlinestatic |
Definition at line 405 of file AMDGPULibCalls.cpp.
References llvm::AMDGPULibFuncBase::Param::ArgType, and llvm::AMDGPULibFunc::getLeads().
Referenced by llvm::AMDGPULibCalls::useNative().
|
static |
Definition at line 357 of file AMDGPULibCalls.cpp.
References 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.
|
static |
Definition at line 170 of file AMDGPULibCalls.cpp.
References llvm::Type::getInt32Ty().
Referenced by llvm::AMDGPULibCalls::fold().
|
inlinestatic |
Definition at line 401 of file AMDGPULibCalls.cpp.
References llvm::AMDGPULibFunc::getLeads(), and llvm::AMDGPULibFuncBase::Param::VectorSize.
|
static |
Definition at line 332 of file AMDGPULibCalls.cpp.
Referenced by llvm::AMDGPULibCalls::useNative().
|
static |
Definition at line 579 of file AMDGPULibCalls.cpp.
References DL, llvm::Constant::getAggregateElement(), llvm::CallBase::getIntrinsicID(), llvm::ConstantFP::getValue(), I, llvm::APFloat::isInteger(), llvm::isKnownNeverInfinity(), llvm::isKnownNeverInfOrNaN(), llvm::FastMathFlags::noInfs(), and llvm::FastMathFlags::noNaNs().
Referenced by llvm::AMDGPULibCalls::fold().
|
static |
|
static |
Definition at line 188 of file AMDGPULibCalls.cpp.
Referenced by getOptTable().
|
static |
Definition at line 194 of file AMDGPULibCalls.cpp.
Referenced by getOptTable().
|
static |
Definition at line 197 of file AMDGPULibCalls.cpp.
Referenced by getOptTable().
|
static |
Definition at line 203 of file AMDGPULibCalls.cpp.
Referenced by getOptTable().
|
static |
Definition at line 209 of file AMDGPULibCalls.cpp.
Referenced by getOptTable().
|
static |
Definition at line 213 of file AMDGPULibCalls.cpp.
Referenced by getOptTable().
|
static |
Definition at line 219 of file AMDGPULibCalls.cpp.
Referenced by getOptTable().
|
static |
Definition at line 225 of file AMDGPULibCalls.cpp.
Referenced by getOptTable().
|
static |
Definition at line 229 of file AMDGPULibCalls.cpp.
Referenced by getOptTable().
|
static |
Definition at line 235 of file AMDGPULibCalls.cpp.
Referenced by getOptTable().
|
static |
Definition at line 241 of file AMDGPULibCalls.cpp.
Referenced by getOptTable().
|
static |
Definition at line 245 of file AMDGPULibCalls.cpp.
Referenced by getOptTable().
|
static |
Definition at line 249 of file AMDGPULibCalls.cpp.
Referenced by getOptTable().
|
static |
Definition at line 257 of file AMDGPULibCalls.cpp.
Referenced by getOptTable().
|
static |
Definition at line 253 of file AMDGPULibCalls.cpp.
Referenced by getOptTable().
|
static |
Definition at line 261 of file AMDGPULibCalls.cpp.
Referenced by getOptTable().
|
static |
Definition at line 271 of file AMDGPULibCalls.cpp.
Referenced by getOptTable().
|
static |
Definition at line 266 of file AMDGPULibCalls.cpp.
Referenced by getOptTable().
|
static |
Definition at line 276 of file AMDGPULibCalls.cpp.
Referenced by getOptTable().
|
static |
Definition at line 280 of file AMDGPULibCalls.cpp.
Referenced by getOptTable().
|
static |
Definition at line 288 of file AMDGPULibCalls.cpp.
Referenced by getOptTable().
|
static |
Definition at line 284 of file AMDGPULibCalls.cpp.
Referenced by getOptTable().
|
static |
Definition at line 292 of file AMDGPULibCalls.cpp.
Referenced by getOptTable().
|
static |
Definition at line 296 of file AMDGPULibCalls.cpp.
Referenced by getOptTable().
|
static |
Definition at line 300 of file AMDGPULibCalls.cpp.
Referenced by getOptTable().
|
static |
Definition at line 304 of file AMDGPULibCalls.cpp.
Referenced by getOptTable().
|
static |
Definition at line 308 of file AMDGPULibCalls.cpp.
Referenced by getOptTable().
|
static |
Definition at line 313 of file AMDGPULibCalls.cpp.
Referenced by getOptTable().
|
static |
Definition at line 317 of file AMDGPULibCalls.cpp.
Referenced by getOptTable().
|
static |
Definition at line 321 of file AMDGPULibCalls.cpp.
Referenced by getOptTable().
|
static |
Definition at line 325 of file AMDGPULibCalls.cpp.
Referenced by getOptTable().
|
static |
Referenced by llvm::AMDGPULibCalls::initNativeFuncs(), and llvm::AMDGPUUseNativeCallsPass::run().