|
LLVM 24.0.0git
|
#include "llvm/Transforms/HipStdPar/HipStdPar.h"#include "llvm/ADT/STLExtras.h"#include "llvm/ADT/SmallPtrSet.h"#include "llvm/ADT/SmallVector.h"#include "llvm/Analysis/CallGraph.h"#include "llvm/Analysis/OptimizationRemarkEmitter.h"#include "llvm/IR/Constants.h"#include "llvm/IR/Function.h"#include "llvm/IR/IRBuilder.h"#include "llvm/IR/Instructions.h"#include "llvm/IR/Intrinsics.h"#include "llvm/IR/Module.h"#include "llvm/Transforms/Utils/ModuleUtils.h"#include <cassert>#include <string>#include <utility>Go to the source code of this file.
Variables | |
| static constexpr std::pair< StringLiteral, StringLiteral > | ReplaceMap [] |
| static constexpr std::pair< StringLiteral, StringLiteral > | HiddenMap [] |
| static constexpr std::pair< StringLiteral, StringLiteral > | MathLibToHipStdPar [] |
|
static |
Definition at line 179 of file HipStdPar.cpp.
References llvm::cast(), llvm::ConstantStruct::get(), llvm::ConstantExpr::getAddrSpaceCast(), getGlobalForName(), getIndirectionGlobal(), llvm::GlobalValue::getParent(), llvm::GlobalValue::getValueType(), and llvm::SmallVectorTemplateBase< T, bool >::push_back().
Referenced by indirectGlobals().
Definition at line 381 of file HipStdPar.cpp.
References llvm::DS_Error, F, I, and llvm::isa().
Referenced by llvm::HipStdParAcceleratorCodeSelectionPass::run().
Definition at line 398 of file HipStdPar.cpp.
References llvm::cast(), llvm::DS_Error, F, llvm::CallBase::getArgOperand(), llvm::Instruction::getDebugLoc(), llvm::ilist_detail::node_parent_access< NodeTy, ParentTy >::getParent(), isCXXExceptionRuntimeFunction(), N, and llvm::StringRef::npos.
|
static |
Definition at line 79 of file HipStdPar.cpp.
References assert(), llvm::SmallVectorTemplateCommon< T, typename >::back(), llvm::cast(), llvm::DS_Error, llvm::SmallVectorTemplateCommon< T, typename >::empty(), llvm::SmallVectorTemplateCommon< T, typename >::end(), G, I, llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::SmallVectorImpl< T >::insert(), llvm::isa(), and llvm::SmallVectorTemplateBase< T, bool >::pop_back().
Referenced by maybeHandleGlobals(), and llvm::HipStdParAcceleratorCodeSelectionPass::run().
|
inlinestatic |
Definition at line 119 of file HipStdPar.cpp.
References eraseFromModule().
Referenced by maybeHandleGlobals(), and llvm::HipStdParAcceleratorCodeSelectionPass::run().
|
static |
Definition at line 131 of file HipStdPar.cpp.
References G, llvm::isa(), llvm::transform(), and Uses.
Referenced by indirectGlobals().
Definition at line 74 of file HipStdPar.cpp.
References llvm::PoisonValue::get(), and T.
Referenced by clearModule(), indirectGlobals(), removeUnreachableFunctions(), and llvm::HipStdParAllocationInterpositionPass::run().
|
static |
Definition at line 199 of file HipStdPar.cpp.
References llvm::cast(), llvm::Count, llvm::ArrayType::get(), llvm::ConstantArray::get(), llvm::ConstantStruct::get(), llvm::PoisonValue::get(), llvm::ConstantExpr::getAddrSpaceCast(), llvm::GlobalValue::getParent(), llvm::Type::getStructElementType(), llvm::GlobalValue::getValueType(), llvm::GlobalValue::PrivateLinkage, llvm::GlobalVariable::setInitializer(), and llvm::SmallVectorTemplateCommon< T, typename >::size().
Referenced by indirectGlobals().
|
inlinestatic |
Definition at line 148 of file HipStdPar.cpp.
References G, llvm::ConstantDataArray::getString(), N, and llvm::GlobalValue::PrivateLinkage.
Referenced by appendIndirectedGlobal().
|
inlinestatic |
Definition at line 162 of file HipStdPar.cpp.
References llvm::PointerType::get(), llvm::PoisonValue::get(), llvm::GlobalValue::getValueType(), llvm::GlobalValue::PrivateLinkage, llvm::GlobalVariable::setConstant(), llvm::GlobalVariable::setExternallyInitialized(), llvm::GlobalVariable::setInitializer(), and llvm::GlobalValue::setLinkage().
Referenced by appendIndirectedGlobal().
|
static |
Definition at line 290 of file HipStdPar.cpp.
References appendIndirectedGlobal(), collectIndirectableUses(), llvm::SmallVectorTemplateCommon< T, typename >::empty(), eraseFromModule(), fillIndirectionTable(), llvm::for_each(), G, replaceWithIndirectUse(), and Uses.
Referenced by maybeHandleGlobals().
Definition at line 366 of file HipStdPar.cpp.
References llvm::CallingConv::AMDGPU_KERNEL, and F.
Referenced by llvm::HipStdParAcceleratorCodeSelectionPass::run().
Definition at line 373 of file HipStdPar.cpp.
Referenced by checkIfSupported().
|
inlinestatic |
Definition at line 254 of file HipStdPar.cpp.
References llvm::cast(), llvm::LLVMContext::diagnose(), llvm::DS_Error, llvm::Value::getContext(), llvm::GlobalValue::getValueType(), and llvm::isa().
Referenced by maybeHandleGlobals().
|
inlinestatic |
Definition at line 317 of file HipStdPar.cpp.
References checkIfSupported(), clearModule(), llvm::SmallVectorTemplateCommon< T, typename >::empty(), G, llvm::PoisonValue::get(), indirectGlobals(), isValidIndirectionTable(), IT, and llvm::SmallVectorTemplateBase< T, bool >::push_back().
Referenced by llvm::HipStdParAcceleratorCodeSelectionPass::run().
|
inlinestatic |
Definition at line 349 of file HipStdPar.cpp.
References C(), llvm::copy_if(), llvm::dyn_cast(), eraseFromModule(), F, llvm::for_each(), llvm::removeFromUsedLists(), and ToRemove.
Referenced by llvm::HipStdParAcceleratorCodeSelectionPass::run().
|
static |
Definition at line 224 of file HipStdPar.cpp.
References assert(), llvm::cast(), llvm::dyn_cast(), G, and I.
Referenced by indirectGlobals().
|
staticconstexpr |
Definition at line 523 of file HipStdPar.cpp.
Referenced by llvm::HipStdParAllocationInterpositionPass::run().
|
staticconstexpr |
Definition at line 573 of file HipStdPar.cpp.
Referenced by llvm::HipStdParMathFixupPass::run().
|
staticconstexpr |
Definition at line 481 of file HipStdPar.cpp.
Referenced by llvm::instrumentor::readConfigFromJSON(), and llvm::HipStdParAllocationInterpositionPass::run().