[PATCH] D106298: [OpenMP] Creating the `NumTeams` and `ThreadLimit` attributes to outlined functions

Johannes Doerfert via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 19 15:38:54 PDT 2021


jdoerfert added inline comments.


================
Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:6659
     }
     return nullptr;
   }
----------------
josemonsalve2 wrote:
> Should I default here to 1? Since this is an `omp target` 
Yes, also above. This will make  
  `omp target`
and 
  `omp target num_teams(1)`
the same thing. Which is what we want, at least for now.


================
Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:6765
+  }
+}
+
----------------
See clang-tidy warning, also DefaultNT is not initialized potentially. I think you should just return a nullptr if `getNumTeamsExprForTargetDirective` did and always return an Expr if you can.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106298



More information about the cfe-commits mailing list