[PATCH] D85223: [CUDA][HIP] Support accessing static device variable in host code for -fgpu-rdc

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 20 11:06:24 PDT 2021


yaxunl added inline comments.


================
Comment at: clang/lib/CodeGen/CodeGenModule.cpp:6265-6268
+void CodeGenModule::printPostfixForExternalizedStaticVar(
+    llvm::raw_ostream &OS) const {
+  OS << ".static." << getContext().getCUIDHash();
+}
----------------
Hahnfeld wrote:
> I've tried to use this with CUDA, but it errors out because `.` is not allowed in identifiers. Could you check if https://reviews.llvm.org/D108456 also works for HIP?
I will try it with our CI and get back to you.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85223



More information about the cfe-commits mailing list