summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/src
Commit message (Collapse)AuthorAgeFilesLines
* [OpenMP] NFC: Fix trivial typos in commentsKazuaki Ishizaki2020-01-0719-39/+40
| | | | | | | | | | | | 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-0314-24/+24
| | | | | | Submitted by: kiszk Differential Revision: https://reviews.llvm.org/D72171
* [OpenMP] Implementation of OMPT reduction callbacksprotze@itc.rwth-aachen.de2019-12-274-6/+59
| | | | | | | | | 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-271-7/+8
| | | | 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-192-7/+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-182-0/+17
| | | | | | | | | | 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
* [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
* [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
* Enable tasks dependencies hashmaps resizing.Andrey Churbanov2019-09-252-11/+65
| | | | | | | | Patch by viroulep (Philippe Virouleau) Differential Revision: https://reviews.llvm.org/D67447 llvm-svn: 372879
* [OpenMP] Change initialization of __kmp_globalJonas Hahnfeld2019-09-041-1/+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-151-0/+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-154-19/+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-151-13/+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
* 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
* Add OMPT support for teams constructHansang Bae2019-08-036-49/+129
| | | | | | | | 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-302-11/+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-257-9/+193
| | | | | | | | | | | | | | 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-223-50/+85
| | | | | | | | | | | | | | | | | | 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
* [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-1253-7220/+162
| | | | | | | | | | 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-024-2/+22
| | | | | | | | 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-199-24/+197
| | | | | | | | 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-053-0/+26
| | | | | | | | 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-301-3/+3
| | | | | | | | | | | 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
* Add checks before pointer dereferencingHansang Bae2019-05-301-1/+5
| | | | | | | | | This change adds checks before dereferencing a pointer returned from a function. Differential Revision: https://reviews.llvm.org/D62224 llvm-svn: 362111
* Fixed third issue reported in https://bugs.llvm.org/show_bug.cgi?id=41584.Andrey Churbanov2019-05-221-5/+0
| | | | | | | | Removed wrong debug assertion. Differential Revision: https://reviews.llvm.org/D62251 llvm-svn: 361408
* [OpenMP] Add implementation to two OMPT API routinesJonathan Peyton2019-05-212-5/+31
| | | | | | | | | | | This change adds implementation to ompt_finalize_tool() and ompt_get_task_memory(). Patch by Hansang Bae Differential Revision: https://reviews.llvm.org/D61657 llvm-svn: 361309
* [OpenMP][OMPT] Fix locking testcases for 32 bit architecturesJoachim Protze2019-05-203-65/+74
| | | | | | | | | | | | | | https://reviews.llvm.org/D58454 did not fix the problem for a typical use case of building LLVM with gcc or icc and then testing with the newly built clang compiler. The compilers do not agree on how to extend a 32-bit pointer to uint64, so make the pointer unsigned first, before adjusting the size. Patch by Joachim Protze Differential Revision: https://reviews.llvm.org/D58506 llvm-svn: 361158
* [OMPT] Handling of the events of initial-task-begin and initial-task-endJoachim Protze2019-05-202-9/+17
| | | | | | | | | | | OpenMP 5.0 says that the callback for the events initial-task-begin and initial-task-end has to be ompt_callback_implicit_task. Patch by Tim Cramer Differential Revision: https://reviews.llvm.org/D58776 llvm-svn: 361157
* Fixed second issue reported in https://bugs.llvm.org/show_bug.cgi?id=41584.Andrey Churbanov2019-05-163-14/+36
| | | | | | | | | | | | | Added synchronization for possible concurrent initialization of mutexes by multiple threads. The need of synchronization caused by commit r357927 which added the use of mutexes at threads movement to/from common pool (earlier the mutexes were used only at suspend/resume). Patch by Johnny Peyton. Differential Revision: https://reviews.llvm.org/D61995 llvm-svn: 360919
* Fix hwloc topology traversal code unable to handle situation where L2 cache ↵Paul Osmialowski2019-05-161-2/+4
| | | | | | | | | | | | | | | | | | | | is common for the packages Currently cores within package that share the same L2 cache are grouped together. The current logic behind this assumes that the L2 cache is always at deeper (or the same) level than the package itself. In case when L2 cache is common for all packages (and the packages are at deeper level than L2 cache) the whole of the further topology discovery fails to find any computational units resulting in following assertion: Assertion failure at kmp_affinity.cpp(715): nActiveThreads == __kmp_avail_proc. OMP: Error #13: Assertion failure at kmp_affinity.cpp(715). This patch adds a bit of a logic that prevents such situation from occurring. Differential Revision: https://reviews.llvm.org/D61796 llvm-svn: 360890
* Fixed https://bugs.llvm.org/show_bug.cgi?id=41584.Andrey Churbanov2019-05-151-2/+0
| | | | | | | | | Removed unconditional and unsafe decrement of counter of active threads in pool at shutdown time. Differential Revision: https://reviews.llvm.org/D61944 llvm-svn: 360784
* Introduce new OpenMP 5.0 depend object type.Andrey Churbanov2019-05-154-0/+5
| | | | | | | | | The implementation should be done by compiler, user can only declare objects of this type and use them in OpenMP directives. Differential Revision: https://reviews.llvm.org/D61860 llvm-svn: 360774
OpenPOWER on IntegriCloud