[all-commits] [llvm/llvm-project] 49230e: [AMDGPU] Add `.amdgpu.info` section for per-functi...
Shilei Tian via All-commits
all-commits at lists.llvm.org
Thu Apr 16 14:53:43 PDT 2026
Branch: refs/heads/users/shiltian/amdgpu-function-info
Home: https://github.com/llvm/llvm-project
Commit: 49230ebef34fa82efde0e830b3cd46aea0268e8d
https://github.com/llvm/llvm-project/commit/49230ebef34fa82efde0e830b3cd46aea0268e8d
Author: Shilei Tian <i at tianshilei.me>
Date: 2026-04-16 (Thu, 16 Apr 2026)
Changed paths:
M llvm/docs/AMDGPUUsage.rst
A llvm/include/llvm/Support/AMDGPUObjLinkingInfo.h
M llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
M llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.h
M llvm/lib/Target/AMDGPU/AMDGPUMCInstLower.cpp
M llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
M llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp
M llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.h
A llvm/test/CodeGen/AMDGPU/lds-link-time-codegen-agpr.ll
A llvm/test/CodeGen/AMDGPU/lds-link-time-codegen-callgraph.ll
A llvm/test/CodeGen/AMDGPU/lds-link-time-codegen-cross-tu-addr-taken.ll
A llvm/test/CodeGen/AMDGPU/lds-link-time-codegen-indirect.ll
M llvm/test/CodeGen/AMDGPU/lds-link-time-codegen-named-barrier.ll
A llvm/test/CodeGen/AMDGPU/lds-link-time-codegen-typeid.ll
M llvm/test/CodeGen/AMDGPU/lds-link-time-codegen.ll
A llvm/test/MC/AMDGPU/amdgpu-info-err.s
A llvm/test/MC/AMDGPU/amdgpu-info-roundtrip.s
Log Message:
-----------
[AMDGPU] Add `.amdgpu.info` section for per-function metadata
AMDGPU object linking requires the linker to propagate resource usage
(registers, stack, LDS) across translation units. To support this, the compiler
must emit per-function metadata and call graph edges in the relocatable object
so the linker can compute whole-program resource requirements.
This PR introduces a `.amdgpu.info` ELF section using a tagged, length-prefixed
binary format: each entry is encoded as:
```
[kind: u8] [len: u8] [payload: <len> bytes]
```
A function scope is opened by an `INFO_FUNC` entry (containing a symbol
reference), followed by per-function attributes (register counts, flags, private
segment size) and relational edges (direct calls, LDS uses, indirect call
signatures). String data such as function type signatures is stored in a
companion `.amdgpu.strtab` section.
The format is forward-compatible: a consumer that encounters an unknown kind can
skip it by reading the length byte, allowing new entry kinds to be added without
breaking existing toolchains.
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