<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/flang/lib/Parser/parse-tree.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] 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] 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>
<entry>
<title>[flang][NFC] Use parser::Unwrap(Ref) more (#162918)</title>
<updated>2025-10-16T19:20:27+00:00</updated>
<author>
<name>Peter Klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2025-10-16T19:20:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e0bffe1ff9082c7775063ccd52ec7213ee24f453'/>
<id>e0bffe1ff9082c7775063ccd52ec7213ee24f453</id>
<content type='text'>
Replace more parse tree references to "thing" and "value()" with usage
of the parser::Unwrap&lt;&gt; template function.
Add parser::UnwrapRef&lt;&gt; as an alias for DEREF(Unwrap&lt;&gt;()).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace more parse tree references to "thing" and "value()" with usage
of the parser::Unwrap&lt;&gt; template function.
Add parser::UnwrapRef&lt;&gt; as an alias for DEREF(Unwrap&lt;&gt;()).</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][OpenMP] Make all block constructs share the same structure (#150956)</title>
<updated>2025-08-01T12:52:59+00:00</updated>
<author>
<name>Krzysztof Parzyszek</name>
<email>Krzysztof.Parzyszek@amd.com</email>
</author>
<published>2025-08-01T12:52:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6533ad04edcbc02d012cdb181d8745ca0d2f2e75'/>
<id>6533ad04edcbc02d012cdb181d8745ca0d2f2e75</id>
<content type='text'>
The structure is
- OmpBeginDirective (aka OmpDirectiveSpecification)
- Block
- optional&lt;OmpEndDirective&gt; (aka optional&lt;OmpDirectiveSpecification&gt;)

The OmpBeginDirective and OmpEndDirective are effectively different
names for OmpDirectiveSpecification. They exist to allow the semantic
analyses to distinguish between the beginning and the ending of a block
construct without maintaining additional context.

The actual changes are in the parser: parse-tree.h and openmp-parser.cpp
in particular. The rest is simply changing the way the directive/clause
information is accessed (typically for the simpler).

All standalone and block constructs now use OmpDirectiveSpecification to
store the directive/clause information.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The structure is
- OmpBeginDirective (aka OmpDirectiveSpecification)
- Block
- optional&lt;OmpEndDirective&gt; (aka optional&lt;OmpDirectiveSpecification&gt;)

The OmpBeginDirective and OmpEndDirective are effectively different
names for OmpDirectiveSpecification. They exist to allow the semantic
analyses to distinguish between the beginning and the ending of a block
construct without maintaining additional context.

The actual changes are in the parser: parse-tree.h and openmp-parser.cpp
in particular. The rest is simply changing the way the directive/clause
information is accessed (typically for the simpler).

All standalone and block constructs now use OmpDirectiveSpecification to
store the directive/clause information.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][OpenMP] Avoid unnecessary parsing of OpenMP constructs (#148629)</title>
<updated>2025-07-15T14:05:56+00:00</updated>
<author>
<name>Krzysztof Parzyszek</name>
<email>Krzysztof.Parzyszek@amd.com</email>
</author>
<published>2025-07-15T14:05:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=51b6f64b892bf57879389e7031051a3922aa5061'/>
<id>51b6f64b892bf57879389e7031051a3922aa5061</id>
<content type='text'>
When parsing a specification part, the parser will look ahead to see if
the next construct is an executable construct. In doing so it will
invoke OpenMPConstruct parser, whereas the only necessary thing to check
would be the directive alone.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When parsing a specification part, the parser will look ahead to see if
the next construct is an executable construct. In doing so it will
invoke OpenMPConstruct parser, whereas the only necessary thing to check
would be the directive alone.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][OpenMP] Overhaul implementation of ATOMIC construct (#137852)</title>
<updated>2025-06-11T15:05:34+00:00</updated>
<author>
<name>Krzysztof Parzyszek</name>
<email>Krzysztof.Parzyszek@amd.com</email>
</author>
<published>2025-06-11T15:05:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=141d390dcb6cd174b07ca663e58f37ab24eee08a'/>
<id>141d390dcb6cd174b07ca663e58f37ab24eee08a</id>
<content type='text'>
The parser will accept a wide variety of illegal attempts at forming an
ATOMIC construct, leaving it to the semantic analysis to diagnose any
issues. This consolidates the analysis into one place and allows us to
produce more informative diagnostics.

The parser's outcome will be parser::OpenMPAtomicConstruct object
holding the directive, parser::Body, and an optional end-directive. The
prior variety of OmpAtomicXyz classes, as well as OmpAtomicClause have
been removed. READ, WRITE, etc. are now proper clauses.

The semantic analysis consistently operates on "evaluation"
representations, mainly evaluate::Expr (as SomeExpr) and
evaluate::Assignment. The results of the semantic analysis are stored in
a mutable member of the OpenMPAtomicConstruct node. This follows a
precedent of having `typedExpr` member in parser::Expr, for example.
This allows the lowering code to avoid duplicated handling of AST nodes.

Using a BLOCK construct containing multiple statements for an ATOMIC
construct that requires multiple statements is now allowed. In fact, any
nesting of such BLOCK constructs is allowed.

This implementation will parse, and perform semantic checks for both
conditional-update and conditional-update-capture, although no MLIR will
be generated for those. Instead, a TODO error will be issues prior to
lowering.

The allowed forms of the ATOMIC construct were based on the OpenMP 6.0
spec.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The parser will accept a wide variety of illegal attempts at forming an
ATOMIC construct, leaving it to the semantic analysis to diagnose any
issues. This consolidates the analysis into one place and allows us to
produce more informative diagnostics.

The parser's outcome will be parser::OpenMPAtomicConstruct object
holding the directive, parser::Body, and an optional end-directive. The
prior variety of OmpAtomicXyz classes, as well as OmpAtomicClause have
been removed. READ, WRITE, etc. are now proper clauses.

The semantic analysis consistently operates on "evaluation"
representations, mainly evaluate::Expr (as SomeExpr) and
evaluate::Assignment. The results of the semantic analysis are stored in
a mutable member of the OpenMPAtomicConstruct node. This follows a
precedent of having `typedExpr` member in parser::Expr, for example.
This allows the lowering code to avoid duplicated handling of AST nodes.

Using a BLOCK construct containing multiple statements for an ATOMIC
construct that requires multiple statements is now allowed. In fact, any
nesting of such BLOCK constructs is allowed.

This implementation will parse, and perform semantic checks for both
conditional-update and conditional-update-capture, although no MLIR will
be generated for those. Instead, a TODO error will be issues prior to
lowering.

The allowed forms of the ATOMIC construct were based on the OpenMP 6.0
spec.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][OpenMP] Pass OpenMP version to getOpenMPDirectiveName (#139131)</title>
<updated>2025-05-09T13:13:52+00:00</updated>
<author>
<name>Krzysztof Parzyszek</name>
<email>Krzysztof.Parzyszek@amd.com</email>
</author>
<published>2025-05-09T12:42:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a68f35a17db03a6633a660d310156f4e2f17197f'/>
<id>a68f35a17db03a6633a660d310156f4e2f17197f</id>
<content type='text'>
The OpenMP version is stored in LangOptions in SemanticsContext. Use the
fallback version where SemanticsContext is unavailable (mostly in case
of debug dumps).

RFC:
https://discourse.llvm.org/t/rfc-alternative-spellings-of-openmp-directives/85507

Reland with a fix for build break in f18-parse-demo.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The OpenMP version is stored in LangOptions in SemanticsContext. Use the
fallback version where SemanticsContext is unavailable (mostly in case
of debug dumps).

RFC:
https://discourse.llvm.org/t/rfc-alternative-spellings-of-openmp-directives/85507

Reland with a fix for build break in f18-parse-demo.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[flang][OpenMP] Pass OpenMP version to getOpenMPDirectiveName (#139131)"</title>
<updated>2025-05-09T12:56:10+00:00</updated>
<author>
<name>Krzysztof Parzyszek</name>
<email>Krzysztof.Parzyszek@amd.com</email>
</author>
<published>2025-05-09T12:55:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=89822ff5a8608570897c21a3c40fb450c53f603f'/>
<id>89822ff5a8608570897c21a3c40fb450c53f603f</id>
<content type='text'>
This reverts commit 41aa67488c3ca33334ec79fb5216145c3644277c.

Breaks build: https://lab.llvm.org/buildbot/#/builders/140/builds/22826
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 41aa67488c3ca33334ec79fb5216145c3644277c.

Breaks build: https://lab.llvm.org/buildbot/#/builders/140/builds/22826
</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][OpenMP] Pass OpenMP version to getOpenMPDirectiveName (#139131)</title>
<updated>2025-05-09T12:42:15+00:00</updated>
<author>
<name>Krzysztof Parzyszek</name>
<email>Krzysztof.Parzyszek@amd.com</email>
</author>
<published>2025-05-09T12:42:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=41aa67488c3ca33334ec79fb5216145c3644277c'/>
<id>41aa67488c3ca33334ec79fb5216145c3644277c</id>
<content type='text'>
The OpenMP version is stored in LangOptions in SemanticsContext. Use the
fallback version where SemanticsContext is unavailable (mostly in case
of debug dumps).

RFC:
https://discourse.llvm.org/t/rfc-alternative-spellings-of-openmp-directives/85507</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The OpenMP version is stored in LangOptions in SemanticsContext. Use the
fallback version where SemanticsContext is unavailable (mostly in case
of debug dumps).

RFC:
https://discourse.llvm.org/t/rfc-alternative-spellings-of-openmp-directives/85507</pre>
</div>
</content>
</entry>
</feed>
