================
@@ -8587,6 +8601,18 @@ OpenMPIRBuilder::InsertPointTy
OpenMPIRBuilder::createTargetInit(
}
}
+ // Generic mode runs the main thread on a warp of its own, past thread_limit.
+ if (MaxThreadsVal > 0 && Attrs.ExecFlags == omp::OMP_TGT_EXEC_MODE_GENERIC &&
----------------
jhuber6 wrote:
I feel like we should just pessimistically append the maximum workgroup size,
simplify this heavily so all we do is round up the attribute by `+64`. I feel
like this could be a handful of lines here instead and I don't think it will
make much of a difference. Maybe worth checking afterwards if the SPMD
optimization in OpenMPOpt can undo that, but I'd prefer to keep it simple.
https://github.com/llvm/llvm-project/pull/218790
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits