]> granicus.if.org Git - clang/commit
Merging r295473:
authorHans Wennborg <hans@hanshq.net>
Thu, 23 Feb 2017 18:33:45 +0000 (18:33 +0000)
committerHans Wennborg <hans@hanshq.net>
Thu, 23 Feb 2017 18:33:45 +0000 (18:33 +0000)
commitad64489dfe7c1e9f172b21fcbafc2be0bb6f2fde
treeb754c4c10a2a4dbe828d071e840a1d91b81bcdcf
parentcc3bc9c7d68164e159e7c5d63055cfc59b45db06
Merging r295473:
------------------------------------------------------------------------
r295473 | hahnfeld | 2017-02-17 10:32:51 -0800 (Fri, 17 Feb 2017) | 13 lines

[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/branches/release_40@296000 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGOpenMPRuntime.cpp
test/OpenMP/cancel_codegen.cpp
test/OpenMP/cancellation_point_codegen.cpp