[all-commits] [llvm/llvm-project] 141d39: [flang][OpenMP] Overhaul implementation of ATOMIC ...
Krzysztof Parzyszek via All-commits
all-commits at lists.llvm.org
Wed Jun 11 08:05:56 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 141d390dcb6cd174b07ca663e58f37ab24eee08a
https://github.com/llvm/llvm-project/commit/141d390dcb6cd174b07ca663e58f37ab24eee08a
Author: Krzysztof Parzyszek <Krzysztof.Parzyszek at amd.com>
Date: 2025-06-11 (Wed, 11 Jun 2025)
Changed paths:
M flang/docs/OpenMPSupport.md
M flang/examples/FeatureList/FeatureList.cpp
M flang/examples/FlangOmpReport/FlangOmpReportVisitor.cpp
M flang/include/flang/Parser/dump-parse-tree.h
M flang/include/flang/Parser/parse-tree.h
M flang/include/flang/Semantics/tools.h
M flang/lib/Lower/OpenMP/DataSharingProcessor.cpp
M flang/lib/Lower/OpenMP/OpenMP.cpp
M flang/lib/Parser/openmp-parsers.cpp
M flang/lib/Parser/parse-tree.cpp
M flang/lib/Parser/unparse.cpp
M flang/lib/Semantics/check-omp-structure.cpp
M flang/lib/Semantics/check-omp-structure.h
M flang/lib/Semantics/resolve-names.cpp
M flang/lib/Semantics/rewrite-directives.cpp
M flang/lib/Semantics/tools.cpp
M flang/test/Examples/omp-atomic.f90
M flang/test/Lower/OpenMP/Todo/atomic-compare-fail.f90
M flang/test/Lower/OpenMP/Todo/atomic-compare.f90
M flang/test/Lower/OpenMP/atomic-capture.f90
M flang/test/Lower/OpenMP/atomic-implicit-cast.f90
M flang/test/Lower/OpenMP/atomic-privatize.f90
M flang/test/Lower/OpenMP/atomic-write.f90
A flang/test/Lower/OpenMP/dump-atomic-analysis.f90
M flang/test/Parser/OpenMP/atomic-compare.f90
A flang/test/Parser/OpenMP/atomic-end.f90
M flang/test/Semantics/OpenMP/atomic-compare.f90
M flang/test/Semantics/OpenMP/atomic-hint-clause.f90
A flang/test/Semantics/OpenMP/atomic-read.f90
A flang/test/Semantics/OpenMP/atomic-update-capture.f90
A flang/test/Semantics/OpenMP/atomic-update-only.f90
M flang/test/Semantics/OpenMP/atomic-update-overloaded-ops.f90
A flang/test/Semantics/OpenMP/atomic-write.f90
M flang/test/Semantics/OpenMP/atomic.f90
M flang/test/Semantics/OpenMP/atomic01.f90
M flang/test/Semantics/OpenMP/atomic02.f90
M flang/test/Semantics/OpenMP/atomic03.f90
M flang/test/Semantics/OpenMP/atomic04.f90
M flang/test/Semantics/OpenMP/atomic05.f90
M flang/test/Semantics/OpenMP/critical-hint-clause.f90
M flang/test/Semantics/OpenMP/omp-atomic-assignment-stmt.f90
M flang/test/Semantics/OpenMP/requires-atomic01.f90
M flang/test/Semantics/OpenMP/requires-atomic02.f90
Log Message:
-----------
[flang][OpenMP] Overhaul implementation of ATOMIC construct (#137852)
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.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list