diff options
author | Jonathan Peyton <jonathan.l.peyton@intel.com> | 2015-06-08 18:56:33 +0000 |
---|---|---|
committer | Jonathan Peyton <jonathan.l.peyton@intel.com> | 2015-06-08 18:56:33 +0000 |
commit | e8104ad0e8bbf25c084068378c3856df1861de2c (patch) | |
tree | 5e0df3331542207b0ef15b22a447c8bcee29f10d /openmp/runtime/src | |
parent | 4a61619ff508e8351d957f8ba3b0a37266d3095e (diff) | |
download | bcm5719-llvm-e8104ad0e8bbf25c084068378c3856df1861de2c.tar.gz bcm5719-llvm-e8104ad0e8bbf25c084068378c3856df1861de2c.zip |
Remove unused variable warnings by fooling compiler.
Some variables are convenient to keep around even if they aren't
really used in a release build. This is often seen in DEBUG guarded code where the variable
is only used in a DEBUG build.
Patch by Jack Howarth
llvm-svn: 239326
Diffstat (limited to 'openmp/runtime/src')
-rw-r--r-- | openmp/runtime/src/kmp_barrier.cpp | 3 | ||||
-rw-r--r-- | openmp/runtime/src/kmp_csupport.c | 3 | ||||
-rw-r--r-- | openmp/runtime/src/kmp_gsupport.c | 4 | ||||
-rw-r--r-- | openmp/runtime/src/kmp_taskdeps.cpp | 3 | ||||
-rw-r--r-- | openmp/runtime/src/kmp_tasking.c | 22 | ||||
-rw-r--r-- | openmp/runtime/src/z_Linux_util.c | 4 |
6 files changed, 28 insertions, 11 deletions
diff --git a/openmp/runtime/src/kmp_barrier.cpp b/openmp/runtime/src/kmp_barrier.cpp index f265e01d021..45bbb3150aa 100644 --- a/openmp/runtime/src/kmp_barrier.cpp +++ b/openmp/runtime/src/kmp_barrier.cpp @@ -1237,7 +1237,8 @@ __kmp_barrier(enum barrier_type bt, int gtid, int is_split, size_t reduce_size, } #endif - kmp_task_team_t * task_team = this_thr->th.th_task_team; + 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_task_team_wait(this_thr, team USE_ITT_BUILD_ARG(itt_sync_obj)); diff --git a/openmp/runtime/src/kmp_csupport.c b/openmp/runtime/src/kmp_csupport.c index f0cb4a85382..332160cbd0c 100644 --- a/openmp/runtime/src/kmp_csupport.c +++ b/openmp/runtime/src/kmp_csupport.c @@ -2148,7 +2148,8 @@ __kmpc_unset_nest_lock( ident_t *loc, kmp_int32 gtid, void **user_lock ) __kmp_itt_lock_releasing( lck ); #endif /* USE_ITT_BUILD */ - int release_status = RELEASE_NESTED_LOCK( lck, gtid ); + int release_status; + release_status = RELEASE_NESTED_LOCK( lck, gtid ); #if OMPT_SUPPORT && OMPT_BLAME if (ompt_status == ompt_status_track_callback) { if (release_status == KMP_LOCK_RELEASED) { diff --git a/openmp/runtime/src/kmp_gsupport.c b/openmp/runtime/src/kmp_gsupport.c index e7bac023912..29f4f72b3b1 100644 --- a/openmp/runtime/src/kmp_gsupport.c +++ b/openmp/runtime/src/kmp_gsupport.c @@ -476,7 +476,9 @@ void xexpand(KMP_API_NAME_GOMP_PARALLEL_END)(void) { int gtid = __kmp_get_gtid(); - kmp_info_t *thr = __kmp_threads[gtid]; + kmp_info_t *thr; + + thr = __kmp_threads[gtid]; MKLOC(loc, "GOMP_parallel_end"); KA_TRACE(20, ("GOMP_parallel_end: T#%d\n", gtid)); diff --git a/openmp/runtime/src/kmp_taskdeps.cpp b/openmp/runtime/src/kmp_taskdeps.cpp index 52d4f0fc781..abc037b5f0c 100644 --- a/openmp/runtime/src/kmp_taskdeps.cpp +++ b/openmp/runtime/src/kmp_taskdeps.cpp @@ -287,8 +287,9 @@ __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; - kmp_taskdata_t * taskdata = KMP_TASK_TO_TASKDATA(task); + taskdata = KMP_TASK_TO_TASKDATA(task); 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 diff --git a/openmp/runtime/src/kmp_tasking.c b/openmp/runtime/src/kmp_tasking.c index e6f72a1000a..8c5794585e8 100644 --- a/openmp/runtime/src/kmp_tasking.c +++ b/openmp/runtime/src/kmp_tasking.c @@ -1274,9 +1274,10 @@ __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_TASK_TO_TASKDATA(new_task); + kmp_taskdata_t * new_taskdata; kmp_int32 res; + new_taskdata = KMP_TASK_TO_TASKDATA(new_task); KA_TRACE(10, ("__kmpc_omp_task(enter): T#%d loc=%p task=%p\n", gtid, loc_ref, new_taskdata ) ); @@ -1636,7 +1637,9 @@ __kmp_steal_task( kmp_info_t *victim, kmp_int32 gtid, kmp_task_team_t *task_team // We need to un-mark this victim as a finished victim. This must be done before // releasing the lock, or else other threads (starting with the master victim) // might be prematurely released from the barrier!!! - kmp_uint32 count = KMP_TEST_THEN_INC32( (kmp_int32 *)unfinished_threads ); + kmp_uint32 count; + + count = KMP_TEST_THEN_INC32( (kmp_int32 *)unfinished_threads ); KA_TRACE(20, ("__kmp_steal_task: T#%d inc unfinished_threads to %d: task_team=%p\n", gtid, count + 1, task_team) ); @@ -1744,7 +1747,9 @@ static inline int __kmp_execute_tasks_template(kmp_info_t *thread, kmp_int32 gti // been done. This decrement might be to the spin location, and // result in the termination condition being satisfied. if (! *thread_finished) { - kmp_uint32 count = KMP_TEST_THEN_DEC32( (kmp_int32 *)unfinished_threads ) - 1; + kmp_uint32 count; + + count = KMP_TEST_THEN_DEC32( (kmp_int32 *)unfinished_threads ) - 1; KA_TRACE(20, ("__kmp_execute_tasks_template(dec #1): T#%d dec unfinished_threads to %d task_team=%p\n", gtid, count, task_team) ); *thread_finished = TRUE; @@ -1825,7 +1830,9 @@ static inline int __kmp_execute_tasks_template(kmp_info_t *thread, kmp_int32 gti // been done. This decrement might be to the spin location, and // result in the termination condition being satisfied. if (! *thread_finished) { - kmp_uint32 count = KMP_TEST_THEN_DEC32( (kmp_int32 *)unfinished_threads ) - 1; + kmp_uint32 count; + + count = KMP_TEST_THEN_DEC32( (kmp_int32 *)unfinished_threads ) - 1; KA_TRACE(20, ("__kmp_execute_tasks_template(dec #2): T#%d dec unfinished_threads to %d " "task_team=%p\n", gtid, count, task_team) ); *thread_finished = TRUE; @@ -1938,7 +1945,9 @@ static inline int __kmp_execute_tasks_template(kmp_info_t *thread, kmp_int32 gti // been done. This decrement might be to the spin location, and // result in the termination condition being satisfied. if (! *thread_finished) { - kmp_uint32 count = KMP_TEST_THEN_DEC32( (kmp_int32 *)unfinished_threads ) - 1; + kmp_uint32 count; + + count = KMP_TEST_THEN_DEC32( (kmp_int32 *)unfinished_threads ) - 1; KA_TRACE(20, ("__kmp_execute_tasks_template(dec #3): T#%d dec unfinished_threads to %d; " "task_team=%p\n", gtid, count, task_team) ); @@ -1996,13 +2005,14 @@ int __kmp_execute_tasks_oncore(kmp_info_t *thread, kmp_int32 gtid, kmp_flag_onco static void __kmp_enable_tasking( kmp_task_team_t *task_team, kmp_info_t *this_thr ) { - kmp_team_t *team = this_thr->th.th_team; + 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); diff --git a/openmp/runtime/src/z_Linux_util.c b/openmp/runtime/src/z_Linux_util.c index c624c9d9f09..4db74fbb441 100644 --- a/openmp/runtime/src/z_Linux_util.c +++ b/openmp/runtime/src/z_Linux_util.c @@ -1114,9 +1114,11 @@ __kmp_create_monitor( kmp_info_t *th ) pthread_attr_t thread_attr; size_t size; int status; - int caller_gtid = __kmp_get_gtid(); + int caller_gtid; int auto_adj_size = FALSE; + caller_gtid = __kmp_get_gtid(); + KA_TRACE( 10, ("__kmp_create_monitor: try to create monitor\n" ) ); KMP_MB(); /* Flush all pending memory write invalidates. */ |