From: Jonathan Peyton Date: Tue, 18 Oct 2016 17:39:06 +0000 (+0000) Subject: Fix OpenMP 4.0 library build X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0ac7b75f7bf07505169fc919e2004ee32d6cf460;p=platform%2Fupstream%2Fllvm.git Fix OpenMP 4.0 library build Patch by Andrey Churbanov Differential Revision: https://reviews.llvm.org/D25505 llvm-svn: 284499 --- diff --git a/openmp/runtime/src/kmp.h b/openmp/runtime/src/kmp.h index eff3c93..6766fd5 100644 --- a/openmp/runtime/src/kmp.h +++ b/openmp/runtime/src/kmp.h @@ -1746,8 +1746,13 @@ typedef struct kmp_disp { 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 diff --git a/openmp/runtime/src/kmp_tasking.c b/openmp/runtime/src/kmp_tasking.c index 0c806c2..7a74267 100644 --- a/openmp/runtime/src/kmp_tasking.c +++ b/openmp/runtime/src/kmp_tasking.c @@ -576,9 +576,13 @@ __kmp_free_task( kmp_int32 gtid, kmp_taskdata_t * taskdata, kmp_info_t * thread 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;