[PATCH] D30088: [OpenMP] Remove barriers at cancel and cancellation point

Jonas Hahnfeld via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 17 04:08:25 PST 2017


Hahnfeld created this revision.

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 https://reviews.llvm.org/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!


https://reviews.llvm.org/D30088

Files:
  lib/CodeGen/CGOpenMPRuntime.cpp
  test/OpenMP/cancel_codegen.cpp
  test/OpenMP/cancellation_point_codegen.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30088.88872.patch
Type: text/x-patch
Size: 8315 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170217/26d8773a/attachment-0001.bin>


More information about the cfe-commits mailing list