[clang] [OpenMP][CodeGen] Improved codegen for combined loop directives (PR #72417)

Alexey Bataev via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 2 04:33:24 PST 2024


================
@@ -6106,6 +6106,8 @@ class OMPTeamsGenericLoopDirective final : public OMPLoopDirective {
 class OMPTargetTeamsGenericLoopDirective final : public OMPLoopDirective {
   friend class ASTStmtReader;
   friend class OMPExecutableDirective;
+  /// true if loop directive's associated loop can be a parallel for.
+  bool CanBeParallelFor = false;
----------------
alexey-bataev wrote:

Do you still need to this new field, taking into account that it does not affect sema anymore, only codegen? You don't need to store this flag, instead you can call teamsLoopCanBeParallelFor() directly in codegen

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


More information about the cfe-commits mailing list