[all-commits] [llvm/llvm-project] 6c9b2c: [Flang][mlir][OpenMP] Support affinity clause code...

Chi-Chun, Chen via All-commits all-commits at lists.llvm.org
Tue Mar 3 12:32:36 PST 2026


  Branch: refs/heads/users/cchen/flang_mlir_affinity_iterator
  Home:   https://github.com/llvm/llvm-project
  Commit: 6c9b2cbb2ae9913eb4aa6bcde8cd8bc99516e8b9
      https://github.com/llvm/llvm-project/commit/6c9b2cbb2ae9913eb4aa6bcde8cd8bc99516e8b9
  Author: cchen <chichun.chen at hpe.com>
  Date:   2026-03-03 (Tue, 03 Mar 2026)

  Changed paths:
    M flang/lib/Lower/OpenMP/ClauseProcessor.cpp
    M flang/lib/Lower/OpenMP/Utils.cpp
    M flang/lib/Lower/OpenMP/Utils.h
    M flang/test/Lower/OpenMP/task-affinity.f90
    M mlir/include/mlir/Dialect/OpenMP/OpenMPClauses.td
    M mlir/include/mlir/Dialect/OpenMP/OpenMPOpBase.td
    M mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
    M mlir/test/Dialect/OpenMP/ops.mlir

  Log Message:
  -----------
  [Flang][mlir][OpenMP] Support affinity clause codegen in Flang

This patch translate flang ast to OpenMP dialect for affinity clause
including the iterator modifier.


  Commit: b17a5a9a1c58c5f14104a2e05d96cdff16dc143e
      https://github.com/llvm/llvm-project/commit/b17a5a9a1c58c5f14104a2e05d96cdff16dc143e
  Author: cchen <chichun.chen at hpe.com>
  Date:   2026-03-03 (Tue, 03 Mar 2026)

  Changed paths:
    M flang/lib/Lower/OpenMP/ClauseProcessor.cpp
    M flang/lib/Lower/OpenMP/Utils.cpp
    M flang/lib/Lower/OpenMP/Utils.h
    R flang/test/Lower/OpenMP/Todo/affinity-clause.f90
    M flang/test/Lower/OpenMP/task-affinity.f90
    M mlir/include/mlir/Dialect/OpenMP/OpenMPClauses.td
    M mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
    M mlir/test/Dialect/OpenMP/ops.mlir
    M mlir/test/Target/LLVMIR/openmp-todo.mlir

  Log Message:
  -----------
  Support iterator modifier in affinity clause


  Commit: 692ed8cd8616beb28e13aac26599e34e3a5fd932
      https://github.com/llvm/llvm-project/commit/692ed8cd8616beb28e13aac26599e34e3a5fd932
  Author: cchen <chichun.chen at hpe.com>
  Date:   2026-03-03 (Tue, 03 Mar 2026)

  Changed paths:
    M flang/lib/Lower/OpenMP/ClauseProcessor.cpp
    M flang/lib/Lower/OpenMP/Utils.cpp
    M flang/lib/Lower/OpenMP/Utils.h
    M flang/test/Lower/OpenMP/task-affinity.f90
    M mlir/test/Dialect/OpenMP/ops.mlir

  Log Message:
  -----------
  Rewrite functions in affinity utility functions with hlfir apis


  Commit: 8dcc5fab16c7b16f52aef28b7a75883d55a70619
      https://github.com/llvm/llvm-project/commit/8dcc5fab16c7b16f52aef28b7a75883d55a70619
  Author: cchen <chichun.chen at hpe.com>
  Date:   2026-03-03 (Tue, 03 Mar 2026)

  Changed paths:
    M flang/lib/Lower/OpenMP/ClauseProcessor.cpp
    M flang/test/Lower/OpenMP/task-affinity.f90
    M mlir/test/Dialect/OpenMP/ops.mlir

  Log Message:
  -----------
  Rebase and replace omp.iterators with omp.iterator


  Commit: 238ca0e49b6add89bc42d0a6dc1fc832e76f98c6
      https://github.com/llvm/llvm-project/commit/238ca0e49b6add89bc42d0a6dc1fc832e76f98c6
  Author: Chi Chun, Chen <chichun.chen at hpe.com>
  Date:   2026-03-03 (Tue, 03 Mar 2026)

  Changed paths:
    M flang/lib/Lower/OpenMP/ClauseProcessor.cpp
    M flang/lib/Lower/OpenMP/Utils.cpp
    M flang/lib/Lower/OpenMP/Utils.h
    M flang/test/Lower/OpenMP/task-affinity.f90

  Log Message:
  -----------
  Lower iterator affinity subscripts and sections correctly

Teach OpenMP affinity lowering to evaluate iterator-dependent subscripts
through the iterator symbol mapping and use them to build the element
coordinate directly.

This fixes cases such as:
- affinity(iterator(i,j): a(j,i))
- affinity(iterator(i,j): a(i+1,j))
- affinity(iterator(i,j): a(i:i+1,j+2))
- affinity(iterator(i,j): a(:i+1,j+2))


  Commit: e49f2a93a5c0fa4e4b1444dda855eadd7dbf51ab
      https://github.com/llvm/llvm-project/commit/e49f2a93a5c0fa4e4b1444dda855eadd7dbf51ab
  Author: Chi Chun, Chen <chichun.chen at hpe.com>
  Date:   2026-03-03 (Tue, 03 Mar 2026)

  Changed paths:
    M flang/lib/Lower/OpenMP/ClauseProcessor.cpp
    M flang/lib/Lower/OpenMP/Utils.cpp
    M flang/lib/Lower/OpenMP/Utils.h
    M flang/test/Lower/OpenMP/task-affinity.f90

  Log Message:
  -----------
  Handle dynamic affinity object sizes and improve iterator coverage

Teach task affinity lowering to compute lengths for dynamic objects
instead of falling back to zero for whole-object cases such as
assumed-shape, allocatable, pointer, character, and polymorphic type.

Add more tests in task-affinity
    - assumed-shape, allocatable, pointer, and polymorphic objects
    - character objects with constant and runtime length
    - iterator character element affinity
    - reordered, expression, and section iterator subscripts
    - Extract iterator handling from processAffinity


Compare: https://github.com/llvm/llvm-project/compare/0ab08252686b...e49f2a93a5c0

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