diff options
author | Jonathan Peyton <jonathan.l.peyton@intel.com> | 2015-11-16 22:48:41 +0000 |
---|---|---|
committer | Jonathan Peyton <jonathan.l.peyton@intel.com> | 2015-11-16 22:48:41 +0000 |
commit | baaccfab386d07f8f1f85a000523d1a4d4a63ef9 (patch) | |
tree | 8c487383c65f20124cb4192b6fe31685cae686f9 | |
parent | abdb8392281e0188f374152a7dc2033ff6ec691f (diff) | |
download | bcm5719-llvm-baaccfab386d07f8f1f85a000523d1a4d4a63ef9.tar.gz bcm5719-llvm-baaccfab386d07f8f1f85a000523d1a4d4a63ef9.zip |
Add missing KMP_NESTED_HOT_TEAMS guards
llvm-svn: 253264
-rw-r--r-- | openmp/runtime/src/kmp_runtime.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/openmp/runtime/src/kmp_runtime.c b/openmp/runtime/src/kmp_runtime.c index 1df00532dc2..0a5c641e560 100644 --- a/openmp/runtime/src/kmp_runtime.c +++ b/openmp/runtime/src/kmp_runtime.c @@ -2120,12 +2120,16 @@ __kmp_fork_call( // Store master's task_state on stack master_th->th.th_task_state_memo_stack[master_th->th.th_task_state_top] = master_th->th.th_task_state; master_th->th.th_task_state_top++; +#if KMP_NESTED_HOT_TEAMS if (team == master_th->th.th_hot_teams[level].hot_team) { // Restore master's nested state if nested hot team master_th->th.th_task_state = master_th->th.th_task_state_memo_stack[master_th->th.th_task_state_top]; } else { +#endif master_th->th.th_task_state = 0; +#if KMP_NESTED_HOT_TEAMS } +#endif } #if !KMP_NESTED_HOT_TEAMS KMP_DEBUG_ASSERT((master_th->th.th_task_team == NULL) || (team == root->r.r_hot_team)); @@ -5280,7 +5284,9 @@ __kmp_free_team( kmp_root_t *root, kmp_team_t *team USE_NESTED_HOT_ARG(kmp_info team->t.t_threads[f]->th.th_task_team = NULL; } KA_TRACE( 20, ( "__kmp_free_team: T#%d deactivating task_team %p on team %d\n", __kmp_get_gtid(), task_team, team->t.t_id ) ); +#if KMP_NESTED_HOT_TEAMS __kmp_free_task_team( master, task_team ); +#endif team->t.t_task_team[tt_idx] = NULL; } } |