summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/src/kmp_runtime.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix for Fix for https://bugs.llvm.org/show_bug.cgi?id=36705.Andrey Churbanov2018-03-191-0/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D44637 llvm-svn: 327875
* Improve OpenMP threadprivate implementation.Andrey Churbanov2018-03-051-84/+65
| | | | | | | | Patch by Terry Wilmarth Differential Revision: https://reviews.llvm.org/D41914 llvm-svn: 326733
* [OMPT] Fix parallel_data in implicit barrier-endJonas Hahnfeld2018-02-231-9/+7
| | | | | | | | | This is required to be NULL for implicit barriers at the end of a parallel region. Noticed in review of D43191. Differential Revision: https://reviews.llvm.org/D43308 llvm-svn: 325922
* Simplify __kmp_expand_threadsJonathan Peyton2018-01-101-37/+12
| | | | | | | | | | | | | | This change simplifies __kmp_expand_threads to take a single argument. Previously, it allowed two arguments and had logic to decide on different potential expansion sizes. However, no calls to __kmp_expand_threads in the runtime make use of this extra logic. Thus the extra argument and logic is removed here. Patch by Terry Wilmarth Differential Revision: https://reviews.llvm.org/D41836 llvm-svn: 322204
* Minor code cleanupJonathan Peyton2018-01-101-0/+8
| | | | | | | | Patch by Terry Wilmarth Differential Revision: https://reviews.llvm.org/D41831 llvm-svn: 322203
* Improve stability of the runtime in parent/child processesJonathan Peyton2018-01-101-1/+1
| | | | | | | | | | | | | | | This change improves stability of the runtime when the application forks child processes. Acquiring/releasing __kmp_initz_lock and __kmp_forkjoin_lock in the atfork handlers insures that the actual fork does not occur while those two locks are held, and __kmp_itt_reset() reverts the itt's global state to the initial state which also initializes the mutex stored in the global state. Some missing initialization code was also inserted in the child's atfork handler. Patch by Hansang Bae Differential Revision: https://reviews.llvm.org/D41462 llvm-svn: 322202
* [OMPT] Fix ompt_task_data handling in implicit barriersJoachim Protze2018-01-101-1/+0
| | | | | | | | Changes to task_data in barrier-begin were not visible at barrier-end Differential Revision: https://reviews.llvm.org/D41176 llvm-svn: 322178
* Fix trademarks found by scannerJonathan Peyton2018-01-041-2/+2
| | | | llvm-svn: 321827
* Make kmp_r_sched_t into a unionJonathan Peyton2017-11-291-26/+17
| | | | | | | | | | | This change makes kmp_r_sched_t type into a union for simpler comparisons and assignments Patch by Terry Wilmarth Differential Revision: https://reviews.llvm.org/D40374 llvm-svn: 319379
* Rename fields of ompt_frame_tJoachim Protze2017-11-051-16/+13
| | | | | | | | | | This is part of the renaming of data types from OpenMP TR4 to TR6 Patch by Simon Convent Differential Revision: https://reviews.llvm.org/D39326 llvm-svn: 317435
* Revert "Rename fields of ompt_frame_t"Jonas Hahnfeld2017-11-031-13/+16
| | | | | | This reverts commit r317338 which discarded some recent commits. llvm-svn: 317347
* Revert "Updating implementation of OMPT as specified in OpenMP 5.0 Preview 2 ↵Jonas Hahnfeld2017-11-031-4/+3
| | | | | | | | (TR6)" This reverts commit r317339 which discarded some recent commits. llvm-svn: 317346
* Updating implementation of OMPT as specified in OpenMP 5.0 Preview 2 (TR6)Joachim Protze2017-11-031-3/+4
| | | | | | | | | | | The TR6 document is expected to be publically released around November 15. This patch does not implement OMPT for libomptarget. Patch by Simon Convent and Joachim Protze Differential Revision: https://reviews.llvm.org/D39182 llvm-svn: 317339
* Rename fields of ompt_frame_tJoachim Protze2017-11-031-16/+13
| | | | | | | | | | This is part of the renaming of data types from OpenMP TR4 to TR6 Patch by Simon Convent Differential Revision: https://reviews.llvm.org/D39326 llvm-svn: 317338
* Update implementation of OMPT to the specification OpenMP 5.0 Preview 1 (TR4).Joachim Protze2017-11-011-244/+297
| | | | | | | | | | | | | | The code is tested to work with latest clang, GNU and Intel compiler. The implementation is optimized for low overhead when no tool is attached shifting the cost to execution with tool attached. This patch does not implement OMPT for libomptarget. Patch by Simon Convent and Joachim Protze Differential Revision: https://reviews.llvm.org/D38185 llvm-svn: 317085
* Apply formatting changesJonathan Peyton2017-10-201-31/+30
| | | | | | | | | | .clang-format's comments are removed and a (hopefully) final set of formatting changes are applied. Differential Revision: https://reviews.llvm.org/D38837 Differential Revision: https://reviews.llvm.org/D38920 llvm-svn: 316227
* Remove unnecessary semicolonsJonathan Peyton2017-09-271-53/+51
| | | | | | | | Removes semicolons after if {} blocks, function definitions, etc. I was able to apply the large OMPT patch cleanly on top of this one with no conflicts. llvm-svn: 314340
* Remove unused t_single_lockJonathan Peyton2017-09-261-1/+0
| | | | | | Add padding inside team structure to keep same structure size. llvm-svn: 314242
* Minor code cleanup of Klocwork issuesJonathan Peyton2017-09-051-14/+13
| | | | | | | | | | | Minor code cleanup of Klocwork issues. Fatal messages are given no return attribute. Define and use KMP_NORETURN to work for multiple C++ versions. Patch by Terry Wilmarth Differential Revision: https://reviews.llvm.org/D37275 llvm-svn: 312538
* Remove BUILD_TVJonathan Peyton2017-08-171-4/+0
| | | | | | | | | | Cleanup code to remove BUILD_TV and unused code bracketed by it. Patch by Terry Wilmarth Differential Revision: https://reviews.llvm.org/D36011 llvm-svn: 311114
* OMP_PROC_BIND: better spreadPaul Osmialowski2017-08-101-42/+108
| | | | | | | | | This change improves the way threads are spread across cores when OMP_PROC_BIND=spread is set and no unusual affinity masks are in use. Differential Revision: https://reviews.llvm.org/D36510 llvm-svn: 310670
* Add new envirable KMP_TEAMS_THREAD_LIMITJonathan Peyton2017-08-021-8/+12
| | | | | | | | | | | | | | | | | | | | This change adds a new environment variable, KMP_TEAMS_THREAD_LIMIT, which is used to set a new global variable, __kmp_teams_max_nth, which is checked when determining the size and quantity of teams that will be created in the teams construct. Specifically, it is a limit on the total number of threads in a given teams construct. It differentiates the limits for the teams construct from the limits for regular parallel regions (KMP_DEVICE_THREAD_LIMIT/__kmp_max_nth and OMP_THREAD_LIMIT/__kmp_cg_max_nth). When each individual team is formed, it is still subject to those limits. After the clauses to the teams construct are parsed and calculated, we check to make sure we are within this limit, and if not, reduce num_threads per team and/or number of teams, accordingly. The default value is set to the number of available processors on the system. Patch by Terry Wilmarth Differential Revision: https://reviews.llvm.org/D36009 llvm-svn: 309874
* Fix implementation of OMP_THREAD_LIMITJonathan Peyton2017-07-271-6/+44
| | | | | | | | | | | | | | | | | | This change fixes the implementation of OMP_THREAD_LIMIT. The implementation of this previously was not restricted to a contention group (but it should be, according to the spec), and this is fixed here. A field is added to root thread to store a counter of the threads in the contention group. An extra check is added when reserving threads for a parallel region that checks this variable and compares to threadlimit-var, which is implemented as a new global variable, kmp_cg_max_nth. Associated settings changes were also made, and clean up of comments that referred to OMP_THREAD_LIMIT, but should refer to the new KMP_DEVICE_THREAD_LIMIT (added in an earlier patch). Patch by Terry Wilmarth Differential Revision: https://reviews.llvm.org/D35912 llvm-svn: 309319
* Introduce KMP_DEVICE_THREAD_LIMITJonathan Peyton2017-07-261-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | This change drops in KMP_DEVICE_THREAD_LIMIT to replace KMP_MAX_THREADS. It's possible there will eventually be a OMP_DEVICE_THREAD_LIMIT, and we need something to distinguish from OMP_THREAD_LIMIT, which is currently implemented incorrectly (the fix for that will be added soon in a separate patch). KMP_ALL_THREADS is deprecated here, but we can keep the "all" option on KMP_DEVICE_THREAD_LIMIT to support that functionality. KMP_DEVICE_THREAD_LIMIT now has priority over its deprecated rival KMP_ALL_THREADS. I also cleaned up some comments that incorrectly referred to non-existent kmp_max_threads variable instead of kmp_max_nth. I've left the name of where this setting eventually ends up as __kmp_max_nth, for now. This change does not change much in the way of functionality. It does NOT change OMP_THREAD_LIMIT. It's just cleaning up and setting up for that. Patch by Terry Wilmarth Differential Revision: https://reviews.llvm.org/D35860 llvm-svn: 309168
* OpenMP RTL cleanup: eliminated warnings with -Wcast-qual, patch 2.Andrey Churbanov2017-07-171-1/+1
| | | | | | | | | Changes are: got all atomics to accept volatile pointers that allowed to simplify many type conversions. Windows specific code fixed correspondingly. Differential Revision: https://reviews.llvm.org/D35417 llvm-svn: 308164
* OpenMP RTL cleanup: eliminated warnings with -Wcast-qual.Andrey Churbanov2017-07-031-12/+11
| | | | | | | | | | | Changes are: replaced C-style casts with cons_cast and reinterpret_cast; type of several counters changed to signed; type of parameters of 32-bit and 64-bit AND and OR intrinsics changes to unsigned; changed files formatted using clang-format version 3.8.1. Differential Revision: https://reviews.llvm.org/D34759 llvm-svn: 307020
* Replace platform macro with KMP_MIC_SUPPORTEDJonathan Peyton2017-06-131-7/+7
| | | | | | Differential Revision: https://reviews.llvm.org/D34119 llvm-svn: 305307
* OpenMP 4.5: implemented support of schedule(simd:guided) andAndrey Churbanov2017-06-051-1/+1
| | | | | | | | | | schedule(simd:runtime) - library part. Compiler generation should use newly introduced scheduling kinds kmp_sch_guided_simd = 46, kmp_sch_runtime_simd = 47, as parameters to __kmpc_dispatch_init_* entries. Differential Revision: https://reviews.llvm.org/D31602 llvm-svn: 304724
* Re-enable assertion after the problem that caused it to be hit had been fixedAndrey Churbanov2017-06-011-5/+0
| | | | | | Differential Revision: https://reviews.llvm.org/D31421 llvm-svn: 304443
* Fix minor formatting issuesJonathan Peyton2017-06-011-29/+22
| | | | | | | | | | | Some code was restructured to move it under KMP_DEBUG. The rest is formatting changes to fix some things broken by clang-format Patch by Terry Wilmarth Differential Revision: https://reviews.llvm.org/D33744 llvm-svn: 304438
* Clang-format and whitespace cleanup of source codeJonathan Peyton2017-05-121-6134/+6048
| | | | | | | | | | | | | This patch contains the clang-format and cleanup of the entire code base. Some of clang-formats changes made the code look worse in places. A best effort was made to resolve the bulk of these problems, but many remain. Most of the problems were mangling line-breaks and tabbing of comments. Patch by Terry Wilmarth Differential Revision: https://reviews.llvm.org/D32659 llvm-svn: 302929
* Reset cancellation status for 'parallel', 'sections' and 'for' constracts.Olga Malysheva2017-04-041-0/+3
| | | | | | | | | Without this fix cancellation status for parallel, sections and for persists across construct boundaries. Differential Revision: https://reviews.llvm.org/D31419 llvm-svn: 299434
* Fix for bug https://llvm.org/bugs/show_bug.cgi?id=30889Andrey Churbanov2017-03-281-1/+1
| | | | | | | | Condition adjusted for Debug assertion. Differential Revision: https://reviews.llvm.org/D29638 llvm-svn: 298915
* Fixed intermittent hang on tests with "target teams if(0)" construct with no ↵Andrey Churbanov2017-03-211-6/+10
| | | | | | | | parallel inside. Differential Revision: https://reviews.llvm.org/D29597 llvm-svn: 298373
* OpenMP version 5.0 addedJonathan Peyton2017-03-061-1/+3
| | | | | | | | | | | | Add build option LIBOMP_OMP_VERSION=50, 5.0 headers, and add the year/month associated with OpenMP 5.0 in relevant source locations. Also, remove the deprecated LIBOMP_OMP_VERSION=41 option. Patch by Olga Malysheva Differential Revision: https://reviews.llvm.org/D30450 llvm-svn: 297083
* Fix a race in shutdown when tasking is used.Andrey Churbanov2017-02-061-1/+26
| | | | | | | | Patch by Terry Wilmarth. Differential Revision: https://reviews.llvm.org/D28377 llvm-svn: 294214
* Fix small memory leak regarding __kmp_nested_proc_bindJonathan Peyton2017-01-181-0/+4
| | | | | | | There is no corresponding free() for this expandable array. The logic is added in __kmp_cleanup() next to the freeing of __kmp_nested_nth. llvm-svn: 292348
* Follow up to r289732: Update comments in source files to reference .cpp filesJonathan Peyton2016-12-141-1/+1
| | | | | | Patch by Hansang Bae llvm-svn: 289739
* Change source files from .c to .cppJonathan Peyton2016-12-141-0/+7683
Patch by Hansang Bae Differential Revision: https://reviews.llvm.org/D26688 llvm-svn: 289732
OpenPOWER on IntegriCloud