[PATCH] D141737: [NVPTX] Unforce minimum alignment of 4 for byval arguments of device-side functions.

Pavel Kopyl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 25 17:17:51 PST 2023


pavelkopyl added a comment.

In D141737#4053125 <https://reviews.llvm.org/D141737#4053125>, @tra wrote:

> Do we need to do it? I mean -- are there any observable differences between enforced alignment of 4 and not? For register-passed parameters it will make no difference, and for the parameters passed via constant/local memory, it may or may not make a difference.
>
> I guess at the extreme it would impact how many 1-byte parameters we may have, as the total size of param address space has an upper bound (for kernels it's 4K: https://docs.nvidia.com/cuda/cuda-c-programming-guide/#parameter-buffer-layout). If that's the case, then it probably does not matter whether we can pass 4K arguments or only 1K.
>
> In other words, I do not see a practical need to introduce an option which may not have any practical use.

Sorry for long response.
OK, I'll remove the option. I just wanted to clarify, are you agree in general with removing this workaround?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141737/new/

https://reviews.llvm.org/D141737



More information about the llvm-commits mailing list