History log of /llvm-project/llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp (Results 51 – 75 of 99)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 7e937d08 15-Dec-2022 Kazu Hirata <kazu@google.com>

Don't include StringSwitch (NFC)

These files do not use llvm::StringSwitch.


# aa9bdd50 09-Dec-2022 Matt Arsenault <Matthew.Arsenault@amd.com>

llvm-reduce: Fix invalid reductions with llvm.used

Fixes issue 59413.


# d77ae7f2 07-Dec-2022 Jon Chesterfield <jonathanchesterfield@gmail.com>

[amdgpu] Reimplement LDS lowering

Renames the current lowering scheme to "module" and introduces two new
ones, "kernel" and "table", plus a "hybrid" that chooses between those three
on a per-variabl

[amdgpu] Reimplement LDS lowering

Renames the current lowering scheme to "module" and introduces two new
ones, "kernel" and "table", plus a "hybrid" that chooses between those three
on a per-variable basis.

Unit tests are set up to pass with the default lowering of "module" or "hybrid"
with this patch defaulting to "module", which will be a less dramatic codegen
change relative to the current. This reflects the sparsity of test coverage for
the table lowering method. Hybrid is better than module in every respect and
will be default in a subsequent patch.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D139433

show more ...


# a862d09a 06-Dec-2022 Nico Weber <thakis@chromium.org>

Revert "[amdgpu] Reimplement LDS lowering"

This reverts commit 982017240d7f25a8a6969b8b73dc51f9ac5b93ed.
Breaks check-llvm, see https://reviews.llvm.org/D139433#3974862


# 98201724 06-Dec-2022 Jon Chesterfield <jonathanchesterfield@gmail.com>

[amdgpu] Reimplement LDS lowering

Renames the current lowering scheme to "module" and introduces two new
ones, "kernel" and "table", plus a "hybrid" that chooses between those three
on a per-variabl

[amdgpu] Reimplement LDS lowering

Renames the current lowering scheme to "module" and introduces two new
ones, "kernel" and "table", plus a "hybrid" that chooses between those three
on a per-variable basis.

Unit tests are set up to pass with the default lowering of "module" or "hybrid"
with this patch defaulting to "module", which will be a less dramatic codegen
change relative to the current. This reflects the sparsity of test coverage for
the table lowering method. Hybrid is better than module in every respect and
will be default in a subsequent patch.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D139433

show more ...


Revision tags: llvmorg-15.0.6, llvmorg-15.0.5
# 56202c51 09-Nov-2022 Jon Chesterfield <jonathanchesterfield@gmail.com>

Revert "[amdgpu][lds] Use the same isKernel predicate consistently"

Looks like this composed poorly with a nominally independent patch, will fix
This reverts commit 0ba0398517778514eb44cb7ba9bf9d4d2

Revert "[amdgpu][lds] Use the same isKernel predicate consistently"

Looks like this composed poorly with a nominally independent patch, will fix
This reverts commit 0ba0398517778514eb44cb7ba9bf9d4d20a856e0.

show more ...


# 0ba03985 09-Nov-2022 Jon Chesterfield <jonathanchesterfield@gmail.com>

[amdgpu][lds] Use the same isKernel predicate consistently

isKernelCC != isKernel(F->getCallingConv())
There's a test case (lower-kernel-lds.ll) that explicitly skips amdgpu_ps
so this change picks

[amdgpu][lds] Use the same isKernel predicate consistently

isKernelCC != isKernel(F->getCallingConv())
There's a test case (lower-kernel-lds.ll) that explicitly skips amdgpu_ps
so this change picks the isKernel predicate that continues to skip that
calling convention.

isKernel returns true for AMDGPU_KERNEL and SPIR_KERNEL. isKernelCC also
returns true for other calling conventions.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D136599

show more ...


# e9a2aa63 09-Nov-2022 Jon Chesterfield <jonathanchesterfield@gmail.com>

[amdgpu][lds] Use a consistent order of fields in generated structs

Avoids spurious and confusing test failures on changing implementation.

Reviewed By: arsenm

Differential Revision: https://revie

[amdgpu][lds] Use a consistent order of fields in generated structs

Avoids spurious and confusing test failures on changing implementation.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D136598

show more ...


Revision tags: llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2
# 35f2584e 28-Sep-2022 Jon Chesterfield <jonathanchesterfield@gmail.com>

[amdgpu] Error, instead of miscompile, anonymous kernels using lds

The association between kernel and struct is done by symbol name.
This doesn't work robustly for anonymous kernels as shown by the

[amdgpu] Error, instead of miscompile, anonymous kernels using lds

The association between kernel and struct is done by symbol name.
This doesn't work robustly for anonymous kernels as shown by the modified
test case.

An alternative association between function and struct can be constructed
if necessary, probably though metadata, but on the basis that we currently
miscompile anonymous kernels and that they are difficult to construct from
application code and difficult to call from the runtime, this patch makes
it a fatal error for now.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D134741

show more ...


Revision tags: llvmorg-15.0.1
# cdb97389 14-Sep-2022 Jon Chesterfield <jonathanchesterfield@gmail.com>

[amdgpu] Expand all ConstantExpr users of LDS variables in instructions

Bug noted in D112717 can be sidestepped with this change.

Expanding all ConstantExpr involved with LDS up front makes the var

[amdgpu] Expand all ConstantExpr users of LDS variables in instructions

Bug noted in D112717 can be sidestepped with this change.

Expanding all ConstantExpr involved with LDS up front makes the variable specialisation simpler. Excludes ConstantExpr that don't access LDS to avoid disturbing codegen elsewhere.

Reviewed By: rampitec

Differential Revision: https://reviews.llvm.org/D133422

show more ...


# 23f6c8d6 07-Sep-2022 Jon Chesterfield <jonathanchesterfield@gmail.com>

[amdgpu] Always, instead of mostly, remove unused LDS symbols

Currently LDS variables are removed by the lower module pass
if they have a use which is caught by the replace with struct control flow.

[amdgpu] Always, instead of mostly, remove unused LDS symbols

Currently LDS variables are removed by the lower module pass
if they have a use which is caught by the replace with struct control flow.
This makes tests brittle to changes to that control flow which induces
noise when trying to improve lowering. Some tests already check that
variables are removed, while others checked that they are not removed.

LDS variables are not (currently) externally accessible, and if that
changes the machinery which makes them externally accessible will look
like a use. This change therefore breaks no applications.

Reviewed By: rampitec

Differential Revision: https://reviews.llvm.org/D133028

show more ...


Revision tags: llvmorg-15.0.0
# fedc5973 03-Sep-2022 Kazu Hirata <kazu@google.com>

[llvm] Use range-based for loops (NFC)


# a28bbd00 31-Aug-2022 Jon Chesterfield <jonathanchesterfield@gmail.com>

[amdgpu][nfc] Factor predicate out of findLDSVariablesToLower


Revision tags: llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1
# b435da02 27-Jul-2022 Dmitri Gribenko <gribozavr@gmail.com>

[amdgpu][nfc] Fix build with a certan Clang version

It errors out in the Bazel CI:

AMDGPULowerModuleLDSPass.cpp:384:12: error: chosen constructor is
explicit in copy-initialization
return {SGV,

[amdgpu][nfc] Fix build with a certan Clang version

It errors out in the Bazel CI:

AMDGPULowerModuleLDSPass.cpp:384:12: error: chosen constructor is
explicit in copy-initialization
return {SGV, std::move(Map)};

Reviewed By: rupprecht

Differential Revision: https://reviews.llvm.org/D130623

show more ...


Revision tags: llvmorg-16-init
# 3ccd88f2 27-Jul-2022 Jon Chesterfield <jonathanchesterfield@gmail.com>

[amdgpu][nfc] Separate processUsedLDS into independent pieces, rename it


# 9981afdd 27-Jul-2022 Jon Chesterfield <jonathanchesterfield@gmail.com>

[amdgpu][nfc] Extract kernel annotation from processUsedLDS


# 923b90bd 26-Jul-2022 Jon Chesterfield <jonathanchesterfield@gmail.com>

[amdgpu][nfc] Separate LDS struct creation from RAUW


# 26dcc7e6 26-Jul-2022 Jon Chesterfield <jonathanchesterfield@gmail.com>

[amdgpu][nfc] Skip operations on padding fields in LDS struct


# 2224bbcd 19-Jul-2022 Jon Chesterfield <jonathanchesterfield@gmail.com>

[nfc][amdgpu] LDS. Move selection logic up the stack.


# eda2bcad 15-Jul-2022 Jon Chesterfield <jonathanchesterfield@gmail.com>

[nfc][amdgpu] Remove dead variable and function


Revision tags: llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4
# bc78c099 04-May-2022 Jon Chesterfield <jonathanchesterfield@gmail.com>

[amdgpu] Elide module lds allocation in kernels with no callees

Introduces a string attribute, amdgpu-requires-module-lds, to allow
eliding the module.lds block from kernels. Will allocate the block

[amdgpu] Elide module lds allocation in kernels with no callees

Introduces a string attribute, amdgpu-requires-module-lds, to allow
eliding the module.lds block from kernels. Will allocate the block as before
if the attribute is missing or has its default value of true.

Patch uses the new attribute to detect the simplest possible instance of this,
where a kernel makes no calls and thus cannot call any functions that use LDS.

Tests updated to match, coverage was already good. Interesting cases is in
lower-module-lds-offsets where annotating the kernel allows the backend to pick
a different (in this case better) variable ordering than previously. A later
patch will avoid moving kernel variables into module.lds when the kernel can
have this attribute, allowing optimal ordering and locally unused variable
elimination.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D122091

show more ...


Revision tags: llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2
# 6527b2a4 18-Feb-2022 Sebastian Neubauer <Sebastian.Neubauer@amd.com>

[AMDGPU][NFC] Fix typos

Fix some typos in the amdgpu backend.

Differential Revision: https://reviews.llvm.org/D119235


# c7eb8463 11-Feb-2022 Stanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>

[AMDGPU] Merge AMDGPULDSUtils into AMDGPUMemoryUtils

Differential Revision: https://reviews.llvm.org/D119502


Revision tags: llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2
# 24b28db8 12-Dec-2021 Jon Chesterfield <jonathanchesterfield@gmail.com>

[amdgpu] Increase alignment of all LDS variables

Currently the superalign option only increases the alignment of
variables that are moved into the module.lds block. Change that to all LDS
variables.

[amdgpu] Increase alignment of all LDS variables

Currently the superalign option only increases the alignment of
variables that are moved into the module.lds block. Change that to all LDS
variables. Also only increase the alignment once, instead of once per function.

Reviewed By: rampitec

Differential Revision: https://reviews.llvm.org/D115488

show more ...


# d395befa 11-Dec-2021 Kazu Hirata <kazu@google.com>

[llvm] Use range-based for loops (NFC)


1234