[llvm] [llvm-calc-occupancy] Add an AMDGPU occupancy calculator tool (PR #208727)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 31 05:55:44 PDT 2026


================
@@ -0,0 +1,30 @@
+# This tool depends on AMDGPU backend internals (GCNSubtarget). Only build it
+# when the AMDGPU target is enabled.
+if(NOT "AMDGPU" IN_LIST LLVM_TARGETS_TO_BUILD)
+  return()
+endif()
+
+include_directories(
+  ${LLVM_MAIN_SRC_DIR}/lib/Target/AMDGPU
+  ${LLVM_BINARY_DIR}/lib/Target/AMDGPU
+  )
+
+set(LLVM_LINK_COMPONENTS
+  AMDGPUCodeGen
+  AMDGPUDesc
+  AMDGPUInfo
----------------
arsenm wrote:

All of the information this uses should be moved into TargetParser 

https://github.com/llvm/llvm-project/pull/208727


More information about the llvm-commits mailing list