[llvm-branch-commits] [flang] [flang][OpenMP] Basic mapping of `do concurrent ... reduce` to OpenMP (PR #146033)

2025-07-06 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
https://github.com/clementval approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/146033 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [utils][TableGen] Treat clause aliases equally with names (PR #141763)

2025-05-28 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
https://github.com/clementval approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/141763 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [utils][TableGen] Unify name qualifications in DirectiveEmitter (PR #140606)

2025-05-19 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
https://github.com/clementval approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/140606 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang] [flang][fir] Basic PFT to MLIR lowering for do concurrent locality specifiers (PR #138534)

2025-05-07 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
https://github.com/clementval commented: Looks ok to me but the OpenMP part should be generalize and extracted. https://github.com/llvm/llvm-project/pull/138534 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm

[llvm-branch-commits] [flang] [flang][fir] Basic PFT to MLIR lowering for do concurrent locality specifiers (PR #138534)

2025-05-07 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
@@ -2029,9 +2031,33 @@ class FirConverter : public Fortran::lower::AbstractConverter { void handleLocalitySpecs(const IncrementLoopInfo &info) { Fortran::semantics::SemanticsContext &semanticsContext = bridge.getSemanticsContext(); -for (const Fortran::semant

[llvm-branch-commits] [flang] [flang][cuda] Lower CUDA shared variable with cuf.shared_memory op (PR #131399)

2025-03-14 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
https://github.com/clementval edited https://github.com/llvm/llvm-project/pull/131399 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang] [flang][cuda] Compute offset on cuf.shared_memory ops (PR #131395)

2025-03-14 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
@@ -0,0 +1,126 @@ +//===-- CUFComputeSharedMemoryOffsetsAndSize.cpp --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [flang] [flang][cuda] Compute offset on cuf.shared_memory ops (PR #131395)

2025-03-14 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?Message-ID: In-Reply-To: https://github.com/clementval updated https://github.com/llvm/llvm-project/pull/131395 >From bd481839b595df26ec54ecf75ecdedef5425c0dd Mon Sep 17 00:00:00 2001 From: Valentin Clement Date: Fri, 14 Mar 2025 14:19:08 -0700 Subje

[llvm-branch-commits] [flang] [flang][cuda] Lower CUDA shared variable with cuf.shared_memory op (PR #131399)

2025-03-14 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
https://github.com/clementval created https://github.com/llvm/llvm-project/pull/131399 None >From 2dc9b157230a7e9b64fa1af7b2a30faaf8af2da9 Mon Sep 17 00:00:00 2001 From: Valentin Clement Date: Fri, 14 Mar 2025 14:47:31 -0700 Subject: [PATCH] [flang][cuda] Lower CUDA shared variable with cuf.s

[llvm-branch-commits] [flang] [flang][cuda] Convert cuf.shared_memory operation to LLVM ops (PR #131396)

2025-03-14 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
https://github.com/clementval created https://github.com/llvm/llvm-project/pull/131396 Convert the operation to `llvm.addressof` operation with `llvm.getelementptr` with the appropriate offset. >From bd44073dc01ff6b5dce02490eeceb8a52f2130b4 Mon Sep 17 00:00:00 2001 From: Valentin Clement Dat

[llvm-branch-commits] [flang] [flang][cuda] Compute offset on cuf.shared_memory ops (PR #131395)

2025-03-14 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
https://github.com/clementval created https://github.com/llvm/llvm-project/pull/131395 Add a pass to compute the size of the shared memory (static shared memory) and the offsets of each variables to be placed in shared memory. The global representing the shared memory is also created during th

[llvm-branch-commits] [flang] [flang][draft] update fir.coordinate_of to carry the fields (PR #127231)

2025-02-22 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
https://github.com/clementval approved this pull request. https://github.com/llvm/llvm-project/pull/127231 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang] [flang][draft] update fir.coordinate_of to carry the fields (PR #127231)

2025-02-14 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
clementval wrote: Thanks for the patch @jeanPerier! The intent to remove such operation looks good to me. https://github.com/llvm/llvm-project/pull/127231 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/

[llvm-branch-commits] [flang] [flang][cuda] Convert cuf.sync_descriptor to runtime call (PR #121524)

2025-01-02 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
https://github.com/clementval created https://github.com/llvm/llvm-project/pull/121524 Convert the op to a new entry point in the runtime `CUFSyncGlobalDescriptor` >From 822f3740a56b689c50aa5c983910e2115da0e62c Mon Sep 17 00:00:00 2001 From: Valentin Clement Date: Thu, 2 Jan 2025 13:58:14 -080

[llvm-branch-commits] [clang] [flang] [lld] [llvm] [Flang] LLVM_ENABLE_RUNTIMES=flang-rt (PR #110217)

2024-12-16 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
clementval wrote: Don't we have buildbots testing shared libs? https://lab.llvm.org/buildbot/#/builders/80 https://github.com/llvm/llvm-project/pull/110217 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/

[llvm-branch-commits] [flang] [flang][cuda] Handle gpu.return in AbstractResult pass (PR #119035)

2024-12-06 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
https://github.com/clementval created https://github.com/llvm/llvm-project/pull/119035 Process `gpu.return` in AbstractResult pass when the function is a `gpu.func`. >From 72a892909a7ce898423cea709f674956dc2121d1 Mon Sep 17 00:00:00 2001 From: Valentin Clement Date: Fri, 6 Dec 2024 13:42:06 -

[llvm-branch-commits] [flang] [llvm] [Flang][NFC] Move runtime library files to flang-rt. (PR #110298)

2024-11-19 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
@@ -6,8 +6,7 @@ // //===--===// -#include "flang/Optimizer/Transforms/CUFOpConversion.h" -#include "flang/Common/Fortran.h" +#include "flang/Optimizer/Transforms/CufOpConversion.h" clementval

[llvm-branch-commits] [clang] [flang] [lld] [llvm] [Flang] LLVM_ENABLE_RUNTIMES=flang-rt (PR #110217)

2024-11-06 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
https://github.com/clementval edited https://github.com/llvm/llvm-project/pull/110217 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [flang] [lld] [llvm] [Flang] LLVM_ENABLE_RUNTIMES=flang-rt (PR #110217)

2024-11-06 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
@@ -171,145 +76,88 @@ set(sources unit-map.cpp unit.cpp utf.cpp - ${FORTRAN_MODULE_OBJECTS} ) -include(AddFlangOffloadRuntime) - -# List of files that are buildable for all devices. -set(supported_files - ISO_Fortran_binding.cpp - allocatable.cpp - allocator-regist

[llvm-branch-commits] [clang] [flang] [lld] [llvm] [Flang] LLVM_ENABLE_RUNTIMES=flang-rt (PR #110217)

2024-11-06 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
@@ -171,145 +76,88 @@ set(sources unit-map.cpp unit.cpp utf.cpp - ${FORTRAN_MODULE_OBJECTS} ) -include(AddFlangOffloadRuntime) - -# List of files that are buildable for all devices. -set(supported_files - ISO_Fortran_binding.cpp - allocatable.cpp - allocator-regist

[llvm-branch-commits] [flang] [flang][cuda] Data transfer with descriptor (PR #114302)

2024-11-01 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
https://github.com/clementval closed https://github.com/llvm/llvm-project/pull/114302 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang] [flang][cuda] Data transfer with descriptor (PR #114302)

2024-10-30 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
https://github.com/clementval updated https://github.com/llvm/llvm-project/pull/114302 >From e4c7e31c77bbfda563e4e2c9b591fe2f5cb2c259 Mon Sep 17 00:00:00 2001 From: Valentin Clement Date: Wed, 30 Oct 2024 11:53:12 -0700 Subject: [PATCH 1/2] [flang][cuda] Data transfer with descriptor --- flan

[llvm-branch-commits] [flang] [flang][cuda] Data transfer with descriptor (PR #114302)

2024-10-30 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
https://github.com/clementval created https://github.com/llvm/llvm-project/pull/114302 Use the feature added in #114301 to perform data transfer between data having a descriptor. >From e4c7e31c77bbfda563e4e2c9b591fe2f5cb2c259 Mon Sep 17 00:00:00 2001 From: Valentin Clement Date: Wed, 30 Oct

[llvm-branch-commits] [flang] [flang][cuda] Convert gpu.launch_func to CUFLaunchClusterKernel when cluster dims are present (PR #113959)

2024-10-28 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
https://github.com/clementval created https://github.com/llvm/llvm-project/pull/113959 Kernel launch in CUF are converted to `gpu.launch_func`. When the kernel has `cluster_dims` specified these get carried over to the `gpu.launch_func` operation. This patch updates the special conversion of `

[llvm-branch-commits] [flang] [flang][cuda] Translate cuf.register_kernel and cuf.register_module (PR #112972)

2024-10-18 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
https://github.com/clementval updated https://github.com/llvm/llvm-project/pull/112972 >From 49f9aa765e7ac39cf09e2ae12a656aa0c76b7f43 Mon Sep 17 00:00:00 2001 From: Valentin Clement Date: Thu, 17 Oct 2024 14:36:04 -0700 Subject: [PATCH 1/2] [flang][cuda] Translate cuf.register_kernel and cuf.r

[llvm-branch-commits] [flang] [flang][cuda] Translate cuf.register_kernel and cuf.register_module (PR #112972)

2024-10-18 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
https://github.com/clementval created https://github.com/llvm/llvm-project/pull/112972 Add LLVM IR Translation for `cuf.register_module` and `cuf.register_kernel`. These are lowered to function call to the CUF runtime entries. >From 49f9aa765e7ac39cf09e2ae12a656aa0c76b7f43 Mon Sep 17 00:00:00

[llvm-branch-commits] [flang] [llvm] [Flang] Move runtime library files to clang-rt. NFC (PR #110298)

2024-10-16 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
https://github.com/clementval edited https://github.com/llvm/llvm-project/pull/110298 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang] [llvm] [Flang] Move runtime library files to clang-rt. NFC (PR #110298)

2024-10-16 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
https://github.com/clementval requested changes to this pull request. See comment about CUDA Fortran directory name https://github.com/llvm/llvm-project/pull/110298 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.l

[llvm-branch-commits] [flang] [llvm] [Flang] Move runtime library files to clang-rt. NFC (PR #110298)

2024-10-16 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
https://github.com/clementval edited https://github.com/llvm/llvm-project/pull/110298 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang] [llvm] [Flang] Move runtime library files to clang-rt. NFC (PR #110298)

2024-10-16 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
@@ -1,4 +1,4 @@ -//===-- include/FortranRuntime/Runtime/array-constructor.h --*- C++ -*-===// +//===-- include/flang-rt/flang_rt/array-constructor.h ---*- C++ -*-===// clementval wrote: That feels strange to me. I hope we can come out with a better

[llvm-branch-commits] [flang] [llvm] [Flang] Move runtime library files to clang-rt. NFC (PR #110298)

2024-10-16 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
@@ -1,13 +1,13 @@ -//===-- include/flang/Runtime/CUDA/allocator.h --*- C++ -*-===// +//===-- include/flang-rt/CufRuntime/allocator.h -*- C++ -*-===// clementval wrote: As @klausler mentioned, this is the "CUDA" part of the Fortra

[llvm-branch-commits] [flang] [llvm] [Flang] Move runtime library files to clang-rt. NFC (PR #110298)

2024-10-16 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
@@ -1,4 +1,4 @@ -//===-- include/FortranRuntime/Runtime/array-constructor.h --*- C++ -*-===// +//===-- include/flang-rt/flang_rt/array-constructor.h ---*- C++ -*-===// clementval wrote: Why do we need this double directory with similar names. Can th

[llvm-branch-commits] [flang] [llvm] [Flang] Move runtime library files to clang-rt. NFC (PR #110298)

2024-10-16 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
@@ -1,13 +1,13 @@ -//===-- include/flang/Runtime/CUDA/allocator.h --*- C++ -*-===// +//===-- include/flang-rt/CufRuntime/allocator.h -*- C++ -*-===// clementval wrote: I would prefer to keep CUDA here rather than CufRuntime. ht

[llvm-branch-commits] [flang] [Flang] Split runtime headers in preparation for cross-compilation. NFC. (PR #112188)

2024-10-16 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
@@ -0,0 +1,73 @@ +//===-- include/flang/Runtime/descriptor-consts.h ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[llvm-branch-commits] [flang] [Flang] Split runtime headers in preparation for cross-compilation. NFC. (PR #112188)

2024-10-15 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
@@ -0,0 +1,73 @@ +//===-- include/flang/Runtime/descriptor-consts.h ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[llvm-branch-commits] [flang] [llvm] [Flang] Move runtime library files to FortranRuntime. NFC (PR #110298)

2024-10-09 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
clementval wrote: > > How recent is your latest rebase? They are missing files in this PR. > > I did not do a rebase since I started working on this PR, maybe 3 weeks ago. > With new files added/removed upstream and at the same time reviewers probably > asking to change the move location, keep

[llvm-branch-commits] [flang] [llvm] [Flang] Move runtime library files to FortranRuntime. NFC (PR #110298)

2024-10-08 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
clementval wrote: How recent is your latest rebase? They are missing files in this PR. https://github.com/llvm/llvm-project/pull/110298 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[llvm-branch-commits] [flang] [flang][cuda] Convert module allocation/deallocation to runtime calls (PR #109214)

2024-09-18 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
https://github.com/clementval closed https://github.com/llvm/llvm-project/pull/109214 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang] [flang][cuda] Convert module allocation/deallocation to runtime calls (PR #109214)

2024-09-18 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
https://github.com/clementval updated https://github.com/llvm/llvm-project/pull/109214 >From be4731f339d6fd9b45cd7cc93e3dd8ff83e80576 Mon Sep 17 00:00:00 2001 From: Valentin Clement Date: Wed, 18 Sep 2024 15:42:19 -0700 Subject: [PATCH] [flang][cuda] Convert module allocation/deallocation to r

[llvm-branch-commits] [flang] [flang][cuda] Convert module allocation/deallocation to runtime calls (PR #109214)

2024-09-18 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
https://github.com/clementval updated https://github.com/llvm/llvm-project/pull/109214 >From 0cf3e882111cf343be5e074ea1cf29893ab8ceb4 Mon Sep 17 00:00:00 2001 From: Valentin Clement Date: Wed, 18 Sep 2024 15:42:19 -0700 Subject: [PATCH 1/3] [flang][cuda] Convert module allocation/deallocation t

[llvm-branch-commits] [flang] [flang][cuda] Convert module allocation/deallocation to runtime calls (PR #109214)

2024-09-18 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
https://github.com/clementval updated https://github.com/llvm/llvm-project/pull/109214 >From 0cf3e882111cf343be5e074ea1cf29893ab8ceb4 Mon Sep 17 00:00:00 2001 From: Valentin Clement Date: Wed, 18 Sep 2024 15:42:19 -0700 Subject: [PATCH 1/2] [flang][cuda] Convert module allocation/deallocation t

[llvm-branch-commits] [flang] [flang][cuda] Convert module allocation/deallocation to runtime calls (PR #109214)

2024-09-18 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
https://github.com/clementval created https://github.com/llvm/llvm-project/pull/109214 Convert `cuf.allocate` and `cuf.deallocate` to the runtime entry points added in #109213 >From 0cf3e882111cf343be5e074ea1cf29893ab8ceb4 Mon Sep 17 00:00:00 2001 From: Valentin Clement Date: Wed, 18 Sep 2024

[llvm-branch-commits] [flang] [flang][cuda] Add CUF allocator (PR #101216)

2024-07-30 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
https://github.com/clementval updated https://github.com/llvm/llvm-project/pull/101216 >From 825e6efbbe20041b2b1591617f32abc12a0b42ff Mon Sep 17 00:00:00 2001 From: Valentin Clement Date: Fri, 12 Jul 2024 15:20:12 -0700 Subject: [PATCH 1/4] [flang][cuda] Add CUF allocator --- flang/CMakeLists

[llvm-branch-commits] [flang] [flang][cuda] Add CUF allocator (PR #101216)

2024-07-30 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
@@ -0,0 +1,18 @@ +#===-- runtime/CUDA/CMakeLists.txt -===# +# +# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2

[llvm-branch-commits] [flang] [flang][cuda] Add CUF allocator (PR #101216)

2024-07-30 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
https://github.com/clementval updated https://github.com/llvm/llvm-project/pull/101216 >From 825e6efbbe20041b2b1591617f32abc12a0b42ff Mon Sep 17 00:00:00 2001 From: Valentin Clement Date: Fri, 12 Jul 2024 15:20:12 -0700 Subject: [PATCH 1/3] [flang][cuda] Add CUF allocator --- flang/CMakeLists

[llvm-branch-commits] [flang] [flang][cuda] Add CUF allocator (PR #101216)

2024-07-30 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
https://github.com/clementval updated https://github.com/llvm/llvm-project/pull/101216 >From 825e6efbbe20041b2b1591617f32abc12a0b42ff Mon Sep 17 00:00:00 2001 From: Valentin Clement Date: Fri, 12 Jul 2024 15:20:12 -0700 Subject: [PATCH 1/2] [flang][cuda] Add CUF allocator --- flang/CMakeLists

[llvm-branch-commits] [flang] [flang][cuda] Add CUF allocator (PR #101216)

2024-07-30 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
@@ -0,0 +1,43 @@ +//===-- include/flang/Runtime/CUDA/allocator.h --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[llvm-branch-commits] [flang] [flang] Add allocator_idx attribute on fir.embox and fircg.ext_embox (PR #101212)

2024-07-30 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
@@ -103,3 +103,27 @@ func.func @fir_dev_issue_1416(%arg0: !fir.ref>, %low: index fir.call @do_something(%3) : (!fir.box>) -> () return } + +// CHECK-LABEL: define void @_QPtest_allocator1() +func.func @_QPtest_allocator1() { + %c20 = arith.constant 20 : index + %0 =

[llvm-branch-commits] [flang] [flang] Add allocator_idx attribute on fir.embox and fircg.ext_embox (PR #101212)

2024-07-30 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
https://github.com/clementval updated https://github.com/llvm/llvm-project/pull/101212 >From 77727fdf40e1164d9975378bb6951bc49baaf04a Mon Sep 17 00:00:00 2001 From: Valentin Clement Date: Mon, 29 Jul 2024 14:50:05 -0700 Subject: [PATCH 1/2] [flang] Add allocator_idx attribute on fir.embox and

[llvm-branch-commits] [flang] [flang][cuda] Add CUF allocator (PR #101216)

2024-07-30 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
https://github.com/clementval created https://github.com/llvm/llvm-project/pull/101216 Add allocators for CUDA fortran allocation on the device. 3 allocators are added for pinned, device and managed/unified memory allocation. `CUFRegisterAllocator()` is called to register the allocators in the

[llvm-branch-commits] [flang] [flang] Add allocator_idx attribute on fir.embox and fircg.ext_embox (PR #101212)

2024-07-30 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
https://github.com/clementval created https://github.com/llvm/llvm-project/pull/101212 #100690 introduces allocator registry with the ability to store allocator index in the descriptor. This patch adds an attribute to fir.embox and fircg.ext_embox to be able to set the allocator index while po

[llvm-branch-commits] [flang] [flang] Lower REDUCE intrinsic for reduction op with args by value (PR #95353)

2024-06-13 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
@@ -5745,6 +5745,14 @@ IntrinsicLibrary::genReduce(mlir::Type resultType, int rank = arrayTmp.rank(); assert(rank >= 1); + // Arguements to the reduction operation are passed by reference or value? + bool argByRef = true; + if (auto embox = + mlir::dyn_cast_or_

[llvm-branch-commits] [flang] [flang] Lower REDUCE intrinsic for reduction op with args by value (PR #95353)

2024-06-12 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
https://github.com/clementval created https://github.com/llvm/llvm-project/pull/95353 #95297 Updates the runtime entry points to distinguish between reduction operation with arguments passed by value or by reference. Add lowering to support the arguments passed by value. >From defadc4f18b0b4

[llvm-branch-commits] [flang] [flang] Lower REDUCE intrinsic with DIM argument (PR #94771)

2024-06-10 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
https://github.com/clementval updated https://github.com/llvm/llvm-project/pull/94771 >From 87a01d458650f4c6fd9b0456acbca51094bd127b Mon Sep 17 00:00:00 2001 From: Valentin Clement Date: Thu, 6 Jun 2024 14:17:44 -0700 Subject: [PATCH] [flang] Lower REDUCE intrinsic with DIM argument --- .../O

[llvm-branch-commits] [flang] [flang] Lower REDUCE intrinsic with DIM argument (PR #94771)

2024-06-07 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?=,Valentin Clement ,Valentin Clement Message-ID: In-Reply-To: https://github.com/clementval updated https://github.com/llvm/llvm-project/pull/94771 >From fd911977863888c7c005f00ae05049b32fe9d4d6 Mon Sep 17 00:00:00 2001 From: Valentin Clement Date:

[llvm-branch-commits] [flang] [flang] Lower REDUCE intrinsic with DIM argument (PR #94771)

2024-06-07 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?=,Valentin Clement Message-ID: In-Reply-To: clementval wrote: > Beware that the windows failure seems related to this change or the previous > one: > > ``` > > C:\ws\src\flang\lib\Optimizer\Builder\Runtime\Reduction.cpp(1499): error > C2065: '_F

[llvm-branch-commits] [flang] [flang] Lower REDUCE intrinsic with DIM argument (PR #94771)

2024-06-07 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?=,Valentin Clement Message-ID: In-Reply-To: clementval wrote: Thanks Slava and Jean for the review! I fixed the mismatch in `ForcedReduceComplex16` and `ForcedReduceComplex16Dim`. Thanks Slava for catching that. https://github.com/llvm/llvm-proje

[llvm-branch-commits] [flang] [flang] Lower REDUCE intrinsic with DIM argument (PR #94771)

2024-06-07 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?=,Valentin Clement Message-ID: In-Reply-To: https://github.com/clementval updated https://github.com/llvm/llvm-project/pull/94771 >From fd911977863888c7c005f00ae05049b32fe9d4d6 Mon Sep 17 00:00:00 2001 From: Valentin Clement Date: Thu, 6 Jun 2024 1

[llvm-branch-commits] [flang] [flang] Lower REDUCE intrinsic with DIM argument (PR #94771)

2024-06-07 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?Message-ID: In-Reply-To: @@ -540,9 +606,31 @@ struct ForcedReduceComplex16 { auto strTy = fir::ReferenceType::get(mlir::IntegerType::get(ctx, 8)); auto intTy = mlir::IntegerType::get(ctx, 8 * sizeof(int)); auto refT

[llvm-branch-commits] [flang] [flang] Lower REDUCE intrinsic with DIM argument (PR #94771)

2024-06-07 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?Message-ID: In-Reply-To: @@ -540,9 +606,31 @@ struct ForcedReduceComplex16 { auto strTy = fir::ReferenceType::get(mlir::IntegerType::get(ctx, 8)); auto intTy = mlir::IntegerType::get(ctx, 8 * sizeof(int)); auto refT

[llvm-branch-commits] [flang] [flang] Lower REDUCE intrinsic with DIM argument (PR #94771)

2024-06-07 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?Message-ID: In-Reply-To: @@ -540,9 +606,31 @@ struct ForcedReduceComplex16 { auto strTy = fir::ReferenceType::get(mlir::IntegerType::get(ctx, 8)); auto intTy = mlir::IntegerType::get(ctx, 8 * sizeof(int)); auto refT

[llvm-branch-commits] [flang] [flang] Lower REDUCE intrinsic with DIM argument (PR #94771)

2024-06-07 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?Message-ID: In-Reply-To: https://github.com/clementval updated https://github.com/llvm/llvm-project/pull/94771 >From fd911977863888c7c005f00ae05049b32fe9d4d6 Mon Sep 17 00:00:00 2001 From: Valentin Clement Date: Thu, 6 Jun 2024 14:17:44 -0700 Subject

[llvm-branch-commits] [flang] [flang] Lower REDUCE intrinsic with DIM argument (PR #94771)

2024-06-07 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
@@ -527,10 +571,32 @@ struct ForcedReduceComplex10 { } }; +/// Placeholder for Dim complex(10) version of Reduce Intrinsic +struct ForcedReduceComplex10Dim { + static constexpr const char *name = + ExpandAndQuoteKey(RTNAME(CppReduceComplex10Dim)); + static constexpr f

[llvm-branch-commits] [flang] [flang] Lower REDUCE intrinsic with DIM argument (PR #94771)

2024-06-07 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
@@ -527,10 +571,32 @@ struct ForcedReduceComplex10 { } }; +/// Placeholder for Dim complex(10) version of Reduce Intrinsic +struct ForcedReduceComplex10Dim { + static constexpr const char *name = + ExpandAndQuoteKey(RTNAME(CppReduceComplex10Dim)); + static constexpr f

[llvm-branch-commits] [flang] [flang] Lower REDUCE intrinsic with DIM argument (PR #94771)

2024-06-07 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
https://github.com/clementval created https://github.com/llvm/llvm-project/pull/94771 This is a follow up patch to #94652 and handles the lowering of the reduce intrinsic with DIM argument and non scalar result. >From fd911977863888c7c005f00ae05049b32fe9d4d6 Mon Sep 17 00:00:00 2001 From: Val

[llvm-branch-commits] [llvm] [Frontend] Introduce `getDirectiveCategory` for ACC/OMP directives (PR #94689)

2024-06-06 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
@@ -308,6 +310,7 @@ def ACC_Declare : Directive<"declare"> { VersionedClause ]; let association = AS_None; + let category = CA_Executable; clementval wrote: ```suggestion let category = CA_Declarative; ``` https://github.com/llvm/llvm-project/pull/

[llvm-branch-commits] [flang] [flang][cuda] Lower device/managed/unified allocation to cuda ops (PR #90526)

2024-04-30 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
https://github.com/clementval closed https://github.com/llvm/llvm-project/pull/90526 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang] [flang][cuda] Lower device/managed/unified allocation to cuda ops (PR #90526)

2024-04-29 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
clementval wrote: > Thank you, Valentin! > > Is it expected that we can have a mix of `fir.alloca` and `fir.cuda_alloc` > operations in the device routines (e.g. I suppose > `fir::FirOpBuilder::createTemporaryAlloc` can generate `fir.alloca` for a > temporary location in device code)? It is n

[llvm-branch-commits] [flang] [flang][cuda] Lower device/managed/unified allocation to cuda ops (PR #90526)

2024-04-29 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
https://github.com/clementval created https://github.com/llvm/llvm-project/pull/90526 Lower locals allocation of cuda device, managed and unified variables to fir.cuda_alloc. Add fir.cuda_free in the function context finalization. >From 02d1ef45cae1ba973a51e5898f092403395c Mon Sep 17 00:0

[llvm-branch-commits] [flang] [flang][OpenMP] simplify getReductionName (PR #85666)

2024-03-18 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
clementval wrote: Great to see this re-used! https://github.com/llvm/llvm-project/pull/85666 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang] [flang] run CFG conversion on omp reduction declare ops (PR #84953)

2024-03-14 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
clementval wrote: > > Wouldn't it be cleaner to expose the patterns via a > > `populateFirCfgConversionPatterns` function and reuse it in you extra pass > > instead of making two pass from the initial file? > > We did this recently for the FirToLLVM patterns. #83492 > > Thanks for taking a loo

[llvm-branch-commits] [flang] [flang][CodeGen] Run PreCGRewrite on omp reduction declare ops (PR #84954)

2024-03-14 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
https://github.com/clementval edited https://github.com/llvm/llvm-project/pull/84954 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang] [flang][CodeGen] Run PreCGRewrite on omp reduction declare ops (PR #84954)

2024-03-14 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
https://github.com/clementval edited https://github.com/llvm/llvm-project/pull/84954 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang] [flang][CodeGen] Run PreCGRewrite on omp reduction declare ops (PR #84954)

2024-03-14 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
https://github.com/clementval approved this pull request. LGTM. Just a nit comment for an even cleaner code. https://github.com/llvm/llvm-project/pull/84954 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org

[llvm-branch-commits] [flang] [flang][CodeGen] Run PreCGRewrite on omp reduction declare ops (PR #84954)

2024-03-14 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
@@ -314,11 +314,8 @@ class CodeGenRewrite : public fir::impl::CodeGenRewriteBase { void runOnOperation() override final { // Call runOn on all top level regions that may contain emboxOp/arrayCoorOp. -auto mod = getOperation(); -for (auto func : mod.getOps()) -

[llvm-branch-commits] [flang] [flang] run CFG conversion on omp reduction declare ops (PR #84953)

2024-03-13 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
clementval wrote: Wouldn't it be cleaner to expose the patterns via a `populateFirCfgConversionPatterns` function and reuse it in you extra pass instead of making two pass from the initial file? We did this recently for the FirToLLVM patterns. https://github.com/llvm/llvm-project/pull/83492

[llvm-branch-commits] [flang] [flang][CodeGen] Run PreCGRewrite on omp reduction declare ops (PR #84954)

2024-03-13 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
@@ -319,6 +320,10 @@ class CodeGenRewrite : public fir::impl::CodeGenRewriteBase { runOn(func, func.getBody()); for (auto global : mod.getOps()) runOn(global, global.getRegion()); +for (auto omp : mod.getOps()) { clementval wrote: Wouldn't

[llvm-branch-commits] [flang] [flang][CodeGen] Run PreCGRewrite on omp reduction declare ops (PR #84954)

2024-03-13 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
@@ -22,6 +22,7 @@ #include "mlir/Transforms/RegionUtils.h" #include "llvm/ADT/STLExtras.h" #include "llvm/Support/Debug.h" +#include clementval wrote: Why <> instead of ""? https://github.com/llvm/llvm-project/pull/84954 _

[llvm-branch-commits] [flang] [flang][NFC] move extractSequenceType helper out of OpenACC to share code (PR #84957)

2024-03-12 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
https://github.com/clementval approved this pull request. https://github.com/llvm/llvm-project/pull/84957 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [Flang][OpenMP][MLIR] Initial derived type member map support (PR #82853)

2024-02-23 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
clementval wrote: > Yes, I am sorry about that, I'd like to make it as easy as possible to review > for you all as I know it's not an easy task and I greatly appreciate the > effort you all put in, so I will most definitely keep it mind in the future! Thanks! https://github.com/llvm/llvm-pr

[llvm-branch-commits] [Flang][OpenMP][MLIR] Initial derived type member map support (PR #82853)

2024-02-23 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
clementval wrote: > > You could do the renaming of the pass as an NFC PR so it would make the non > > NFC changes more obvious to spot at. Not necessary to do it for this time > > but next time it would be nice. > > I'm very sorry about that! I didn't realise it would be a problem, but I will

[llvm-branch-commits] [Flang][OpenMP][MLIR] Initial derived type member map support (PR #82853)

2024-02-23 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
clementval wrote: You could do the renaming of the pass as an NFC PR so it would make the non NFC changes more obvious to spot at. Not necessary to do it for this time but next time it would be nice. https://github.com/llvm/llvm-project/pull/82853 _

[llvm-branch-commits] [flang] [llvm] [flang][OpenMP] Main splitting functionality dev-complete (PR #82003)

2024-02-19 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
@@ -48,6 +49,29 @@ using DeclareTargetCapturePair = // Common helper functions //===--===// +static llvm::ArrayRef getWorksharing() { + static llvm::omp::Directive worksharing[] = { + llvm::omp::Directi

[llvm-branch-commits] [flang] [flang][OpenMP] Add support for copyprivate (PR #80485)

2024-02-02 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
@@ -1092,6 +1040,79 @@ class FirConverter : public Fortran::lower::AbstractConverter { return true; } + void copyVar(const Fortran::semantics::Symbol &sym, + const Fortran::lower::SymbolBox &lhs_sb, + const Fortran::lower::SymbolBox &rhs_sb)

[llvm-branch-commits] [flang] [flang][openacc] Carry device dependent info for acc routine in the module file (PR #77804)

2024-01-11 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?Message-ID: In-Reply-To: clementval wrote: For some reason this PR has been closed when I merged the parent PR. I'll apply the suggestion and push the commit manually. https://github.com/llvm/llvm-project/pull/77804 _

[llvm-branch-commits] [flang] [flang][openacc] Carry device dependent info for acc routine in the module file (PR #77804)

2024-01-11 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?Message-ID: In-Reply-To: https://github.com/clementval closed https://github.com/llvm/llvm-project/pull/77804 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi

[llvm-branch-commits] [flang] [flang][openacc] Carry device dependent info for acc routine in the module file (PR #77804)

2024-01-11 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?Message-ID: In-Reply-To: https://github.com/clementval updated https://github.com/llvm/llvm-project/pull/77804 >From d417332a130814e34fcc2448430d71b0fd5376b5 Mon Sep 17 00:00:00 2001 From: Valentin Clement Date: Wed, 10 Jan 2024 21:26:53 -0800 Subjec

[llvm-branch-commits] [flang] [flang][openacc] Carry device dependent info for acc routine in the module file (PR #77804)

2024-01-11 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
@@ -124,21 +125,41 @@ class OpenACCRoutineInfo { void set_isGang(bool value = true) { isGang_ = value; } unsigned gangDim() const { return gangDim_; } void set_gangDim(unsigned value) { gangDim_ = value; } - bool isNohost() const { return isNohost_; } - void set_isNohos

[llvm-branch-commits] [flang] [flang][openacc] Carry device dependent info for acc routine in the module file (PR #77804)

2024-01-11 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
https://github.com/clementval created https://github.com/llvm/llvm-project/pull/77804 - Move the DeviceType enumeratoon to `Fortran::common` so it can be used outside of parser only. - Store the device_type dependent information on the symbol and reproduce them in the module file. >From d41