tra accepted this revision. tra added inline comments.
================ Comment at: lib/CodeGen/CGCUDANV.cpp:475-476 return nullptr; + if (IsHIP && EmittedKernels.empty() && DeviceVars.empty()) + return nullptr; // void __{cuda|hip}_register_globals(void* handle); ---------------- yaxunl wrote: > tra wrote: > > I think this would make sense for CUDA, too. > https://github.com/llvm-mirror/clang/blob/master/lib/CodeGen/CGCUDANV.cpp#L482 > > CUDA generates a dummy register function call for -fgpu-rdc. So probably only > do this when RelocatableDeviceCode is false for CUDA? Good point. Off the top of my head I can't tell why -fcudardc needs this. Keeping the change HIP-only is fine. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60141/new/ https://reviews.llvm.org/D60141 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits