tra accepted this revision. tra added a comment. This revision is now accepted and ready to land.
In D95901#2539754 <https://reviews.llvm.org/D95901#2539754>, @yaxunl wrote: > For -fno-gpu-rdc, two TU's can have global device variables with the same > name, therefore the shadow variables need to be internalized, which is fine > since -fno-gpu-rdc is not supposed to access device variables across TU's. So > far users did not report issues about shadow var linkage for -fno-gpu-rdc > (they reported shadow var linkage issues for -fgpu-rdc only). Let the shadow > vars keep original linkage and use CUID to make them unique would be > unnecessary and clutter the IR. I've checked what NVCC does in this case and their behavior appears to match your approach. Shadows are internalized w/o RDC and become visible when it's on. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95901/new/ https://reviews.llvm.org/D95901 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits