LLVM 20.0.0git
|
Public Member Functions | |
AMDGPULibCalls ()=default | |
bool | fold (CallInst *CI) |
void | initFunction (Function &F, FunctionAnalysisManager &FAM) |
void | initNativeFuncs () |
bool | useNative (CallInst *CI) |
Protected Member Functions | |
bool | isUnsafeMath (const FPMathOperator *FPOp) const |
bool | isUnsafeFiniteOnlyMath (const FPMathOperator *FPOp) const |
bool | canIncreasePrecisionOfConstantFold (const FPMathOperator *FPOp) const |
Static Protected Member Functions | |
static void | replaceCall (Instruction *I, Value *With) |
static void | replaceCall (FPMathOperator *I, Value *With) |
Definition at line 49 of file AMDGPULibCalls.cpp.
|
default |
|
protected |
Definition at line 645 of file AMDGPULibCalls.cpp.
References llvm::FastMathFlags::approxFunc(), B, canIncreasePrecisionOfConstantFold(), llvm::cannotBeOrderedLessThanZero(), llvm::dbgs(), llvm::AMDGPULibFuncBase::EI_CEIL, llvm::AMDGPULibFuncBase::EI_COPYSIGN, llvm::AMDGPULibFuncBase::EI_COS, llvm::AMDGPULibFuncBase::EI_EXP, llvm::AMDGPULibFuncBase::EI_EXP2, llvm::AMDGPULibFuncBase::EI_FABS, llvm::AMDGPULibFuncBase::EI_FLOOR, llvm::AMDGPULibFuncBase::EI_FMA, llvm::AMDGPULibFuncBase::EI_FMAX, llvm::AMDGPULibFuncBase::EI_FMIN, llvm::AMDGPULibFuncBase::EI_LDEXP, llvm::AMDGPULibFuncBase::EI_LOG, llvm::AMDGPULibFuncBase::EI_LOG10, llvm::AMDGPULibFuncBase::EI_LOG2, llvm::AMDGPULibFuncBase::EI_MAD, llvm::AMDGPULibFuncBase::EI_POW, llvm::AMDGPULibFuncBase::EI_POWN, llvm::AMDGPULibFuncBase::EI_POWR, llvm::AMDGPULibFuncBase::EI_READ_PIPE_2, llvm::AMDGPULibFuncBase::EI_READ_PIPE_4, llvm::AMDGPULibFuncBase::EI_RINT, llvm::AMDGPULibFuncBase::EI_ROOTN, llvm::AMDGPULibFuncBase::EI_ROUND, llvm::AMDGPULibFuncBase::EI_SIN, llvm::AMDGPULibFuncBase::EI_SQRT, llvm::AMDGPULibFuncBase::EI_TRUNC, llvm::AMDGPULibFuncBase::EI_WRITE_PIPE_2, llvm::AMDGPULibFuncBase::EI_WRITE_PIPE_4, llvm::CallBase::getArgOperand(), llvm::CallBase::getCalledFunction(), llvm::CallBase::getFunctionType(), llvm::AMDGPULibFunc::getId(), llvm::Instruction::getModule(), llvm::Intrinsic::getOrInsertDeclaration(), llvm::FunctionType::getParamType(), getPownType(), llvm::Value::getType(), llvm::AMDGPULibFunc::isCompatibleSignature(), isKnownIntegral(), llvm::CallBase::isNoBuiltin(), llvm::CallBase::isStrictFP(), LLVM_DEBUG, llvm::FastMathFlags::none(), llvm::CallBase::setArgOperand(), llvm::CallBase::setCalledFunction(), and llvm::AttributeFuncs::typeIncompatible().
Referenced by llvm::AMDGPUSimplifyLibCallsPass::run().
void AMDGPULibCalls::initFunction | ( | Function & | F, |
FunctionAnalysisManager & | FAM | ||
) |
Definition at line 434 of file AMDGPULibCalls.cpp.
References F, FAM, llvm::AnalysisManager< IRUnitT, ExtraArgTs >::getCachedResult(), and llvm::AnalysisManager< IRUnitT, ExtraArgTs >::getResult().
Referenced by llvm::AMDGPUSimplifyLibCallsPass::run(), and llvm::AMDGPUUseNativeCallsPass::run().
void AMDGPULibCalls::initNativeFuncs | ( | ) |
Definition at line 445 of file AMDGPULibCalls.cpp.
References UseNative.
Referenced by llvm::AMDGPUSimplifyLibCallsPass::run(), and llvm::AMDGPUUseNativeCallsPass::run().
|
protected |
Definition at line 423 of file AMDGPULibCalls.cpp.
References llvm::FPMathOperator::hasApproxFunc(), llvm::FPMathOperator::hasNoInfs(), and llvm::FPMathOperator::hasNoNaNs().
|
protected |
Definition at line 419 of file AMDGPULibCalls.cpp.
References llvm::FPMathOperator::isFast().
Referenced by canIncreasePrecisionOfConstantFold().
|
inlinestaticprotected |
Definition at line 131 of file AMDGPULibCalls.cpp.
References I, and replaceCall().
|
inlinestaticprotected |
Definition at line 487 of file AMDGPULibCalls.cpp.
References llvm::dbgs(), DEBUG_WITH_TYPE, llvm::AMDGPULibFuncBase::EI_SINCOS, F, llvm::AMDGPULibFuncBase::F64, getArgType(), llvm::CallBase::getCalledFunction(), llvm::AMDGPULibFunc::getId(), llvm::Instruction::getModule(), llvm::AMDGPULibFunc::getName(), llvm::AMDGPULibFunc::getPrefix(), HasNative(), llvm::AMDGPULibFunc::isMangled(), llvm::CallBase::isNoBuiltin(), llvm::AMDGPULibFuncBase::NATIVE, llvm::AMDGPULibFuncBase::NOPFX, llvm::CallBase::setCalledFunction(), and llvm::AMDGPULibFunc::setPrefix().
Referenced by llvm::AMDGPUUseNativeCallsPass::run().