LLVM
15.0.0git
|
#include "llvm/CodeGen/ReplaceWithVeclib.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/DemandedBits.h"
#include "llvm/Analysis/GlobalsModRef.h"
#include "llvm/Analysis/OptimizationRemarkEmitter.h"
#include "llvm/Analysis/TargetLibraryInfo.h"
#include "llvm/Analysis/VectorUtils.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/InstIterator.h"
#include "llvm/Transforms/Utils/ModuleUtils.h"
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "replace-with-veclib" |
Functions | |
STATISTIC (NumCallsReplaced, "Number of calls to intrinsics that have been replaced.") | |
STATISTIC (NumTLIFuncDeclAdded, "Number of vector library function declarations added.") | |
STATISTIC (NumFuncUsedAdded, "Number of functions added to `llvm.compiler.used`") | |
static bool | replaceWithTLIFunction (CallInst &CI, const StringRef TLIName) |
static bool | replaceWithCallToVeclib (const TargetLibraryInfo &TLI, CallInst &CI) |
static bool | runImpl (const TargetLibraryInfo &TLI, Function &F) |
INITIALIZE_PASS_BEGIN (ReplaceWithVeclibLegacy, DEBUG_TYPE, "Replace intrinsics with calls to vector library", false, false) INITIALIZE_PASS_END(ReplaceWithVeclibLegacy | |
Variables | |
DEBUG_TYPE | |
Replace intrinsics with calls to vector | library |
Replace intrinsics with calls to vector | false |
#define DEBUG_TYPE "replace-with-veclib" |
Definition at line 30 of file ReplaceWithVeclib.cpp.
INITIALIZE_PASS_BEGIN | ( | ReplaceWithVeclibLegacy | , |
DEBUG_TYPE | , | ||
"Replace intrinsics with calls to vector library" | , | ||
false | , | ||
false | |||
) |
|
static |
Definition at line 92 of file ReplaceWithVeclib.cpp.
References Arg, llvm::CallBase::args(), llvm::dbgs(), DEBUG_TYPE, llvm::enumerate(), llvm::CallBase::getCalledFunction(), llvm::LinearPolySize< ElementCount >::getFixed(), llvm::Function::getIntrinsicID(), llvm::Instruction::getModule(), llvm::Intrinsic::getName(), llvm::TargetLibraryInfo::getVectorizedFunction(), llvm::TargetLibraryInfo::isFunctionVectorizable(), llvm::UnivariateLinearPolyBase< LeafTy >::isNonZero(), llvm::Intrinsic::isOverloaded(), llvm::LinearPolySize< LeafTy >::isScalable(), llvm::isVectorIntrinsicWithScalarOpAtArg(), LLVM_DEBUG, llvm::Intrinsic::not_intrinsic, replaceWithTLIFunction(), and llvm::StringRef::str().
Referenced by runImpl().
Definition at line 41 of file ReplaceWithVeclib.cpp.
References llvm::appendToCompilerUsed(), llvm::AMDGPU::HSAMD::Kernel::Key::Args, llvm::CallBase::args(), assert(), llvm::Function::copyAttributesFrom(), llvm::Instruction::copyFastMathFlags(), llvm::Function::Create(), llvm::IRBuilderBase::CreateCall(), llvm::dbgs(), DEBUG_TYPE, llvm::GlobalValue::ExternalLinkage, llvm::CallBase::getCalledFunction(), llvm::Function::getFunctionType(), llvm::Instruction::getModule(), llvm::Value::getName(), llvm::CallBase::getOperandBundlesAsDefs(), llvm::GlobalValue::getType(), LLVM_DEBUG, M, and llvm::Value::replaceAllUsesWith().
Referenced by replaceWithCallToVeclib().
|
static |
Definition at line 176 of file ReplaceWithVeclib.cpp.
References F, I, llvm::instructions(), and replaceWithCallToVeclib().
Referenced by llvm::MergeICmpsPass::run(), llvm::LowerInvokePass::run(), llvm::ReplaceWithVeclib::run(), llvm::DataFlowSanitizerPass::run(), llvm::ObjCARCAPElimPass::run(), llvm::ObjCARCExpandPass::run(), llvm::SLPVectorizerPass::run(), llvm::NaryReassociatePass::run(), llvm::JumpThreadingPass::run(), llvm::TLSVariableHoistPass::run(), llvm::SROAPass::run(), llvm::GVNPass::run(), llvm::ConstantHoistingPass::run(), llvm::RewriteSymbolPass::run(), llvm::LoopVersioningPass::run(), and llvm::ReplaceWithVeclibLegacy::runOnFunction().
STATISTIC | ( | NumCallsReplaced | , |
"Number of calls to intrinsics that have been replaced." | |||
) |
STATISTIC | ( | NumFuncUsedAdded | , |
"Number of functions added to `llvm.compiler.used`" | |||
) |
DEBUG_TYPE |
Definition at line 247 of file ReplaceWithVeclib.cpp.
Replace intrinsics with calls to vector false |
Definition at line 248 of file ReplaceWithVeclib.cpp.
Replace intrinsics with calls to vector library |
Definition at line 248 of file ReplaceWithVeclib.cpp.