[PATCH] D104023: [AMDGPU] Make sure that the size of module (or kernel) lds struct is multiple of its alignment.
Mahesha S via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 10 08:52:12 PDT 2021
hsmhsm added a comment.
In D104023#2810359 <https://reviews.llvm.org/D104023#2810359>, @foad wrote:
>> When we create module (or per kernel) lds struct, we fix its alignment as the largest of struct
>> members. Add padding at the end of the struct so that the size of struct is multiple of its alignment.
>
> Why?
Actually, in general scenario it is needed - imagine that we create an array of struct, if we don't do it, then array elements starting from index may not aligned.
But here it is special case. We don't create array of these structs. Hence it is not required here. I will abondon the patch.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104023/new/
https://reviews.llvm.org/D104023
More information about the llvm-commits
mailing list