LLVM 22.0.0git
AMDGPUAttributor.cpp File Reference
#include "AMDGPU.h"
#include "GCNSubtarget.h"
#include "Utils/AMDGPUBaseInfo.h"
#include "llvm/IR/IntrinsicsAMDGPU.h"
#include "llvm/IR/IntrinsicsR600.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Transforms/IPO/Attributor.h"
#include "AMDGPUAttributes.def"

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "amdgpu-attributor"
#define AMDGPU_ATTRIBUTE(Name, Str)
#define AMDGPU_ATTRIBUTE(Name, Str)
#define AMDGPU_ATTRIBUTE(Name, Str)

Enumerations

enum  ImplicitArgumentPositions { LAST_ARG_POS }
enum  ImplicitArgumentMask { NOT_IMPLICIT_INPUT = 0 , ALL_ARGUMENT_MASK = (1 << LAST_ARG_POS) - 1 }

Functions

static ImplicitArgumentMask intrinsicToAttrMask (Intrinsic::ID ID, bool &NonKernelOnly, bool &NeedsImplicit, bool HasApertureRegs, bool SupportsGetDoorBellID, unsigned CodeObjectVersion)
static bool castRequiresQueuePtr (unsigned SrcAS)
static bool isDSAddress (const Constant *C)
static bool funcRequiresHostcallPtr (const Function &F)
 Returns true if the function requires the implicit argument be passed regardless of the function contents.

Variables

static cl::opt< unsignedIndirectCallSpecializationThreshold ("amdgpu-indirect-call-specialization-threshold", cl::desc("A threshold controls whether an indirect call will be specialized"), cl::init(3))
static constexpr std::pair< ImplicitArgumentMask, StringLiteralImplicitAttrs []

Macro Definition Documentation

◆ AMDGPU_ATTRIBUTE [1/3]

#define AMDGPU_ATTRIBUTE ( Name,
Str )
Value:
Name##_POS,

Definition at line 31 of file AMDGPUAttributor.cpp.

◆ AMDGPU_ATTRIBUTE [2/3]

#define AMDGPU_ATTRIBUTE ( Name,
Str )
Value:
Name = 1 << Name##_POS,

Definition at line 31 of file AMDGPUAttributor.cpp.

◆ AMDGPU_ATTRIBUTE [3/3]

#define AMDGPU_ATTRIBUTE ( Name,
Str )
Value:
{Name, Str},

Definition at line 31 of file AMDGPUAttributor.cpp.

◆ DEBUG_TYPE

#define DEBUG_TYPE   "amdgpu-attributor"

Definition at line 21 of file AMDGPUAttributor.cpp.

Enumeration Type Documentation

◆ ImplicitArgumentMask

Enumerator
NOT_IMPLICIT_INPUT 
ALL_ARGUMENT_MASK 

Definition at line 40 of file AMDGPUAttributor.cpp.

◆ ImplicitArgumentPositions

Enumerator
LAST_ARG_POS 

Definition at line 33 of file AMDGPUAttributor.cpp.

Function Documentation

◆ castRequiresQueuePtr()

bool castRequiresQueuePtr ( unsigned SrcAS)
static

◆ funcRequiresHostcallPtr()

bool funcRequiresHostcallPtr ( const Function & F)
static

Returns true if the function requires the implicit argument be passed regardless of the function contents.

Definition at line 136 of file AMDGPUAttributor.cpp.

References F.

◆ intrinsicToAttrMask()

ImplicitArgumentMask intrinsicToAttrMask ( Intrinsic::ID ID,
bool & NonKernelOnly,
bool & NeedsImplicit,
bool HasApertureRegs,
bool SupportsGetDoorBellID,
unsigned CodeObjectVersion )
static

Definition at line 58 of file AMDGPUAttributor.cpp.

◆ isDSAddress()

Variable Documentation

◆ ImplicitAttrs

std::pair<ImplicitArgumentMask, StringLiteral> ImplicitAttrs[]
staticconstexpr

Definition at line 48 of file AMDGPUAttributor.cpp.

Referenced by llvm::SITargetLowering::passSpecialInputs().

◆ IndirectCallSpecializationThreshold

cl::opt< unsigned > IndirectCallSpecializationThreshold("amdgpu-indirect-call-specialization-threshold", cl::desc( "A threshold controls whether an indirect call will be specialized"), cl::init(3)) ( "amdgpu-indirect-call-specialization-threshold" ,
cl::desc( "A threshold controls whether an indirect call will be specialized") ,
cl::init(3)  )
static