Commit Graph

6 Commits

Author SHA1 Message Date
Jonathan Peyton ac7ba406ed Fix bugs in TAS and futex lock
* Incorrect lock value written in __kmp_test_futex_lock
* Incorrect lock value check in tas/futex lock with USE_LOCK_PROFILE on

Patch by Hansang Bae

llvm-svn: 274053
2016-06-28 19:37:24 +00:00
Jonathan Peyton e119e8e5b5 Remove redundant %libomp-compile step from test/lock/omp_lock.c
llvm-svn: 273576
2016-06-23 16:18:59 +00:00
Jonathan Peyton 9d2412c9e5 Apply the KMP_USE_FUTEX feature macro everywhere
llvm-svn: 273438
2016-06-22 16:35:12 +00:00
Jonathan Peyton 3731076997 Remove trailing whitespace from tests
llvm-svn: 269841
2016-05-17 21:08:52 +00:00
Jonathan Peyton 377aa40d84 Exponential back off logic for test-and-set lock
This change adds back off logic in the test and set lock for better contended
lock performance. It uses a simple truncated binary exponential back off
function. The default back off parameters are tuned for x86.

The main back off logic has a two loop structure where each is controlled by a
user-level parameter:
max_backoff - limits the outer loop number of iterations.
    This parameter should be a power of 2.
min_ticks - the inner spin wait loop number of "ticks" which is system
    dependent and should be tuned for your system if you so choose.
    The "ticks" on x86 correspond to the time stamp counter,
    but on other architectures ticks is a timestamp derived
    from gettimeofday().

The user can modify these via the environment variable:
KMP_SPIN_BACKOFF_PARAMS=max_backoff[,min_ticks]
Currently, since the default user lock is a queuing lock,
one would have to also specify KMP_LOCK_KIND=tas to use the test-and-set locks.

Differential Revision: http://reviews.llvm.org/D19020

llvm-svn: 266329
2016-04-14 16:00:37 +00:00
Jonathan Peyton 614c7ef81c OpenMP Initial testsuite change to purely llvm-lit based testing
This change introduces a check-libomp target which is based upon llvm's lit
test infrastructure. Each test (generated from the University of Houston's
OpenMP testsuite) is compiled and then run. For each test, an exit status of 0
indicates success and non-zero indicates failure. This way, FileCheck is not
needed. I've added a bit of logic to generate symlinks (libiomp5 and libgomp)
in the build tree so that gcc can be tested as well.  When building out-of-
tree builds, the user will have to provide llvm-lit either by specifying
-DLIBOMP_LLVM_LIT_EXECUTABLE or having llvm-lit in their PATH.

Differential Revision: http://reviews.llvm.org/D11821

llvm-svn: 248211
2015-09-21 20:41:31 +00:00