[all-commits] [llvm/llvm-project] 8a16e7: [flang][OpenMP] Support lowering of metadirective ...

Chi-Chun, Chen via All-commits all-commits at lists.llvm.org
Wed May 6 12:31:54 PDT 2026


  Branch: refs/heads/users/cchen/flang-metadirective-dynamic-user-cond
  Home:   https://github.com/llvm/llvm-project
  Commit: 8a16e79634376fc2785fdfa1b5d86affcb1e8044
      https://github.com/llvm/llvm-project/commit/8a16e79634376fc2785fdfa1b5d86affcb1e8044
  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
    R flang/test/Lower/OpenMP/Todo/metadirective-dynamic.f90
    M flang/test/Lower/OpenMP/metadirective-user.f90

  Log Message:
  -----------
  [flang][OpenMP] Support lowering of metadirective (part 2)

Lower non-constant user={condition(expr)} selectors in metadirectives
to a fir.if/else chain.

Only statically applicable when-clauses participate in dynamic
selection. Dynamic conditions are evaluated at runtime in declaration
order, with the best static match, an explicit otherwise/default
clause, or implicit nothing as the final fallback.

This patch is part of the feature work for #188820.

Assisted with copilot and GPT-5.4


  Commit: c499f3d202f6f177c2e3a9ba9bad4ce4bd6234f4
      https://github.com/llvm/llvm-project/commit/c499f3d202f6f177c2e3a9ba9bad4ce4bd6234f4
  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-user.f90

  Log Message:
  -----------
  Fix dynamic metadirective candidate selection

- Use one scored candidate path for static and dynamic metadirective variants.
- Dynamic user conditions are statically filtered and scored using their
  non-user traits, then guarded at runtime with fir.if.
- Keeps construct/device/implementation traits enforced for dynamic
  candidates and lets higher-scored static candidates beat lower-scored dynamic
  candidates.
- Add regressions for construct mismatch, score ordering, and
  implicit-nothing tie-breaking.


Compare: https://github.com/llvm/llvm-project/compare/c36eec79da08...c499f3d202f6

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