[Mlir-commits] [mlir] [Flang] [MLIR] [OpenMP] Add initial MLIR op support for OMP TARGET UPDATE directive (PR #74699)
Raghu Maddhipatla
llvmlistbot at llvm.org
Thu Dec 7 09:17:14 PST 2023
================
@@ -1416,6 +1416,50 @@ def TargetOp : OpenMP_Op<"target",[IsolatedFromAbove, OutlineableOpenMPOpInterfa
let hasVerifier = 1;
}
+//===---------------------------------------------------------------------===//
+// 2.14.6 target update data Construct
+//===---------------------------------------------------------------------===//
+
+def Target_UpdateDataOp: OpenMP_Op<"target_update_data",
+ [AttrSizedOperandSegments]>{
+ let summary = "target update data construct";
+ let description = [{
+ The target update directive makes the corresponding list items in the device
+ data environment consistent with their original list items, according to the
+ specified motion clauses. The target update construct is a stand-alone
+ directive.
+
+ The optional $if_expr parameter specifies a boolean result of a
+ conditional check. If this value is 1 or is not provided then the target
+ region runs on a device, if it is 0 then the target region is executed
+ on the host device.
+
+ The optional $device parameter specifies the device number for the
+ target region.
+
+ The optional $nowait eliminates the implicit barrier so the parent
+ task can make progress even if the target task is not yet completed.
+
+ TODO: depend, to and from clauses
+ }];
+
+ let arguments = (ins Optional<I1>:$if_expr,
+ Optional<AnyInteger>:$device,
+ UnitAttr:$nowait,
+ Variadic<OpenMP_PointerLikeType>:$to_operands,
+ Variadic<OpenMP_PointerLikeType>:$from_operands);
----------------
raghavendhra wrote:
I will remove these so that complete support can be added later in future PR.
https://github.com/llvm/llvm-project/pull/74699
More information about the Mlir-commits
mailing list