<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/flang/lib/Semantics/resolve-directives.cpp, branch main</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][OpenMP] Implement loop nest parser (#168884)</title>
<updated>2025-11-22T18:28:58+00:00</updated>
<author>
<name>Krzysztof Parzyszek</name>
<email>Krzysztof.Parzyszek@amd.com</email>
</author>
<published>2025-11-22T18:28:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c2d659b9b8efac9f80b8ebcb2b38b61295d82bdc'/>
<id>c2d659b9b8efac9f80b8ebcb2b38b61295d82bdc</id>
<content type='text'>
Previously, loop constructs were parsed in a piece-wise manner: the
begin directive, the body, and the end directive were parsed separately.
Later on in canonicalization they were all coalesced into a loop
construct. To facilitate that end-loop directives were given a special
treatment, namely they were parsed as OpenMP constructs. As a result
syntax errors caused by misplaced end-loop directives were handled
differently from those cause by misplaced non-loop end directives.

The new loop nest parser constructs the complete loop construct,
removing the need for the canonicalization step. Additionally, it is the
basis for parsing loop-sequence-associated constructs in the future.

It also removes the need for the special treatment of end-loop
directives. While this patch temporarily degrades the error messaging
for misplaced end-loop directives, it enables uniform handling of any
misplaced end-directives in the future.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, loop constructs were parsed in a piece-wise manner: the
begin directive, the body, and the end directive were parsed separately.
Later on in canonicalization they were all coalesced into a loop
construct. To facilitate that end-loop directives were given a special
treatment, namely they were parsed as OpenMP constructs. As a result
syntax errors caused by misplaced end-loop directives were handled
differently from those cause by misplaced non-loop end directives.

The new loop nest parser constructs the complete loop construct,
removing the need for the canonicalization step. Additionally, it is the
basis for parsing loop-sequence-associated constructs in the future.

It also removes the need for the special treatment of end-loop
directives. While this patch temporarily degrades the error messaging
for misplaced end-loop directives, it enables uniform handling of any
misplaced end-directives in the future.</pre>
</div>
</content>
</entry>
<entry>
<title>[Flang][OpenMP] Add semantic support for Loop Sequences and OpenMP loop fuse (#161213)</title>
<updated>2025-11-21T14:16:30+00:00</updated>
<author>
<name>Ferran Toda</name>
<email>f.toda.c@gmail.com</email>
</author>
<published>2025-11-21T14:16:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f4ebee0ca980f807de32841288b3785dadbc471d'/>
<id>f4ebee0ca980f807de32841288b3785dadbc471d</id>
<content type='text'>
This patch adds semantics for the `omp fuse` directive in flang, as
specified in OpenMP 6.0. This patch also enables semantic support for
loop sequences which are needed for the fuse directive along with
semantics for the `looprange` clause. These changes are only semantic.
Relevant tests have been added , and previous behavior is retained with
no changes.

---------

Co-authored-by: Ferran Toda &lt;ferran.todacasaban@bsc.es&gt;
Co-authored-by: Krzysztof Parzyszek &lt;Krzysztof.Parzyszek@amd.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds semantics for the `omp fuse` directive in flang, as
specified in OpenMP 6.0. This patch also enables semantic support for
loop sequences which are needed for the fuse directive along with
semantics for the `looprange` clause. These changes are only semantic.
Relevant tests have been added , and previous behavior is retained with
no changes.

---------

Co-authored-by: Ferran Toda &lt;ferran.todacasaban@bsc.es&gt;
Co-authored-by: Krzysztof Parzyszek &lt;Krzysztof.Parzyszek@amd.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][OpenMP] Undeprecate accidentally deprecated TARGET LOOP (#167495)</title>
<updated>2025-11-17T18:23:02+00:00</updated>
<author>
<name>Krzysztof Parzyszek</name>
<email>Krzysztof.Parzyszek@amd.com</email>
</author>
<published>2025-11-17T18:23:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4be0ab659e6a65436c4e3629706318acd0c1cdc9'/>
<id>4be0ab659e6a65436c4e3629706318acd0c1cdc9</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][OpenMP] Store Block in OpenMPLoopConstruct, add access functions (#168078)</title>
<updated>2025-11-17T14:02:36+00:00</updated>
<author>
<name>Krzysztof Parzyszek</name>
<email>Krzysztof.Parzyszek@amd.com</email>
</author>
<published>2025-11-17T14:02:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e70e9ec3b83757761ccbba217a566d77b561ec53'/>
<id>e70e9ec3b83757761ccbba217a566d77b561ec53</id>
<content type='text'>
Instead of storing a variant with specific types, store parser::Block as
the body. Add two access functions to make the traversal of the nest
simpler.

This will allow storing loop-nest sequences in the future.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of storing a variant with specific types, store parser::Block as
the body. Add two access functions to make the traversal of the nest
simpler.

This will allow storing loop-nest sequences in the future.</pre>
</div>
</content>
</entry>
<entry>
<title>[Flang][OpenMP] Fix defaultmap(none) being overly aggressive with symbol checks (#167806)</title>
<updated>2025-11-14T18:03:33+00:00</updated>
<author>
<name>agozillon</name>
<email>Andrew.Gozillon@amd.com</email>
</author>
<published>2025-11-14T18:03:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=739a5a4685590b51cab5a5fd0bb9b7d89a7754ef'/>
<id>739a5a4685590b51cab5a5fd0bb9b7d89a7754ef</id>
<content type='text'>
Currently we're picking up and complaining about builtin (and procedure)
symbols like null() when defaultmap(none) is set, so I've relaxed the
restriction a bit to allow for procedures and named constants to bypass
the restriction. It might be the case that we want to tighten it up
again in certain aspects in the future.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently we're picking up and complaining about builtin (and procedure)
symbols like null() when defaultmap(none) is set, so I've relaxed the
restriction a bit to allow for procedures and named constants to bypass
the restriction. It might be the case that we want to tighten it up
again in certain aspects in the future.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][OpenMP] Remove dead code left over after PR143715, NFC (#167941)</title>
<updated>2025-11-14T13:39:15+00:00</updated>
<author>
<name>Krzysztof Parzyszek</name>
<email>Krzysztof.Parzyszek@amd.com</email>
</author>
<published>2025-11-14T13:39:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=928393b29a9275934c99fb98eca2875b1b396be1'/>
<id>928393b29a9275934c99fb98eca2875b1b396be1</id>
<content type='text'>
In PrivatizeAssociatedLoopIndexAndCheckLoopLevel we now descend all the
way down the chain of nested OpenMPLoopDirectives ahead of time, so
innerMostNest can only be a nullptr, or a DoConstruct.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In PrivatizeAssociatedLoopIndexAndCheckLoopLevel we now descend all the
way down the chain of nested OpenMPLoopDirectives ahead of time, so
innerMostNest can only be a nullptr, or a DoConstruct.</pre>
</div>
</content>
</entry>
<entry>
<title>[Flang][OpenMP] Initial defaultmap(none) implementation (#166715)</title>
<updated>2025-11-11T02:15:58+00:00</updated>
<author>
<name>agozillon</name>
<email>Andrew.Gozillon@amd.com</email>
</author>
<published>2025-11-11T02:15:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=86fa018a1dca99a1a199e1a0e6f5730546198824'/>
<id>86fa018a1dca99a1a199e1a0e6f5730546198824</id>
<content type='text'>
This PR adds defaultmap(none) behaviour to Flang, where we emit a
semantic error if variables within the target construct do not have an
associated data attribute. Similar to the way default behaves, as
described by the OpenMP specification.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR adds defaultmap(none) behaviour to Flang, where we emit a
semantic error if variables within the target construct do not have an
associated data attribute. Similar to the way default behaves, as
described by the OpenMP specification.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][OpenMP] Use OmpDirectiveSpecification in ALLOCATE (#165865)</title>
<updated>2025-11-03T13:37:13+00:00</updated>
<author>
<name>Krzysztof Parzyszek</name>
<email>Krzysztof.Parzyszek@amd.com</email>
</author>
<published>2025-11-03T13:37:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3d3fab17f5ea8a14eb390f53075c094f5e1f19fa'/>
<id>3d3fab17f5ea8a14eb390f53075c094f5e1f19fa</id>
<content type='text'>
The ALLOCATE directive has two forms:
- A declarative form with a standalone directive:
  ```
  !$OMP ALLOCATE (variable-list-item...)
  ```
- An executable form that consists of several directives followed by an
ALLOCATE statement:
  ```
  !$OMP ALLOCATE (variable-list-item...)
  !$OMP ALLOCATE (variable-list-item...)
  ...
  ALLOCATE (...)
  ```

The second form was deprecated in OpenMP 5.2 in favor of the ALLOCATORS
construct.

Since in the parse tree every type corresponding to a directive only
corresponds to a single directive, the executable form is represented by
a sequence of nested OmpAllocateDirectives, e.g.
```
   !$OMP ALLOCATE(x)
   !$OMP ALLOCATE(y)
   ALLOCATE(x, y)
```
will become
```
   OmpAllocateDirective
   |- ALLOCATE(x)            // begin directive
   `- OmpAllocateDirective   // block
      |- ALLOCATE(y)            // begin directive
      `- ALLOCATE(x, y)         // block
```
With this change all AST nodes for directives use
OmpDirectiveSpecification as the directive representation.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The ALLOCATE directive has two forms:
- A declarative form with a standalone directive:
  ```
  !$OMP ALLOCATE (variable-list-item...)
  ```
- An executable form that consists of several directives followed by an
ALLOCATE statement:
  ```
  !$OMP ALLOCATE (variable-list-item...)
  !$OMP ALLOCATE (variable-list-item...)
  ...
  ALLOCATE (...)
  ```

The second form was deprecated in OpenMP 5.2 in favor of the ALLOCATORS
construct.

Since in the parse tree every type corresponding to a directive only
corresponds to a single directive, the executable form is represented by
a sequence of nested OmpAllocateDirectives, e.g.
```
   !$OMP ALLOCATE(x)
   !$OMP ALLOCATE(y)
   ALLOCATE(x, y)
```
will become
```
   OmpAllocateDirective
   |- ALLOCATE(x)            // begin directive
   `- OmpAllocateDirective   // block
      |- ALLOCATE(y)            // begin directive
      `- ALLOCATE(x, y)         // block
```
With this change all AST nodes for directives use
OmpDirectiveSpecification as the directive representation.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][OpenMP] Reorganize ALLOCATE-related semantic checks (#165719)</title>
<updated>2025-11-03T12:58:59+00:00</updated>
<author>
<name>Krzysztof Parzyszek</name>
<email>Krzysztof.Parzyszek@amd.com</email>
</author>
<published>2025-11-03T12:58:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ab049891cd7ce2f631a49ec830701dee4bd483a9'/>
<id>ab049891cd7ce2f631a49ec830701dee4bd483a9</id>
<content type='text'>
For ALLOCATORS and executable ALLOCATE first perform list item checks in
the context of an individual ALLOCATE clause or directive respectively,
then perform "global" checks, e.g. whether all list items are present on
the ALLOCATE statement.

These changes allowed to simplify the checks for presence on ALLOCATE
statement and the use of a predefined allocator.

Additionally, allow variable list item lists to be empty, add a test for
the related spec restriction.

This is a first step towards unifying OpenMPDeclarativeAllocate and
OpenMPExecutableAllocate into a single directive.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For ALLOCATORS and executable ALLOCATE first perform list item checks in
the context of an individual ALLOCATE clause or directive respectively,
then perform "global" checks, e.g. whether all list items are present on
the ALLOCATE statement.

These changes allowed to simplify the checks for presence on ALLOCATE
statement and the use of a predefined allocator.

Additionally, allow variable list item lists to be empty, add a test for
the related spec restriction.

This is a first step towards unifying OpenMPDeclarativeAllocate and
OpenMPExecutableAllocate into a single directive.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][OpenMP] Implement OpenMP stylized expressions (#165049)</title>
<updated>2025-10-28T17:45:04+00:00</updated>
<author>
<name>Krzysztof Parzyszek</name>
<email>Krzysztof.Parzyszek@amd.com</email>
</author>
<published>2025-10-28T17:45:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=cd40bc487a8d07dfdcf58f6ab919543f8336d1db'/>
<id>cd40bc487a8d07dfdcf58f6ab919543f8336d1db</id>
<content type='text'>
Consider OpenMP stylized expression to be a template to be instantiated
with a series of types listed on the containing directive (currently
DECLARE_REDUCTION). Create a series of instantiations in the parser,
allowing OpenMP special variables to be declared separately for each
type.

---------

Co-authored-by: Tom Eccles &lt;tom.eccles@arm.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Consider OpenMP stylized expression to be a template to be instantiated
with a series of types listed on the containing directive (currently
DECLARE_REDUCTION). Create a series of instantiations in the parser,
allowing OpenMP special variables to be declared separately for each
type.

---------

Co-authored-by: Tom Eccles &lt;tom.eccles@arm.com&gt;</pre>
</div>
</content>
</entry>
</feed>
