summaryrefslogtreecommitdiffstats
path: root/test/OpenMP/cancellation_point_codegen.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [OpenMP] Fix cancellation point in task with no cancelJonas Hahnfeld2017-02-171-0/+15
| | | | | | | | | With tasks, the cancel may happen in another task. This has a different region info which means that we can't find it here. Differential Revision: https://reviews.llvm.org/D30091 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@295474 91177308-0d34-0410-b5e6-96231b3b80d8
* [OpenMP] Remove barriers at cancel and cancellation pointJonas Hahnfeld2017-02-171-10/+0
| | | | | | | | | | | | | | | | 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
* Remove unnecessary x86 backend requirements from OpenMP testsReid Kleckner2016-10-211-1/+0
| | | | | | Clang can generate LLVM IR for x86 without a registered x86 backend. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@284836 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Generalize codegen for 'sections'-based directive.Alexey Bataev2016-01-221-6/+20
| | | | | | | If 'sections' directive has only one sub-section, the code for 'single'-based directive was emitted. Removed this codegen, because it causes crashes in different cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@258495 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Remove explicit call for implicit barrierAlexey Bataev2015-12-181-2/+0
| | | | | | | | #pragma omp parallel needs an implicit barrier that is currently done by an explicit call to __kmpc_barrier. However, the runtime already ensures a barrier in __kmpc_fork_call which currently leads to two barriers per region per thread. Differential Revision: http://reviews.llvm.org/D15561 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@255992 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Emit __kmpc_cancel_barrier() and code for 'cancellation point' only ↵Alexey Bataev2015-09-151-0/+75
| | | | | | | | | | | | | | | if 'cancel' is found. Patch improves codegen for OpenMP constructs. If the OpenMP region does not have internal 'cancel' construct, a call to 'void __kmpc_barrier()' runtime function is generated for all implicit/explicit barriers. If the region has inner 'cancel' directive, then ``` if (__kmpc_cancel_barrier()) exit from outer construct; ``` code is generated. Also, the code for 'canellation point' directive is not generated if parent directive does not have 'cancel' directive. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247681 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Revert r241620 and follow-up commits" and move the initializationAdrian Prantl2015-07-081-1/+1
| | | | | | of the llvm targets from clang/CodeGen into ClangCheck.cpp and CIndex.cpp. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241653 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r241620 and follow-up commits while investigating linux buildbot ↵Adrian Prantl2015-07-071-1/+1
| | | | | | failures. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241642 91177308-0d34-0410-b5e6-96231b3b80d8
* Update testcases that use precompiled headers to require a target afterAdrian Prantl2015-07-071-1/+1
| | | | | | r241620. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241623 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP 4.0] Fixed codegen for 'cancellation point' construct.Alexey Bataev2015-07-031-1/+26
| | | | | | | | | | | Generate the next code for 'cancellation point': if (__kmpc_cancellationpoint()) { __kmpc_cancel_barrier(); <exit construct>; } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241336 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP 4.0] Fixed test for 'cancellation point' directive.Alexey Bataev2015-07-021-1/+1
| | | | | | | Added explicit target to pch test git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241240 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP 4.0] Codegen for 'cancellation point' directive.Alexey Bataev2015-07-021-0/+70
The next code is generated for this construct: ``` if (__kmpc_cancellationpoint(ident_t *loc, kmp_int32 global_tid, kmp_int32 cncl_kind) != 0) <exit from outer innermost construct>; ``` git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241239 91177308-0d34-0410-b5e6-96231b3b80d8