[PATCH] D98814: [CUDA][HIP] Mark device var used by host only

Artem Belevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 22 11:07:33 PDT 2021


tra accepted this revision.
tra added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang/test/CodeGenCUDA/host-used-device-var.cu:31-33
+// Check device-used static device var is not in llvm.compiler.used.
+// CHECK-DAG: @_ZL2u4
+static __device__ int u4;
----------------
I'd rephrase it as 'but is not in llvm.compiler.used'



================
Comment at: clang/test/CodeGenCUDA/host-used-device-var.cu:46
+}
+// CHECK: @llvm.compiler.used = {{[^@]*}} @_ZL2u3 {{[^@]*}} @u1 {{[^@]*}} @u2 {{[^@]*}} @u5
----------------
I'd add a comment that we're effectively matching the exact list of the variables here and that ensures that `@_ZL2u4` is not among them.



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

https://reviews.llvm.org/D98814



More information about the cfe-commits mailing list