Revision tags: llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init |
|
#
4e43ba25 |
| 19-Jul-2023 |
Juan Manuel MARTINEZ CAAMAÑO <juamarti@amd.com> |
[NFC][AMDGPULowerModuleLDSPass] Use shorter APIs in markUsedByKernel
* Use shorter versions of the LLVM API
Reviewed By: JonChesterfield
Differential Revision: https://reviews.llvm.org/D155589
|
#
fcbafc06 |
| 19-Jul-2023 |
Juan Manuel MARTINEZ CAAMAÑO <juamarti@amd.com> |
[NFC][AMDGPULowerModuleLDSPass] Cleanup of getTableLookupKernelIndex
* Do a single lookup when querying the map * Use shorter versions of the LLVM API
Reviewed By: JonChesterfield
Differential Rev
[NFC][AMDGPULowerModuleLDSPass] Cleanup of getTableLookupKernelIndex
* Do a single lookup when querying the map * Use shorter versions of the LLVM API
Reviewed By: JonChesterfield
Differential Revision: https://reviews.llvm.org/D155588
show more ...
|
#
6043d4df |
| 15-Jul-2023 |
Jon Chesterfield <jonathanchesterfield@gmail.com> |
[amdgpu] Accept an optional max to amdgpu-lds-size attribute for use in PromoteAlloca
|
#
d3316bc1 |
| 13-Jul-2023 |
Jon Chesterfield <jonathanchesterfield@gmail.com> |
[amdgpu] Delete elide-module-lds attribute
Requires D155190
Reviewed By: arsenm
Differential Revision: https://reviews.llvm.org/D155238
|
#
74e928a0 |
| 13-Jul-2023 |
Jon Chesterfield <jonathanchesterfield@gmail.com> |
[amdgpu][lds] Remove recalculation of LDS frame from backend
Do the LDS frame calculation once, in the IR pass, instead of repeating the work in the backend.
Prior to this patch: The IR lowering pa
[amdgpu][lds] Remove recalculation of LDS frame from backend
Do the LDS frame calculation once, in the IR pass, instead of repeating the work in the backend.
Prior to this patch: The IR lowering pass sets up a per-kernel LDS frame and annotates the variables with absolute_symbol metadata so that the assembler can build lookup tables out of it. There is a fragile association between kernel functions and named structs which is used to recompute the frame layout in the backend, with fatal_errors catching inconsistencies in the second calculation.
After this patch: The IR lowering pass additionally sets a frame size attribute on kernels. The backend uses the same absolute_symbol metadata that the assembler uses to place objects within that frame size.
Deleted the now dead allocation code from the backend. Left for a later cleanup: - enabling lowering for anonymous functions - removing the elide-module-lds attribute (test churn, it's not used by llc any more) - adjusting the dynamic alignment check to not use symbol names
Reviewed By: arsenm
Differential Revision: https://reviews.llvm.org/D155190
show more ...
|
#
9418c40a |
| 13-Jul-2023 |
Jon Chesterfield <jonathanchesterfield@gmail.com> |
[amdgpu][lds] Raise an explicit unimplemented error on absolute address LDS variables
These aren't implemented. They could be at moderate implementation complexity. Raising an error is better than s
[amdgpu][lds] Raise an explicit unimplemented error on absolute address LDS variables
These aren't implemented. They could be at moderate implementation complexity. Raising an error is better than silently miscompiling.
Patching now because the patch at D155125 is a step towards using this metadata more extensively as part of the lowering path and that will interact badly with input variables with this annotation.
Lowering user defined variables at specific addresses would drop this error, put them at the requested position in the frame during this pass, and then use the same codegen that will be used for the kernel specific struct shortly.
Reviewed By: jmmartinez
Differential Revision: https://reviews.llvm.org/D155132
show more ...
|
#
367b1f28 |
| 12-Jul-2023 |
Juan Manuel MARTINEZ CAAMAÑO <juamarti@amd.com> |
[NFC][AMDGPULowerModuleLDSPass] Fix buildbot santizier failed to compile
It seems that the sanitizer-x86_64-linux-android wasn't able to deduce the template argument:
AMDGPULowerModuleLDSPass.cpp
[NFC][AMDGPULowerModuleLDSPass] Fix buildbot santizier failed to compile
It seems that the sanitizer-x86_64-linux-android wasn't able to deduce the template argument:
AMDGPULowerModuleLDSPass.cpp:1192:53: error: no viable constructor or deduction guide for deduction of template arguments of 'vector' auto TableLookupVariablesOrdered = sortByName(std::vector(
This patch makes the template argument explicit.
show more ...
|
#
3a75551e |
| 12-Jul-2023 |
Juan Manuel MARTINEZ CAAMAÑO <juamarti@amd.com> |
Reland "[NFC][AMDGPULowerModuleLDSPass] Factorize repetead sort code"
Fixed compilation error and reudndant copy warning
Differential Revision: https://reviews.llvm.org/D154977
|
#
e75ce77c |
| 11-Jul-2023 |
Jon Chesterfield <jonathanchesterfield@gmail.com> |
[amdgpu][lds] Fix missing markUsedByKernel calls and undef lookup table elements
More robust association between the kernels and lds struct.
Use poison instead of value() for lookup table elements
[amdgpu][lds] Fix missing markUsedByKernel calls and undef lookup table elements
More robust association between the kernels and lds struct.
Use poison instead of value() for lookup table elements introduced by dynamic lds lowering.
Extracted from D154946, new test from there verbatim. Segv fixed.
Fixes issues/63338
Fixes SWDEV-404491
Reviewed By: arsenm
Differential Revision: https://reviews.llvm.org/D154972
show more ...
|
#
ebdd610a |
| 11-Jul-2023 |
Juan Manuel MARTINEZ CAAMAÑO <juamarti@amd.com> |
Revert "[NFC][AMDGPULowerModuleLDSPass] Factorize repetead sort code"
This reverts commit 125b90749a98d6dc6b492883c9617f9e91ab60e0.
|
#
125b9074 |
| 11-Jul-2023 |
Juan Manuel MARTINEZ CAAMAÑO <juamarti@amd.com> |
[NFC][AMDGPULowerModuleLDSPass] Factorize repetead sort code
Reviewed By: JonChesterfield
Differential Revision: https://reviews.llvm.org/D154970
|
#
70bb5d2b |
| 11-Jul-2023 |
Juan Manuel MARTINEZ CAAMAÑO <juamarti@amd.com> |
[NFC][AMDGPULowerModuleLDSPass] Add const to some variables/parameters
Moving out some changes not related to the bugfix in https://reviews.llvm.org/D154946
Reviewed By: JonChesterfield, arsenm
Di
[NFC][AMDGPULowerModuleLDSPass] Add const to some variables/parameters
Moving out some changes not related to the bugfix in https://reviews.llvm.org/D154946
Reviewed By: JonChesterfield, arsenm
Differential Revision: https://reviews.llvm.org/D154959
show more ...
|
#
abf08197 |
| 07-Jul-2023 |
Juan Manuel MARTINEZ CAAMAÑO <juamarti@amd.com> |
[NFC][AMDGPULowerModuleLDSPass] Remove dead variable
|
Revision tags: llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2 |
|
#
e17c1bb4 |
| 11-Apr-2023 |
Jon Chesterfield <jonathanchesterfield@gmail.com> |
[amdgpu][nfc] Update comments on LDS lowering
|
Revision tags: llvmorg-16.0.1 |
|
#
0507448d |
| 04-Apr-2023 |
Jon Chesterfield <jonathanchesterfield@gmail.com> |
[amdgpu] Implement dynamic LDS accesses from non-kernel functions
The premise here is to allow non-kernel functions to locate external LDS variables without using LDS or extra magic SGPRs to do so.
[amdgpu] Implement dynamic LDS accesses from non-kernel functions
The premise here is to allow non-kernel functions to locate external LDS variables without using LDS or extra magic SGPRs to do so.
1/ First it crawls the callgraph to work out which external LDS variables are reachable from a given kernel 2/ Then it creates a new `extern char[0]` variable for each kernel, which will alias all the other extern LDS variables because that's the documented behaviour of these variables 3/ The address of that variable is written to a lookup table. The global variable is tagged with metadata to track what address it was allocated at by codegen 4/ The assembler builds the lookup table using the metadata 5/ Any non-kernel functions use the same magic intrinsic used by table lookups of non-dynamic LDS variables to find the address to use
Heavy overlap with the code paths taken for other lowering, in particular the same intrinsic is used to pass the dynamic scope information through the same sgpr as for table lookups of static LDS.
Reviewed By: arsenm
Differential Revision: https://reviews.llvm.org/D144233
show more ...
|
#
62951784 |
| 03-Apr-2023 |
Jon Chesterfield <jonathanchesterfield@gmail.com> |
[amdgpu][nfc] Refactor prior to D144233 to remove noise from diff
|
#
78e68180 |
| 22-Mar-2023 |
Jon Chesterfield <jonathanchesterfield@gmail.com> |
[amdgpu][nfc] clang-format AMDGPULowerModuleLDS for easier merging
|
#
d70e7ea0 |
| 22-Mar-2023 |
Jon Chesterfield <jonathanchesterfield@gmail.com> |
[amdgpu][nfc] Extract more functions in LowerModuleLDS, mark more methods static
|
#
e8ad2a05 |
| 21-Mar-2023 |
Jon Chesterfield <jonathanchesterfield@gmail.com> |
[amdgpu][nfc] Comment and extract two functions in LowerModuleLDS
|
Revision tags: llvmorg-16.0.0 |
|
#
d3dda422 |
| 12-Mar-2023 |
Jon Chesterfield <jonathanchesterfield@gmail.com> |
[amdgpu][nfc] Replace ad hoc LDS frame recalculation with absolute_symbol MD
Post ISel, LDS variables are absolute values. Representing them as such is simpler than the frame recalculation currently
[amdgpu][nfc] Replace ad hoc LDS frame recalculation with absolute_symbol MD
Post ISel, LDS variables are absolute values. Representing them as such is simpler than the frame recalculation currently used to build assembler tables from their addresses.
This is a precursor to lowering dynamic/external LDS accesses from non-kernel functions.
Reviewed By: arsenm
Differential Revision: https://reviews.llvm.org/D144221
show more ...
|
Revision tags: llvmorg-16.0.0-rc4 |
|
#
576060fb |
| 03-Mar-2023 |
Nikita Popov <npopov@redhat.com> |
[ReplaceConstant] Extract code for expanding users of constant (NFC)
AMDGPU implements some handy code for expanding all constexpr users of LDS globals. Extract the core logic into ReplaceConstant,
[ReplaceConstant] Extract code for expanding users of constant (NFC)
AMDGPU implements some handy code for expanding all constexpr users of LDS globals. Extract the core logic into ReplaceConstant, so that it can be reused elsewhere.
show more ...
|
#
bf579a70 |
| 24-Feb-2023 |
Jon Chesterfield <jonathanchesterfield@gmail.com> |
[amdgpu] Change LDS lowering default to hybrid
Postponed from D139433 until the bug fixed by D139874 could be resolved.
Reviewed By: arsenm
Differential Revision: https://reviews.llvm.org/D141852
|
Revision tags: llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7 |
|
#
87b6b347 |
| 06-Jan-2023 |
Guillaume Chatelet <gchatelet@google.com> |
Revert D141134 "[NFC] Only expose getXXXSize functions in TypeSize"
The patch should be discussed further.
This reverts commit dd56e1c92b0e6e6be249f2d2dd40894e0417223f.
|
#
dd56e1c9 |
| 06-Jan-2023 |
Guillaume Chatelet <gchatelet@google.com> |
[NFC] Only expose getXXXSize functions in TypeSize
Currently 'TypeSize' exposes two functions that serve the same purpose: - getFixedSize / getFixedValue - getKnownMinSize / getKnownMinValue
sour
[NFC] Only expose getXXXSize functions in TypeSize
Currently 'TypeSize' exposes two functions that serve the same purpose: - getFixedSize / getFixedValue - getKnownMinSize / getKnownMinValue
source : https://github.com/llvm/llvm-project/blob/bf82070ea465969e9ae86a31dfcbf94c2a7b4c4c/llvm/include/llvm/Support/TypeSize.h#L337-L338
This patch offers to remove one of the two and stick to a single function in the code base.
Differential Revision: https://reviews.llvm.org/D141134
show more ...
|
#
6fed2c90 |
| 03-Jan-2023 |
Matt Arsenault <Matthew.Arsenault@amd.com> |
AMDGPU: Diagnose which LDS global failed to lower
Also lowercase the message to start since that seems to be the prevailing convention for error messages.
|