tra added inline comments.

================
Comment at: clang/lib/CodeGen/CodeGenModule.cpp:4137
+        // TODO: Reject __device__ constexpr and __device__ inline in Sema.
+        if (!D->hasExternalStorage() && !D->isInline())
           getCUDARuntime().registerDeviceVar(D, *GV, !D->hasDefinition(),
----------------
> For rdc mode, device vars are merged. Host shadow vars should also be in 
> comdat and merged. 

Right. I think we need to add `|| (getLangOpts().HIP && 
getLangOpts().GPURelocatableDeviceCode)`. Maybe even for both CUDA and HIP as 
`rdc` should work similarly in CUDA, too.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88786/new/

https://reviews.llvm.org/D88786

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to