Commit Graph
620 Commits
Author SHA1 Message Date
Jonathan Peyton 03e17bc444 Improve stability of the runtime in parent/child processes
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


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@322202 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-10 18:21:48 +00:00
Joachim Protze 5edd0c003d Missed to add new test case in previous commit
git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@322179 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-10 12:52:34 +00:00
Joachim Protze cd3a757667 [OMPT] Fix ompt_task_data handling in implicit barriers
Changes to task_data in barrier-begin were not visible at barrier-end

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

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@322178 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-10 12:51:27 +00:00
Jonas Hahnfeld 2bfb62fa2e [OMPT] Fix cast and printf of wait_id in lock test
This didn't work on 32 bit platforms.

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

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@322160 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-10 08:10:23 +00:00
Paul Osmialowski 1d709bff68 Fix type mismatch in omp_control_tool() implementation that makes it run incorrectly on 32-bit machines.
Differential Revision: https://reviews.llvm.org/D41854

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@322068 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-09 10:54:06 +00:00
Jonas Hahnfeld a58db48c8c Correct types of pointers to doacross_num_done
This field is defined as kmp_int32, so we should use neither
pointers to kmp_int64 nor 64 bit atomic instructions.
(Found while testing on a Raspberry Pi, 32 bit ARM)

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

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@321964 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-07 16:54:36 +00:00
Jonathan Peyton 382a875814 Fix some comments and formatting in kmp_dispatch.cpp
git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@321831 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-04 23:05:26 +00:00
Jonathan Peyton c2ca3f2e78 Fix trademarks found by scanner
git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@321827 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-04 22:56:47 +00:00
Joachim Protze 85a6d05495 [OMPT] Build runtime with OMPT support by default
This patch enables OMPT by default if version 50 or later is built and the config says, that OMPT will be supported.

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

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@321675 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-02 21:09:00 +00:00
Jonas Hahnfeld 4a0909d000 Unify build documentation and convert to reStructuredText
We now have several options that apply for both libraries and they
shouldn't be documented in multiple files. When already merging
the two Build_With_CMake.txt documents, convert them to
reStructuredText which is used for all of LLVM's documentation.

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

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@321481 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-27 09:15:10 +00:00
Joachim Protze 9976cd64ea [OMPT] Set and reset frame address when creating a task with dependences
As for normal task creation, the task frame addresses need to be stored
for the encountering task.

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

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@321421 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-24 07:30:23 +00:00
Paul Osmialowski abbefd87f0 [OMPT] Add missing initialization in nested_lwt.c test case
Without this initialization this test case tend to fail.

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

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@321379 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-22 19:24:06 +00:00
Joachim Protze aa01de3464 [OMPT] Fix failing test cases for gcc on Ubuntu
The compiler warns that _BSD_SOURCE is deprecated and _DEFAULT_SOURCE should
be used instead. We keep _BSD_SOURCE for older compilers, that don't know
about _DEFAULT_SOURCE.

The linker drops the tool when linking, since there is no visible need for
the library. So we need to tell the linker, that the tool should be linked
anyway.

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

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@321362 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-22 16:40:32 +00:00
Joachim Protze 081e235183 Remove unused positional argument for printf
The format string for hints only prints the second argument (string) and drops
the first argument (hint id). Depending on how you read the POSIX text for
printf, this could be valid. But for practical reason, i.e., unpacking the
va_list passed to printf based on the formating information, it makes sense
to fix the implementation and not pass the id for hint.

Failing testcases were:

misc_bugs/teams-reduction.c
ompt/parallel/not_enough_threads.c

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

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@321361 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-22 16:40:26 +00:00
Joachim Protze 00e405ede6 Add missing test case from D41171 commit
git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@321270 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-21 14:36:36 +00:00
Joachim Protze 62dafa36f3 [OMPT] Add missing ompt_get_num_procs function
This function is defined in OpenMP-TR6 section 4.1.5.1.6
The functions was not implemented yet.

Since ompt-functions can only be called after the runtime was initialized and
has loaded a tool, it can assume the runtime to be initialized. In contrast
to omp_get_num_procs which needs to check whether the runtime is initialized.

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

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@321269 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-21 14:36:30 +00:00
Joachim Protze 623b98e440 [OMPT] Fix return address handling in a few GOMP interface methods
This revision fixes failing testcases with parallel for loops and the gomp
interface. The return address needs to be stored at entry to runtime.
The storage is cleared on usage, so we need to update the storage before
calling again internal functions, that will trigger event callbacks.

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

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@321265 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-21 13:55:39 +00:00
Joachim Protze 617a41cdba [OMPT] Handle null pointer in set_callback to improve performance
We use the bitmap ompt_enabled thoughout the runtime, to avoid loading the
vector of callback functions when testing if specific code should be executed.
Before invoking an event callback function, the pointer is tested for NULL.

This revision resets the corresponding bit in ompt_enabled to 0 if
NULL is passed in set_callback.

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

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@321264 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-21 13:55:34 +00:00
Joachim Protze df39d67d94 [OMPT] Use frames at different level when using clang version 5 or higher with debug flag
Clang 5 or higher adds an intermediate function call in certain cases when
compiling with debug flag. This revision updates the testcases to work
correctly.

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

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@321263 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-21 13:55:29 +00:00
Joachim Protze ad36fb50c7 [OMPT] Add annotations to testcases that are expected to fail when using certain compilers
Reasons for expected failures are mainly bugs when using lables in OpenMP regions
or missing support of some OpenMP features.
For some worksharing clauses, support to distinguish the kind of workshare was
added just recently.

If an issue was fixed in a minor release version of a compiler, we flag the
test as unsupported for this compiler version to avoid false positives.
Same for fixes that where backported to older compiler versions.

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

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@321262 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-21 13:55:16 +00:00
Paul Osmialowski f8f48669a0 [AArch64] add required arch specific code for running OMPT test cases
Differential Revision: https://reviews.llvm.org/D41482

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@321258 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-21 12:33:31 +00:00
Dimitry Andric ebc0015ad7 Fix more inconsistent line endings. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@321016 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-18 19:46:56 +00:00
Paul Osmialowski 7843965571 [AArch64] fix an issue with older /proc/cpuinfo layout
There are two /proc/cpuinfo layots in use for AArch64: old and new.
The old one has all 'processor : n' lines in one section, hence
checking for duplications does not make sense.

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

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@320593 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-13 16:12:24 +00:00
Jonas Hahnfeld 3cee55228e Use hyperbarrier by default on all architectures
All architectures except x86_64 used the linear barrier implementation
by default which doesn't give good performance for a larger number
of threads.

Improvements for PARALLEL overhead (EPCC) with this patch on a Power8
system (2 sockets x 10 cores x 8 threads, OMP_PLACES=cores)

 20 threads:  4.55us -> 3.49us
 40 threads:  8.84us -> 4.06us
 80 threads: 19.18us -> 4.74us
160 threads: 54.22us -> 6.73us

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

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@320152 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-08 15:07:07 +00:00
Jonas Hahnfeld a0542f7865 Fix thread affinity on non-x86 Linux
To make thread affinity work according to the OpenMP spec, the
runtime needs information about the hardware topology. On Linux
the default way is to parse /proc/cpuinfo which contains this
information for x86 machines but (at least) not for AArch64 and
Power architectures.

Fortunately, there is a different code path which is able to get
that data from sysfs. The needed patch has landed in 2006 for
Linux 2.6.16 which is safe to assume nowadays (even RHEL 5 had
a kernel version derived from 2.6.18, and we are now at RHEL 7!).

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

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@320151 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-08 15:07:05 +00:00
Jonas Hahnfeld c549ebcc76 Add missing memory barrier for queuing locks
Otherwise I see hangs in the omp_single_copyprivate test when
compiling in release mode. With the debug assertions, I get a
failure `head > 0 && tail > 0`.

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

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@320150 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-08 15:07:02 +00:00
Jonathan Peyton 74e9371341 [OpenMP] Add entry for Intel Compiler 18
Patch by Simon Convent

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


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@319961 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-06 21:15:28 +00:00
Jonathan Peyton 865d07f101 Eliminate double printing of verbose affinity settings
Redundant extra verbose output of binding to full mask in case
affinity=balanced or OMP_PLACES=<any> or OMP_PROC_BIND=<any>

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


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@319960 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-06 21:07:41 +00:00
Jonathan Peyton 441b330c98 Trivial enum fix
This change is a trivial fix for enums that removes specification of "last" or
"upper" values, or other boundary values. This simplifies the code in places,
and results in never needing to update the "upper" values again.

Patch by Terry Wilmarth

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


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@319957 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-06 21:02:15 +00:00
Jonas Hahnfeld 93e7a82b80 Fix alignment in teams-reduction.c test
The runtime will use the global kmp_critical_name as a lock and
tries to atomically store a pointer in there. This will fail
if the global is only aligned by 4 bytes, the size of one int32_t
element. Use a union to ensure the global is aligned to the size
of a pointer on the current platform.

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@319811 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-05 18:45:21 +00:00
Jonas Hahnfeld 3342a84ab0 Fix PR30890: Reduction across teams hangs
__kmpc_reduce_nowait() correctly swapped the teams for reductions
in a teams construct. Apply the same logic to __kmpc_reduce() and
__kmpc_reduce_end().

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

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@319788 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-05 16:51:24 +00:00
Jonas Hahnfeld d180ffbb82 [CMake] Detect information about test compiler
Perform a nested CMake invocation to avoid writing our own parser
for compiler versions when we are not testing the in-tree compiler.
Use the extracted information to mark a test as unsupported that
hangs with Clang prior to version 4.0.1 and restrict tests for
libomptarget to Clang version 6.0.0 and later.

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

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@319448 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-30 17:08:31 +00:00
Andrey Churbanov 1696d28687 Extension of HWLOC topology discovery with NUMA nodes and tiles
Patch by Olga Malysheva

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


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@319422 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-30 11:51:47 +00:00
Jonathan Peyton 9cdb2558bd Make kmp_r_sched_t into a union
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


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@319379 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-29 22:47:52 +00:00
Jonathan Peyton b77eb553e2 Fix aligned memory allocation in the stub library
kmp_aligned_malloc() always returned NULL on Windows (stub library only)
that may cause Fortran application crash.  With this change all memory
allocation functions were fixed to use aligned{m,re,rec}alloc() to
allocate/reallocate memory. To deallocate that memory _aligned_free() is
used in kmp_free().

Patch by Olga Malysheva

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


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@319375 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-29 22:29:38 +00:00
Jonathan Peyton e9075904db Warning is emitted when tiles are requested but cannot be used
Added two warnings:
1) Before building the topology map check if tiles are requested but the
   topo method is not hwloc;
2) After building the topology map check if tiles are requested but not
   detected by the library.

Patch by Olga Malysheva

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


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@319374 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-29 22:27:18 +00:00
Jonathan Peyton 61fa396215 Fix types of Fortran array elements
Fortran array elements made default integer in OMP_GET_PLACE_PROC_IDS and
OMP_GET_PARTITION_PLACE_NUMS subroutines, otherwise call to them produces
incorrect result.

Patch by Olga Malysheva

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


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@319372 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-29 22:23:44 +00:00
Jonas Hahnfeld a1b4de8ad3 [CMake] Refactor testing infrastructure
The code for the two OpenMP runtime libraries was very similar.
Move to common CMake file that is included and provides a simple
interface for adding testsuites. Also add a common check-openmp
target that runs all testsuites that have been registered.

Note that this renames all test options to the common OPENMP
namespace, for example OPENMP_TEST_C_COMPILER instead of
LIBOMP_TEST_COMPILER and so on.

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

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@319343 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-29 19:31:52 +00:00
Jonas Hahnfeld 41aebf5e26 [CMake] Refactor common settings and flags
These are needed by both libraries, so we can do that in a
common namespace and unify configuration parameters.
Also make sure that the user isn't requesting libomptarget
if the library cannot be built on the system. Issue an error
in that case.

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

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@319342 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-29 19:31:48 +00:00
Jonas Hahnfeld b5f5bf534a [CMake] Disallow direct configuration
As a first step, this allows us to generalize the detection of
standalone builds and make it fully compatible when building in
llvm/runtimes/ which automatically sets OPENMP_STANDLONE_BUILD.

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

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@319341 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-29 19:31:43 +00:00
Sylvestre Ledru 9c6a06ae28 doxygen: disable the html timestamp: this is breaking the reproducible build of openmp
git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@318978 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-25 14:12:33 +00:00
Jonas Hahnfeld 9da031d4d2 Fix for OMP doacross implementation on Power
Power has a weak consistency model so we need memory barriers to
make writes (both from runtime and from user code) available for
all threads.

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

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@318848 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-22 17:15:20 +00:00
Andrey Churbanov 0b53bf7427 Fixed OMP doacross implementation on 32-bit platforms.
Differential Revision: https://reviews.llvm.org/D40171


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@318658 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-20 16:00:42 +00:00
Jonas Hahnfeld 2653e740fc [OMPT] Fix inaccuracies in worksharing tests
These tests were failing rarely on my MacBook when there was some
activity in the background. Read: one of a thousand executions?

 * sections.c missed the sorting based on thread ids. This worked
   as long as the master thread finished its section before the
   worker thread started the second one but failed if the master
   thread was put to sleep by the OS.
 * The checks in single.c assumed that the master thread executes
   the single region which works most of the time because it is
   usually faster than the newly spawned worker thread.

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

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@318527 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-17 15:26:44 +00:00
Andrey Churbanov 73ebd2c677 Exclude untied tasks from checking of task scheduling constraint (TSC).
This can improve performance of tests with untied tasks.

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


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@318388 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 10:45:07 +00:00
Jonas Hahnfeld e139f2e769 [OMPT] Provide initialization for Mac OS X
Traditionally, the library had a weak symbol for ompt_start_tool()
that served as fallback and disabled OMPT if called. Tools could
provide their own version and replace the default implementation
to register callbacks and lookup functions. This mechanism has
worked reasonably well on Linux systems where this interface was
initially developed.

On Darwin / Mac OS X the situation is a bit more complicated and
the weak symbol doesn't work out-of-the-box. In my tests, the
library with the tool needed to link against the OpenMP runtime
to make the process work. This would effectively mean that a tool
needed to choose a runtime library whereas one design goal of the
interface was to allow tools that are agnostic of the runtime.

The solution is to use dlsym() with the argument RTLD_DEFAULT so
that static implementations of ompt_start_tool() are found in the
main executable. This works because the linker on Mac OS X includes
all symbols of an executable in the global symbol table by default.
To use the same code path on Linux, the application would need to
be built with -Wl,--export-dynamic. To avoid this restriction, we
continue to use weak symbols on Linux systems as before.

Finally this patch extends the existing test to cover all possible
ways of initializing the tool as described by the standard. It
also fixes ompt_finalize() to not call omp_get_thread_num() when
the library is shut down which resulted in hangs on Darwin.
The changes have been tested on Linux to make sure that it passes
the current tests as well as the newly extended one.

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

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@317980 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-11 13:59:48 +00:00
Joachim Protze 50aea48c65 [OMPT] Fix assertion for OpenMP code generated with outdated compilers
For up-to-date compilers, this assertion is reasonable, but it breaks
compatibility with the typical compiler installed on most systems.
This patch changes the default value to what we had when there was no
compiler support. A warning about the outdated compiler is printed during
runtime, when this point is reached.

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

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@317928 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-10 21:07:01 +00:00
Jonas Hahnfeld 67a8cd77e9 [OMPT] Purge OMPT_BLAME and OMPT_TRACE
This was replace by OMPT_OPTIONAL.

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@317890 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-10 15:17:57 +00:00
Jonas Hahnfeld 3f9960d5d7 Add const to some variables to avoid const_casts
In these places the const attribute seems correct and doesn't
need any other change, so let's do it.

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

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@317798 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-09 15:52:29 +00:00
Jonas Hahnfeld 11bae5e490 Remove const from variables with dynamic memory
Allocated memory is typically not 'const' if it needs to be freed.
This patch removes around 50 wrong const attributes, modifies the
corresponding functions and finally gets rid of some const_casts.
These have especially been strange for __kmp_str_fname_free() that
added a 'const' to call __kmp_str_free() which removed it again.

Two minor cleanups that I performed in this process:
 * __kmp_tool_libraries now lives in kmp_settings.cpp as it is
   used nowhere else.
 * __kmp_msg_empty was removed as it was never used and Clang
   now complained that it was assigned a string literal that
   is 'const char *'.

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

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@317797 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-09 15:52:25 +00:00