[Mlir-commits] [llvm] [mlir] [OpenMP][IRBuilder] Handle `target` directives with both `if` & `nowait` (PR #125029)

Sergio Afonso llvmlistbot at llvm.org
Thu Jan 30 03:00:52 PST 2025


================
@@ -7438,10 +7438,15 @@ emitTargetCall(OpenMPIRBuilder &OMPBuilder, IRBuilderBase &Builder,
       // '@.omp_target_task_proxy_func' in the pseudo code above)
       // "@.omp_target_task_proxy_func' is generated by
       // emitTargetTaskProxyFunction.
-      if (OutlinedFnID)
+      //
+      // We only need to do the outlining if `DeviceID` is set to avoid calling
+      // `emitKernelLaunch` if we want to code-gen for the host; e.g. if we are
+      // generating the `else` branch of an `if` clause.
----------------
skatrak wrote:

Ultra-nit: Perhaps it makes more sense to integrate this comment below, which is where the `OutlinedFnID` exception is also discussed.

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


More information about the Mlir-commits mailing list