Re: [PATCH] D17779: [CUDA] Emit host-side 'shadows' for device-side global variables

2016-03-01 Thread Artem Belevich via cfe-commits
tra updated this revision to Diff 49561. tra marked 9 inline comments as done. tra added a comment. Addressed Justin's comments. http://reviews.llvm.org/D17779 Files: lib/CodeGen/CGCUDANV.cpp lib/CodeGen/CGCUDARuntime.h lib/CodeGen/CodeGenModule.cpp test/CodeGenCUDA/device-stub.cu

Re: [PATCH] D17779: [CUDA] Emit host-side 'shadows' for device-side global variables

2016-03-01 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: lib/CodeGen/CGCUDANV.cpp:168 @@ -163,1 +167,3 @@ +/// of global scope device-side variables generated in this module +/// with the CUDA runtime. /// \code This is kind of hard to parse. How about rephrasing to something

[PATCH] D17779: [CUDA] Emit host-side 'shadows' for device-side global variables

2016-03-01 Thread Artem Belevich via cfe-commits
tra created this revision. tra added reviewers: jlebar, jingyue. tra added a subscriber: cfe-commits. .. and register them with CUDA runtime. This is needed for commonly used cudaMemcpy*() APIs that use address of host-side shadow to access their counterparts on device side. Fixes PR26340.