Remove BUILD_TV

Cleanup code to remove BUILD_TV and unused code bracketed by it.

Patch by Terry Wilmarth

Differential Revision: https://reviews.llvm.org/D36011

llvm-svn: 311114
This commit is contained in:
Jonathan Peyton 2017-08-17 19:09:28 +00:00
parent df1e59b640
commit d4daf4540a
5 changed files with 0 additions and 81 deletions

View File

@ -1193,28 +1193,6 @@ typedef struct kmp_cpuinfo {
} kmp_cpuinfo_t;
#endif
#ifdef BUILD_TV
struct tv_threadprivate {
/* Record type #1 */
void *global_addr;
void *thread_addr;
};
struct tv_data {
struct tv_data *next;
void *type;
union tv_union {
struct tv_threadprivate tp;
} u;
};
extern kmp_key_t __kmp_tv_key;
#endif /* BUILD_TV */
/* ------------------------------------------------------------------------ */
#if USE_ITT_BUILD
// We cannot include "kmp_itt.h" due to circular dependency. Declare the only
// required type here. Later we will check the type meets requirements.
@ -1961,10 +1939,6 @@ typedef struct kmp_local {
#endif /* ! USE_CMP_XCHG_FOR_BGET */
#endif /* KMP_USE_BGET */
#ifdef BUILD_TV
struct tv_data *tv_data;
#endif
PACKED_REDUCTION_METHOD_T
packed_reduction_method; /* stored by __kmpc_reduce*(), used by
__kmpc_end_reduce*() */
@ -3057,11 +3031,6 @@ extern void __kmp_parallel_dxo(int *gtid_ref, int *cid_ref, ident_t *loc_ref);
extern int __kmp_get_load_balance(int);
#endif
#ifdef BUILD_TV
extern void __kmp_tv_threadprivate_store(kmp_info_t *th, void *global_addr,
void *thread_addr);
#endif
extern int __kmp_get_global_thread_id(void);
extern int __kmp_get_global_thread_id_reg(void);
extern void __kmp_exit_thread(int exit_status);

View File

@ -502,13 +502,6 @@ kmp_lock_t __kmp_debug_lock; /* Control I/O access for KMP_DEBUG */
int __kmp_handle_signals = FALSE;
#endif
/* ----------------------------------------------- */
#ifdef BUILD_TV
kmp_key_t __kmp_tv_key = 0;
#endif
/* ------------------------------------------------------------------------ */
#ifdef DEBUG_SUSPEND
int get_suspend_count_(void) {
int count = __kmp_suspend_count;

View File

@ -4082,10 +4082,6 @@ static void __kmp_initialize_info(kmp_info_t *this_thr, kmp_team_t *team,
this_thr->th.th_local.this_construct = 0;
#ifdef BUILD_TV
this_thr->th.th_local.tv_data = 0;
#endif
if (!this_thr->th.th_pri_common) {
this_thr->th.th_pri_common =
(struct common_table *)__kmp_allocate(sizeof(struct common_table));

View File

@ -445,10 +445,6 @@ struct private_common *kmp_threadprivate_insert(int gtid, void *pc_addr,
tn->link = __kmp_threads[gtid]->th.th_pri_head;
__kmp_threads[gtid]->th.th_pri_head = tn;
#ifdef BUILD_TV
__kmp_tv_threadprivate_store(__kmp_threads[gtid], tn->gbl_addr, tn->par_addr);
#endif
if ((__kmp_foreign_tp) ? (KMP_INITIAL_GTID(gtid)) : (KMP_UBER_GTID(gtid)))
return tn;

View File

@ -1759,30 +1759,6 @@ void __kmp_clear_system_time(void) {
TIMEVAL_TO_TIMESPEC(&tval, &__kmp_sys_timer_data.start);
}
#ifdef BUILD_TV
void __kmp_tv_threadprivate_store(kmp_info_t *th, void *global_addr,
void *thread_addr) {
struct tv_data *p;
p = (struct tv_data *)__kmp_allocate(sizeof(*p));
p->u.tp.global_addr = global_addr;
p->u.tp.thread_addr = thread_addr;
p->type = (void *)1;
p->next = th->th.th_local.tv_data;
th->th.th_local.tv_data = p;
if (p->next == 0) {
int rc = pthread_setspecific(__kmp_tv_key, p);
KMP_CHECK_SYSFAIL("pthread_setspecific", rc);
}
}
#endif /* BUILD_TV */
static int __kmp_get_xproc(void) {
int r = 0;
@ -1872,13 +1848,6 @@ void __kmp_runtime_initialize(void) {
/* Set up minimum number of threads to switch to TLS gtid */
__kmp_tls_gtid_min = KMP_TLS_GTID_MIN;
#ifdef BUILD_TV
{
int rc = pthread_key_create(&__kmp_tv_key, 0);
KMP_CHECK_SYSFAIL("pthread_key_create", rc);
}
#endif
status = pthread_key_create(&__kmp_gtid_threadprivate_key,
__kmp_internal_end_dest);
KMP_CHECK_SYSFAIL("pthread_key_create", status);
@ -1910,10 +1879,6 @@ void __kmp_runtime_destroy(void) {
status = pthread_key_delete(__kmp_gtid_threadprivate_key);
KMP_CHECK_SYSFAIL("pthread_key_delete", status);
#ifdef BUILD_TV
status = pthread_key_delete(__kmp_tv_key);
KMP_CHECK_SYSFAIL("pthread_key_delete", status);
#endif
status = pthread_mutex_destroy(&__kmp_wait_mx.m_mutex);
if (status != 0 && status != EBUSY) {