[Openmp-commits] [PATCH] D81497: [OpenMP] support alloc of serialized tasks

Joachim Protze via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Jun 9 13:14:32 PDT 2020


protze.joachim created this revision.
protze.joachim added reviewers: AndreyChurbanov, hbae.
protze.joachim added a project: OpenMP.
Herald added subscribers: sstefan1, guansong, yaxunl.
Herald added a reviewer: jdoerfert.

Usually for serialized tasks (with if(0)), `__kmpc_omp_task_begin_if0` is used. 
This does not allow to track outgoing dependencies in case of detached tasks (see https://bugs.llvm.org/show_bug.cgi?id=46185).
Similarly, `mutexinoutset` would rather block than execute the task immediately.

This patch will allow to generate code as for normal tasks, but mark the task as undeferrable.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D81497

Files:
  openmp/runtime/src/kmp_tasking.cpp


Index: openmp/runtime/src/kmp_tasking.cpp
===================================================================
--- openmp/runtime/src/kmp_tasking.cpp
+++ openmp/runtime/src/kmp_tasking.cpp
@@ -1328,7 +1328,7 @@
 
   taskdata->td_flags.task_serial =
       (parent_task->td_flags.final || taskdata->td_flags.team_serial ||
-       taskdata->td_flags.tasking_ser);
+       taskdata->td_flags.tasking_ser || flags->task_serial);
 
   taskdata->td_flags.started = 0;
   taskdata->td_flags.executing = 0;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81497.269638.patch
Type: text/x-patch
Size: 499 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20200609/19dbd46c/attachment.bin>


More information about the Openmp-commits mailing list