<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp, branch users/fmayer/spr/wip-smartpointers</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[Flang][mlir] - Translation of delayed privatization for deferred target-tasks (#155348)</title>
<updated>2025-10-22T17:18:56+00:00</updated>
<author>
<name>Pranav Bhandarkar</name>
<email>pranav.bhandarkar@amd.com</email>
</author>
<published>2025-10-22T17:18:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e2ad55499197db540d09e7201b9b80366a0908c3'/>
<id>e2ad55499197db540d09e7201b9b80366a0908c3</id>
<content type='text'>
This PR adds support for translation of the private clause on deferred
target tasks - that is `omp.target` operations with the `nowait` clause.

An offloading call for a deferred target-task is not blocking - the
offloading (target-generating) host task continues its execution after issuing the offloading
call. Therefore, the key problem we need to solve is to ensure that the
data needed for private variables to be initialized in the target task
persists even after the host task has completed.
We do this in a new pass called `PrepareForOMPOffloadPrivatizationPass`.
For a privatized variable that needs its host counterpart for
initialization (such as the shape of the data from the descriptor when
an allocatable is privatized or the value of the data when an
allocatable is firstprivatized),
  - the pass allocates memory on the heap.
- it then initializes this memory by using the `init` and `copy` (for
firstprivate) regions of the corresponding `omp::PrivateClauseOp`.
- Finally the memory allocated on the heap is freed using the `dealloc`
region of the same `omp::PrivateClauseOp` instance. This step is not
straightforward though, because we cannot simply free the memory that's
going to be used by another thread without any synchronization. So, for
deallocation, we create a `omp.task` after the `omp.target` and
synchronize the two with a dummy dependency (using the `depend` clause).
In this newly created `omp.task` we do the deallocation.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR adds support for translation of the private clause on deferred
target tasks - that is `omp.target` operations with the `nowait` clause.

An offloading call for a deferred target-task is not blocking - the
offloading (target-generating) host task continues its execution after issuing the offloading
call. Therefore, the key problem we need to solve is to ensure that the
data needed for private variables to be initialized in the target task
persists even after the host task has completed.
We do this in a new pass called `PrepareForOMPOffloadPrivatizationPass`.
For a privatized variable that needs its host counterpart for
initialization (such as the shape of the data from the descriptor when
an allocatable is privatized or the value of the data when an
allocatable is firstprivatized),
  - the pass allocates memory on the heap.
- it then initializes this memory by using the `init` and `copy` (for
firstprivate) regions of the corresponding `omp::PrivateClauseOp`.
- Finally the memory allocated on the heap is freed using the `dealloc`
region of the same `omp::PrivateClauseOp` instance. This step is not
straightforward though, because we cannot simply free the memory that's
going to be used by another thread without any synchronization. So, for
deallocation, we create a `omp.task` after the `omp.target` and
synchronize the two with a dummy dependency (using the `depend` clause).
In this newly created `omp.task` we do the deallocation.</pre>
</div>
</content>
</entry>
<entry>
<title>[Flang][OpenMP][Dialect] Swap to using MLIR dialect enum to encode map flags (#164043)</title>
<updated>2025-10-21T19:54:25+00:00</updated>
<author>
<name>agozillon</name>
<email>Andrew.Gozillon@amd.com</email>
</author>
<published>2025-10-21T19:54:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f2b20d3410e4c0cc3be4a5b69e00120cab9f1d5e'/>
<id>f2b20d3410e4c0cc3be4a5b69e00120cab9f1d5e</id>
<content type='text'>
This PR shifts from using the LLVM OpenMP enumerator bit flags to an
OpenMP dialect specific enumerator. This allows us to better represent
map types that wouldn't be of interest to the LLVM backend and runtime
in the dialect.

Primarily things like
ref_ptr/ref_ptee/ref_ptr_ptee/atach_none/attach_always/attach_auto which
are of interest to the compiler for certrain transformations (primarily
in the FIR transformation passes dealing with mapping), but the runtime
has no need to know about them. It also means if another OpenMP
implementation comes along they won't need to stick to the same bit flag
system LLVM chose/do leg work to address it.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR shifts from using the LLVM OpenMP enumerator bit flags to an
OpenMP dialect specific enumerator. This allows us to better represent
map types that wouldn't be of interest to the LLVM backend and runtime
in the dialect.

Primarily things like
ref_ptr/ref_ptee/ref_ptr_ptee/atach_none/attach_always/attach_auto which
are of interest to the compiler for certrain transformations (primarily
in the FIR transformation passes dealing with mapping), but the runtime
has no need to know about them. It also means if another OpenMP
implementation comes along they won't need to stick to the same bit flag
system LLVM chose/do leg work to address it.</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR] Apply clang-tidy fixes for performance-unnecessary-value-param in OpenMPToLLVMIRTranslation.cpp (NFC)</title>
<updated>2025-10-17T12:58:15+00:00</updated>
<author>
<name>Mehdi Amini</name>
<email>joker.eph@gmail.com</email>
</author>
<published>2025-08-21T18:05:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=936e03867f5ef803cb628b0e1d5a29f4f7a8aff3'/>
<id>936e03867f5ef803cb628b0e1d5a29f4f7a8aff3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir] Simplify unreachable type switch cases. NFC. (#162032)</title>
<updated>2025-10-06T13:23:25+00:00</updated>
<author>
<name>Jakub Kuderski</name>
<email>jakub@nod-labs.com</email>
</author>
<published>2025-10-06T13:23:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8bab6c4e8c4f9a7b32ac5dd94436922c84705a86'/>
<id>8bab6c4e8c4f9a7b32ac5dd94436922c84705a86</id>
<content type='text'>
Use `DefaultUnreachable` from
https://github.com/llvm/llvm-project/pull/161970.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use `DefaultUnreachable` from
https://github.com/llvm/llvm-project/pull/161970.</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][omp] Add omp.tile operation (#160292)</title>
<updated>2025-10-02T17:12:14+00:00</updated>
<author>
<name>Michael Kruse</name>
<email>llvm-project@meinersbur.de</email>
</author>
<published>2025-10-02T17:12:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=419594230f952a37dd2751056f3b92b0a9f80dee'/>
<id>419594230f952a37dd2751056f3b92b0a9f80dee</id>
<content type='text'>
Add the `omp.tile` loop transformations for the OpenMP dialect. Used for
lowering a standalone `!$omp tile` in Flang.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add the `omp.tile` loop transformations for the OpenMP dialect. Used for
lowering a standalone `!$omp tile` in Flang.</pre>
</div>
</content>
</entry>
<entry>
<title>[clang] Use the VFS to create the OpenMP region entry ID (#160918)</title>
<updated>2025-09-26T19:25:37+00:00</updated>
<author>
<name>Jan Svoboda</name>
<email>jan_svoboda@apple.com</email>
</author>
<published>2025-09-26T19:25:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c580ad488ebbc8a195c740235e6ca5f52035a041'/>
<id>c580ad488ebbc8a195c740235e6ca5f52035a041</id>
<content type='text'>
This PR uses the VFS to create the OpenMP target entry instead of going
straight to the real file system. This matches the behavior of other
input files of the compiler.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR uses the VFS to create the OpenMP target entry instead of going
straight to the real file system. This matches the behavior of other
input files of the compiler.</pre>
</div>
</content>
</entry>
<entry>
<title>[Flang][OpenMP] Enable no-loop kernels (#155818)</title>
<updated>2025-09-26T11:57:51+00:00</updated>
<author>
<name>Dominik Adamski</name>
<email>dominik.adamski@amd.com</email>
</author>
<published>2025-09-26T11:57:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=83ef38a274b76c8877f15d3758d955772f91cf2d'/>
<id>83ef38a274b76c8877f15d3758d955772f91cf2d</id>
<content type='text'>
Enable the generation of no-loop kernels for Fortran OpenMP code. target
teams distribute parallel do pragmas can be promoted to no-loop kernels
if the user adds the -fopenmp-assume-teams-oversubscription and
-fopenmp-assume-threads-oversubscription flags.

If the OpenMP kernel contains reduction or num_teams clauses, it is not
promoted to no-loop mode.

The global OpenMP device RTL oversubscription flags no longer force
no-loop code generation for Fortran.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Enable the generation of no-loop kernels for Fortran OpenMP code. target
teams distribute parallel do pragmas can be promoted to no-loop kernels
if the user adds the -fopenmp-assume-teams-oversubscription and
-fopenmp-assume-threads-oversubscription flags.

If the OpenMP kernel contains reduction or num_teams clauses, it is not
promoted to no-loop mode.

The global OpenMP device RTL oversubscription flags no longer force
no-loop code generation for Fortran.</pre>
</div>
</content>
</entry>
<entry>
<title>[OpenMP][MLIR] Preserve to/from flags in mapper base entry for mappers (#159799)</title>
<updated>2025-09-19T18:34:09+00:00</updated>
<author>
<name>Akash Banerjee</name>
<email>akash.banerjee@amd.com</email>
</author>
<published>2025-09-19T18:34:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8afea0d0ea1c1d24c8df646a6d8c87fd02ca0ea1'/>
<id>8afea0d0ea1c1d24c8df646a6d8c87fd02ca0ea1</id>
<content type='text'>
With declare mapper, the parent base entry was emitted as `TARGET_PARAM`
only. The mapper received a map-type without `to/from`, causing
components to degrade to `alloc`-only (no copies), breaking allocatable
payload mapping. This PR preserves the map-type bits from the parent.

This fixes #156466.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With declare mapper, the parent base entry was emitted as `TARGET_PARAM`
only. The mapper received a map-type without `to/from`, causing
components to degrade to `alloc`-only (no copies), breaking allocatable
payload mapping. This PR preserves the map-type bits from the parent.

This fixes #156466.</pre>
</div>
</content>
</entry>
<entry>
<title>[clang] Use VFS for `-fopenmp-host-ir-file-path` (#156727)</title>
<updated>2025-09-11T16:08:47+00:00</updated>
<author>
<name>Jan Svoboda</name>
<email>jan_svoboda@apple.com</email>
</author>
<published>2025-09-11T16:08:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d1c0b1b6203d4005ad9a1baefe843ab45b3693a8'/>
<id>d1c0b1b6203d4005ad9a1baefe843ab45b3693a8</id>
<content type='text'>
This is a follow-up to #150124. This PR makes it so that the
`-fopenmp-host-ir-file-path` respects VFS overlays, like any other input
file.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a follow-up to #150124. This PR makes it so that the
`-fopenmp-host-ir-file-path` respects VFS overlays, like any other input
file.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][OpenMP] Enable tiling (#143715)</title>
<updated>2025-09-10T13:25:40+00:00</updated>
<author>
<name>Jan Leyonberg</name>
<email>jan_sjodin@yahoo.com</email>
</author>
<published>2025-09-10T13:25:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d452e67ee7b5d17aa040f71d8997abc1a47750e4'/>
<id>d452e67ee7b5d17aa040f71d8997abc1a47750e4</id>
<content type='text'>
This patch enables tiling in flang. In MLIR tiling is handled by
changing the the omp.loop_nest op to be able to represent both collapse
and tiling, so the flang front-end will combine the nested constructs into
a single MLIR op. The MLIR-&gt;LLVM-IR lowering of the LoopNestOp is
enhanced to first do the tiling if present, then collapse.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch enables tiling in flang. In MLIR tiling is handled by
changing the the omp.loop_nest op to be able to represent both collapse
and tiling, so the flang front-end will combine the nested constructs into
a single MLIR op. The MLIR-&gt;LLVM-IR lowering of the LoopNestOp is
enhanced to first do the tiling if present, then collapse.
</pre>
</div>
</content>
</entry>
</feed>
