LLVM
8.0.1
|
#include "AMDGPU.h"
#include "AMDGPUSubtarget.h"
#include "Utils/AMDGPUBaseInfo.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Triple.h"
#include "llvm/Analysis/CallGraph.h"
#include "llvm/Analysis/CallGraphSCCPass.h"
#include "llvm/CodeGen/TargetPassConfig.h"
#include "llvm/IR/CallSite.h"
#include "llvm/IR/Constant.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Type.h"
#include "llvm/IR/Use.h"
#include "llvm/Pass.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Target/TargetMachine.h"
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "amdgpu-annotate-kernel-features" |
Functions | |
INITIALIZE_PASS (AMDGPUAnnotateKernelFeatures, DEBUG_TYPE, "Add AMDGPU function attributes", false, false) static bool castRequiresQueuePtr(unsigned SrcAS) | |
static bool | castRequiresQueuePtr (const AddrSpaceCastInst *ASC) |
static StringRef | intrinsicToAttrName (Intrinsic::ID ID, bool &NonKernelOnly, bool &IsQueuePtr) |
static bool | handleAttr (Function &Parent, const Function &Callee, StringRef Name) |
static void | copyFeaturesToFunction (Function &Parent, const Function &Callee, bool &NeedQueuePtr) |
#define DEBUG_TYPE "amdgpu-annotate-kernel-features" |
Definition at line 40 of file AMDGPUAnnotateKernelFeatures.cpp.
|
static |
Definition at line 90 of file AMDGPUAnnotateKernelFeatures.cpp.
References C, llvm::dyn_cast(), llvm::SmallVectorBase::empty(), llvm::ConstantExpr::getOpcode(), llvm::User::getOperand(), llvm::Type::getPointerAddressSpace(), llvm::AddrSpaceCastInst::getSrcAddressSpace(), llvm::Value::getType(), llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::User::operands(), llvm::SmallVectorImpl< T >::pop_back_val(), and llvm::SmallVectorTemplateBase< T >::push_back().
Referenced by copyFeaturesToFunction().
|
static |
Definition at line 193 of file AMDGPUAnnotateKernelFeatures.cpp.
References Callee, castRequiresQueuePtr(), llvm::dyn_cast(), llvm::StringRef::empty(), F(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getCalledFunction(), llvm::CallGraphSCC::getCallGraph(), llvm::Function::getCallingConv(), llvm::Function::getIntrinsicID(), llvm::CallGraph::getModule(), llvm::Module::getTargetTriple(), handleAttr(), llvm::GCNSubtarget::hasApertureRegs(), llvm::GCNSubtarget::hasFlatAddressSpace(), I, intrinsicToAttrName(), llvm::GlobalValue::isDeclaration(), llvm::AMDGPU::isEntryFunctionCC(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::isInlineAsm(), llvm::Intrinsic::not_intrinsic, llvm::report_fatal_error(), llvm::ARM_MB::ST, and llvm::SystemZISD::TM.
Definition at line 183 of file AMDGPUAnnotateKernelFeatures.cpp.
References llvm::Function::addFnAttr(), and llvm::Function::hasFnAttribute().
Referenced by copyFeaturesToFunction().
INITIALIZE_PASS | ( | AMDGPUAnnotateKernelFeatures | , |
DEBUG_TYPE | , | ||
"Add AMDGPU function attributes" | , | ||
false | , | ||
false | |||
) |
Definition at line 81 of file AMDGPUAnnotateKernelFeatures.cpp.
References AMDGPUAS::LOCAL_ADDRESS, and AMDGPUAS::PRIVATE_ADDRESS.
|
static |
Definition at line 143 of file AMDGPUAnnotateKernelFeatures.cpp.
References llvm::Intrinsic::amdgcn_dispatch_id, llvm::Intrinsic::amdgcn_dispatch_ptr, llvm::Intrinsic::amdgcn_implicitarg_ptr, llvm::Intrinsic::amdgcn_kernarg_segment_ptr, llvm::Intrinsic::amdgcn_queue_ptr, llvm::Intrinsic::amdgcn_workgroup_id_x, llvm::Intrinsic::amdgcn_workgroup_id_y, llvm::Intrinsic::amdgcn_workgroup_id_z, llvm::Intrinsic::amdgcn_workitem_id_x, llvm::Intrinsic::amdgcn_workitem_id_y, llvm::Intrinsic::amdgcn_workitem_id_z, llvm::Intrinsic::debugtrap, llvm::Intrinsic::r600_read_tgid_y, llvm::Intrinsic::r600_read_tgid_z, llvm::Intrinsic::r600_read_tidig_y, llvm::Intrinsic::r600_read_tidig_z, and llvm::Intrinsic::trap.
Referenced by copyFeaturesToFunction().