[all-commits] [llvm/llvm-project] fb5b59: [mlir][openacc] Add conversion for if operand to s...

Valentin Clement (バレンタイン クレメン) via All-commits all-commits at lists.llvm.org
Mon Jun 7 09:10:36 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fb5b590b5e18796bf850170946f15fc10ab9394a
      https://github.com/llvm/llvm-project/commit/fb5b590b5e18796bf850170946f15fc10ab9394a
  Author: Valentin Clement <clementval at gmail.com>
  Date:   2021-06-07 (Mon, 07 Jun 2021)

  Changed paths:
    A mlir/include/mlir/Conversion/OpenACCToSCF/ConvertOpenACCToSCF.h
    M mlir/include/mlir/Conversion/Passes.h
    M mlir/include/mlir/Conversion/Passes.td
    M mlir/include/mlir/Dialect/OpenACC/OpenACCOps.td
    M mlir/lib/Conversion/CMakeLists.txt
    A mlir/lib/Conversion/OpenACCToSCF/CMakeLists.txt
    A mlir/lib/Conversion/OpenACCToSCF/OpenACCToSCF.cpp
    M mlir/lib/Conversion/PassDetail.h
    A mlir/test/Conversion/OpenACCToSCF/convert-openacc-to-scf.mlir

  Log Message:
  -----------
  [mlir][openacc] Add conversion for if operand to scf.if for standalone data operation

This patch convert the if condition on standalone data operation such as acc.update,
acc.enter_data and acc.exit_data to a scf.if with the operation in the if region.
It removes the operation when the if condition is constant and false. It removes the
the condition if it is contant and true.

Conversion to scf.if is done in order to use the translation to LLVM IR dialect out of the box.
Not sure this is the best approach or we should perform this during the translation from OpenACC
to LLVM IR dialect. Any thoughts welcome.

Reviewed By: ftynse

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




More information about the All-commits mailing list