[PATCH] D17148: [OPENMP] Basic teams directive implementation

Carlo Bertolli via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 15 09:05:21 PST 2016


carlo.bertolli marked an inline comment as done.
carlo.bertolli added a comment.

I updated the patch to reflect the comments. I will wait for an answer to the comment asking to split the emit function for push_num_teams. Thanks!


================
Comment at: lib/CodeGen/CGOpenMPRuntime.h:1009-1015
@@ +1008,9 @@
+
+  /// \brief Emits call to void __kmpc_push_num_teamss(ident_t *loc, kmp_int32
+  /// global_tid, kmp_int32 num_teams, kmp_int32 thread_limit) to generate code
+  /// for num_teams clause.
+  /// \param NumTeams An integer value of teams.
+  /// \param ThreadsLimit An integer value of threads.
+  virtual void emitNumTeamsClause(CodeGenFunction &CGF, llvm::Value *NumTeams,
+                                  llvm::Value *ThreadLimit, SourceLocation Loc);
+
----------------
ABataev wrote:
> This must be split in 2 functions: emitNumTeamsClause() and emitThreadLimitClause().
I do not understand this: thread_limit and num_teams can only be input to the library function kmpc_push_num_teams, which accepts values corresponding to those two parameters.
The thread_limit clause does not provoke calling of kmpc_push_num_threads.
If I have two emit functions, I would have to either have two push_num_teams calls (both with a 0 parameter) or save somewhere either ThreadLimit or NumTeams.


http://reviews.llvm.org/D17148





More information about the cfe-commits mailing list