[all-commits] [llvm/llvm-project] 8647e4: [mlir] support translating OpenMP loops with reduc...

ftynse via All-commits all-commits at lists.llvm.org
Thu Sep 2 06:38:36 PDT 2021


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

  Changed paths:
    M mlir/include/mlir/Target/LLVMIR/ModuleTranslation.h
    M mlir/lib/Target/LLVMIR/CMakeLists.txt
    M mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
    M mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
    M mlir/test/Target/LLVMIR/llvmir-invalid.mlir
    A mlir/test/Target/LLVMIR/openmp-reduction.mlir

  Log Message:
  -----------
  [mlir] support translating OpenMP loops with reductions

Use the recently introduced OpenMPIRBuilder facility to transate OpenMP
workshare loops with reductions to LLVM IR calling OpenMP runtime. Most of the
heavy lifting is done at the OpenMPIRBuilder. When other OpenMP dialect
constructs grow support for reductions, the translation can be updated to
operate on, e.g., an operation interface for all reduction containers instead
of workshare loops specifically. Designing such a generic translation for the
single operation that currently supports reductions is premature since we don't
know how the reduction modeling itself will be generalized.

Reviewed By: kiranchandramohan

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




More information about the All-commits mailing list