summaryrefslogtreecommitdiffstats
path: root/openmp/runtime
Commit message (Collapse)AuthorAgeFilesLines
* [OpenMP][OMPT] fix reduction test for 32-bit x86protze@itc.rwth-aachen.de2020-02-051-3/+7
| | | | | | | | | | | | | | Fixes [[ https://bugs.llvm.org/show_bug.cgi?id=44733 | TEST 'libomp :: ompt/synchronization/reduction/tree_reduce.c' FAILED on 32-bit x86 ]] For 32-bit we need at least 3 variables to avoid atomic reduction to be choosen by runtime function `__kmp_determine_reduction_method`. This patch adds reduction variables to the testcase. Reviewers: mgorny, Hahnfeld Differential Revision: https://reviews.llvm.org/D73850 (cherry picked from commit 90e4ebdce55fd3c1f8877f19784a5339b9890f98)
* [OpenMP] NFC: Fix trivial typos in commentsKazuaki Ishizaki2020-01-0729-54/+55
| | | | | | | | | | | | Reviewers: jdoerfert, Jim Reviewed By: Jim Subscribers: Jim, mgorny, guansong, jfb, openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D72285
* [OpenMP] Fix incorrect property of __has_attribute() macroKelvin Li2020-01-061-1/+1
| | | | | | | | __has_attribute(fallthough) -> __has_attribute(fallthrough) Submitted by: kiszk (Kazuaki Ishizaki <ishizaki@jp.ibm.com>) Differential Revision: https://reviews.llvm.org/D72287
* [OpenMP] NFC: Fix trivial typos in commentsKelvin Li2020-01-0324-35/+35
| | | | | | Submitted by: kiszk Differential Revision: https://reviews.llvm.org/D72171
* [OpenMP] Implementation of OMPT reduction callbacksprotze@itc.rwth-aachen.de2019-12-277-6/+181
| | | | | | | | | Including two tests These callbacks were added late to the 5.0 specification, an implementation is missing. Reviewed By: jdoerfert Differential Review: https://reviews.llvm.org/D70395
* [OpenMP] Fix linkage issue on FreeBSDDavid Carlier2019-12-061-1/+1
| | | | needs kmp_set_thread_affinity_mask_initial implementation.
* [openmp] Fixed nonmonotonic schedule when #threads > #chunks in a loop.AndreyChurbanov2019-11-272-7/+48
| | | | Differential Revision: https://reviews.llvm.org/D70713
* [openmp] Recognise ARMv7ve machine arch.AndreyChurbanov2019-11-261-1/+1
| | | | | | Patch by raj.khem (Khem Raj) Differential Revision: https://reviews.llvm.org/D68543
* Fix openmp on PowerPC64-BE-ELFv2 ABI on FreeBSD.AndreyChurbanov2019-11-192-15/+15
| | | | | | Patch by adalava (Alfredo Dal'Ava J.nior) Differential Revision: https://reviews.llvm.org/D67190
* [OpenMP] Remove -Wl,-fini=__kmp_internal_end_finiAaron Puchert2019-11-194-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The termination function duplicated the functionality of the __attribute((destructor))-annotated function __kmp_internal_end_fini, and we have no indication that this doesn't work. The function might cause issues with link-time optimization turned on: until very recently, none of the usual linkers was reporting functions named in -Wl,-fini as used to the LTO plugin, so it might be dropped. If the function is dropped, -Wl,-fini=__kmp_internal_end_fini doesn't do what we want: with ld.bfd and lld it drops the FINI attribute from .dynamic and with gold we get FINI = 0x0, which leads to a crash on cleanup. This can be reproduced by building with -DLLVM_ENABLE_PROJECTS="clang;openmp" \ -DLLVM_ENABLE_LTO=Thin \ -DLLVM_USE_LINKER=gold The issue in lld has been fixed in f95273f75aa, but gold remains without fix so far. Fixes PR43927. Reviewers: JonChesterfield, jdoerfert, AndreyChurbanov Reviewed By: AndreyChurbanov Differential Revision: https://reviews.llvm.org/D69927
* [OpenMP] Add implementation and tests of Archer toolprotze@itc.rwth-aachen.de2019-11-183-0/+21
| | | | | | | | | | The tool provides TSAN annotations for OpenMP synchronization. The tool is activated if no other OMPT tool is loaded. The tool detects whether the application was built with TSan and rejects activation according to the OMPT protocol if there is no TSan-rt. Differential Revision: https://reviews.llvm.org/D45890
* Remove +x permission on some filesSylvestre Ledru2019-11-161-0/+0
|
* [openmp] [test] Skip one more test that kills NetBSD buildbotMichał Górny2019-11-071-0/+3
|
* [OpenMP] Reset affinity mask in the process child on FreeBSDDavid Carlier2019-10-301-1/+1
| | | | | | | | Reviewers: dim, chandlerc, jdoerfert Reviewed By: dim Differential Revision: https://reviews.llvm.org/D69047
* Enable OpenBSD support.AndreyChurbanov2019-10-303-4/+33
| | | | | | Patch by devnexen (David CARLIER) Differential Revision: https://reviews.llvm.org/D69220
* OpenMP Tasks dependencies hash re-sizing fixed.AndreyChurbanov2019-10-251-4/+4
| | | | | | | | | Details: - nconflicts field initialized; - formatting fix (moved declaration out of the long line); - count conflicts in new hash as opposed to old one. Differential Revision: https://reviews.llvm.org/D68036
* [OpenMP] Enable thread affinity on FreeBSDDavid Carlier2019-10-086-14/+51
| | | | | | | | | | Reviewers: chandlerc, jlpeyton, jdoerfert, dim Reviewed-By: dim Differential Revision: https://reviews.llvm.org/D68580 llvm-svn: 374118
* Don't assume Type from `readelf -d` has parenthesesAndrey Churbanov2019-10-081-1/+1
| | | | | | | | Patch by jbeich (Jan Beich) Differential Revision: https://reviews.llvm.org/D68053 llvm-svn: 374038
* Don't link libm with -Wl,--as-needed on FreeBSDAndrey Churbanov2019-10-081-2/+2
| | | | | | | | Patch by jbeich (Jan Beich) Differential Revision: https://reviews.llvm.org/D68051 llvm-svn: 374037
* [OpenMP] FreeBSD address check if mapped more nativeDavid Carlier2019-09-281-1/+42
| | | | | | | | | | | | | /proc unless Linux layer compatibility is activated for CentOS is activated is not present thus relying on a more native for checking the address. Reviewers: Hahnfeld, kongyl, jdoerfert, jlpeyton, AndreyChurbanov, emaster, dim Reviewed By: Hahnfeld Differential Revision: https://reviews.llvm.org/D67326 llvm-svn: 373152
* fixed test: eliminated race condition which might cause deadlockAndrey Churbanov2019-09-251-1/+1
| | | | llvm-svn: 372887
* Enable tasks dependencies hashmaps resizing.Andrey Churbanov2019-09-253-11/+103
| | | | | | | | Patch by viroulep (Philippe Virouleau) Differential Revision: https://reviews.llvm.org/D67447 llvm-svn: 372879
* [OpenMP] Change initialization of __kmp_globalJonas Hahnfeld2019-09-043-3/+1
| | | | | | | | | | | | | | There's no need to initialize variables with static storage duration because they're implicitly initialized to zero. See https://en.cppreference.com/w/c/language/initialization#Implicit_initialization I think that's already relied upon because the supplied 0 only sets 'kmp_time_global_t g_time;' in 'struct kmp_base_global'. The other fields are not set in the code, but implicitly initialized by the compiler. Differential Revision: https://reviews.llvm.org/D66292 llvm-svn: 370943
* Force honoring nthreads-var and thread-limit-var inside teams construct on hostJonathan Peyton2019-08-201-4/+17
| | | | | | | | | | | | | This patch fixes https://bugs.llvm.org/show_bug.cgi?id=42906, via adding adjustment of number of threads on enter to the teams construct on host according to user settings. This allows to pass checks and avoid assertions at time of team of threads creation. Patch by Andrey Churbanov Differential Revision: https://reviews.llvm.org/D66351 llvm-svn: 369430
* [OpenMP] Enable warning about "implicit fallthrough"Jonas Hahnfeld2019-08-153-2/+2
| | | | | | | | | Fix last warned location in ittnotify_static.cpp using the defined macro KMP_FALLTHROUGH(). Differential Revision: https://reviews.llvm.org/D65871 llvm-svn: 369003
* [OpenMP] Remove 'unnecessary parentheses'Jonas Hahnfeld2019-08-156-21/+19
| | | | | | | | | | The variables in kmp_lock.cpp are really arrays of function pointers that return void or int, not pointers to functions that return void* or int*. The other changes are only cosmetic. Differential Revision: https://reviews.llvm.org/D65870 llvm-svn: 369002
* [OMPT] Resolve warnings because of ints in if conditionsJonas Hahnfeld2019-08-153-15/+10
| | | | | | | | | | | | | The implementation status can only be one of ompt_event_UNIMPLEMENTED = ompt_set_never = 1 ompt_event_MAY_ALWAYS = ompt_set_always = 5 In both cases, the condition was already true, so just remove the check. Differential Revision: https://reviews.llvm.org/D65869 llvm-svn: 369001
* [OpenMP] Turn on -Wall compiler warnings by defaultJonas Hahnfeld2019-08-152-51/+30
| | | | | | | | | | | | | | | | | | Instead, maintain a list of disabled options to still build libomp and libomptarget without warnings. This includes -Wno-error and -Wno-pedantic to silence warnings that LLVM enables when building in-tree. I tested the following compilers: * Clang 6.0, 7.0, 8.0 * GCC 4.8.5 (CentOS 7), GCC 6, 7, 8, 9 * Intel Compiler 16, 17, 18, 19 RFC thread on openmp-dev mailing list: http://lists.llvm.org/pipermail/openmp-dev/2019-August/002668.html Differential Revision: https://reviews.llvm.org/D65867 llvm-svn: 368999
* Cleanup unused variable.Andrey Churbanov2019-08-121-3/+1
| | | | | | | | | | | This patch fixes problem raised in post-review comments of the https://reviews.llvm.org/D65285. Developers of ittnotify confirmed that dll_path_ptr field of the __itt_global structure is never used by ittnotify library, so it is safe to remove the dll_path array. Differential Revision: https://reviews.llvm.org/D65885 llvm-svn: 368559
* [OpenMP] Add support for GOMP_*_nonmonotonic_* functionsJonathan Peyton2019-08-052-0/+62
| | | | | | | | Patch by Isuru Fernando Differential Revision: https://reviews.llvm.org/D65714 llvm-svn: 367949
* [OpenMP] Fix broken build due to new OMPT testsHansang Bae2019-08-054-4/+4
| | | | | | | | | New OMPT tests with teams construct should be disabled for GCC as it emits code with a GOMP entry not supported in the LLVM runtime. Differential Revision: https://reviews.llvm.org/D65757 llvm-svn: 367939
* Add OMPT support for teams constructHansang Bae2019-08-0312-63/+437
| | | | | | | | This change adds OMPT support for events from teams construct. Differential Revision: https://reviews.llvm.org/D64025 llvm-svn: 367746
* [OpenMP] Rename last file to cpp and remove LIBOMP_CFLAGSJonas Hahnfeld2019-07-305-27/+8
| | | | | | | | | | | | | All other files are already C++ and the build system has always passed '-x c++' for C files, effectively compiling them as C++. To stay warning free we need one fix in ittnotify_static.{c,cpp}: The variable dll_path can be written to, so it must not be const. GCC complained with -Wcast-qual and I think it's right. Differential Revision: https://reviews.llvm.org/D65285 llvm-svn: 367343
* [openmp] Workaround bug in old Android pthread_attr_setstacksizeYi Kong2019-07-251-0/+7
| | | | | | | | | | | | Round the stack size to a multiple of the page size. Older versions of Android (until KitKat) would fail pthread_attr_setstacksize with EINVAL if the stack size was not a multiple of the page size. Patch by Dan Albert <danalbert@google.com>. Test: Build, copied into the NDK, passed openmp test on ICS. Bug: https://github.com/android-ndk/ndk/issues/9 llvm-svn: 367070
* [OpenMP] Fix build of stubs library, NFC.Jonas Hahnfeld2019-07-251-2/+2
| | | | | | | | | | Both Clang and GCC complained that they cannot initialize a return object of type 'kmp_proc_bind_t' with an 'int'. While at it, also fix a warning about missing parentheses thrown by Clang. Differential Revision: https://reviews.llvm.org/D65284 llvm-svn: 367041
* [OpenMP] RISCV64 portJonas Hahnfeld2019-07-2516-13/+238
| | | | | | | | | | | | | | This is a port of libomp for the RISC-V 64-bit Linux target. We have tested this port on a HiFive Unleashed development board using a downstream LLVM that has support for the missing bits in upstream. As of now, all tests are passing, including OMPT. Patch by Ferran Pallarès! Differential Revision: https://reviews.llvm.org/D59880 llvm-svn: 367021
* [OMPT] Cleanup reset of exit_frame pointerJonas Hahnfeld2019-07-224-50/+88
| | | | | | | | | | | | | | | | | | This is done at call-site and does not need to be handled in __kmp_invoke_microtask. It was already absent from the x86 and x86_64 assembly, this patch removes it from the generic implementation in z_Linux_util.cpp and adds documentation for AArch64 and PPC64 that it's actually not needed. I can't test on these architectures, so I don't want to change the code just because it looks right :) While at it, rename some variables for consistency and add a check in test/ompt/parallel/normal.c that the pointer was reset before entering the barrier. Differential Revision: https://reviews.llvm.org/D64442 llvm-svn: 366721
* Delete empty fileJonas Hahnfeld2019-07-221-0/+0
| | | | | | This is a left-over from r356288 which was reviewed in D58989. llvm-svn: 366716
* Remove REQUIRES OMP spec version within lit testsJonathan Peyton2019-07-1713-13/+0
| | | | | | | | This is a follow up patch to D64534 (r365963) which removed all OMP spec versioning within the OpenMP runtime codebase. This patch removes REQUIRES: openmp-x.y lines from lit tests. llvm-svn: 366341
* [OpenMP] Move header inclusion out of 'extern "C"'Jonas Hahnfeld2019-07-161-2/+3
| | | | | | | | | | This leads to problems when compiling C++ code with libc++ for Nvidia GPUs because Clang now uses wrappers for math functions that might include C++ templates not allowed in 'extern "C"'. Differentiel Revision: https://reviews.llvm.org/D64625 llvm-svn: 366229
* [OpenMP] Remove OMP spec versioningJonathan Peyton2019-07-1262-7275/+168
| | | | | | | | | | Remove all older OMP spec versioning from the runtime and build system. Patch by Terry Wilmarth Differential Revision: https://reviews.llvm.org/D64534 llvm-svn: 365963
* NFC: fixed typo #ifdef --> #if to allow macro set to 0 work correctlyAndrey Churbanov2019-07-101-1/+1
| | | | llvm-svn: 365642
* Create a runtime option to disable task throttling.Andrey Churbanov2019-07-025-2/+82
| | | | | | | | Patch by viroulep (Philippe Virouleau) Differential Revision: https://reviews.llvm.org/D63196 llvm-svn: 364934
* Cleanup of unused codeAndrey Churbanov2019-07-026-25/+1
| | | | | | | | Patch by Terry Wilmarth Differential Revision: https://reviews.llvm.org/D63891 llvm-svn: 364925
* Fixed memory use-after-free problem.Andrey Churbanov2019-06-262-3/+24
| | | | | | | | | | | Bug reported in https://bugs.llvm.org/show_bug.cgi?id=42269. Freeing of the contention group (CG) stucture by master thread looks wrong, because workers can leave the CG later on. Intead the freeing is now done by the last thread leaving the CG. Differential Revision: https://reviews.llvm.org/D63599 llvm-svn: 364456
* New implementation of OpenMP 5.0 detached tasks.Andrey Churbanov2019-06-1912-24/+564
| | | | | | | | Patch by Alex Duran Differential Revision: https://reviews.llvm.org/D62485 llvm-svn: 363799
* [OpenMP] Add task alloc functionGheorghe-Teodor Bercea2019-06-142-0/+16
| | | | | | | | | | | | | | | | Summary: Add the target task allocation function to the interface. Reviewers: ABataev, AlexEichenberger, caomhin, jlpeyton, AndreyChurbanov, RaviNarayanaswamy, hbae Reviewed By: AlexEichenberger, hbae Subscribers: hbae, RaviNarayanaswamy, cfe-commits, Hahnfeld, guansong, jdoerfert, openmp-commits Tags: #openmp, #clang Differential Revision: https://reviews.llvm.org/D63010 llvm-svn: 363449
* Added propagation of not big initial stack size of master thread to workers.Andrey Churbanov2019-06-054-0/+91
| | | | | | | | Currently implemented only for non-Windows 64-bit platforms. Differential Revision: https://reviews.llvm.org/D62488 llvm-svn: 362618
* Fixed build warning with -DLIBOMP_USE_HWLOC=1Andrey Churbanov2019-06-032-1/+8
| | | | | | | | | | Made type of depth of hwloc object to correapond with change from unsigned in hwloc 1,x to int in hwloc 2.x. This eliminates the warning on signed-unsigned comparison. Differential Revision: https://reviews.llvm.org/D62332 llvm-svn: 362401
* Fix OMP_TARGET_OFFLOAD parsingHansang Bae2019-05-302-3/+65
| | | | | | | | | | | Current parsing allows trailing string after the permitted value, MANDATORY|DISABLED|DEFAULT -- e.g., "mandatorynot" is also recognized as "MANDATORY". Such cases should be recognized as incorrect/unknown value. Differential Revision: https://reviews.llvm.org/D62431 llvm-svn: 362125
OpenPOWER on IntegriCloud