Fix OpenMP 4.0 library build

Patch by Andrey Churbanov

Differential Revision: https://reviews.llvm.org/D25505

llvm-svn: 284499
This commit is contained in:
Jonathan Peyton 2016-10-18 17:39:06 +00:00
parent a2778b2591
commit 0ac7b75f7b
2 changed files with 9 additions and 0 deletions

View File

@ -1745,9 +1745,14 @@ typedef struct kmp_disp {
kmp_int64 *th_doacross_info; // info on loop bounds
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

View File

@ -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;