LLVM
8.0.1
|
#include "AMDGPU.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Mangler.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/User.h"
#include "llvm/Pass.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "amdgpu-lower-enqueued-block" |
Functions | |
INITIALIZE_PASS (AMDGPUOpenCLEnqueuedBlockLowering, DEBUG_TYPE, "Lower OpenCL enqueued blocks", false, false) ModulePass *llvm | |
static void | collectCallers (Function *F, DenseSet< Function *> &Callers) |
Collect direct or indrect callers of F and save them to Callers . More... | |
static void | collectFunctionUsers (User *U, DenseSet< Function *> &Funcs) |
If U is instruction or constant, collect functions which directly or indirectly use it. More... | |
#define DEBUG_TYPE "amdgpu-lower-enqueued-block" |
Definition at line 48 of file AMDGPUOpenCLEnqueuedBlockLowering.cpp.
Collect direct or indrect callers of F
and save them to Callers
.
Definition at line 81 of file AMDGPUOpenCLEnqueuedBlockLowering.cpp.
References llvm::detail::DenseSetImpl< ValueT, DenseMap< ValueT, detail::DenseSetEmpty, ValueInfoT, detail::DenseSetPair< ValueT > >, ValueInfoT >::insert(), and llvm::Value::users().
Referenced by collectFunctionUsers().
If U
is instruction or constant, collect functions which directly or indirectly use it.
Definition at line 93 of file AMDGPUOpenCLEnqueuedBlockLowering.cpp.
References llvm::CallingConv::AMDGPU_KERNEL, C, collectCallers(), llvm::dbgs(), llvm::GlobalValue::ExternalLinkage, F(), llvm::Module::functions(), llvm::ArrayType::get(), llvm::Module::getContext(), llvm::Module::getDataLayout(), llvm::Type::getInt64Ty(), llvm::Mangler::getNameWithPrefix(), llvm::Constant::getNullValue(), llvm::ConstantExpr::getPointerCast(), AMDGPUAS::GLOBAL_ADDRESS, I, llvm::detail::DenseSetImpl< ValueT, DenseMap< ValueT, detail::DenseSetEmpty, ValueInfoT, detail::DenseSetPair< ValueT > >, ValueInfoT >::insert(), LLVM_DEBUG, Name, llvm::GlobalValue::NotThreadLocal, llvm::Value::replaceAllUsesWith(), llvm::AMDGPU::HSAMD::Kernel::Attrs::Key::RuntimeHandle, and llvm::Value::users().
INITIALIZE_PASS | ( | AMDGPUOpenCLEnqueuedBlockLowering | , |
DEBUG_TYPE | , | ||
"Lower OpenCL enqueued blocks" | , | ||
false | , | ||
false | |||
) |
Definition at line 72 of file AMDGPUOpenCLEnqueuedBlockLowering.cpp.