LLVM 22.0.0git
AMDGPUWaitSGPRHazards.cpp File Reference

Insert s_wait_alu instructions to mitigate SGPR read hazards on GFX12. More...

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "amdgpu-wait-sgpr-hazards"

Functions

 INITIALIZE_PASS (AMDGPUWaitSGPRHazardsLegacy, DEBUG_TYPE, "AMDGPU Insert waits for SGPR read hazards", false, false) PreservedAnalyses AMDGPUWaitSGPRHazardsPass

Variables

static cl::opt< boolGlobalEnableSGPRHazardWaits ("amdgpu-sgpr-hazard-wait", cl::init(true), cl::Hidden, cl::desc("Enable required s_wait_alu on SGPR hazards"))
static cl::opt< boolGlobalCullSGPRHazardsOnFunctionBoundary ("amdgpu-sgpr-hazard-boundary-cull", cl::init(false), cl::Hidden, cl::desc("Cull hazards on function boundaries"))
static cl::opt< boolGlobalCullSGPRHazardsAtMemWait ("amdgpu-sgpr-hazard-mem-wait-cull", cl::init(false), cl::Hidden, cl::desc("Cull hazards on memory waits"))
static cl::opt< unsignedGlobalCullSGPRHazardsMemWaitThreshold ("amdgpu-sgpr-hazard-mem-wait-cull-threshold", cl::init(8), cl::Hidden, cl::desc("Number of tracked SGPRs before initiating hazard cull on memory " "wait"))

Detailed Description

Insert s_wait_alu instructions to mitigate SGPR read hazards on GFX12.

Definition in file AMDGPUWaitSGPRHazards.cpp.

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "amdgpu-wait-sgpr-hazards"

Definition at line 23 of file AMDGPUWaitSGPRHazards.cpp.

Function Documentation

◆ INITIALIZE_PASS()

INITIALIZE_PASS ( AMDGPUWaitSGPRHazardsLegacy ,
DEBUG_TYPE ,
"AMDGPU Insert waits for SGPR read hazards" ,
false ,
false  )

Variable Documentation

◆ GlobalCullSGPRHazardsAtMemWait

cl::opt< bool > GlobalCullSGPRHazardsAtMemWait("amdgpu-sgpr-hazard-mem-wait-cull", cl::init(false), cl::Hidden, cl::desc("Cull hazards on memory waits")) ( "amdgpu-sgpr-hazard-mem-wait-cull" ,
cl::init(false) ,
cl::Hidden ,
cl::desc("Cull hazards on memory waits")  )
static

◆ GlobalCullSGPRHazardsMemWaitThreshold

cl::opt< unsigned > GlobalCullSGPRHazardsMemWaitThreshold("amdgpu-sgpr-hazard-mem-wait-cull-threshold", cl::init(8), cl::Hidden, cl::desc("Number of tracked SGPRs before initiating hazard cull on memory " "wait")) ( "amdgpu-sgpr-hazard-mem-wait-cull-threshold" ,
cl::init(8) ,
cl::Hidden ,
cl::desc("Number of tracked SGPRs before initiating hazard cull on memory " "wait")  )
static

◆ GlobalCullSGPRHazardsOnFunctionBoundary

cl::opt< bool > GlobalCullSGPRHazardsOnFunctionBoundary("amdgpu-sgpr-hazard-boundary-cull", cl::init(false), cl::Hidden, cl::desc("Cull hazards on function boundaries")) ( "amdgpu-sgpr-hazard-boundary-cull" ,
cl::init(false) ,
cl::Hidden ,
cl::desc("Cull hazards on function boundaries")  )
static

◆ GlobalEnableSGPRHazardWaits

cl::opt< bool > GlobalEnableSGPRHazardWaits("amdgpu-sgpr-hazard-wait", cl::init(true), cl::Hidden, cl::desc("Enable required s_wait_alu on SGPR hazards")) ( "amdgpu-sgpr-hazard-wait" ,
cl::init(true) ,
cl::Hidden ,
cl::desc("Enable required s_wait_alu on SGPR hazards")  )
static