sandeepkosuri added inline comments.

================
Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:9866
+      (CGM.getLangOpts().OpenMP >= 51 &&
+       needsTaskBasedThreadLimit(D.getDirectiveKind()) &&
+       D.hasClausesOfKind<OMPThreadLimitClause>());
----------------
ABataev wrote:
> I think you don't need needsTaskBasedThreadLimit call here, the 
> emitTargetCall function itself can be called only for target-based directives
`emitTargetCall()` is called for all the target based directives, even target - 
team based directives, which already have a thread limit implementation in 
place. So, I need `needsTaskBasedThreadLimit` to select applicable directives 
only.


================
Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:5143
+    if (CGF.CGM.getLangOpts().OpenMP >= 51 &&
+        needsTaskBasedThreadLimit(S.getDirectiveKind()) && TL) {
+      // Emit __kmpc_set_thread_limit() to set the thread_limit for the task
----------------
ABataev wrote:
> Same regarding needsTaskBasedThreadLimit(S.getDirectiveKind()) , the function 
> EmitOMPTargetTaskBasedDirective is called only for target-based directives
Similarly here as well.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152054/new/

https://reviews.llvm.org/D152054

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to