[Openmp-commits] [openmp] r246067 - Put taskdata variables under KMP_DEBUG guards.

Jonathan Peyton via Openmp-commits openmp-commits at lists.llvm.org
Wed Aug 26 13:02:21 PDT 2015


Author: jlpeyton
Date: Wed Aug 26 15:02:21 2015
New Revision: 246067

URL: http://llvm.org/viewvc/llvm-project?rev=246067&view=rev
Log:
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.

Modified:
    openmp/trunk/runtime/src/kmp_taskdeps.cpp
    openmp/trunk/runtime/src/kmp_tasking.c

Modified: openmp/trunk/runtime/src/kmp_taskdeps.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_taskdeps.cpp?rev=246067&r1=246066&r2=246067&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_taskdeps.cpp (original)
+++ openmp/trunk/runtime/src/kmp_taskdeps.cpp Wed Aug 26 15:02:21 2015
@@ -287,9 +287,10 @@ __kmp_check_deps ( kmp_int32 gtid, kmp_d
                    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

Modified: openmp/trunk/runtime/src/kmp_tasking.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_tasking.c?rev=246067&r1=246066&r2=246067&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_tasking.c (original)
+++ openmp/trunk/runtime/src/kmp_tasking.c Wed Aug 26 15:02:21 2015
@@ -1276,10 +1276,11 @@ __kmp_omp_task( kmp_int32 gtid, kmp_task
 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 ) );
 




More information about the Openmp-commits mailing list