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

Tom Eccles via All-commits all-commits at lists.llvm.org
Tue Mar 12 10:26:20 PDT 2024


  Branch: refs/heads/users/tblah/omp_array_reduction_2
  Home:   https://github.com/llvm/llvm-project
  Commit: 192da3c05fd8c0759f280e0895ffc2f09b2203e4
      https://github.com/llvm/llvm-project/commit/192da3c05fd8c0759f280e0895ffc2f09b2203e4
  Author: Tom Eccles <tom.eccles at arm.com>
  Date:   2024-03-12 (Tue, 12 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

  Log Message:
  -----------
  [flang] run CFG conversion on omp reduction declare ops

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.

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