[PATCH] D155986: [clang][AMDGPU]: Don't use byval for struct arguments in function ABI
Jon Chesterfield via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 21 16:14:56 PDT 2023
JonChesterfield added a comment.
In D155986#4524214 <https://reviews.llvm.org/D155986#4524214>, @jdoerfert wrote:
> That aside, I am not arguing this is by itself wrong. What I'm mostly trying to say is that there is a more generic alternative we should implement instead.
We should optimise more aggressively within a module. There's an idea in mailing lists to deliberately split functions into local versions with a fast calling convention and externally visible shims used for address escapes. That's a good thing that we should do. It's not this thing.
This is a case where the module external functions can be quicker too. So we should do that. I hear that nvptx does the worse thing and you don't like divergence between the GPU targets. Ptx is the stable ABI there, perhaps we should fix nvptx to match in a later patch.
> My goal is to get the same effect for all languages targeting AMDGPUs, not only the ones that go through Clang.
Those languages should also not use the convention in place before this patch. The existing behaviour is a design mistake. This frees them to do something better without generating shims to work around the C ABI.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155986/new/
https://reviews.llvm.org/D155986
More information about the llvm-commits
mailing list