[llvm-branch-commits] [flang] [mlir] [MLIR][OpenMP] LLVM IR translation of host_eval (PR #116052)

Sergio Afonso via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Jan 10 03:57:13 PST 2025


================
@@ -289,7 +281,16 @@ static LogicalResult checkImplementationStatus(Operation &op) {
         checkBare(op, result);
         checkDevice(op, result);
         checkHasDeviceAddr(op, result);
-        checkHostEval(op, result);
+
+        // Host evaluated clauses are supported, except for target SPMD loop
----------------
skatrak wrote:

Actually, initially I wasn't sure between doing what you suggest and what I ended up doing. Since other `check<ClauseName>` helpers only tested that the clause exists at all, and special cases so far were handled within the switch (i.e. firstprivate in target) to allow these functions still be reused by other operations, I decided to do the latter even though that clause cannot appear in any other operation.

But I agree that it makes things simpler, so I'm following your suggestion. In fact, I'm moving type-specific checks to the associated lambda as well and get things straightened out.

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


More information about the llvm-branch-commits mailing list