LLVM 20.0.0git
Namespaces | Macros | Enumerations | Functions | Variables
AMDGPUAttributor.cpp File Reference
#include "AMDGPU.h"
#include "GCNSubtarget.h"
#include "Utils/AMDGPUBaseInfo.h"
#include "llvm/Analysis/CycleAnalysis.h"
#include "llvm/Analysis/TargetTransformInfo.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 "AMDGPUAttributes.def"

Go to the source code of this file.

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
 

Macros

#define DEBUG_TYPE   "amdgpu-attributor"
 
#define AMDGPU_ATTRIBUTE(Name, Str)   Name##_POS,
 
#define AMDGPU_ATTRIBUTE(Name, Str)   Name = 1 << Name##_POS,
 
#define AMDGPU_ATTRIBUTE(Name, Str)   {Name, Str},
 

Enumerations

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

Functions

void llvm::initializeCycleInfoWrapperPassPass (PassRegistry &)
 
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.
 
 INITIALIZE_PASS_BEGIN (AMDGPUAttributorLegacy, DEBUG_TYPE, "AMDGPU Attributor", false, false) INITIALIZE_PASS_DEPENDENCY(CycleInfoWrapperPass)
 

Variables

static cl::opt< unsignedKernargPreloadCount ("amdgpu-kernarg-preload-count", cl::desc("How many kernel arguments to preload onto SGPRs"), cl::init(0))
 
static constexpr std::pair< ImplicitArgumentMask, StringLiteralImplicitAttrs []
 

Macro Definition Documentation

◆ AMDGPU_ATTRIBUTE [1/3]

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

Definition at line 51 of file AMDGPUAttributor.cpp.

◆ AMDGPU_ATTRIBUTE [2/3]

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

Definition at line 51 of file AMDGPUAttributor.cpp.

◆ AMDGPU_ATTRIBUTE [3/3]

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

Definition at line 51 of file AMDGPUAttributor.cpp.

◆ DEBUG_TYPE

#define DEBUG_TYPE   "amdgpu-attributor"

Definition at line 24 of file AMDGPUAttributor.cpp.

Enumeration Type Documentation

◆ ImplicitArgumentMask

Enumerator
NOT_IMPLICIT_INPUT 
ALL_ARGUMENT_MASK 

Definition at line 45 of file AMDGPUAttributor.cpp.

◆ ImplicitArgumentPositions

Enumerator
LAST_ARG_POS 

Definition at line 38 of file AMDGPUAttributor.cpp.

Function Documentation

◆ castRequiresQueuePtr()

static bool castRequiresQueuePtr ( unsigned  SrcAS)
static

◆ funcRequiresHostcallPtr()

static 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 132 of file AMDGPUAttributor.cpp.

References F.

◆ INITIALIZE_PASS_BEGIN()

INITIALIZE_PASS_BEGIN ( AMDGPUAttributorLegacy  ,
DEBUG_TYPE  ,
"AMDGPU Attributor"  ,
false  ,
false   
)

◆ intrinsicToAttrMask()

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

◆ isDSAddress()

static bool isDSAddress ( const Constant C)
static

Variable Documentation

◆ ImplicitAttrs

constexpr std::pair<ImplicitArgumentMask, StringLiteral> ImplicitAttrs[]
staticconstexpr
Initial value:
= {
}

Definition at line 53 of file AMDGPUAttributor.cpp.

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

◆ KernargPreloadCount

cl::opt< unsigned > KernargPreloadCount("amdgpu-kernarg-preload-count", cl::desc("How many kernel arguments to preload onto SGPRs"), cl::init(0)) ( "amdgpu-kernarg-preload-count"  ,
cl::desc("How many kernel arguments to preload onto SGPRs")  ,
cl::init(0)   
)
static