[PATCH] D79034: [OPENMP50]Codegen for reduction clauses with 'task' modifier.

Johannes Doerfert via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 30 12:53:56 PDT 2020


jdoerfert accepted this revision.
jdoerfert added a comment.
This revision is now accepted and ready to land.

Some nits noted below. Can be done prior to commit.



================
Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:2374
+    break;
+  }
   case OMPRTL__kmpc_alloc: {
----------------
This reminds me, we should replace this code with a generator. I'll look into it.


================
Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:6885
+        llvm::ConstantInt::get(CGM.IntTy, Data.IsWorksharingReduction ? 1 : 0,
+                               /*isSigned=*/true),
+        llvm::ConstantInt::get(CGM.IntTy, Size, /*isSigned=*/true),
----------------
Nit: Unclear if the ternary operator is really needed.


================
Comment at: clang/lib/CodeGen/CGOpenMPRuntime.h:2246
+  /// ...
+  /// void* tg1 = __kmpc_taskred_modifier_init(loc, gtid, is_worksharing, n,
+  /// red_data);
----------------
`__kmpc_task_reduction_modifier_init`, same elsewhere.


================
Comment at: clang/lib/CodeGen/CGOpenMPRuntime.h:2260
+  /// \code
+  /// __kmpc_taskred_modifier_fini(loc, gtid, is_worksharing);
+  /// \endcode
----------------
`__kmpc_task_reduction_modifier_fini`, same elsewhere


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79034





More information about the cfe-commits mailing list