[all-commits] [llvm/llvm-project] 95b0b8: [Flang][OpenMP][MLIR] Add declare target attribute...

agozillon via All-commits all-commits at lists.llvm.org
Mon May 22 03:41:52 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 95b0b867b0d19919133693b8e75b170fd25a9cec
      https://github.com/llvm/llvm-project/commit/95b0b867b0d19919133693b8e75b170fd25a9cec
  Author: Andrew Gozillon <Andrew.Gozillon at amd.com>
  Date:   2023-05-22 (Mon, 22 May 2023)

  Changed paths:
    M flang/include/flang/Optimizer/Dialect/FIRDialect.h
    M flang/lib/Optimizer/Dialect/FIRDialect.cpp
    M flang/lib/Optimizer/Dialect/FIROps.cpp
    A flang/test/Fir/omp-declare-target-data.fir
    M mlir/include/mlir/Dialect/OpenMP/OpenMPInterfaces.h
    M mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
    M mlir/include/mlir/Dialect/OpenMP/OpenMPOpsInterfaces.td
    M mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
    M mlir/test/Dialect/OpenMP/attr.mlir

  Log Message:
  -----------
  [Flang][OpenMP][MLIR] Add declare target attribute set and interface for the OpenMP dialect

This attribute represents the OpenMP declare target directive, it marks a function
or global as declare target by being present but also contains information on
the device_type and capture clause (link or to). It being an attribute allows it to
mark existing constructs and be converted trivially on lowering from the OpenMP
dialect to MLIR using amendOperation.

An interface has been made for the declare target attribute, with several helper
methods for managing the attribute, this interface can be applied to MLIR
operations that are allowed to be marked as declare target (as an example, it
is by default applied to func.func, LLVMFunc, fir.GlobalOps and LLVMGlobalOps).

Reviewers: kiranchandramohan

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




More information about the All-commits mailing list