[Mlir-commits] [llvm] [mlir] [OMPIRBuilder] - Fix emitTargetTaskProxyFunc to not generate empty functions (PR #126958)

Sergio Afonso llvmlistbot at llvm.org
Thu Feb 13 02:21:26 PST 2025


================
@@ -7022,10 +7022,11 @@ static Function *emitTargetTaskProxyFunction(OpenMPIRBuilder &OMPBuilder,
   Function *KernelLaunchFunction = StaleCI->getCalledFunction();
 
   // StaleCI is the CallInst which is the call to the outlined
-  // target kernel launch function. If there are values that the
-  // outlined function uses then these are aggregated into a structure
-  // which is passed as the second argument. If not, then there's
-  // only one argument, the threadID. So, StaleCI can be
+  // target kernel launch function. If there are local live-in values
+  // that the outlined function uses then these are aggregated into a structure
+  // which is passed as the second argument. If there are no local live-in
+  // vallues or if all values used by the outlined kernel are global variables,
----------------
skatrak wrote:

```suggestion
  // values or if all values used by the outlined kernel are global variables,
```

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


More information about the Mlir-commits mailing list