From 644f4e3d11500d4795047a291bd394407bce850b Mon Sep 17 00:00:00 2001 From: Jonathan Peyton Date: Fri, 28 Jul 2017 19:05:17 +0000 Subject: [PATCH] Fix comments and build messages concerning TSX llvm-svn: 309418 --- openmp/runtime/Build_With_CMake.txt | 7 ++++--- openmp/runtime/CMakeLists.txt | 7 ++++--- openmp/runtime/src/kmp_os.h | 3 ++- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/openmp/runtime/Build_With_CMake.txt b/openmp/runtime/Build_With_CMake.txt index 1b1d3b528764..1739e7783f20 100644 --- a/openmp/runtime/Build_With_CMake.txt +++ b/openmp/runtime/Build_With_CMake.txt @@ -127,9 +127,10 @@ Intel(R) MIC Architecture, can be knf or knc. Should the Fortran modules be created (requires Fortran compiler) -DLIBOMP_USE_ADAPTIVE_LOCKS=on|off -Should adaptive (TSX-based) locks be included? -These are x86 specific. This feature is turned on by default -for i386 and x86_64. Otherwise, it is turned off. +Should adaptive (Intel(R) Transactional Synchronization Extensions +(Intel(R) TSX) based) locks be included? These are x86 specific. +This feature is turned on by default for IA-32 architecture and +Intel(R) 64 architecture. Otherwise, it is turned off. -DLIBOMP_USE_INTERNODE_ALIGNMENT=off|on Should 4096-byte alignment be used for certain data structures? diff --git a/openmp/runtime/CMakeLists.txt b/openmp/runtime/CMakeLists.txt index 555fd9f7decd..29e1584ea2e4 100644 --- a/openmp/runtime/CMakeLists.txt +++ b/openmp/runtime/CMakeLists.txt @@ -279,12 +279,13 @@ set(LIBOMP_USE_DEBUGGER FALSE CACHE BOOL set(LIBOMP_USE_STDCPPLIB FALSE CACHE BOOL "Should we link to C++ library?") -# TSX (x86) based locks have __asm code which can be troublesome for some compilers. +# Intel(R) Transactional Synchronization Extensions (Intel(R) TSX) based locks have +# __asm code which can be troublesome for some compilers. This feature is also x86 specific. # TODO: Make this a real feature check set(LIBOMP_USE_ADAPTIVE_LOCKS "${LIBOMP_HAVE_ADAPTIVE_LOCKS}" CACHE BOOL - "Should TSX-based lock be compiled (adaptive lock in kmp_lock.cpp). These are x86 specific.") + "Should Intel(R) TSX lock be compiled (adaptive lock in kmp_lock.cpp). These are x86 specific.") if(LIBOMP_USE_ADAPTIVE_LOCKS AND (NOT LIBOMP_HAVE_ADAPTIVE_LOCKS)) - libomp_error_say("Adaptive locks (TSX) functionality requested but not available") + libomp_error_say("Adaptive locks (Intel(R) TSX) functionality is only supported on x86 Architecture") endif() # - stats-gathering enables OpenMP stats where things like the number of diff --git a/openmp/runtime/src/kmp_os.h b/openmp/runtime/src/kmp_os.h index b8ae152f6094..b1af5109b919 100644 --- a/openmp/runtime/src/kmp_os.h +++ b/openmp/runtime/src/kmp_os.h @@ -834,7 +834,8 @@ typedef void (*microtask_t)(int *gtid, int *npr, ...); #define KMP_USE_DYNAMIC_LOCK 1 #endif -// Enable TSX if dynamic user lock is turned on +// Enable Intel(R) Transactional Synchronization Extensions (Intel(R) TSX) if +// dynamic user lock is turned on #if KMP_USE_DYNAMIC_LOCK // Visual studio can't handle the asm sections in this code #define KMP_USE_TSX (KMP_ARCH_X86 || KMP_ARCH_X86_64) && !KMP_COMPILER_MSVC