[OpenMP] Fixes for LIBOMP_OMP_VERSION=45/40
Summary: I have discovered this because i wanted to experiment with building static libomp (with openmp-4.0 support only) for debugging purposes. There are three kinds of problems here: 1. `__kmp_compare_and_store_acq()` simply does not exist. It was added in D47903 by @jlpeyton. I'm guessing `__kmp_atomic_compare_store_acq()` was meant. 2. In `__kmp_is_ticket_lock_initialized()`, `lck->lk.initialized` is `std::atomic<bool>`, while `lck` is `kmp_ticket_lock_t *`. Naturally, they can't be equality-compared. Either, it should return the value read from `lck->lk.initialized`, or do what `__kmp_is_queuing_lock_initialized()` does, compare the passed pointer with the field in the struct pointed by the pointer. I think the latter is correct-er choice here. 3. Tests were not versioned. They assume that `LIBOMP_OMP_VERSION` is at the latest version. This does not touch LIBOMP_OMP_VERSION=30. That is still broken. Reviewers: jlpeyton, Hahnfeld, AndreyChurbanov Reviewed By: AndreyChurbanov Subscribers: guansong, jfb, openmp-commits, jlpeyton Tags: #openmp Differential Revision: https://reviews.llvm.org/D55496 llvm-svn: 349260
Showing
- openmp/runtime/src/kmp_lock.cpp 1 addition, 1 deletionopenmp/runtime/src/kmp_lock.cpp
- openmp/runtime/src/kmp_lock.h 9 additions, 8 deletionsopenmp/runtime/src/kmp_lock.h
- openmp/runtime/src/kmp_tasking.cpp 2 additions, 0 deletionsopenmp/runtime/src/kmp_tasking.cpp
- openmp/runtime/test/api/omp_alloc.c 3 additions, 0 deletionsopenmp/runtime/test/api/omp_alloc.c
- openmp/runtime/test/lit.cfg 9 additions, 0 deletionsopenmp/runtime/test/lit.cfg
- openmp/runtime/test/lit.site.cfg.in 1 addition, 0 deletionsopenmp/runtime/test/lit.site.cfg.in
- openmp/runtime/test/ompt/misc/control_tool_no_ompt_support.c 3 additions, 0 deletionsopenmp/runtime/test/ompt/misc/control_tool_no_ompt_support.c
- openmp/runtime/test/tasking/bug_nested_proxy_task.c 1 addition, 0 deletionsopenmp/runtime/test/tasking/bug_nested_proxy_task.c
- openmp/runtime/test/tasking/bug_proxy_task_dep_waiting.c 1 addition, 0 deletionsopenmp/runtime/test/tasking/bug_proxy_task_dep_waiting.c
- openmp/runtime/test/tasking/kmp_task_reduction_nest.cpp 1 addition, 0 deletionsopenmp/runtime/test/tasking/kmp_task_reduction_nest.cpp
- openmp/runtime/test/tasking/kmp_taskloop.c 1 addition, 0 deletionsopenmp/runtime/test/tasking/kmp_taskloop.c
- openmp/runtime/test/tasking/omp_task_priority.c 1 addition, 0 deletionsopenmp/runtime/test/tasking/omp_task_priority.c
- openmp/runtime/test/tasking/omp_taskloop_grainsize.c 1 addition, 0 deletionsopenmp/runtime/test/tasking/omp_taskloop_grainsize.c
- openmp/runtime/test/tasking/omp_taskloop_num_tasks.c 1 addition, 0 deletionsopenmp/runtime/test/tasking/omp_taskloop_num_tasks.c
- openmp/runtime/test/worksharing/for/kmp_doacross_check.c 1 addition, 0 deletionsopenmp/runtime/test/worksharing/for/kmp_doacross_check.c
- openmp/runtime/test/worksharing/for/kmp_sch_simd_guided.c 1 addition, 0 deletionsopenmp/runtime/test/worksharing/for/kmp_sch_simd_guided.c
- openmp/runtime/test/worksharing/for/kmp_sch_simd_runtime_api.c 1 addition, 0 deletions...p/runtime/test/worksharing/for/kmp_sch_simd_runtime_api.c
- openmp/runtime/test/worksharing/for/kmp_sch_simd_runtime_guided.c 1 addition, 0 deletions...untime/test/worksharing/for/kmp_sch_simd_runtime_guided.c
- openmp/runtime/test/worksharing/for/kmp_sch_simd_runtime_static.c 1 addition, 0 deletions...untime/test/worksharing/for/kmp_sch_simd_runtime_static.c
- openmp/runtime/test/worksharing/for/omp_doacross.c 1 addition, 0 deletionsopenmp/runtime/test/worksharing/for/omp_doacross.c
Loading
Please register or sign in to comment