Avoid making a temporary copy of byval argument if all accesses are loads and therefore the pointer to the parameter can not escape.
This avoids excessive global memory accesses when each kernel makes its own copy.
Paths
| Differential D98469
[NVPTX] Avoid temp copy of byval kernel parameters. ClosedPublic Authored by tra on Mar 11 2021, 4:31 PM.
Details Summary Avoid making a temporary copy of byval argument if all accesses are loads and therefore the pointer to the parameter can not escape. This avoids excessive global memory accesses when each kernel makes its own copy.
Diff Detail
Unit TestsFailed
Event TimelineHerald added subscribers: bixia, hiraditya, jholewinski. · View Herald TranscriptMar 11 2021, 4:31 PM Comment Actions This is going to be so great. Thanks, Art.
This revision is now accepted and ready to land.Mar 12 2021, 1:31 PM
This revision was landed with ongoing or failed builds.Mar 15 2021, 2:28 PM Closed by commit rG50c7504a93fd: [NVPTX] Avoid temp copy of byval kernel parameters. (authored by tra). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 330375 llvm/lib/Target/NVPTX/NVPTXLowerArgs.cpp
llvm/test/CodeGen/NVPTX/lower-args.ll
llvm/test/CodeGen/NVPTX/lower-byval-args.ll
llvm/test/CodeGen/NVPTX/lower-kernel-ptr-arg.ll
|
I think there was a clang-tidy warning at one point saying this should be lower-case c?