LLVM  14.0.0git
Classes | Macros | Enumerations | Functions | Variables
AMDGPUAttributor.cpp File Reference
#include "AMDGPU.h"
#include "GCNSubtarget.h"
#include "llvm/CodeGen/TargetPassConfig.h"
#include "llvm/IR/IntrinsicsAMDGPU.h"
#include "llvm/IR/IntrinsicsR600.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Transforms/IPO/Attributor.h"
Include dependency graph for AMDGPUAttributor.cpp:

Go to the source code of this file.

Classes

class  AMDGPUInformationCache
 
struct  AAAMDAttributes
 
struct  AAUniformWorkGroupSize
 
struct  AAUniformWorkGroupSizeFunction
 
struct  AAAMDAttributesFunction
 
class  AMDGPUAttributor
 

Macros

#define DEBUG_TYPE   "amdgpu-attributor"
 

Enumerations

enum  ImplicitArgumentMask {
  NOT_IMPLICIT_INPUT = 0, DISPATCH_PTR = 1 << 0, QUEUE_PTR = 1 << 1, DISPATCH_ID = 1 << 2,
  IMPLICIT_ARG_PTR = 1 << 3, WORKGROUP_ID_X = 1 << 4, WORKGROUP_ID_Y = 1 << 5, WORKGROUP_ID_Z = 1 << 6,
  WORKITEM_ID_X = 1 << 7, WORKITEM_ID_Y = 1 << 8, WORKITEM_ID_Z = 1 << 9, ALL_ARGUMENT_MASK = (1 << 10) - 1
}
 

Functions

static ImplicitArgumentMask intrinsicToAttrMask (Intrinsic::ID ID, bool &NonKernelOnly, bool &IsQueuePtr)
 
static bool castRequiresQueuePtr (unsigned SrcAS)
 
static bool isDSAddress (const Constant *C)
 

Variables

static constexpr std::pair< ImplicitArgumentMask, StringLiteralImplicitAttrs []
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "amdgpu-attributor"

Definition at line 21 of file AMDGPUAttributor.cpp.

Enumeration Type Documentation

◆ ImplicitArgumentMask

Enumerator
NOT_IMPLICIT_INPUT 
DISPATCH_PTR 
QUEUE_PTR 
DISPATCH_ID 
IMPLICIT_ARG_PTR 
WORKGROUP_ID_X 
WORKGROUP_ID_Y 
WORKGROUP_ID_Z 
WORKITEM_ID_X 
WORKITEM_ID_Y 
WORKITEM_ID_Z 
ALL_ARGUMENT_MASK 

Definition at line 25 of file AMDGPUAttributor.cpp.

Function Documentation

◆ castRequiresQueuePtr()

static bool castRequiresQueuePtr ( unsigned  SrcAS)
static

◆ intrinsicToAttrMask()

static ImplicitArgumentMask intrinsicToAttrMask ( Intrinsic::ID  ID,
bool &  NonKernelOnly,
bool &  IsQueuePtr 
)
static

◆ isDSAddress()

static bool isDSAddress ( const Constant C)
static

Variable Documentation

◆ ImplicitAttrs

constexpr std::pair<ImplicitArgumentMask, StringLiteral> ImplicitAttrs[]
staticconstexpr
Initial value:
= {
{DISPATCH_PTR, "amdgpu-no-dispatch-ptr"},
{QUEUE_PTR, "amdgpu-no-queue-ptr"},
{DISPATCH_ID, "amdgpu-no-dispatch-id"},
{IMPLICIT_ARG_PTR, "amdgpu-no-implicitarg-ptr"},
{WORKGROUP_ID_X, "amdgpu-no-workgroup-id-x"},
{WORKGROUP_ID_Y, "amdgpu-no-workgroup-id-y"},
{WORKGROUP_ID_Z, "amdgpu-no-workgroup-id-z"},
{WORKITEM_ID_X, "amdgpu-no-workitem-id-x"},
{WORKITEM_ID_Y, "amdgpu-no-workitem-id-y"},
{WORKITEM_ID_Z, "amdgpu-no-workitem-id-z"}
}

Definition at line 45 of file AMDGPUAttributor.cpp.

Referenced by AAAMDAttributesFunction::getAsStr(), AAAMDAttributesFunction::initialize(), AAAMDAttributesFunction::manifest(), and llvm::SITargetLowering::passSpecialInputs().

WORKITEM_ID_Y
@ WORKITEM_ID_Y
Definition: AMDGPUAttributor.cpp:39
IMPLICIT_ARG_PTR
@ IMPLICIT_ARG_PTR
Definition: AMDGPUAttributor.cpp:32
WORKGROUP_ID_Y
@ WORKGROUP_ID_Y
Definition: AMDGPUAttributor.cpp:34
WORKITEM_ID_X
@ WORKITEM_ID_X
Definition: AMDGPUAttributor.cpp:38
DISPATCH_ID
@ DISPATCH_ID
Definition: AMDGPUAttributor.cpp:31
QUEUE_PTR
@ QUEUE_PTR
Definition: AMDGPUAttributor.cpp:30
DISPATCH_PTR
@ DISPATCH_PTR
Definition: AMDGPUAttributor.cpp:29
WORKGROUP_ID_X
@ WORKGROUP_ID_X
Definition: AMDGPUAttributor.cpp:33
WORKGROUP_ID_Z
@ WORKGROUP_ID_Z
Definition: AMDGPUAttributor.cpp:35
WORKITEM_ID_Z
@ WORKITEM_ID_Z
Definition: AMDGPUAttributor.cpp:40