aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
diff options
context:
space:
mode:
authorShilei Tian <tianshilei1992@gmail.com>2021-08-31 12:15:38 -0400
committerShilei Tian <tianshilei1992@gmail.com>2021-08-31 12:15:46 -0400
commit8442967fe32453ada32913d1e0fdd97b19520df2 (patch)
treec7e83a908a670497025bc59b955ab4189596116c /llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
parent6c0181c00f4ea0bcb7e4d05055412083b8270cc8 (diff)
downloadllvm-8442967fe32453ada32913d1e0fdd97b19520df2.zip
llvm-8442967fe32453ada32913d1e0fdd97b19520df2.tar.gz
llvm-8442967fe32453ada32913d1e0fdd97b19520df2.tar.bz2
[OpenMP] Fix task wait doesn't work as expected in serialized team
As discussed in D107121, task wait doesn't work when a regular task T depends on a detached task or a hidden helper task T' in a serialized team. The root cause is, since the team is serialized, the last task will not be tracked by `td_incomplete_child_tasks`. When T' is finished, it first releases its dependences, and then decrements its parent counter. So far so good. For the thread that is running task wait, if at the moment it is still spinning and trying to execute tasks, it is fine because it can detect the new task and execute it. However, if it happends to finish the function `flag.execute_tasks(...)`, it will be broken because `td_incomplete_child_tasks` is 0 now. In this patch, we update the rule to track children tasks a little bit. If the task team encounters a proxy task or a hidden helper task, all following tasks will be tracked. Reviewed By: AndreyChurbanov Differential Revision: https://reviews.llvm.org/D107496
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp')
0 files changed, 0 insertions, 0 deletions