[flang-commits] [flang] [flang] [cuda] implicitly set DEVICE attribute to scalars in device routines (PR #140834)
Valentin Clement バレンタイン クレメン via flang-commits
flang-commits at lists.llvm.org
Wed May 21 09:49:51 PDT 2025
================
@@ -9,4 +9,5 @@ end subroutine
! CHECK-LABEL: func.func @_QPsharedmem() attributes {cuf.proc_attr = #cuf.cuda_proc<global>}
! CHECK: %{{.*}} = cuf.shared_memory !fir.array<32xf32> {bindc_name = "s", uniq_name = "_QFsharedmemEs"} -> !fir.ref<!fir.array<32xf32>>
+! CHECK: cuf.free %{{.*}}#0 : !fir.ref<i32> {data_attr = #cuf.cuda<device>}
! CHECK-NOT: cuf.free
----------------
clementval wrote:
We clean it later but I think it would make sense to not generate them if we can. This is not very important with this patch.
https://github.com/llvm/llvm-project/pull/140834
More information about the flang-commits
mailing list