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

Alexey Bataev via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 15 00:52:22 PST 2016


ABataev added inline comments.

================
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);
+
----------------
This must be split in 2 functions: emitNumTeamsClause() and emitThreadLimitClause().

================
Comment at: lib/CodeGen/CGStmtOpenMP.cpp:2714
@@ +2713,3 @@
+  if (NT || TL) {
+    NumTeamsVal = (NT) ? CGF.EmitScalarExpr(NT->getNumTeams(), true) :
+        NumTeamsVal = CGF.Builder.getInt32(0);
----------------
Add comment with the name of argument for 'true' parameter.


http://reviews.llvm.org/D17148





More information about the cfe-commits mailing list