[all-commits] [llvm/llvm-project] 1ce752: [mlir] support reductions in SCF to OpenMP conversion

ftynse via All-commits all-commits at lists.llvm.org
Thu Sep 9 04:04:43 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1ce752b7415bef59200c32f64fcfac795813b11e
      https://github.com/llvm/llvm-project/commit/1ce752b7415bef59200c32f64fcfac795813b11e
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2021-09-09 (Thu, 09 Sep 2021)

  Changed paths:
    M mlir/include/mlir/Conversion/Passes.td
    M mlir/include/mlir/Conversion/SCFToOpenMP/SCFToOpenMP.h
    M mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
    M mlir/lib/Conversion/SCFToOpenMP/CMakeLists.txt
    M mlir/lib/Conversion/SCFToOpenMP/SCFToOpenMP.cpp
    A mlir/test/Conversion/SCFToOpenMP/reductions.mlir
    M mlir/test/Conversion/SCFToOpenMP/scf-to-openmp.mlir
    M utils/bazel/llvm-project-overlay/mlir/BUILD.bazel

  Log Message:
  -----------
  [mlir] support reductions in SCF to OpenMP conversion

OpenMP reductions need a neutral element, so we match some known reduction
kinds (integer add/mul/or/and/xor, float add/mul, integer and float min/max) to
define the neutral element and the atomic version when possible to express
using atomicrmw (everything except float mul). The SCF-to-OpenMP pass becomes a
module pass because it now needs to introduce new symbols for reduction
declarations in the module.

Reviewed By: chelini

Differential Revision: https://reviews.llvm.org/D107549




More information about the All-commits mailing list