================
@@ -104,3 +106,17 @@ void fun() {
   (void) b<double>;
   (void) var_host_only;
 }
+
+// NEG-NOT: external_func
+extern __global__ void external_func();
+// NEG-NOT: @external_dep
+extern void* const external_dep[] = {
+  (void*)(external_func)
+};
+// NEG-NOT: @external_arr
----------------
PatriosTheGreat wrote:

Not sure I got it correctly, but AFAIU in this test we are checking only the 
device code.
So with the current patch an external global variable should not be included to 
the device code (only to the host code) if it's not used in any device 
functions at the current compilation unit. If it's actually used 
Though if this variable is used at the device function than it should be 
manually marked as __constant__ variable. I can add this test case as well if 
it's needed.


https://github.com/llvm/llvm-project/pull/73549
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to