[llvm] [AMDGPU][NFC] Move InstCounterType and Waitcnt to AMDGPUWaitcntUtils.h (PR #187823)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 8 09:26:59 PDT 2026
================
@@ -69,6 +70,49 @@ static cl::opt<bool> ExpertSchedulingModeFlag(
cl::desc("Enable expert scheduling mode 2 for all functions (GFX12+ only)"),
cl::init(false), cl::Hidden);
+namespace llvm {
+
+namespace AMDGPU {
+
+iota_range<InstCounterType> inst_counter_types(InstCounterType MaxCounter) {
+ return enum_seq(LOAD_CNT, MaxCounter);
+}
+
+StringLiteral getInstCounterName(InstCounterType T) {
+ switch (T) {
+ case LOAD_CNT:
+ return "LOAD_CNT";
+ case DS_CNT:
+ return "DS_CNT";
+ case EXP_CNT:
+ return "EXP_CNT";
+ case STORE_CNT:
+ return "STORE_CNT";
+ case SAMPLE_CNT:
+ return "SAMPLE_CNT";
+ case BVH_CNT:
+ return "BVH_CNT";
+ case KM_CNT:
+ return "KM_CNT";
+ case X_CNT:
+ return "X_CNT";
+ case VA_VDST:
+ return "VA_VDST";
+ case VM_VSRC:
+ return "VM_VSRC";
+ default:
+ return "Unknown T";
----------------
arsenm wrote:
To make all the compilers happy you have to put the unreachable after the switch
https://github.com/llvm/llvm-project/pull/187823
More information about the llvm-commits
mailing list