[Mlir-commits] [mlir] [MLIR][OpenMP] Add OMP Declare Mapper MLIR Op definition (PR #117045)

Sergio Afonso llvmlistbot at llvm.org
Tue Nov 26 08:55:19 PST 2024


================
@@ -1652,6 +1652,34 @@ def CancellationPointOp : OpenMP_Op<"cancellation_point", clauses = [
   let hasVerifier = 1;
 }
 
+//===----------------------------------------------------------------------===//
+// 2.19.7.3 Declare Mapper Directive
+//===----------------------------------------------------------------------===//
+def DeclareMapperOp : OpenMP_Op<"declare_mapper", traits = [
+  Symbol], clauses = [
+    OpenMP_MapClause
----------------
skatrak wrote:

I think it would make sense to extract the definition of the mapper identifier into a clause and simplify the operation:
```
class OpenMP_MapperIdentifierClauseSkip<...> : OpenMP_Clause<...> {
  let traits = [
    Symbol
  ];

  let arguments = (ins
    SymbolNameAttr:$sym_name,
    OpenMP_PointerLikeType:$mapper_id_var,
    TypeAttr:$mapper_id_type
  );

  ...
}
```

https://github.com/llvm/llvm-project/pull/117045


More information about the Mlir-commits mailing list