[Mlir-commits] [clang] [llvm] [mlir] [Flang][OpenMP] Enable no-loop kernels (PR #155818)

Michael Kruse llvmlistbot at llvm.org
Wed Sep 10 02:05:49 PDT 2025


================
@@ -2106,6 +2106,29 @@ Operation *TargetOp::getInnermostCapturedOmpOp() {
       });
 }
 
+/// Check if we can promote SPMD kernel to No-Loop kernel.
+static bool canPromoteToNoLoop(Operation *capturedOp, TeamsOp teamsOp,
+                               WsloopOp *wsLoopOp) {
+  // num_teams clause can break no-loop teams/threads assumption.
+  if (teamsOp.getNumTeamsUpper())
+    return false;
+  // Reduction kernels are slower in no-loop mode.
----------------
Meinersbur wrote:

```suggestion

  // Reduction kernels are slower in no-loop mode.
```
Most often we use empty lines before a comment to create a visual "block" of the comment and the code it applies to

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


More information about the Mlir-commits mailing list