]> granicus.if.org Git - clang/commit
[OpenMP] Remove barriers at cancel and cancellation point
authorJonas Hahnfeld <Hahnfeld@itc.rwth-aachen.de>
Fri, 17 Feb 2017 18:32:51 +0000 (18:32 +0000)
committerJonas Hahnfeld <Hahnfeld@itc.rwth-aachen.de>
Fri, 17 Feb 2017 18:32:51 +0000 (18:32 +0000)
commit696f45e1309f4314286f8835ff6c50c548771bf4
tree9ff1e8d0fd29479a7f3dbe1fecaf42cdcfdf92d2
parentfc92af3eab231bced6fff4fa29ea6a2db6c47c50
[OpenMP] Remove barriers at cancel and cancellation point

This resolves a deadlock with the cancel directive when there is no explicit
cancellation point. In that case, the implicit barrier acts as cancellation
point. After removing the barrier after cancel, the now unmatched barrier for
the explicit cancellation point has to go as well.

This has probably worked before rL255992: With the calls for the explicit
barrier, it was sure that all threads passed a barrier before exiting.

Reported by Simon Convent and Joachim Protze!

Differential Revision: https://reviews.llvm.org/D30088

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@295473 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGOpenMPRuntime.cpp
test/OpenMP/cancel_codegen.cpp
test/OpenMP/cancellation_point_codegen.cpp