[all-commits] [llvm/llvm-project] 24ab15: [flang][OpenMP] Lower data sharing for metadirecti...
Chi-Chun, Chen via All-commits
all-commits at lists.llvm.org
Wed Jul 29 15:39:03 PDT 2026
Branch: refs/heads/users/cchen/flang-metadirective-loop-dsa
Home: https://github.com/llvm/llvm-project
Commit: 24ab154925592e65a921454b0d671f645dfc71a4
https://github.com/llvm/llvm-project/commit/24ab154925592e65a921454b0d671f645dfc71a4
Author: Chi-Chun, Chen <chichun.chen at hpe.com>
Date: 2026-07-29 (Wed, 29 Jul 2026)
Changed paths:
M flang/include/flang/Lower/Support/Utils.h
M flang/lib/Lower/OpenMP/DataSharingProcessor.cpp
M flang/lib/Lower/OpenMP/OpenMP.cpp
M flang/lib/Lower/Support/Utils.cpp
R flang/test/Lower/OpenMP/Todo/metadirective-loop-data-environment.f90
R flang/test/Lower/OpenMP/Todo/metadirective-loop-data-sharing-clause.f90
A flang/test/Lower/OpenMP/Todo/metadirective-teams-loop.f90
M flang/test/Lower/OpenMP/metadirective-loop.f90
Log Message:
-----------
[flang][OpenMP] Lower data sharing for metadirective loop variants
Enable data sharing and privatization for ordinary loop-associated
metadirective replacements. Selection happens during lowering, after semantic
name resolution, so a selected replacement lacks the data-sharing flags and
host-association symbols created for an ordinary OpenMP construct.
Reconstruct explicit `private`, `firstprivate`, `lastprivate`, `shared`,
`linear`, and `reduction` attributes, together with the selected `default`
rule. Apply them at the variant boundary, isolate candidates from one another,
and restore temporary symbol state after each selection.
Recompute nested task captures and sequential loop-index attributes without
crossing nested data environments or unresolved metadirectives. Support
firstprivate and lastprivate copies without semantic host-association symbols,
including pointer and allocatable descriptors.
Diagnose replacements that require eager privatization. Keep `teams`
replacements unsupported until their privatization path can handle selected
metadirective variants correctly.
Add tests for explicit and default data sharing, dynamic candidates, nested
tasks and loops, local and static `block` objects, and copy-in/copy-out
behavior.
Assisted with codex.
Commit: f84bbd4cb9776b029f93e1475812f7329c75cf17
https://github.com/llvm/llvm-project/commit/f84bbd4cb9776b029f93e1475812f7329c75cf17
Author: Chi-Chun, Chen <chichun.chen at hpe.com>
Date: 2026-07-29 (Wed, 29 Jul 2026)
Changed paths:
M flang/lib/Lower/OpenMP/OpenMP.cpp
M flang/lib/Semantics/resolve-directives.cpp
R flang/test/Lower/OpenMP/Todo/metadirective-loop-enclosing-data-environment.f90
R flang/test/Lower/OpenMP/Todo/metadirective-loop-unsupported-directive.f90
A flang/test/Lower/OpenMP/metadirective-loop-loop-directive.f90
A flang/test/Lower/OpenMP/metadirective-loop-nested-data-environment.f90
M flang/test/Lower/OpenMP/metadirective-loop.f90
Log Message:
-----------
Fix DSA isolation for metadirective loop variants
Keep data-sharing state local to each metadirective replacement during name
resolution. This prevents an explicit clause or default rule in one dynamic
candidate from affecting another candidate or the associated loop body.
Preserve explicit lastprivate when marking a selected loop induction variable.
Also enable nested data-environment and loop replacements now handled by the
Part 3 lowering path, replacing their TODO tests with lowering coverage.
Assisted with codex.
Commit: 5ac15dcc33829a40372aa1802d15d1cdf2553a18
https://github.com/llvm/llvm-project/commit/5ac15dcc33829a40372aa1802d15d1cdf2553a18
Author: Chi-Chun, Chen <chichun.chen at hpe.com>
Date: 2026-07-29 (Wed, 29 Jul 2026)
Changed paths:
M flang/lib/Lower/OpenMP/OpenMP.cpp
A flang/test/Lower/OpenMP/Todo/metadirective-loop-nested-data-environment-queue.f90
A flang/test/Lower/OpenMP/metadirective-loop-common-block.f90
Log Message:
-----------
[flang][OpenMP] Fix metadirective DSA corner cases
Selected loop variants reconstruct data-sharing attributes during lowering.
Flattening nested parallel and task environments can silently privatize shared
variables, while clauses naming a COMMON block lose firstprivate or lastprivate
copy semantics when the block is expanded into members.
Reject replacement queues with multiple DSA-generating environments until
lowering can represent distinct bindings at every region boundary, and
propagate explicit DSA flags to every COMMON-block member. Add focused
coverage for the diagnostic and member copy-in/copy-out.
Compare: https://github.com/llvm/llvm-project/compare/24ab15492559%5E...5ac15dcc3382
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