<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/flang/lib/Parser/executable-parsers.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] More graceful parse failures at EOF (#159834)</title>
<updated>2025-09-23T22:44:40+00:00</updated>
<author>
<name>Peter Klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2025-09-23T22:44:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=977e75c98d97755f643bce8e3da331005b1b36eb'/>
<id>977e75c98d97755f643bce8e3da331005b1b36eb</id>
<content type='text'>
Rather than admit complete confusion with a "FAIL" message when parsing
runs into the end of the source file unexpectedly, deal better with
missing or garbled END statements through the use of `consumedAllInput`
in end-of-line and end-of-statement parsers and error recovery. Adds a
new test (the original motivation) and updates the expected results in
two extant tests that were failing before.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rather than admit complete confusion with a "FAIL" message when parsing
runs into the end of the source file unexpectedly, deal better with
missing or garbled END statements through the use of `consumedAllInput`
in end-of-line and end-of-statement parsers and error recovery. Adds a
new test (the original motivation) and updates the expected results in
two extant tests that were failing before.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang] Better recovery from errors in a loop control (#117025)</title>
<updated>2024-11-21T18:47:42+00:00</updated>
<author>
<name>Peter Klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2024-11-21T18:47:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=be6bc6a1e5beb84984b8e1419393c80a3fe2d3d8'/>
<id>be6bc6a1e5beb84984b8e1419393c80a3fe2d3d8</id>
<content type='text'>
When there's an error in a DO statement loop control, error recovery
isn't great. A bare "DO" is a valid statement, so a failure to parse its
loop control doesn't fail on the whole statement. Its partial parse ends
after the keyword, and as some other statement parsers can get further
into the input before failing, errors in the loop control can lead to
confusing error messages about bad pointer assignment statements and
others. So just check that a bare "DO" is followed by the end of the
statement.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When there's an error in a DO statement loop control, error recovery
isn't great. A bare "DO" is a valid statement, so a failure to parse its
loop control doesn't fail on the whole statement. Its partial parse ends
after the keyword, and as some other statement parsers can get further
into the input before failing, errors in the loop control can lead to
confusing error messages about bad pointer assignment statements and
others. So just check that a bare "DO" is followed by the end of the
statement.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][cuda] Make launch configuration optional for cuf kernel (#115947)</title>
<updated>2024-11-13T00:49:44+00:00</updated>
<author>
<name>Valentin Clement (バレンタイン クレメン)</name>
<email>clementval@gmail.com</email>
</author>
<published>2024-11-13T00:49:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=37143fe27e082b478d333ca28f6f1af5210b7c6b'/>
<id>37143fe27e082b478d333ca28f6f1af5210b7c6b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][parser] Better error recovery for misplaced declaration (#100482)</title>
<updated>2024-07-30T16:43:43+00:00</updated>
<author>
<name>Peter Klausler</name>
<email>35819229+klausler@users.noreply.github.com</email>
</author>
<published>2024-07-30T16:43:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fffbabfd4780261942711e3a3676447eba91e877'/>
<id>fffbabfd4780261942711e3a3676447eba91e877</id>
<content type='text'>
When a declaration construct appears in the execution part of a block or
subprogram body, report it as such rather than as a misleading syntax
error on the executable statement that it somehow matched the most.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When a declaration construct appears in the execution part of a block or
subprogram body, report it as such rather than as a misleading syntax
error on the executable statement that it somehow matched the most.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang] Add parsing of DO CONCURRENT REDUCE clause (#92518)</title>
<updated>2024-05-30T18:34:19+00:00</updated>
<author>
<name>khaki3</name>
<email>47756807+khaki3@users.noreply.github.com</email>
</author>
<published>2024-05-30T18:34:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3af717d661e9fe8d562181b933a373ca58e41b27'/>
<id>3af717d661e9fe8d562181b933a373ca58e41b27</id>
<content type='text'>
Derived from #92480. This PR supports parsing of the DO CONCURRENT
REDUCE clause in Fortran 2023. Following the style of the OpenMP parser
in MLIR, the front end accepts both arbitrary operations and procedures
for the REDUCE clause. But later Semantics can notify type errors and
resolve procedure names.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Derived from #92480. This PR supports parsing of the DO CONCURRENT
REDUCE clause in Fortran 2023. Following the style of the OpenMP parser
in MLIR, the front end accepts both arbitrary operations and procedures
for the REDUCE clause. But later Semantics can notify type errors and
resolve procedure names.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang] Parse REDUCE clauses in !$CUF KERNEL DO (#92154)</title>
<updated>2024-05-15T23:28:58+00:00</updated>
<author>
<name>Peter Klausler</name>
<email>35819229+klausler@users.noreply.github.com</email>
</author>
<published>2024-05-15T23:28:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5bbb63bd6d6d3929de643fcd88babbda20c97b69'/>
<id>5bbb63bd6d6d3929de643fcd88babbda20c97b69</id>
<content type='text'>
A !$CUF KERNEL DO directive is allowed to have advisory REDUCE clauses
similar to those in OpenACC and DO CONCURRENT. Parse and represent them.
Semantic validation will follow.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A !$CUF KERNEL DO directive is allowed to have advisory REDUCE clauses
similar to those in OpenACC and DO CONCURRENT. Parse and represent them.
Semantic validation will follow.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang] Parse !$CUF KERNEL DO &lt;&lt;&lt; (*) (#85338)</title>
<updated>2024-03-15T20:57:42+00:00</updated>
<author>
<name>Peter Klausler</name>
<email>35819229+klausler@users.noreply.github.com</email>
</author>
<published>2024-03-15T20:57:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=60fa2b0670b874b702ddb9f81d098af692ea6875'/>
<id>60fa2b0670b874b702ddb9f81d098af692ea6875</id>
<content type='text'>
Accept and represent asterisks within the parenthesized grid and block
specification lists.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Accept and represent asterisks within the parenthesized grid and block
specification lists.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang] Add notify-type and notify-wait-stmt (#76594)</title>
<updated>2024-01-02T18:40:47+00:00</updated>
<author>
<name>Katherine Rasmussen</name>
<email>krasmussen@lbl.gov</email>
</author>
<published>2024-01-02T18:40:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a2d7af757bc33dc91f2e038742915a146cfb0c13'/>
<id>a2d7af757bc33dc91f2e038742915a146cfb0c13</id>
<content type='text'>
Add `notify-type` to `iso_fortran_env` module. Add `notify-wait-stmt` to
the parser and add checks for constraints on the statement, `C1177` and
`C1178`, from the Fortran 2023 standard. Add three semantics tests for
`notify-wait-stmt`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add `notify-type` to `iso_fortran_env` module. Add `notify-wait-stmt` to
the parser and add checks for constraints on the statement, `C1177` and
`C1178`, from the Fortran 2023 standard. Add three semantics tests for
`notify-wait-stmt`.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang] Fix construct names on labeled DO (#67622)</title>
<updated>2023-10-17T00:29:25+00:00</updated>
<author>
<name>Peter Klausler</name>
<email>35819229+klausler@users.noreply.github.com</email>
</author>
<published>2023-10-17T00:29:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=81d04709f86968431ecab1df12a17279d057daa9'/>
<id>81d04709f86968431ecab1df12a17279d057daa9</id>
<content type='text'>
Fortran requires that a DO construct with a construct name end with an
END DO statement bearing the same name. This is true even if the DO
construct begins with a label DO statement; e.g., "constrName: do 10
j=1,10" must end with "10 end do constrName".

The compiler presently basically ignores construct names that appear on
label DO statements, because only non-label DO statements can be parsed
as DO constructs. This causes us to miss some errors, and (worse) breaks
the usage of the construct name on CYCLE and EXIT statements.

To fix this, this patch changes the parse tree and parser so that a DO
construct name on a putative label DO statement causes it to be parsed
as a "non-label" DO statement... with a label. Only true old-style
labeled DO statements without construct names are now parsed as such.

I did not change the class name NonLabelDoStmt -- it's widely used
across the front-end, and is the name of a production in the standard's
grammar. But now it basically means DoConstructDoStmt.

Fixes https://github.com/llvm/llvm-project/issues/67283.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fortran requires that a DO construct with a construct name end with an
END DO statement bearing the same name. This is true even if the DO
construct begins with a label DO statement; e.g., "constrName: do 10
j=1,10" must end with "10 end do constrName".

The compiler presently basically ignores construct names that appear on
label DO statements, because only non-label DO statements can be parsed
as DO constructs. This causes us to miss some errors, and (worse) breaks
the usage of the construct name on CYCLE and EXIT statements.

To fix this, this patch changes the parse tree and parser so that a DO
construct name on a putative label DO statement causes it to be parsed
as a "non-label" DO statement... with a label. Only true old-style
labeled DO statements without construct names are now parsed as such.

I did not change the class name NonLabelDoStmt -- it's widely used
across the front-end, and is the name of a production in the standard's
grammar. But now it basically means DoConstructDoStmt.

Fixes https://github.com/llvm/llvm-project/issues/67283.</pre>
</div>
</content>
</entry>
</feed>
