================ @@ -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 + if (teamsOp.getNumReductionVars()) + return false; + if (wsLoopOp->getNumReductionVars()) + return false; + // check if the user allows the promotion of kernels to no-loop mode ---------------- skatrak wrote:
```suggestion // Check if the user allows the promotion of kernels to no-loop mode. ``` https://github.com/llvm/llvm-project/pull/155818 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits