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

LLVM Continuous Integration via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 30 06:51:20 PDT 2026


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux-android` running on `sanitizer-buildbot-android` while building `llvm` at step 2 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/186/builds/778

<details>
<summary>Here is the relevant piece of the build log for the reference</summary>

```
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
[5819/5961] Building CXX object tools/llvm-ir2vec/lib/MIRUtils/CMakeFiles/LLVMMIREmbUtils.dir/MIRUtils.cpp.o
[5820/5961] Linking CXX static library lib/libLLVMMIREmbUtils.a
[5821/5961] Linking CXX executable bin/clang-scan-deps
[5822/5961] Building CXX object tools/llvm-isel-fuzzer/CMakeFiles/llvm-isel-fuzzer.dir/DummyISelFuzzer.cpp.o
[5823/5961] Building CXX object tools/llvm-isel-fuzzer/CMakeFiles/llvm-isel-fuzzer.dir/llvm-isel-fuzzer.cpp.o
[5824/5961] Linking CXX executable bin/clang-refactor
[5825/5961] Building CXX object tools/llvm-jitlink/CMakeFiles/llvm-jitlink.dir/llvm-jitlink.cpp.o
[5826/5961] Building CXX object tools/llvm-jitlink/CMakeFiles/llvm-jitlink.dir/llvm-jitlink-coff.cpp.o
[5827/5961] Building CXX object tools/llvm-jitlink/CMakeFiles/llvm-jitlink.dir/llvm-jitlink-elf.cpp.o
[5828/5961] Building CXX object tools/llvm-calc-occupancy/CMakeFiles/llvm-calc-occupancy.dir/llvm-calc-occupancy.cpp.o
FAILED: tools/llvm-calc-occupancy/CMakeFiles/llvm-calc-occupancy.dir/llvm-calc-occupancy.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes CCACHE_SLOPPINESS=pch_defines,time_macros /usr/bin/ccache /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm_build0/bin/clang++ -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GLIBCXX_USE_CXX11_ABI=1 -D_GNU_SOURCE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm_build64/tools/llvm-calc-occupancy -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/tools/llvm-calc-occupancy -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm_build64/include -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/include -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/lib/Target/AMDGPU -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm_build64/lib/Target/AMDGPU -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wno-pass-failed -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=c++17 -UNDEBUG -fno-exceptions -funwind-tables -fno-rtti -MD -MT tools/llvm-calc-occupancy/CMakeFiles/llvm-calc-occupancy.dir/llvm-calc-occupancy.cpp.o -MF tools/llvm-calc-occupancy/CMakeFiles/llvm-calc-occupancy.dir/llvm-calc-occupancy.cpp.o.d -o tools/llvm-calc-occupancy/CMakeFiles/llvm-calc-occupancy.dir/llvm-calc-occupancy.cpp.o -c /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/tools/llvm-calc-occupancy/llvm-calc-occupancy.cpp
/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/tools/llvm-calc-occupancy/llvm-calc-occupancy.cpp:229:41: error: no member named 'getAddressableNumSGPRs' in namespace 'llvm::AMDGPU::IsaInfo'; did you mean 'getAddressableNumVGPRs'?
  229 |   unsigned AddrSGPRs = AMDGPU::IsaInfo::getAddressableNumSGPRs(STI);
      |                                         ^~~~~~~~~~~~~~~~~~~~~~
      |                                         getAddressableNumVGPRs
/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h:281:10: note: 'getAddressableNumVGPRs' declared here
  281 | unsigned getAddressableNumVGPRs(const MCSubtargetInfo &STI,
      |          ^
/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/tools/llvm-calc-occupancy/llvm-calc-occupancy.cpp:229:67: error: too few arguments to function call, expected 2, have 1
  229 |   unsigned AddrSGPRs = AMDGPU::IsaInfo::getAddressableNumSGPRs(STI);
      |                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    ^
/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h:281:10: note: 'getAddressableNumVGPRs' declared here
  281 | unsigned getAddressableNumVGPRs(const MCSubtargetInfo &STI,
      |          ^                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  282 |                                 unsigned DynamicVGPRBlockSize);
      |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
[5829/5961] Building CXX object tools/llvm-jitlink/CMakeFiles/llvm-jitlink.dir/llvm-jitlink-macho.cpp.o
[5830/5961] Linking CXX executable bin/clang-extdef-mapping
[5831/5961] Linking CXX executable bin/clang-import-test
[5832/5961] Linking CXX executable bin/llvm-exegesis
[5833/5961] Linking CXX executable bin/llvm-dwarfutil
[5834/5961] Linking CXX shared library lib/libclang-cpp.so.24.0git
[5835/5961] Linking CXX executable bin/llvm-gsymutil
[5836/5961] Linking CXX executable bin/clang-check
[5837/5961] Linking CXX shared library lib/libclang.so.24.0.0git
[5838/5961] Linking CXX executable bin/llvm-ir2vec
[5839/5961] Linking CXX executable bin/llvm-isel-fuzzer
[5840/5961] Linking CXX executable bin/clang-24
[5841/5961] Linking CXX executable bin/clang-repl
ninja: build stopped: subcommand failed.

How to reproduce locally: https://github.com/google/sanitizers/wiki/SanitizerBotReproduceBuild


@@@STEP_FAILURE@@@

@@@STEP_FAILURE@@@
Step 8 (bootstrap clang) failure: bootstrap clang (failure)
...
[5819/5961] Building CXX object tools/llvm-ir2vec/lib/MIRUtils/CMakeFiles/LLVMMIREmbUtils.dir/MIRUtils.cpp.o
[5820/5961] Linking CXX static library lib/libLLVMMIREmbUtils.a
[5821/5961] Linking CXX executable bin/clang-scan-deps
[5822/5961] Building CXX object tools/llvm-isel-fuzzer/CMakeFiles/llvm-isel-fuzzer.dir/DummyISelFuzzer.cpp.o
[5823/5961] Building CXX object tools/llvm-isel-fuzzer/CMakeFiles/llvm-isel-fuzzer.dir/llvm-isel-fuzzer.cpp.o
[5824/5961] Linking CXX executable bin/clang-refactor
[5825/5961] Building CXX object tools/llvm-jitlink/CMakeFiles/llvm-jitlink.dir/llvm-jitlink.cpp.o
[5826/5961] Building CXX object tools/llvm-jitlink/CMakeFiles/llvm-jitlink.dir/llvm-jitlink-coff.cpp.o
[5827/5961] Building CXX object tools/llvm-jitlink/CMakeFiles/llvm-jitlink.dir/llvm-jitlink-elf.cpp.o
[5828/5961] Building CXX object tools/llvm-calc-occupancy/CMakeFiles/llvm-calc-occupancy.dir/llvm-calc-occupancy.cpp.o
FAILED: tools/llvm-calc-occupancy/CMakeFiles/llvm-calc-occupancy.dir/llvm-calc-occupancy.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes CCACHE_SLOPPINESS=pch_defines,time_macros /usr/bin/ccache /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm_build0/bin/clang++ -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GLIBCXX_USE_CXX11_ABI=1 -D_GNU_SOURCE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm_build64/tools/llvm-calc-occupancy -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/tools/llvm-calc-occupancy -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm_build64/include -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/include -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/lib/Target/AMDGPU -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm_build64/lib/Target/AMDGPU -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wno-pass-failed -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=c++17 -UNDEBUG -fno-exceptions -funwind-tables -fno-rtti -MD -MT tools/llvm-calc-occupancy/CMakeFiles/llvm-calc-occupancy.dir/llvm-calc-occupancy.cpp.o -MF tools/llvm-calc-occupancy/CMakeFiles/llvm-calc-occupancy.dir/llvm-calc-occupancy.cpp.o.d -o tools/llvm-calc-occupancy/CMakeFiles/llvm-calc-occupancy.dir/llvm-calc-occupancy.cpp.o -c /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/tools/llvm-calc-occupancy/llvm-calc-occupancy.cpp
/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/tools/llvm-calc-occupancy/llvm-calc-occupancy.cpp:229:41: error: no member named 'getAddressableNumSGPRs' in namespace 'llvm::AMDGPU::IsaInfo'; did you mean 'getAddressableNumVGPRs'?
  229 |   unsigned AddrSGPRs = AMDGPU::IsaInfo::getAddressableNumSGPRs(STI);
      |                                         ^~~~~~~~~~~~~~~~~~~~~~
      |                                         getAddressableNumVGPRs
/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h:281:10: note: 'getAddressableNumVGPRs' declared here
  281 | unsigned getAddressableNumVGPRs(const MCSubtargetInfo &STI,
      |          ^
/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/tools/llvm-calc-occupancy/llvm-calc-occupancy.cpp:229:67: error: too few arguments to function call, expected 2, have 1
  229 |   unsigned AddrSGPRs = AMDGPU::IsaInfo::getAddressableNumSGPRs(STI);
      |                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    ^
/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h:281:10: note: 'getAddressableNumVGPRs' declared here
  281 | unsigned getAddressableNumVGPRs(const MCSubtargetInfo &STI,
      |          ^                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  282 |                                 unsigned DynamicVGPRBlockSize);
      |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
[5829/5961] Building CXX object tools/llvm-jitlink/CMakeFiles/llvm-jitlink.dir/llvm-jitlink-macho.cpp.o
[5830/5961] Linking CXX executable bin/clang-extdef-mapping
[5831/5961] Linking CXX executable bin/clang-import-test
[5832/5961] Linking CXX executable bin/llvm-exegesis
[5833/5961] Linking CXX executable bin/llvm-dwarfutil
[5834/5961] Linking CXX shared library lib/libclang-cpp.so.24.0git
[5835/5961] Linking CXX executable bin/llvm-gsymutil
[5836/5961] Linking CXX executable bin/clang-check
[5837/5961] Linking CXX shared library lib/libclang.so.24.0.0git
[5838/5961] Linking CXX executable bin/llvm-ir2vec
[5839/5961] Linking CXX executable bin/llvm-isel-fuzzer
[5840/5961] Linking CXX executable bin/clang-24
[5841/5961] Linking CXX executable bin/clang-repl
ninja: build stopped: subcommand failed.

How to reproduce locally: https://github.com/google/sanitizers/wiki/SanitizerBotReproduceBuild




program finished with exit code 2

```

</details>

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


More information about the llvm-commits mailing list