[flang-commits] [flang] [flang][cuda] Adapt ExternalNameConversion to work in gpu module (PR #117039)

Valentin Clement バレンタイン クレメン via flang-commits flang-commits at lists.llvm.org
Wed Nov 20 14:05:49 PST 2024


================
@@ -0,0 +1,13 @@
+// RUN: fir-opt --split-input-file --external-name-interop %s | FileCheck %s
+
+gpu.module @cuda_device_mod {
+  gpu.func @_QPfoo() {
+    fir.call @_QPthreadfence() fastmath<contract> : () -> ()
+    gpu.return
+  }
+  func.func private @_QPthreadfence() attributes {cuf.proc_attr = #cuf.cuda_proc<device>}
+}
+
+// CHECK-LABEL: gpu.func @_QPfoo
+// CHECK: fir.call @threadfence_()
+// CHECK: func.func private @threadfence_()
----------------
clementval wrote:

For the this specific example we could be the patch aims to solve the general problem of applying the renaming in the gpu module. 

https://github.com/llvm/llvm-project/pull/117039


More information about the flang-commits mailing list