Remove unused variable warnings by deletion.
As an ongoing effort to sanitize the openmp code, these changes delete variables that aren't used at all. http://lists.cs.uiuc.edu/pipermail/openmp-dev/2015-June/000701.html Patch by Jack Howarth llvm-svn: 239334
This commit is contained in:
parent
4af289d0f2
commit
7c4d66d217
|
@ -654,7 +654,6 @@ __kmpc_barrier(ident_t *loc, kmp_int32 global_tid)
|
|||
{
|
||||
KMP_COUNT_BLOCK(OMP_BARRIER);
|
||||
KMP_TIME_BLOCK(OMP_barrier);
|
||||
int explicit_barrier_flag;
|
||||
KC_TRACE( 10, ("__kmpc_barrier: called T#%d\n", global_tid ) );
|
||||
|
||||
if (! TCR_4(__kmp_init_parallel))
|
||||
|
|
|
@ -23,24 +23,6 @@
|
|||
|
||||
#define MIN_STACK 100
|
||||
|
||||
static char const * cons_text_fort[] = {
|
||||
"(none)",
|
||||
"PARALLEL",
|
||||
"work-sharing", /* this is not called DO because of lowering of SECTIONS and WORKSHARE directives */
|
||||
"ORDERED work-sharing", /* this is not called DO ORDERED because of lowering of SECTIONS directives */
|
||||
"SECTIONS",
|
||||
"work-sharing", /* this is not called SINGLE because of lowering of SECTIONS and WORKSHARE directives */
|
||||
"TASKQ",
|
||||
"TASKQ",
|
||||
"TASKQ ORDERED",
|
||||
"CRITICAL",
|
||||
"ORDERED", /* in PARALLEL */
|
||||
"ORDERED", /* in PDO */
|
||||
"ORDERED", /* in TASKQ */
|
||||
"MASTER",
|
||||
"REDUCE",
|
||||
"BARRIER"
|
||||
};
|
||||
|
||||
static char const * cons_text_c[] = {
|
||||
"(none)",
|
||||
|
@ -70,7 +52,6 @@ static char const * cons_text_c[] = {
|
|||
cons_text_c[ (p)->stack_data[ tos ].type ], \
|
||||
get_src( (p)->stack_data[ tos ].ident )
|
||||
|
||||
static int const cons_text_fort_num = sizeof( cons_text_fort ) / sizeof( char const * );
|
||||
static int const cons_text_c_num = sizeof( cons_text_c ) / sizeof( char const * );
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
|
|
@ -186,7 +186,6 @@ void
|
|||
xexpand(KMP_API_NAME_GOMP_SINGLE_COPY_END)(void *data)
|
||||
{
|
||||
int gtid = __kmp_get_gtid();
|
||||
MKLOC(loc, "GOMP_single_copy_end");
|
||||
KA_TRACE(20, ("GOMP_single_copy_end: T#%d\n", gtid));
|
||||
|
||||
//
|
||||
|
@ -826,7 +825,6 @@ LOOP_NEXT_ULL(xexpand(KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_RUNTIME_NEXT), \
|
|||
long lb, long ub, long str, long chunk_sz) \
|
||||
{ \
|
||||
int gtid = __kmp_entry_gtid(); \
|
||||
int last = FALSE; \
|
||||
MKLOC(loc, #func); \
|
||||
KA_TRACE(20, ( #func ": T#%d, lb 0x%lx, ub 0x%lx, str 0x%lx, chunk_sz 0x%lx\n", \
|
||||
gtid, lb, ub, str, chunk_sz )); \
|
||||
|
@ -1023,7 +1021,6 @@ xexpand(KMP_API_NAME_GOMP_PARALLEL_SECTIONS_START)(void (*task) (void *), void *
|
|||
unsigned num_threads, unsigned count)
|
||||
{
|
||||
int gtid = __kmp_entry_gtid();
|
||||
int last = FALSE;
|
||||
|
||||
#if OMPT_SUPPORT
|
||||
ompt_frame_t *parent_frame;
|
||||
|
@ -1119,7 +1116,6 @@ xexpand(KMP_API_NAME_GOMP_PARALLEL_SECTIONS)(void (*task) (void *), void *data,
|
|||
unsigned num_threads, unsigned count, unsigned flags)
|
||||
{
|
||||
int gtid = __kmp_entry_gtid();
|
||||
int last = FALSE;
|
||||
MKLOC(loc, "GOMP_parallel_sections");
|
||||
KA_TRACE(20, ("GOMP_parallel_sections: T#%d\n", gtid));
|
||||
|
||||
|
@ -1151,7 +1147,6 @@ xexpand(KMP_API_NAME_GOMP_PARALLEL_SECTIONS)(void (*task) (void *), void *data,
|
|||
long lb, long ub, long str, long chunk_sz, unsigned flags) \
|
||||
{ \
|
||||
int gtid = __kmp_entry_gtid(); \
|
||||
int last = FALSE; \
|
||||
MKLOC(loc, #func); \
|
||||
KA_TRACE(20, ( #func ": T#%d, lb 0x%lx, ub 0x%lx, str 0x%lx, chunk_sz 0x%lx\n", \
|
||||
gtid, lb, ub, str, chunk_sz )); \
|
||||
|
|
|
@ -3870,7 +3870,6 @@ __kmp_lock_table_insert( kmp_user_lock_p lck )
|
|||
if ( __kmp_user_lock_table.used >= __kmp_user_lock_table.allocated ) {
|
||||
kmp_lock_index_t size;
|
||||
kmp_user_lock_p *table;
|
||||
kmp_lock_index_t i;
|
||||
// Reallocate lock table.
|
||||
if ( __kmp_user_lock_table.allocated == 0 ) {
|
||||
size = 1024;
|
||||
|
@ -3979,8 +3978,6 @@ __kmp_user_lock_allocate( void **user_lock, kmp_int32 gtid,
|
|||
void
|
||||
__kmp_user_lock_free( void **user_lock, kmp_int32 gtid, kmp_user_lock_p lck )
|
||||
{
|
||||
kmp_lock_pool_t * lock_pool;
|
||||
|
||||
KMP_DEBUG_ASSERT( user_lock != NULL );
|
||||
KMP_DEBUG_ASSERT( lck != NULL );
|
||||
|
||||
|
|
|
@ -732,8 +732,6 @@ __kmp_parallel_deo( int *gtid_ref, int *cid_ref, ident_t *loc_ref )
|
|||
}
|
||||
#ifdef BUILD_PARALLEL_ORDERED
|
||||
if( !team->t.t_serialized ) {
|
||||
kmp_uint32 spins;
|
||||
|
||||
KMP_MB();
|
||||
KMP_WAIT_YIELD(&team->t.t_ordered.dt.t_value, __kmp_tid_from_gtid( gtid ), KMP_EQ, NULL);
|
||||
KMP_MB();
|
||||
|
@ -1288,7 +1286,6 @@ __kmp_serialized_parallel(ident_t *loc, kmp_int32 global_tid)
|
|||
/* this serial team was already used
|
||||
* TODO increase performance by making this locks more specific */
|
||||
kmp_team_t *new_team;
|
||||
int tid = this_thr->th.th_info.ds.ds_tid;
|
||||
|
||||
__kmp_acquire_bootstrap_lock( &__kmp_forkjoin_lock );
|
||||
|
||||
|
@ -2749,7 +2746,6 @@ __kmp_get_schedule( int gtid, kmp_sched_t * kind, int * chunk )
|
|||
{
|
||||
kmp_info_t *thread;
|
||||
enum sched_type th_type;
|
||||
int i;
|
||||
|
||||
KF_TRACE( 10, ("__kmp_get_schedule: thread %d\n", gtid ));
|
||||
KMP_DEBUG_ASSERT( __kmp_init_serial );
|
||||
|
@ -3119,7 +3115,6 @@ __kmp_initialize_root( kmp_root_t *root )
|
|||
int f;
|
||||
kmp_team_t *root_team;
|
||||
kmp_team_t *hot_team;
|
||||
size_t disp_size, dispatch_size, bar_size;
|
||||
int hot_team_max_nth;
|
||||
kmp_r_sched_t r_sched = __kmp_get_schedule_global(); // get current state of scheduling globals
|
||||
kmp_internal_control_t r_icvs = __kmp_get_global_icvs();
|
||||
|
@ -4766,8 +4761,6 @@ __kmp_allocate_team( kmp_root_t *root, int new_nproc, int max_nproc,
|
|||
KMP_TIME_BLOCK(KMP_allocate_team);
|
||||
int f;
|
||||
kmp_team_t *team;
|
||||
char *ptr;
|
||||
size_t size;
|
||||
int use_hot_team = ! root->r.r_active;
|
||||
int level = 0;
|
||||
|
||||
|
@ -5911,8 +5904,6 @@ __kmp_internal_end(void)
|
|||
void
|
||||
__kmp_internal_end_library( int gtid_req )
|
||||
{
|
||||
int i;
|
||||
|
||||
/* if we have already cleaned up, don't try again, it wouldn't be pretty */
|
||||
/* this shouldn't be a race condition because __kmp_internal_end() is the
|
||||
* only place to clear __kmp_serial_init */
|
||||
|
|
|
@ -1582,7 +1582,6 @@ static void
|
|||
__kmp_stg_print_force_reduction( kmp_str_buf_t * buffer, char const * name, void * data ) {
|
||||
|
||||
kmp_stg_fr_data_t * reduction = (kmp_stg_fr_data_t *) data;
|
||||
char const * value = NULL;
|
||||
if ( reduction->force ) {
|
||||
if( __kmp_force_reduction_method == critical_reduce_block) {
|
||||
__kmp_stg_print_str( buffer, name, "critical");
|
||||
|
@ -3998,7 +3997,6 @@ __kmp_stg_parse_adaptive_lock_props( const char *name, const char *value, void *
|
|||
int max_badness = 0;
|
||||
|
||||
const char *next = value;
|
||||
const char *scan = next;
|
||||
|
||||
int total = 0; // Count elements that were set. It'll be used as an array size
|
||||
int prev_comma = FALSE; // For correct processing sequential commas
|
||||
|
@ -5232,7 +5230,6 @@ void
|
|||
__kmp_env_print_2() {
|
||||
|
||||
kmp_env_blk_t block;
|
||||
int i;
|
||||
kmp_str_buf_t buffer;
|
||||
|
||||
__kmp_env_format = 1;
|
||||
|
|
|
@ -275,7 +275,6 @@ __kmp_str_buf_print_size(
|
|||
char const * names[] = { "", "k", "M", "G", "T", "P", "E", "Z", "Y" };
|
||||
int const units = sizeof( names ) / sizeof( char const * );
|
||||
int u = 0;
|
||||
int rc;
|
||||
if ( size > 0 ) {
|
||||
while ( ( size % 1024 == 0 ) && ( u + 1 < units ) ) {
|
||||
size = size / 1024;
|
||||
|
@ -733,7 +732,6 @@ __kmp_str_to_size( // R: Error code.
|
|||
size_t value = 0;
|
||||
size_t factor = 0;
|
||||
int overflow = 0;
|
||||
int bad_unit = 0;
|
||||
int i = 0;
|
||||
int digit;
|
||||
|
||||
|
|
|
@ -1563,7 +1563,7 @@ __kmp_steal_task( kmp_info_t *victim, kmp_int32 gtid, kmp_task_team_t *task_team
|
|||
kmp_task_t * task;
|
||||
kmp_taskdata_t * taskdata;
|
||||
kmp_thread_data_t *victim_td, *threads_data;
|
||||
kmp_int32 victim_tid, thread_tid;
|
||||
kmp_int32 victim_tid;
|
||||
|
||||
KMP_DEBUG_ASSERT( __kmp_tasking_mode != tskm_immediate_exec );
|
||||
|
||||
|
@ -1676,7 +1676,6 @@ static inline int __kmp_execute_tasks_template(kmp_info_t *thread, kmp_int32 gti
|
|||
USE_ITT_BUILD_ARG(void * itt_sync_obj), kmp_int32 is_constrained)
|
||||
{
|
||||
kmp_task_team_t * task_team;
|
||||
kmp_team_t * team;
|
||||
kmp_thread_data_t * threads_data;
|
||||
kmp_task_t * task;
|
||||
kmp_taskdata_t * current_task = thread -> th.th_current_task;
|
||||
|
|
|
@ -42,7 +42,6 @@ __kmp_taskq_eo( int *gtid_ref, int *cid_ref, ident_t *loc_ref )
|
|||
{
|
||||
int gtid = *gtid_ref;
|
||||
int tid = __kmp_tid_from_gtid( gtid );
|
||||
kmp_uint32 spins;
|
||||
kmp_uint32 my_token;
|
||||
kmpc_task_queue_t *taskq;
|
||||
kmp_taskq_t *tq = & __kmp_threads[gtid] -> th.th_team -> t.t_taskq;
|
||||
|
@ -99,7 +98,6 @@ __kmp_taskq_xo( int *gtid_ref, int *cid_ref, ident_t *loc_ref )
|
|||
static void
|
||||
__kmp_taskq_check_ordered( kmp_int32 gtid, kmpc_thunk_t *thunk )
|
||||
{
|
||||
kmp_uint32 spins;
|
||||
kmp_uint32 my_token;
|
||||
kmpc_task_queue_t *taskq;
|
||||
|
||||
|
@ -1080,8 +1078,6 @@ __kmp_remove_queue_from_tree( kmp_taskq_t *tq, kmp_int32 global_tid, kmpc_task_q
|
|||
queue->tq_next_child = NULL;
|
||||
|
||||
if (in_parallel) {
|
||||
kmp_uint32 spins;
|
||||
|
||||
KMP_DEBUG_REF_CTS(("line %d gtid %d: Q %p waiting for ref_count of %d to reach 1\n",
|
||||
__LINE__, global_tid, queue, queue->tq_ref_count));
|
||||
|
||||
|
@ -1387,8 +1383,6 @@ __kmpc_taskq( ident_t *loc, kmp_int32 global_tid, kmpc_task_t taskq_task,
|
|||
/* master thread only executes this code */
|
||||
|
||||
if( tq->tq_curr_thunk_capacity < nproc ) {
|
||||
int i;
|
||||
|
||||
if(tq->tq_curr_thunk)
|
||||
__kmp_free(tq->tq_curr_thunk);
|
||||
else {
|
||||
|
|
|
@ -80,7 +80,6 @@ __kmp_get_logical_id( int log_per_phy, int apic_id )
|
|||
{
|
||||
unsigned current_bit;
|
||||
int bits_seen;
|
||||
unsigned mask;
|
||||
|
||||
if (log_per_phy <= 1) return ( 0 );
|
||||
|
||||
|
|
|
@ -687,7 +687,6 @@ __kmp_launch_worker( void *thr )
|
|||
void *padding = 0;
|
||||
#endif
|
||||
int gtid;
|
||||
int error;
|
||||
|
||||
gtid = ((kmp_info_t*)thr) -> th.th_info.ds.ds_gtid;
|
||||
__kmp_gtid_set_specific( gtid );
|
||||
|
@ -766,7 +765,6 @@ __kmp_launch_monitor( void *thr )
|
|||
struct timespec interval;
|
||||
int yield_count;
|
||||
int yield_cycles = 0;
|
||||
int error;
|
||||
|
||||
KMP_MB(); /* Flush all pending memory write invalidates. */
|
||||
|
||||
|
@ -1278,7 +1276,7 @@ void __kmp_resume_monitor();
|
|||
void
|
||||
__kmp_reap_monitor( kmp_info_t *th )
|
||||
{
|
||||
int status, i;
|
||||
int status;
|
||||
void *exit_val;
|
||||
|
||||
KA_TRACE( 10, ("__kmp_reap_monitor: try to reap monitor thread with handle %#.8lx\n",
|
||||
|
|
Loading…
Reference in New Issue