Commit Graph
17 Commits
Author SHA1 Message Date
Jonathan Peyton dc14379055 Cleanup version symbol macros and attributes/declspecs
1) Get rid of xaliasify, xexpand and xversionify for KMP_EXPAND_NAME and
KMP_VERSION_SYMBOL. KMP_VERSION_SYMBOL is a combination of xaliasify and
xversionify.

2) Put all attribute and __declspec definitions in kmp_os.h

Differential Revision: https://reviews.llvm.org/D39516


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@317636 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-07 23:32:13 +00:00
Joachim Protze ff9d3f5109 Update implementation of OMPT to the specification OpenMP 5.0 Preview 1 (TR4).
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

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@317085 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-01 10:08:30 +00:00
Jonathan Peyton be524d6135 Apply formatting changes
.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


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@316227 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-20 19:30:57 +00:00
Jonathan Peyton 5b33aeb207 Remove unnecessary semicolons
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.


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@314340 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-27 20:36:27 +00:00
Jonathan Peyton e945cccc7e Minor code cleanup of Klocwork issues
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


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@312538 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-05 15:43:58 +00:00
Jonathan Peyton f4926388d0 Remove BUILD_TV
Cleanup code to remove BUILD_TV and unused code bracketed by it.

Patch by Terry Wilmarth

Differential Revision: https://reviews.llvm.org/D36011


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@311114 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-17 19:09:28 +00:00
Andrey Churbanov b88a01f4ef OpenMP RTL cleanup: eliminated warnings with -Wcast-qual, patch 2.
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


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@308164 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-17 09:03:14 +00:00
Andrey Churbanov 1c31fdada0 OpenMP RTL cleanup: eliminated warnings with -Wcast-qual.
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


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@307020 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-03 11:24:08 +00:00
Jonathan Peyton 862483e622 Set affinity to none/false in child processes
Reset affinity to none (false for proc-bind-var) so that threads in the child
processes are not bound tightly, unless the user explicitly sets this in
KMP_AFFINITY/OMP_PROC_BIND, in child processes. This can improve
performance for scripting languages which fork for parallelism like Python's
multiprocessing module.

Differential Revision: https://reviews.llvm.org/D34154


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@305513 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-15 21:51:07 +00:00
Jonathan Peyton a8b80af9fc Reset initial affinity in children processes
If OpenMP is initialized before fork()-ing occurs and affinity is set to
something like compact, then the master thread will be pinned to a single HW
thread/core after initialization. If the master (or any other thread) then
forks N processes, all N processes will then be pinned to that same single HW
thread/core. To reset the affinity for the new child process, the atfork
handler for the child process can call kmp_set_thread_affinity_mask_initial()
to reset its affinity to the initial affinity of the application before it
re-initializes libomp. The parent process will not be affected and still
keeps its affinity setting.

Differential Revision: https://reviews.llvm.org/D34118


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@305306 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-13 17:16:12 +00:00
Jonathan Peyton e703e783e7 Clang-format and whitespace cleanup of source code
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


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@302929 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-12 18:01:32 +00:00
Andrey Churbanov ef71bbcce4 Fix crash in invoking microtask on ios arm64.
Patch by Ni Hui.

Differential Revision: https://reviews.llvm.org/D31923


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@300448 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-17 11:58:20 +00:00
Jonathan Peyton 6168925936 Minor improvement of KMP_YIELD_NOW() macro.
This change slightly improves performance of KMP_YIELD_NOW() macro, by using
_rdtsc() intrinsic function if possible.

Patch by Hansang Bae

Differential Revision: https://reviews.llvm.org/D31008


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@298314 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-20 22:11:31 +00:00
Jonathan Peyton c80d301009 Removing couple unnecessary architecture guards.
This section of code (__kmp_test_then_* functions) is guarded by
(KMP_ARCH_X86 || KMP_ARCH_X86_64) so it does not make sense to have other
architecture guards inside this section.  Non-x86 architectures always
use intrinsics (__sync_*)


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@296525 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-28 21:43:28 +00:00
Jonathan Peyton 1aaa414753 Enable yield cycle on Linux
This change allows the runtime to turn __kmp_yield() on/off repeatedly on Linux.
This feature was removed when disabling monitor thread, but there are
applications that perform better with this feature on.

Patch by Hansang Bae

Differential Revision: https://reviews.llvm.org/D29227


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@295203 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-15 17:19:21 +00:00
Jonathan Peyton 4277fc10ad Follow up to r289732: Update comments in source files to reference .cpp files
Patch by Hansang Bae


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@289739 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-14 23:01:24 +00:00
Jonathan Peyton 844de54c9c Change source files from .c to .cpp
Patch by Hansang Bae

Differential Revision: https://reviews.llvm.org/D26688


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@289732 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-14 22:39:11 +00:00