[Openmp-commits] [PATCH] D107496: [OpenMP] Fix task wait doesn't work as expected in serialized team

Shilei Tian via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Aug 4 17:56:24 PDT 2021


tianshilei1992 added a comment.

In D107496#2926713 <https://reviews.llvm.org/D107496#2926713>, @protze.joachim wrote:

> It's not just the last task, but any task after a detached/hidden task that has the issue to not be synchronized with the taskwait.

Thanks for pointing out. I've updated the description.

> Instead of looking for the values in task_team, you could also just add `|| taskdata->td_parent->td_incomplete_child_tasks>0` and avoid a branch.

They're not equivalent I think, especially when decrementing the counter. We should not decrement the counter if only `td_incomplete_child_tasks > 0`. I prefer to make increment and decrement "symmetric" such that we know they can be paired.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D107496



More information about the Openmp-commits mailing list