[Openmp-commits] [openmp] r246065 - Replace variables with definitions inside KMP_DEBUG_ASSERT statements

Jonathan Peyton via Openmp-commits openmp-commits at lists.llvm.org
Wed Aug 26 12:58:48 PDT 2015


Author: jlpeyton
Date: Wed Aug 26 14:58:48 2015
New Revision: 246065

URL: http://llvm.org/viewvc/llvm-project?rev=246065&view=rev
Log:
Replace variables with definitions inside KMP_DEBUG_ASSERT statements

This change just removes the variables created solely for KMP_DEBUG_ASSERT statements
and puts the definition of the removed variables inside the KMP_DEBUG_ASSERT
statements.

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

Modified: openmp/trunk/runtime/src/kmp_barrier.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_barrier.cpp?rev=246065&r1=246064&r2=246065&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_barrier.cpp (original)
+++ openmp/trunk/runtime/src/kmp_barrier.cpp Wed Aug 26 14:58:48 2015
@@ -1255,9 +1255,7 @@ __kmp_barrier(enum barrier_type bt, int
                 }
 #endif
 
-                kmp_task_team_t * task_team;
-                task_team = this_thr->th.th_task_team;
-                KMP_DEBUG_ASSERT(task_team->tt.tt_found_proxy_tasks == TRUE);
+                KMP_DEBUG_ASSERT(this_thr->th.th_task_team->tt.tt_found_proxy_tasks == TRUE);
                 __kmp_task_team_wait(this_thr, team
                                                USE_ITT_BUILD_ARG(itt_sync_obj));
                 __kmp_task_team_setup(this_thr, team, 0, 0);

Modified: openmp/trunk/runtime/src/kmp_tasking.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_tasking.c?rev=246065&r1=246064&r2=246065&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_tasking.c (original)
+++ openmp/trunk/runtime/src/kmp_tasking.c Wed Aug 26 14:58:48 2015
@@ -2009,20 +2009,18 @@ int __kmp_execute_tasks_oncore(kmp_info_
 static void
 __kmp_enable_tasking( kmp_task_team_t *task_team, kmp_info_t *this_thr )
 {
-    kmp_team_t *team;
     kmp_thread_data_t *threads_data;
     int nthreads, i, is_init_thread;
 
     KA_TRACE( 10, ( "__kmp_enable_tasking(enter): T#%d\n",
                     __kmp_gtid_from_thread( this_thr ) ) );
 
-    team = this_thr->th.th_team;
     KMP_DEBUG_ASSERT(task_team != NULL);
-    KMP_DEBUG_ASSERT(team != NULL);
+    KMP_DEBUG_ASSERT(this_thr->th.th_team != NULL);
 
     nthreads = task_team->tt.tt_nproc;
     KMP_DEBUG_ASSERT(nthreads > 0);
-    KMP_DEBUG_ASSERT(nthreads == team->t.t_nproc);
+    KMP_DEBUG_ASSERT(nthreads == this_thr->th.th_team->t.t_nproc);
 
     // Allocate or increase the size of threads_data if necessary
     is_init_thread = __kmp_realloc_task_threads_data( this_thr, task_team );




More information about the Openmp-commits mailing list