[all-commits] [llvm/llvm-project] 0b6acd: [flang][OpenMP] Lower ordinary loop variants in me...

Chi-Chun, Chen via All-commits all-commits at lists.llvm.org
Fri Jul 17 19:45:11 PDT 2026


  Branch: refs/heads/users/cchen/flang-metadirective-loop-core
  Home:   https://github.com/llvm/llvm-project
  Commit: 0b6acd30992e194ac2195ba736ace8ca3422cc77
      https://github.com/llvm/llvm-project/commit/0b6acd30992e194ac2195ba736ace8ca3422cc77
  Author: Chi Chun, Chen <chichun.chen at hpe.com>
  Date:   2026-07-17 (Fri, 17 Jul 2026)

  Changed paths:
    M flang/include/flang/Lower/PFTBuilder.h
    M flang/lib/Lower/Bridge.cpp
    M flang/lib/Lower/OpenMP/DataSharingProcessor.cpp
    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-loop-allocatable-iv.f90
    A flang/test/Lower/OpenMP/Todo/metadirective-loop-body-variant.f90
    A flang/test/Lower/OpenMP/Todo/metadirective-loop-data-environment.f90
    A flang/test/Lower/OpenMP/Todo/metadirective-loop-data-sharing-clause.f90
    A flang/test/Lower/OpenMP/Todo/metadirective-loop-pointer-iv.f90
    A flang/test/Lower/OpenMP/Todo/metadirective-loop-sequence.f90
    R flang/test/Lower/OpenMP/Todo/metadirective-loop.f90
    A flang/test/Lower/OpenMP/Todo/metadirective-target-loop.f90
    A flang/test/Lower/OpenMP/metadirective-loop.f90

  Log Message:
  -----------
  [flang][OpenMP] Lower ordinary loop variants in metadirectives

Add core lowering for ordinary DO, SIMD, and DO SIMD replacements
selected by a metadirective. Support standalone and begin/end forms with
static or runtime selection, while deferring replacements that require
data-environment reconstruction.

Preserve sequential fallbacks, code after associated loops, compiler
loop directives, and alternate ENTRY control flow. Apply loop-index
data-sharing attributes per selected variant without leaking them to
other arms.

Keep focused TODOs for pointer and allocatable loop indices,
data-environment and data-sharing variants, body- and
loop-sequence-associated variants, and TARGET.

Add lowering tests for selection, association, fallbacks, affected loop
depth, compiler directives, ENTRY points, and unsupported boundaries.

Assisted with codex.


  Commit: 22b7e110ea390c0a4cd89eb490ddfb1928397d41
      https://github.com/llvm/llvm-project/commit/22b7e110ea390c0a4cd89eb490ddfb1928397d41
  Author: chichunchen <chichunchen844 at gmail.com>
  Date:   2026-07-17 (Fri, 17 Jul 2026)

  Changed paths:
    M flang/lib/Lower/OpenMP/OpenMP.cpp
    A flang/test/Lower/OpenMP/Todo/metadirective-loop-enclosing-data-environment.f90
    A flang/test/Lower/OpenMP/Todo/metadirective-loop-unsupported-directive.f90
    M flang/test/Lower/OpenMP/metadirective-loop.f90

  Log Message:
  -----------
  Restrict metadirective loop lowering to safe cases

Defer loop variants nested in an existing OpenMP data environment until lowering
can create a variant-local loop induction variable binding. This prevents variant
DSA from affecting the enclosing construct, including for statically inapplicable
variants.

Limit core lowering to DO, SIMD, and DO SIMD. Emit focused TODOs for other
loop-associated directives and add coverage for both boundaries.

Assisted with codex.


Compare: https://github.com/llvm/llvm-project/compare/0b6acd30992e%5E...22b7e110ea39

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