llvm-project/llvm
Jon Chesterfield 3a20597776 [amdgpu] Implement lds kernel id intrinsic
Implement an intrinsic for use lowering LDS variables to different
addresses from different kernels. This will allow kernels that cannot
reach an LDS variable to avoid wasting space for it.

There are a number of implicit arguments accessed by intrinsic already
so this implementation closely follows the existing handling. It is slightly
novel in that this SGPR is written by the kernel prologue.

It is necessary in the general case to put variables at different addresses
such that they can be compactly allocated and thus necessary for an
indirect function call to have some means of determining where a
given variable was allocated. Claiming an arbitrary SGPR into which
an integer can be written by the kernel, in this implementation based
on metadata associated with that kernel, which is then passed on to
indirect call sites is sufficient to determine the variable address.

The intent is to emit a __const array of LDS addresses and index into it.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D125060
2022-07-19 17:46:19 +01:00
..
benchmarks
bindings [IR] Remove support for float binop constant expressions 2022-07-12 09:40:49 +02:00
cmake Revert "[llvm] add zstd to llvm::compression namespace" 2022-07-14 01:23:20 -07:00
docs [Reland][Debuginfo][llvm-dwarfutil] llvm-dwarfutil dsymutil-like tool for ELF. 2022-07-19 15:11:36 +03:00
examples [Kaleidoscope] Remove unused function argument 2022-06-30 20:47:01 +00:00
include [amdgpu] Implement lds kernel id intrinsic 2022-07-19 17:46:19 +01:00
lib [amdgpu] Implement lds kernel id intrinsic 2022-07-19 17:46:19 +01:00
projects
resources
runtimes
test [amdgpu] Implement lds kernel id intrinsic 2022-07-19 17:46:19 +01:00
tools [Reland][Debuginfo][llvm-dwarfutil] llvm-dwarfutil dsymutil-like tool for ELF. 2022-07-19 15:11:36 +03:00
unittests Fix signed/unsigned comparison mismatch warning 2022-07-19 11:13:31 +01:00
utils [gn build] (manually) port 4539b44148 (llvm-dwarfutil) 2022-07-19 11:50:54 -04:00
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt Revert "[llvm] add zstd to llvm::compression namespace" 2022-07-14 01:23:20 -07:00
CODE_OWNERS.TXT
CREDITS.TXT
LICENSE.TXT
README.txt
RELEASE_TESTERS.TXT
configure
llvm.spec.in

README.txt

The LLVM Compiler Infrastructure
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.