forked from OSchip/llvm-project
Remove unused variable warnings by adding proper macro guards.
As an ongoing effort to sanitize the openmp code, these changes remove unused variables by adding proper macros around both variables and functions. Patch by Jack Howarth llvm-svn: 239330
This commit is contained in:
parent
2315333072
commit
2321d57f8b
|
@ -1380,7 +1380,9 @@ __kmp_dispatch_next(
|
|||
typedef typename traits_t< T >::unsigned_t UT;
|
||||
typedef typename traits_t< T >::signed_t ST;
|
||||
typedef typename traits_t< T >::floating_t DBL;
|
||||
#if ( KMP_STATIC_STEAL_ENABLED && KMP_ARCH_X86_64 )
|
||||
static const int ___kmp_size_type = sizeof( UT );
|
||||
#endif
|
||||
|
||||
int status;
|
||||
dispatch_private_info_template< T > * pr;
|
||||
|
|
|
@ -370,6 +370,7 @@ ___kmp_env_blk_parse_string(
|
|||
It is not clear how empty environment is represented. "\x00\x00"?
|
||||
*/
|
||||
|
||||
#if KMP_OS_WINDOWS
|
||||
static
|
||||
void
|
||||
___kmp_env_blk_parse_windows(
|
||||
|
@ -436,7 +437,7 @@ ___kmp_env_blk_parse_windows(
|
|||
block->count = count;
|
||||
|
||||
}; // ___kmp_env_blk_parse_windows
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -206,6 +206,7 @@ __kmp_free_cons_stack( void * ptr ) {
|
|||
}
|
||||
|
||||
|
||||
#if KMP_DEBUG
|
||||
static void
|
||||
dump_cons_stack( int gtid, struct cons_header * p ) {
|
||||
int i;
|
||||
|
@ -224,6 +225,7 @@ dump_cons_stack( int gtid, struct cons_header * p ) {
|
|||
__kmp_debug_printf( "%s", buffer.str );
|
||||
__kmp_str_buf_free( & buffer );
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
__kmp_push_parallel( int gtid, ident_t const * ident )
|
||||
|
|
|
@ -71,7 +71,9 @@ void __kmp_cleanup( void );
|
|||
|
||||
static void __kmp_initialize_info( kmp_info_t *, kmp_team_t *, int tid, int gtid );
|
||||
static void __kmp_initialize_team( kmp_team_t * team, int new_nproc, kmp_internal_control_t * new_icvs, ident_t * loc );
|
||||
#if OMP_40_ENABLED && KMP_AFFINITY_SUPPORTED
|
||||
static void __kmp_partition_places( kmp_team_t *team );
|
||||
#endif
|
||||
static void __kmp_do_serial_initialize( void );
|
||||
void __kmp_fork_barrier( int gtid, int tid );
|
||||
void __kmp_join_barrier( int gtid );
|
||||
|
@ -83,7 +85,9 @@ static int __kmp_load_balance_nproc( kmp_root_t * root, int set_nproc );
|
|||
#endif
|
||||
|
||||
static int __kmp_expand_threads(int nWish, int nNeed);
|
||||
#if KMP_OS_WINDOWS
|
||||
static int __kmp_unregister_root_other_thread( int gtid );
|
||||
#endif
|
||||
static void __kmp_unregister_library( void ); // called by __kmp_internal_end()
|
||||
static void __kmp_reap_thread( kmp_info_t * thread, int is_root );
|
||||
static kmp_info_t *__kmp_thread_pool_insert_pt = NULL;
|
||||
|
@ -3961,6 +3965,7 @@ __kmp_unregister_root_current_thread( int gtid )
|
|||
__kmp_release_bootstrap_lock( &__kmp_forkjoin_lock );
|
||||
}
|
||||
|
||||
#if KMP_OS_WINDOWS
|
||||
/* __kmp_forkjoin_lock must be already held
|
||||
Unregisters a root thread that is not the current thread. Returns the number of
|
||||
__kmp_threads entries freed as a result.
|
||||
|
@ -3981,6 +3986,7 @@ __kmp_unregister_root_other_thread( int gtid )
|
|||
KC_TRACE( 10, ("__kmp_unregister_root_other_thread: T#%d unregistered\n", gtid ));
|
||||
return r;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if KMP_DEBUG
|
||||
void __kmp_task_info() {
|
||||
|
|
|
@ -42,6 +42,7 @@ __kmp_convert_to_double( char const * s )
|
|||
return result;
|
||||
}
|
||||
|
||||
#ifdef KMP_DEBUG
|
||||
static unsigned int
|
||||
__kmp_readstr_with_sentinel(char *dest, char const * src, size_t len, char sentinel) {
|
||||
unsigned int i;
|
||||
|
@ -54,6 +55,7 @@ __kmp_readstr_with_sentinel(char *dest, char const * src, size_t len, char senti
|
|||
*dest = '\0';
|
||||
return i;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int
|
||||
__kmp_match_with_sentinel( char const * a, char const * b, size_t len, char sentinel ) {
|
||||
|
@ -349,6 +351,7 @@ __kmp_stg_parse_size(
|
|||
}; // if
|
||||
} // __kmp_stg_parse_size
|
||||
|
||||
#if KMP_AFFINITY_SUPPORTED
|
||||
static void
|
||||
__kmp_stg_parse_str(
|
||||
char const * name,
|
||||
|
@ -358,7 +361,7 @@ __kmp_stg_parse_str(
|
|||
KMP_INTERNAL_FREE( (void *) * out );
|
||||
* out = __kmp_str_format( "%s", value );
|
||||
} // __kmp_stg_parse_str
|
||||
|
||||
#endif
|
||||
|
||||
static void
|
||||
__kmp_stg_parse_int(
|
||||
|
@ -402,6 +405,7 @@ __kmp_stg_parse_int(
|
|||
} // __kmp_stg_parse_int
|
||||
|
||||
|
||||
#if KMP_DEBUG_ADAPTIVE_LOCKS
|
||||
static void
|
||||
__kmp_stg_parse_file(
|
||||
char const * name,
|
||||
|
@ -420,6 +424,7 @@ __kmp_stg_parse_file(
|
|||
KMP_INTERNAL_FREE(t);
|
||||
* out = __kmp_str_format( "%s", buffer );
|
||||
} // __kmp_stg_parse_file
|
||||
#endif
|
||||
|
||||
#ifdef KMP_DEBUG
|
||||
static char * par_range_to_print = NULL;
|
||||
|
|
|
@ -119,6 +119,8 @@ __kmp_taskq_check_ordered( kmp_int32 gtid, kmpc_thunk_t *thunk )
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef KMP_DEBUG
|
||||
|
||||
static void
|
||||
__kmp_dump_TQF(kmp_int32 flags)
|
||||
{
|
||||
|
@ -377,6 +379,7 @@ __kmp_dump_task_queue_tree( kmp_taskq_t *tq, kmpc_task_queue_t *tqroot, kmp_int3
|
|||
|
||||
__kmp_printf("\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
/* --------------------------------------------------------------------------- */
|
||||
|
||||
|
|
|
@ -30,7 +30,9 @@ static const char *unknown = "unknown";
|
|||
/* the debugging package has not been initialized yet, and only "0" will print */
|
||||
/* debugging output since the environment variables have not been read. */
|
||||
|
||||
#ifdef KMP_DEBUG
|
||||
static int trace_level = 5;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* LOG_ID_BITS = ( 1 + floor( log_2( max( log_per_phy - 1, 1 ))))
|
||||
|
@ -136,7 +138,9 @@ __kmp_query_cpuid( kmp_cpuinfo_t *p )
|
|||
struct kmp_cpuid buf;
|
||||
int max_arg;
|
||||
int log_per_phy;
|
||||
#ifdef KMP_DEBUG
|
||||
int cflush_size;
|
||||
#endif
|
||||
|
||||
p->initialized = 1;
|
||||
|
||||
|
|
|
@ -683,7 +683,9 @@ __kmp_launch_worker( void *thr )
|
|||
sigset_t new_set, old_set;
|
||||
#endif /* KMP_BLOCK_SIGNALS */
|
||||
void *exit_val;
|
||||
#if KMP_OS_LINUX || KMP_OS_FREEBSD
|
||||
void *padding = 0;
|
||||
#endif
|
||||
int gtid;
|
||||
int error;
|
||||
|
||||
|
|
Loading…
Reference in New Issue