[all-commits] [llvm/llvm-project] 8d85b9: [flang][OpenMP] Support lowering of metadirective ...
Chi-Chun, Chen via All-commits
all-commits at lists.llvm.org
Wed May 6 12:31:33 PDT 2026
Branch: refs/heads/users/cchen/flang-metadirective-static
Home: https://github.com/llvm/llvm-project
Commit: 8d85b9f4a605aa876f3afa7c193a4c4fd96d7ab3
https://github.com/llvm/llvm-project/commit/8d85b9f4a605aa876f3afa7c193a4c4fd96d7ab3
Author: Chi Chun, Chen <chichun.chen at hpe.com>
Date: 2026-05-06 (Wed, 06 May 2026)
Changed paths:
M flang/lib/Lower/OpenMP/OpenMP.cpp
M flang/lib/Lower/OpenMP/Utils.cpp
M flang/lib/Lower/OpenMP/Utils.h
A flang/test/Lower/OpenMP/Todo/metadirective-dynamic.f90
R flang/test/Lower/OpenMP/Todo/metadirective-exec.f90
A flang/test/Lower/OpenMP/Todo/metadirective-loop.f90
R flang/test/Lower/OpenMP/Todo/metadirective-spec.f90
A flang/test/Lower/OpenMP/Todo/metadirective-target-device.f90
A flang/test/Lower/OpenMP/metadirective-construct.f90
A flang/test/Lower/OpenMP/metadirective-device-isa.f90
A flang/test/Lower/OpenMP/metadirective-device-kind.f90
A flang/test/Lower/OpenMP/metadirective-implementation.f90
A flang/test/Lower/OpenMP/metadirective-user.f90
Log Message:
-----------
[flang][OpenMP] Support lowering of metadirective (part 1)
This patch implements following feature in metadirective:
- implementation={vendor(...)}
- device={kind(...), isa(...), arch(...)}
- user={condition(<constant-expr>)}
- construct={parallel, target, teams}
- default, nothing, and otherwise clause
Dynamic user conditions, target_device, and loop-associated
variants are deferred to follow-up patches.
This patch is part of the feature work for #188820.
Assisted with copilot and GPT-5.4
Commit: 96d0f1000a91b17b5518e149b64f9bced63b53bb
https://github.com/llvm/llvm-project/commit/96d0f1000a91b17b5518e149b64f9bced63b53bb
Author: Chi Chun, Chen <chichun.chen at hpe.com>
Date: 2026-05-06 (Wed, 06 May 2026)
Changed paths:
M flang/lib/Lower/OpenMP/OpenMP.cpp
M flang/test/Lower/OpenMP/metadirective-construct.f90
M flang/test/Lower/OpenMP/metadirective-device-isa.f90
M flang/test/Lower/OpenMP/metadirective-device-kind.f90
M flang/test/Lower/OpenMP/metadirective-implementation.f90
M flang/test/Lower/OpenMP/metadirective-user.f90
Log Message:
-----------
Support begin/end metadirective
Commit: 20a56baa1b38af32fc6c404952291654341afe79
https://github.com/llvm/llvm-project/commit/20a56baa1b38af32fc6c404952291654341afe79
Author: Chi Chun, Chen <chichun.chen at hpe.com>
Date: 2026-05-06 (Wed, 06 May 2026)
Changed paths:
M flang/lib/Lower/OpenMP/Utils.cpp
R flang/test/Lower/OpenMP/Todo/begin-metadirective.f90
M flang/test/Lower/OpenMP/Todo/metadirective-target-device.f90
M flang/test/Lower/OpenMP/metadirective-construct.f90
A flang/test/Lower/OpenMP/metadirective-device-arch.f90
M flang/test/Lower/OpenMP/metadirective-device-isa.f90
M flang/test/Lower/OpenMP/metadirective-device-kind.f90
M flang/test/Lower/OpenMP/metadirective-implementation.f90
A flang/test/Lower/OpenMP/metadirective-nothing.f90
M flang/test/Lower/OpenMP/metadirective-user.f90
Log Message:
-----------
Fix trait-property mapping and improve metadirective tests
- In processTraitProperties, restrict the device_isa___ANY fallback to
only isa selectors. Unknown properties under arch, kind, or vendor
now produce an invalid trait so the variant does not match. Previously,
device={arch("neon")} would incorrectly match via ISA target-feature
checking.
- Add metadirective-nothing tests for OpenMP version >= 5.1.
- Add explicit -triple flags to ISA tests so AArch64 features run
under an aarch64 triple and x86 features under an x86_64 triple.
- Split device={arch()} tests into metadirective-device-arch.f90
- Add omp.terminator checks for begin/end metadirective match cases.
- Remove begin-metadirective.f90 TODO test (now supported).
Assisted with copilot
Commit: 762b6d558109f66c0e584c97ad6cd037b2994666
https://github.com/llvm/llvm-project/commit/762b6d558109f66c0e584c97ad6cd037b2994666
Author: chichunchen <chichunchen844 at gmail.com>
Date: 2026-05-06 (Wed, 06 May 2026)
Changed paths:
M flang/lib/Lower/OpenMP/OpenMP.cpp
M flang/test/Lower/OpenMP/metadirective-implementation.f90
Log Message:
-----------
Fix metadirective implicit-nothing candidate ordering
Preserve whether a metadirective variant was explicitly
specified so selection can distinguish explicit nothing
from an omitted directive variant. Order explicit candidates
before implicit nothing candidates when invoking the OpenMP
context scorer, matching the metadirective tie-break rule.
Add standalone and begin/end metadirective regression tests
where an implicit nothing candidate appears before an
otherwise-tied explicit directive variant.
Reference:
OpenMP 5.0 [2.3.4] says that if multiple when clauses have
compatible context selectors with the same highest score, and
at least one of them specifies a directive variant, "the first
directive variant specified in the lexical order of those when
clauses" replaces the metadirective.
Commit: b5667db4b0dde278dfa1af264f7d9aaf667563f4
https://github.com/llvm/llvm-project/commit/b5667db4b0dde278dfa1af264f7d9aaf667563f4
Author: Chi Chun, Chen <chichun.chen at hpe.com>
Date: 2026-05-06 (Wed, 06 May 2026)
Changed paths:
M flang/lib/Lower/OpenMP/OpenMP.cpp
Log Message:
-----------
Remove redundant MetadirectiveVariant
Commit: c0414ae61e2128e97e32e0c04a576d97107ec98b
https://github.com/llvm/llvm-project/commit/c0414ae61e2128e97e32e0c04a576d97107ec98b
Author: chichunchen <chichunchen844 at gmail.com>
Date: 2026-05-06 (Wed, 06 May 2026)
Changed paths:
M flang/lib/Lower/OpenMP/OpenMP.cpp
Log Message:
-----------
Fix for construct
Compare: https://github.com/llvm/llvm-project/compare/dadc748acd62...c0414ae61e21
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