[all-commits] [llvm/llvm-project] 630bff: [RFC][AMDGPU] Add AMDGPU_SUMMARY bitcode block for...
Shilei Tian via All-commits
all-commits at lists.llvm.org
Tue Apr 28 18:15:32 PDT 2026
Branch: refs/heads/users/shiltian/amdgpu-thinlto-summary-block
Home: https://github.com/llvm/llvm-project
Commit: 630bff8a2248da1873f27060d17301b5a5606ebb
https://github.com/llvm/llvm-project/commit/630bff8a2248da1873f27060d17301b5a5606ebb
Author: Shilei Tian <i at tianshilei.me>
Date: 2026-04-28 (Tue, 28 Apr 2026)
Changed paths:
M llvm/include/llvm/Bitcode/BitcodeReader.h
M llvm/include/llvm/Bitcode/LLVMBitCodes.h
A llvm/include/llvm/Support/AMDGPUSummary.h
M llvm/lib/Bitcode/Reader/BitcodeAnalyzer.cpp
M llvm/lib/Bitcode/Reader/BitcodeReader.cpp
M llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
A llvm/test/ThinLTO/AMDGPU/amdgpu-summary-roundtrip.ll
Log Message:
-----------
[RFC][AMDGPU] Add AMDGPU_SUMMARY bitcode block for ThinLTO
With AMDGPU object linking, device functions are compiled separately from the
kernels that call them. Without whole-program visibility, the compiler must be
conservative about occupancy for every device function, leading to suboptimal
resource usage. However, GPU kernels typically carry explicit occupancy control
attributes that constrain the launch environment. ThinLTO is the natural place
to propagate these kernel attributes to callees: the combined module summary
index contains a cross-TU call graph, allowing occupancy information to be
propagated top-down from kernels to all reachable device functions. The backend
can then generate better code with the propagated constraints, achieving
whole-program awareness without the compile-time overhead of full LTO.
This patch introduces a dedicated AMDGPU_SUMMARY bitcode block that serializes
per-function summary data alongside the standard module summary. The block is
scoped to AMDGPU so that non-AMDGPU targets are completely unaffected. A
follow-up patch will add the ThinLTO propagation logic that reads these
summaries and applies conservative attribute bounds to device functions
reachable from multiple kernels.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list