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

Kareem Ergawy via All-commits all-commits at lists.llvm.org
Tue Feb 18 00:07:59 PST 2025


  Branch: refs/heads/users/ergawy/parallel_loop
  Home:   https://github.com/llvm/llvm-project
  Commit: f9369bdb0aa01644291a0b8b9d824ee38882b59b
      https://github.com/llvm/llvm-project/commit/f9369bdb0aa01644291a0b8b9d824ee38882b59b
  Author: ergawy <kareem.ergawy at amd.com>
  Date:   2025-02-17 (Mon, 17 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: 5c32bc7703dc7d0db35d58416d07e7887a51e8e8
      https://github.com/llvm/llvm-project/commit/5c32bc7703dc7d0db35d58416d07e7887a51e8e8
  Author: ergawy <kareem.ergawy at amd.com>
  Date:   2025-02-18 (Tue, 18 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/f9369bdb0aa0%5E...5c32bc7703dc

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