Put taskdata variables under KMP_DEBUG guards.

These variables are only used in the TRACE macros and
so don't need to be defined unless compiling in debug mode.

llvm-svn: 246067
This commit is contained in:
Jonathan Peyton 2015-08-26 20:02:21 +00:00
parent 7732ae4a4f
commit d2eb3c73ad
2 changed files with 6 additions and 4 deletions

View File

@ -287,9 +287,10 @@ __kmp_check_deps ( kmp_int32 gtid, kmp_depnode_t *node, kmp_task_t *task, kmp_de
kmp_int32 ndeps_noalias, kmp_depend_info_t *noalias_dep_list )
{
int i;
kmp_taskdata_t * taskdata;
taskdata = KMP_TASK_TO_TASKDATA(task);
#if KMP_DEBUG
kmp_taskdata_t * taskdata = KMP_TASK_TO_TASKDATA(task);
#endif
KA_TRACE(20, ("__kmp_check_deps: T#%d checking dependencies for task %p : %d possibly aliased dependencies, %d non-aliased depedencies : dep_barrier=%d .\n", gtid, taskdata, ndeps, ndeps_noalias, dep_barrier ) );
// Filter deps in dep_list

View File

@ -1276,10 +1276,11 @@ __kmp_omp_task( kmp_int32 gtid, kmp_task_t * new_task, bool serialize_immediate
kmp_int32
__kmpc_omp_task( ident_t *loc_ref, kmp_int32 gtid, kmp_task_t * new_task)
{
kmp_taskdata_t * new_taskdata;
kmp_int32 res;
new_taskdata = KMP_TASK_TO_TASKDATA(new_task);
#if KMP_DEBUG
kmp_taskdata_t * new_taskdata = KMP_TASK_TO_TASKDATA(new_task);
#endif
KA_TRACE(10, ("__kmpc_omp_task(enter): T#%d loc=%p task=%p\n",
gtid, loc_ref, new_taskdata ) );