[OpenMP][Flang][MLIR] Add MLIR support for OpenMP requires directive
authorSergio Afonso <safonsof@amd.com>
Wed, 29 Mar 2023 16:45:24 +0000 (17:45 +0100)
committerSergio Afonso <safonsof@amd.com>
Mon, 12 Jun 2023 11:38:04 +0000 (12:38 +0100)
commit667ee52551a7cf31f30b95acdb80cf0ed470a1be
treea68c684abd7b483d787cfbac77ef3d9a0270e59c
parentfc560cdb462ae106fa6f7910f9d959a908087362
[OpenMP][Flang][MLIR] Add MLIR support for OpenMP requires directive

This patch introduces an MLIR attribute to the OpenMP dialect
representing the clauses that a 'requires' directive can define.

The `OffloadModuleInterface` is also updated to provide methods to get
and set a new dialect attribute `omp.requires`, to allow storing and using this
information during the lowering stages to LLVM IR.

Differential Revision: https://reviews.llvm.org/D147214
mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
mlir/include/mlir/Dialect/OpenMP/OpenMPOpsInterfaces.td
mlir/test/Dialect/OpenMP/ops.mlir