[Openmp-commits] [openmp] r267785 - Merging r264166:
Jonathan Peyton via Openmp-commits
openmp-commits at lists.llvm.org
Wed Apr 27 13:42:44 PDT 2016
Author: jlpeyton
Date: Wed Apr 27 15:42:43 2016
New Revision: 267785
URL: http://llvm.org/viewvc/llvm-project?rev=267785&view=rev
Log:
Merging r264166:
------------------------------------------------------------------------
r264166 | jlpeyton | 2016-03-23 11:27:25 -0500 (Wed, 23 Mar 2016) | 5 lines
Fix Visual Studio builds
Have Visual Studio use MemoryBarrier() instead of _mm_mfence() and remove
__declspec align attribute from function parameters in kmp_atomic.h
------------------------------------------------------------------------
Modified:
openmp/branches/release_38/ (props changed)
openmp/branches/release_38/runtime/src/kmp_atomic.h
openmp/branches/release_38/runtime/src/kmp_csupport.c
Propchange: openmp/branches/release_38/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Apr 27 15:42:43 2016
@@ -1 +1 @@
-/openmp/trunk:257833,258169,258528,258695,258990,263651
+/openmp/trunk:257833,258169,258528,258695,258990,263651,264166
Modified: openmp/branches/release_38/runtime/src/kmp_atomic.h
URL: http://llvm.org/viewvc/llvm-project/openmp/branches/release_38/runtime/src/kmp_atomic.h?rev=267785&r1=267784&r2=267785&view=diff
==============================================================================
--- openmp/branches/release_38/runtime/src/kmp_atomic.h (original)
+++ openmp/branches/release_38/runtime/src/kmp_atomic.h Wed Apr 27 15:42:43 2016
@@ -35,6 +35,13 @@
#if defined( __cplusplus ) && ( KMP_OS_WINDOWS )
// create shortcuts for c99 complex types
+ // Visual Studio cannot have function parameters that have the
+ // align __declspec attribute, so we must remove it. (Compiler Error C2719)
+ #if KMP_COMPILER_MSVC
+ # undef KMP_DO_ALIGN
+ # define KMP_DO_ALIGN(alignment) /* Nothing */
+ #endif
+
#if (_MSC_VER < 1600) && defined(_DEBUG)
// Workaround for the problem of _DebugHeapTag unresolved external.
// This problem prevented to use our static debug library for C tests
Modified: openmp/branches/release_38/runtime/src/kmp_csupport.c
URL: http://llvm.org/viewvc/llvm-project/openmp/branches/release_38/runtime/src/kmp_csupport.c?rev=267785&r1=267784&r2=267785&view=diff
==============================================================================
--- openmp/branches/release_38/runtime/src/kmp_csupport.c (original)
+++ openmp/branches/release_38/runtime/src/kmp_csupport.c Wed Apr 27 15:42:43 2016
@@ -654,8 +654,10 @@ __kmpc_flush(ident_t *loc)
if ( ! __kmp_cpuinfo.sse2 ) {
// CPU cannot execute SSE2 instructions.
} else {
- #if KMP_COMPILER_ICC || KMP_COMPILER_MSVC
+ #if KMP_COMPILER_ICC
_mm_mfence();
+ #elif KMP_COMPILER_MSVC
+ MemoryBarrier();
#else
__sync_synchronize();
#endif // KMP_COMPILER_ICC
More information about the Openmp-commits
mailing list