[all-commits] [llvm/llvm-project] 1f1e09: [flang] run CFG conversion on omp reduction declar...

Tom Eccles via All-commits all-commits at lists.llvm.org
Wed Mar 20 02:48:10 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1f1e0948f20338961f995426c11497e8f21ceb08
      https://github.com/llvm/llvm-project/commit/1f1e0948f20338961f995426c11497e8f21ceb08
  Author: Tom Eccles <tom.eccles at arm.com>
  Date:   2024-03-20 (Wed, 20 Mar 2024)

  Changed paths:
    M flang/include/flang/Optimizer/Transforms/Passes.h
    M flang/include/flang/Optimizer/Transforms/Passes.td
    M flang/include/flang/Tools/CLOptions.inc
    M flang/lib/Optimizer/Transforms/ControlFlowConverter.cpp
    M flang/test/Driver/bbc-mlir-pass-pipeline.f90
    M flang/test/Driver/mlir-debug-pass-pipeline.f90
    M flang/test/Driver/mlir-pass-pipeline.f90
    M flang/test/Fir/array-value-copy-2.fir
    M flang/test/Fir/basic-program.fir
    M flang/test/Fir/convert-to-llvm-openmp-and-fir.fir
    M flang/test/Fir/loop01.fir
    M flang/test/Fir/loop02.fir
    M flang/test/Lower/OpenMP/FIR/flush.f90
    M flang/test/Lower/OpenMP/FIR/master.f90
    M flang/test/Lower/OpenMP/FIR/parallel-sections.f90
    A flang/test/Transforms/omp-reduction-cfg-conversion.fir

  Log Message:
  -----------
  [flang] run CFG conversion on omp reduction declare ops (#84953)

Most FIR passes only look for FIR operations inside of functions (either
because they run only on func.func or they run on the module but iterate
over functions internally). But there can also be FIR operations inside
of fir.global, some OpenMP and OpenACC container operations.

This has worked so far for fir.global and OpenMP reductions because they
only contained very simple FIR code which doesn't need most passes to be
lowered into LLVM IR. I am not sure how OpenACC works.

In the long run, I hope to see a more systematic approach to making sure
that every pass runs on all of these container operations. I will write
an RFC for this soon.

In the meantime, this pass duplicates the CFG conversion pass to also
run on omp reduction operations. This is similar to how the
AbstractResult pass is already duplicated for fir.global operations.

OpenMP array reductions 2/6
Previous PR: https://github.com/llvm/llvm-project/pull/84952
Next PR: https://github.com/llvm/llvm-project/pull/84954

---------

Co-authored-by: Mats Petersson <mats.petersson at arm.com>



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