[all-commits] [llvm/llvm-project] ca1bd5: [flang][OpenMP] Decompose compound constructs, do ...

Krzysztof Parzyszek via All-commits all-commits at lists.llvm.org
Mon May 13 06:09:47 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ca1bd5995f6ed934f9187305190a5abfac049173
      https://github.com/llvm/llvm-project/commit/ca1bd5995f6ed934f9187305190a5abfac049173
  Author: Krzysztof Parzyszek <Krzysztof.Parzyszek at amd.com>
  Date:   2024-05-13 (Mon, 13 May 2024)

  Changed paths:
    M flang/lib/Lower/CMakeLists.txt
    M flang/lib/Lower/OpenMP/Clauses.cpp
    M flang/lib/Lower/OpenMP/Clauses.h
    A flang/lib/Lower/OpenMP/Decomposer.cpp
    A flang/lib/Lower/OpenMP/Decomposer.h
    M flang/lib/Lower/OpenMP/OpenMP.cpp
    M flang/lib/Lower/OpenMP/Utils.cpp
    M flang/lib/Lower/OpenMP/Utils.h
    M flang/test/Lower/OpenMP/default-clause-byref.f90
    M flang/test/Lower/OpenMP/default-clause.f90
    M flang/test/Lower/OpenMP/parallel-lastprivate-clause-scalar.f90
    M llvm/include/llvm/Frontend/OpenMP/ClauseT.h
    A llvm/include/llvm/Frontend/OpenMP/ConstructCompositionT.h
    A llvm/include/llvm/Frontend/OpenMP/ConstructDecompositionT.h
    M llvm/unittests/Frontend/CMakeLists.txt
    A llvm/unittests/Frontend/OpenMPDecompositionTest.cpp

  Log Message:
  -----------
  [flang][OpenMP] Decompose compound constructs, do recursive lowering (#90098)

A compound construct with a list of clauses is broken up into individual
leaf/composite constructs. Each such construct has the list of clauses
that apply to it based on the OpenMP spec.

Each lowering function (i.e. a function that generates MLIR ops) is now
responsible for generating its body as described below.

Functions that receive AST nodes extract the construct, and the clauses
from the node. They then create a work queue consisting of individual
constructs, and invoke a common dispatch function to process (lower) the
queue.

The dispatch function examines the current position in the queue, and
invokes the appropriate lowering function. Each lowering function
receives the queue as well, and once it needs to generate its body, it
either invokes the dispatch function on the rest of the queue (if any),
or processes nested evaluations if the work queue is at the end.



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