[Openmp-commits] [PATCH] D25505: Cleanup: fixed OpenMP 4.0 library build

Andrey Churbanov via Openmp-commits openmp-commits at lists.llvm.org
Wed Oct 12 02:02:25 PDT 2016


AndreyChurbanov created this revision.
AndreyChurbanov added reviewers: tlwilmar, jlpeyton.
AndreyChurbanov added a subscriber: openmp-commits.
AndreyChurbanov set the repository for this revision to rL LLVM.

Fixed OpenMP 4.0 library build (-DLIBOMP_OMP_VERSION=40).


Repository:
  rL LLVM

https://reviews.llvm.org/D25505

Files:
  src/kmp.h
  src/kmp_tasking.c


Index: src/kmp_tasking.c
===================================================================
--- src/kmp_tasking.c
+++ src/kmp_tasking.c
@@ -576,9 +576,13 @@
 static void
 __kmp_free_task_and_ancestors( kmp_int32 gtid, kmp_taskdata_t * taskdata, kmp_info_t * thread )
 {
+#if OMP_45_ENABLED
     // Proxy tasks must always be allowed to free their parents
     // because they can be run in background even in serial mode.
     kmp_int32 task_serial = taskdata->td_flags.task_serial && !taskdata->td_flags.proxy;
+#else
+    kmp_int32 task_serial = taskdata->td_flags.task_serial;
+#endif
     KMP_DEBUG_ASSERT( taskdata -> td_flags.tasktype == TASK_EXPLICIT );
 
     kmp_int32 children = KMP_TEST_THEN_DEC32( (kmp_int32 *)(& taskdata -> td_allocated_child_tasks) ) - 1;
Index: src/kmp.h
===================================================================
--- src/kmp.h
+++ src/kmp.h
@@ -1746,8 +1746,13 @@
         kmp_lock_t          *th_steal_lock;       // lock used for chunk stealing (8-byte variable)
     };
 #else
+#if KMP_STATIC_STEAL_ENABLED
+    kmp_lock_t              *th_steal_lock;       // lock used for chunk stealing (8-byte variable)
+    void* dummy_padding[1]; // make it 64 bytes on Intel(R) 64
+#else
     void* dummy_padding[2]; // make it 64 bytes on Intel(R) 64
 #endif
+#endif
 #if KMP_USE_INTERNODE_ALIGNMENT
     char more_padding[INTERNODE_CACHE_LINE];
 #endif


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25505.74342.patch
Type: text/x-patch
Size: 1393 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20161012/d7502df5/attachment.bin>


More information about the Openmp-commits mailing list