For example, in
struct S { int *x; int *y; }; __global__ void foo(S s) { int *b = s.y; // use b }
"b" is guaranteed to point to global. NVPTX should emit ld.global/st.global for
accessing "b".
Paths
| Differential D11505
[NVPTX] convert pointers in byval kernel arguments to global ClosedPublic Authored by jingyue on Jul 25 2015, 4:50 PM.
Details Summary For example, in struct S { int *x; int *y; }; __global__ void foo(S s) { int *b = s.y; // use b } "b" is guaranteed to point to global. NVPTX should emit ld.global/st.global for
Diff Detail Event Timelinejholewinski edited edge metadata. Comment ActionsLooks reasonable to me, with the minor comment. Thanks!
This revision is now accepted and ready to land.Jul 31 2015, 1:03 PM jingyue edited edge metadata. Comment ActionsAs Justin pointed out, enable this optimization for CUDA only
Revision Contents
Diff 31170 lib/Target/NVPTX/NVPTXLowerKernelArgs.cpp
test/CodeGen/NVPTX/lower-kernel-ptr-arg.ll
|
Can you enable this for CUDA only?