[flang-commits] [flang] [mlir] [mlir][OpenMP] Separate OutlinableInterface from taskloop LoopWrapper (PR #188068)

Sergio Afonso via flang-commits flang-commits at lists.llvm.org
Wed Apr 1 08:35:44 PDT 2026


================
@@ -2838,12 +2841,35 @@ convertOmpTaskOp(omp::TaskOp taskOp, llvm::IRBuilderBase &builder,
   return success();
 }
 
-// Converts an OpenMP taskloop construct into LLVM IR using OpenMPIRBuilder.
+/// The correct entry point is convertOmpTaskloopContextOp. This gets called
+/// whilst lowering the body of the taskloop context (i.e. the task function)
 static LogicalResult
-convertOmpTaskloopOp(Operation &opInst, llvm::IRBuilderBase &builder,
+convertOmpTaskloopOp(omp::TaskloopOp taskloopOp, llvm::IRBuilderBase &builder,
                      LLVM::ModuleTranslation &moduleTranslation) {
+  mlir::Operation &opInst = *taskloopOp.getOperation();
+  if (failed(checkImplementationStatus(opInst)))
+    return failure();
+
+  // Recurse into the loop body
----------------
skatrak wrote:

```suggestion
  // Recurse into the loop body.
```

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


More information about the flang-commits mailing list