LLVM  14.0.0git
Macros | Functions
AMDGPUAnnotateKernelFeatures.cpp File Reference
#include "AMDGPU.h"
#include "GCNSubtarget.h"
#include "llvm/Analysis/CallGraph.h"
#include "llvm/Analysis/CallGraphSCCPass.h"
#include "llvm/CodeGen/TargetPassConfig.h"
#include "llvm/IR/IntrinsicsAMDGPU.h"
#include "llvm/IR/IntrinsicsR600.h"
#include "llvm/Target/TargetMachine.h"
Include dependency graph for AMDGPUAnnotateKernelFeatures.cpp:

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 bool isDSAddress (const Constant *C)
 
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)
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "amdgpu-annotate-kernel-features"

Definition at line 23 of file AMDGPUAnnotateKernelFeatures.cpp.

Function Documentation

◆ castRequiresQueuePtr()

static bool castRequiresQueuePtr ( const AddrSpaceCastInst ASC)
static

◆ copyFeaturesToFunction()

static void copyFeaturesToFunction ( Function Parent,
const Function Callee,
bool &  NeedQueuePtr 
)
static

Definition at line 202 of file AMDGPUAnnotateKernelFeatures.cpp.

References Callee, handleAttr(), and ImplicitAttrNames.

◆ handleAttr()

static bool handleAttr ( Function Parent,
const Function Callee,
StringRef  Name 
)
static

Definition at line 193 of file AMDGPUAnnotateKernelFeatures.cpp.

References llvm::Function::addFnAttr(), and Callee.

Referenced by copyFeaturesToFunction().

◆ INITIALIZE_PASS()

INITIALIZE_PASS ( AMDGPUAnnotateKernelFeatures  ,
DEBUG_TYPE  ,
"Add AMDGPU function attributes ,
false  ,
false   
)

◆ intrinsicToAttrName()

static StringRef intrinsicToAttrName ( Intrinsic::ID  ID,
bool &  NonKernelOnly,
bool &  IsQueuePtr 
)
static

Definition at line 150 of file AMDGPUAnnotateKernelFeatures.cpp.

◆ isDSAddress()

static bool isDSAddress ( const Constant C)
static