[all-commits] [llvm/llvm-project] 113b80: [mlir][openacc] Add OpenACC translation to LLVM IR...

Valentin Clement (バレンタイン クレメン) via All-commits all-commits at lists.llvm.org
Wed May 12 10:41:50 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 113b807017847f7d9e79db724f09968b51459cf0
      https://github.com/llvm/llvm-project/commit/113b807017847f7d9e79db724f09968b51459cf0
  Author: Valentin Clement <clementval at gmail.com>
  Date:   2021-05-12 (Wed, 12 May 2021)

  Changed paths:
    M mlir/include/mlir/Target/LLVMIR/Dialect/All.h
    A mlir/include/mlir/Target/LLVMIR/Dialect/OpenACC/OpenACCToLLVMIRTranslation.h
    M mlir/lib/Target/LLVMIR/CMakeLists.txt
    M mlir/lib/Target/LLVMIR/Dialect/CMakeLists.txt
    A mlir/lib/Target/LLVMIR/Dialect/OpenACC/CMakeLists.txt
    A mlir/lib/Target/LLVMIR/Dialect/OpenACC/OpenACCToLLVMIRTranslation.cpp
    A mlir/test/Target/LLVMIR/openacc-llvm.mlir

  Log Message:
  -----------
  [mlir][openacc] Add OpenACC translation to LLVM IR (enter_data op create/copyin)

This patch begins to translate acc.enter_data operation to call to tgt runtime call.
It currently only translate create/copyin operands of memref type. This acts as a basis to add support
for FIR types in the Flang/OpenACC support. It follows more or less a similar path than clang
with `omp target enter data map` directives.
This patch is taking a different approach than D100678 and perform a translation to LLVM IR
and make use of the OpenMPIRBuilder instead of doing a conversion to the LLVMIR dialect.

OpenACC support in Flang will rely on the current OpenMP runtime where 1:1 lowering can be
applied. Some extension will be added where features are not available yet.

Big part of this code will be shared for other standalone data operations in the OpenACC
dialect such as acc.exit_data and acc.update.

It is likely that parts of the lowering can also be shared later with the ops for
standalone data directives in the OpenMP dialect when they are introduced.

This is an initial translation and it probably needs more work.

Reviewed By: ftynse

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




More information about the All-commits mailing list