History log of /llvm-project/flang/lib/Parser/openmp-parsers.cpp (Results 1 – 25 of 106)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 15ab7be2 29-Jan-2025 Krzysztof Parzyszek <Krzysztof.Parzyszek@amd.com>

[flang][OpenMP] Parse WHEN, OTHERWISE, MATCH clauses plus METADIRECTIVE (#121817)

Parse METADIRECTIVE as a standalone executable directive at the moment.
This will allow testing the parser code.

Th

[flang][OpenMP] Parse WHEN, OTHERWISE, MATCH clauses plus METADIRECTIVE (#121817)

Parse METADIRECTIVE as a standalone executable directive at the moment.
This will allow testing the parser code.

There is no lowering, not even clause conversion yet. There is also no
verification of the allowed values for trait sets, trait properties.

show more ...


# c8593239 29-Jan-2025 Krzysztof Parzyszek <Krzysztof.Parzyszek@amd.com>

[flang][OpenMP] Make parsing of trait properties more context-sensitive (#122900)

A trait poperty can be one of serveral alternatives (name, expression,
etc.), and each property in a list was parsed

[flang][OpenMP] Make parsing of trait properties more context-sensitive (#122900)

A trait poperty can be one of serveral alternatives (name, expression,
etc.), and each property in a list was parsed as if it could be any of
these alternatives independently from other properties. This made the
parsing vulnerable to certain ambiguities in the trait grammar (provided
in the OpenMP spec).
At the same time the OpenMP spec gives the expected types of properties
for almost every trait: all properties listed for a given trait are
usually of the same type, e.g. names, clauses, etc.

Incorporate these restrictions into the parser, and additionally use
property extensions as the fallback if the parsing of the expected
property type failed. This is intended to allow the parser to succeed,
and instead let the semantic-checking code emit a more user-friendly
message.

show more ...


Revision tags: llvmorg-21-init
# 8035d38d 26-Jan-2025 Mats Petersson <mats.petersson@arm.com>

[Flang][OpenMP]Add parsing support for DISPATCH construct (#121982)

This allows the Flang parser to accept the !$OMP DISPATCH and related
clauses.

Lowering is currently not implemented. Tests fo

[Flang][OpenMP]Add parsing support for DISPATCH construct (#121982)

This allows the Flang parser to accept the !$OMP DISPATCH and related
clauses.

Lowering is currently not implemented. Tests for unparse and parse-tree
dump is provided, and one for checking that the lowering ends in a "not
yet implemented"

---------

Co-authored-by: Kiran Chandramohan <kiran.chandramohan@arm.com>

show more ...


Revision tags: llvmorg-19.1.7
# 70e96dc3 10-Jan-2025 Krzysztof Parzyszek <Krzysztof.Parzyszek@amd.com>

[flang][OpenMP] Parsing context selectors for METADIRECTIVE (#121815)

This is just adding parsers for context selectors. There are no tests
because there is no way to execute these parsers yet.


# 4df366cd 06-Jan-2025 Mats Petersson <mats.petersson@arm.com>

[FLANG][OpenMP]Add support for ALIGN clause on OMP ALLOCATE (#120791)

This is trivially additional support for the existing ALLOCATE
directive, which allows an ALIGN clause.

The ALLOCATE directi

[FLANG][OpenMP]Add support for ALIGN clause on OMP ALLOCATE (#120791)

This is trivially additional support for the existing ALLOCATE
directive, which allows an ALIGN clause.

The ALLOCATE directive is currently not implemented, so this is just
addding the necessary parser parts to allow the compiler to not say
"Huh? I don't get this" [or "Expected OpenMP construct"] when it
encounters the ALIGN clause.

Some parser testing is updated and a new todo test, just in case the
feature of align clause is not supported by the initial support for
ALLOCATE.

show more ...


# adeff9f6 03-Jan-2025 Krzysztof Parzyszek <Krzysztof.Parzyszek@amd.com>

[flang][OpenMP] Allow utility constructs in specification part (#121509)

Allow utility constructs (error and nothing) to appear in the
specification part as well as the execution part. The exception

[flang][OpenMP] Allow utility constructs in specification part (#121509)

Allow utility constructs (error and nothing) to appear in the
specification part as well as the execution part. The exception is
"ERROR AT(EXECUTION)" which should only be in the execution part.
In case of ambiguity (the boundary between the specification and the
execution part), utility constructs will be parsed as belonging to the
specification part. In such cases move them to the execution part in the
OpenMP canonicalization code.

show more ...


# df859f90 03-Jan-2025 Krzysztof Parzyszek <Krzysztof.Parzyszek@amd.com>

[flang][OpenMP] Frontend support for NOTHING directive (#120606)

Create OpenMPUtilityConstruct and put the two utility directives in it
(error and nothing). Rename OpenMPErrorConstruct to OmpErrorDi

[flang][OpenMP] Frontend support for NOTHING directive (#120606)

Create OpenMPUtilityConstruct and put the two utility directives in it
(error and nothing). Rename OpenMPErrorConstruct to OmpErrorDirective.

show more ...


Revision tags: llvmorg-19.1.6
# 75e6d0eb 13-Dec-2024 Mats Petersson <mats.petersson@arm.com>

[flang][OpenMP]Add support for OpenMP ERROR directive (#119582)

Lowering leads to a TODO, with a test to confirm.

Also testing unparse.

---------

Co-authored-by: Krzysztof Parzyszek <Krzysz

[flang][OpenMP]Add support for OpenMP ERROR directive (#119582)

Lowering leads to a TODO, with a test to confirm.

Also testing unparse.

---------

Co-authored-by: Krzysztof Parzyszek <Krzysztof.Parzyszek@amd.com>

show more ...


# 7c9404c2 13-Dec-2024 Ivan R. Ivanov <ivanov.i.aa@m.titech.ac.jp>

[flang][OpenMP] Add frontend support for ompx_bare clause (#111106)


# 03cbe426 12-Dec-2024 Krzysztof Parzyszek <Krzysztof.Parzyszek@amd.com>

[flang][OpenMP] Rework LINEAR clause (#119278)

The OmpLinearClause class was a variant of two classes, one for when the
linear modifier was present, and one for when it was absent. These two
class

[flang][OpenMP] Rework LINEAR clause (#119278)

The OmpLinearClause class was a variant of two classes, one for when the
linear modifier was present, and one for when it was absent. These two
classes did not follow the conventions for parse tree nodes, (i.e.
tuple/wrapper/union formats), which necessitated specialization of the
parse tree visitor.

The new form of OmpLinearClause is the standard tuple with a list of
modifiers and an object list. The specialization of parse tree visitor
for it has been removed.
Parsing and unparsing of the new form bears additional complexity due to
syntactical differences between OpenMP 5.2 and prior versions: in OpenMP
5.2 the argument list is post-modified, while in the prior versions, the
step modifier was a post-modifier while the linear modifier had an
unusual syntax of `modifier(list)`.

With this change the LINEAR clause is no different from any other
clauses in terms of its structure and use of modifiers. Modifier
validation and all other checks work the same as with other clauses.

show more ...


# 58f9c4fc 12-Dec-2024 Krzysztof Parzyszek <Krzysztof.Parzyszek@amd.com>

[flang][OpenMP] Semantic checks for IN_REDUCTION and TASK_REDUCTION (#118841)

Update parsing of these two clauses and add semantic checks for them.
Simplify some code in IsReductionAllowedForType a

[flang][OpenMP] Semantic checks for IN_REDUCTION and TASK_REDUCTION (#118841)

Update parsing of these two clauses and add semantic checks for them.
Simplify some code in IsReductionAllowedForType and
CheckReductionOperator.

show more ...


# 00e1cc4c 11-Dec-2024 Mats Petersson <mats.petersson@arm.com>

[flang][OpenMP]Add support for fail clause (#118683)

Support the atomic compare option of a fail(memory-order) clauses.

Additional tests introduced to check that parsing and semantics checks
for

[flang][OpenMP]Add support for fail clause (#118683)

Support the atomic compare option of a fail(memory-order) clauses.

Additional tests introduced to check that parsing and semantics checks
for the new clause is handled.

Lowering for atomic compare is still unsupported and wil end in a TOOD
(aka "Not yet implemented"). A test for this case with the fail clause
is also present.

show more ...


Revision tags: llvmorg-19.1.5
# 33faa828 02-Dec-2024 Krzysztof Parzyszek <Krzysztof.Parzyszek@amd.com>

[flang][OpenMP] Use new modifiers in IF/LASTPRIVATE (#118128)

The usual changes, added more references to OpenMP specs.


# bde79c0e 02-Dec-2024 Krzysztof Parzyszek <Krzysztof.Parzyszek@amd.com>

[flang][OpenMP] Use new modifiers in DEPEND/GRAINSIZE/NUM_TASKS (#117917)

The usual changes, added more references to OpenMP specs.


# 05096590 02-Dec-2024 Krzysztof Parzyszek <Krzysztof.Parzyszek@amd.com>

[flang][OpenMP] Use new modifiers with AFFINITY/ALIGNED/DEVICE (#117786)

This is a mostly mechanical change from specific modifiers embedded
directly in a clause to the Modifier variant.

Additio

[flang][OpenMP] Use new modifiers with AFFINITY/ALIGNED/DEVICE (#117786)

This is a mostly mechanical change from specific modifiers embedded
directly in a clause to the Modifier variant.

Additional comments and references to the OpenMP specs were added.

show more ...


# 608f4ae1 02-Dec-2024 Krzysztof Parzyszek <Krzysztof.Parzyszek@amd.com>

[flang][OpenMP] Rename some `Type` members in OpenMP clauses (#117784)

The intent is to keep names in sync with the terminology from the OpenMP
spec:
```
OmpBindClause::Type -> Binding

[flang][OpenMP] Rename some `Type` members in OpenMP clauses (#117784)

The intent is to keep names in sync with the terminology from the OpenMP
spec:
```
OmpBindClause::Type -> Binding
OmpDefaultClause::Type -> DataSharingAttribute
OmpDeviceTypeClause::Type -> DeviceTypeDescription
OmpProcBindClause::Type -> AffinityPolicy
```
Add more comments with references to the OpenMP specs.

show more ...


# 03b5f8f0 02-Dec-2024 Mats Petersson <mats.petersson@arm.com>

[flang][OpenMP]Add parsing and semantics support for ATOMIC COMPARE (#117032)

This adds a minimalistic implementation of parsing and semantics for the
ATOMIC COMPARE feature from OpenMP 5.1.

The

[flang][OpenMP]Add parsing and semantics support for ATOMIC COMPARE (#117032)

This adds a minimalistic implementation of parsing and semantics for the
ATOMIC COMPARE feature from OpenMP 5.1.

There is no lowering, just a TODO for that part. Some of the Semantics
is also just a comment explaining that more is needed.

show more ...


# cdbd2287 02-Dec-2024 Krzysztof Parzyszek <Krzysztof.Parzyszek@amd.com>

[flang][OpenMP] Use new modifiers in ALLOCATE clause (#117627)

Again, this simplifies the semantic checks and lowering quite a bit.
Update the check for positive alignment to use a more informative

[flang][OpenMP] Use new modifiers in ALLOCATE clause (#117627)

Again, this simplifies the semantic checks and lowering quite a bit.
Update the check for positive alignment to use a more informative
message, and to highlight the modifier itsef, not the whole clause.
Remove the checks for the allocator expression itself being positive:
there is nothing in the spec that says that it should be positive.

Remove the "simple" modifier from the AllocateT template, since both
simple and complex modifiers are the same thing, only differing in
syntax.

show more ...


# 52755ac2 25-Nov-2024 Krzysztof Parzyszek <Krzysztof.Parzyszek@amd.com>

[flang][OpenMP] Use new modifier infrastructure for MAP/FROM/TO clauses (#117447)

This removes the specialized parsers and helper classes for these
clauses, namely ConcatSeparated, MapModifiers, an

[flang][OpenMP] Use new modifier infrastructure for MAP/FROM/TO clauses (#117447)

This removes the specialized parsers and helper classes for these
clauses, namely ConcatSeparated, MapModifiers, and MotionModifiers. Map
and the motion clauses are now handled in the same way as all other
clauses with modifiers, with one exception: the commas separating their
modifiers are optional. This syntax is deprecated in OpenMP 5.2.

Implement version checks for modifiers: for a given modifier on a given
clause, check if that modifier is allowed on this clause in the
specified OpenMP version. This replaced several individual checks.

Add a testcase for handling map modifiers in a different order, and for
diagnosing an ultimate modifier out of position.

show more ...


# e79cd246 21-Nov-2024 Krzysztof Parzyszek <Krzysztof.Parzyszek@amd.com>

[flang][OpenMP] Use new modifier code in ORDER and SCHEDULE clauses (#117081)

This actually simplifies the AST node for the schedule clause: the two
allowed modifiers can be easily classified as th

[flang][OpenMP] Use new modifier code in ORDER and SCHEDULE clauses (#117081)

This actually simplifies the AST node for the schedule clause: the two
allowed modifiers can be easily classified as the ordering-modifier and
the chunk-modifier during parsing without the need to create additional
classes.

show more ...


# 4fc1141e 21-Nov-2024 Krzysztof Parzyszek <Krzysztof.Parzyszek@amd.com>

[flang][OpenMP] Apply modifier representation to semantic checks (#116658)

Also, define helper macros in parse-tree.h.

Apply the new modifier representation to the DEFAULTMAP and REDUCTION
claus

[flang][OpenMP] Apply modifier representation to semantic checks (#116658)

Also, define helper macros in parse-tree.h.

Apply the new modifier representation to the DEFAULTMAP and REDUCTION
clauses, with testcases utilizing the new modifier validation.

OpenMP modifier overhaul: #3/3

show more ...


# cfd67c21 20-Nov-2024 Krzysztof Parzyszek <Krzysztof.Parzyszek@amd.com>

[flang][OpenMP] Normalize clause modifiers that exist on their own (#116655)

This is the first part of the effort to make parsing of clause modifiers
more uniform and robust. Currently, when multip

[flang][OpenMP] Normalize clause modifiers that exist on their own (#116655)

This is the first part of the effort to make parsing of clause modifiers
more uniform and robust. Currently, when multiple modifiers are allowed,
the parser will expect them to appear in a hard-coded order.
Additionally, modifier properties (such as "ultimate") are checked
separately for each case.

The overall plan is
1. Extract all modifiers into their own top-level classes, and then
equip them with sets of common properties that will allow performing the
property checks generically, without refering to the specific kind of
the modifier.
2. Define a parser (as a separate class) for each modifier.
3. For each clause define a union (std::variant) of all allowable
modifiers, and parse the modifiers as a list of these unions.

The intent is also to isolate parts of the code that could eventually be
auto-generated.

OpenMP modifier overhaul: #1/3

show more ...


# 92604d7c 20-Nov-2024 Mats Petersson <mats.petersson@arm.com>

[flang][OpenMP]Add parsing support for MAP(MAPPER(name) ...) (#116274)

This prepares for using the DECLARE MAPPER construct.

A check in lowering will say "Not implemented" when trying to use a
m

[flang][OpenMP]Add parsing support for MAP(MAPPER(name) ...) (#116274)

This prepares for using the DECLARE MAPPER construct.

A check in lowering will say "Not implemented" when trying to use a
mapper as some code is required to tie the mapper to the declared one.

Senantics check for the symbol generated.

show more ...


Revision tags: llvmorg-19.1.4
# 4c4a4134 18-Nov-2024 Krzysztof Parzyszek <Krzysztof.Parzyszek@amd.com>

[flang][OpenMP] Update frontend support for DEFAULTMAP clause (#116506)

Add ALL variable category, implement semantic checks to verify the
validity of the clause, improve error messages, add testca

[flang][OpenMP] Update frontend support for DEFAULTMAP clause (#116506)

Add ALL variable category, implement semantic checks to verify the
validity of the clause, improve error messages, add testcases.

The variable category modifier is optional since 5.0, make sure we allow
it to be missing. If it is missing, assume "all" in clause conversion.

show more ...


# e67e09a7 15-Nov-2024 Anchu Rajendran S <asudhaku@amd.com>

[Flang][OpenMP][Sema] Adding parsing and semantic support for scan directive. (#102792)


12345