[all-commits] [llvm/llvm-project] e19641: [flang][OpenMP] Map `teams loop` to `teams distrib...

Kareem Ergawy via All-commits all-commits at lists.llvm.org
Thu Feb 20 07:26:10 PST 2025


  Branch: refs/heads/users/ergawy/parallel_loop
  Home:   https://github.com/llvm/llvm-project
  Commit: e196418642e4cbe41693d920580be65db85f6b57
      https://github.com/llvm/llvm-project/commit/e196418642e4cbe41693d920580be65db85f6b57
  Author: ergawy <kareem.ergawy at amd.com>
  Date:   2025-02-20 (Thu, 20 Feb 2025)

  Changed paths:
    M flang/lib/Optimizer/OpenMP/GenericLoopConversion.cpp
    M flang/test/Lower/OpenMP/loop-directive.f90

  Log Message:
  -----------
  [flang][OpenMP] Map `teams loop` to `teams distribute` when required.

This extends support for generic `loop` rewriting by:
1. Preventing nesting multiple worksharing loops inside each other. This
   is checked by walking the `teams loop` region searching for any
   `loop` directive whose `bind` modifier is `parallel`.
2. Preventing convert to worksharing loop if calls to unknow functions
   are found in the `loop` directive's body.

We walk the `teams loop` body to identify either of the above 2
conditions, if either of them is found to be true, we map the `loop`
directive to `distribute`.


  Commit: 466a856d4ff685f57a1af28e6b8d546d819b8f2c
      https://github.com/llvm/llvm-project/commit/466a856d4ff685f57a1af28e6b8d546d819b8f2c
  Author: ergawy <kareem.ergawy at amd.com>
  Date:   2025-02-20 (Thu, 20 Feb 2025)

  Changed paths:
    M flang/lib/Optimizer/OpenMP/GenericLoopConversion.cpp
    M flang/test/Lower/OpenMP/loop-directive.f90
    M flang/test/Transforms/generic-loop-rewriting-todo.mlir
    M flang/test/Transforms/generic-loop-rewriting.mlir

  Log Message:
  -----------
  [flang][OpenMP] Support `parallel loop` construct.

Extends support for the `loop` directive by adding support for `parallel
loop` combined directive.

Parent PR: #127489. Only the latest commit is relevant.


Compare: https://github.com/llvm/llvm-project/compare/5c32bc7703dc...466a856d4ff6

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