Skip to content

Commit d4daf45

Browse files
committedAug 17, 2017
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
1 parent df1e59b commit d4daf45

File tree

5 files changed

+0
-81
lines changed

5 files changed

+0
-81
lines changed
 

‎openmp/runtime/src/kmp.h

-31
Original file line numberDiff line numberDiff line change
@@ -1193,28 +1193,6 @@ typedef struct kmp_cpuinfo {
11931193
} kmp_cpuinfo_t;
11941194
#endif
11951195

1196-
#ifdef BUILD_TV
1197-
1198-
struct tv_threadprivate {
1199-
/* Record type #1 */
1200-
void *global_addr;
1201-
void *thread_addr;
1202-
};
1203-
1204-
struct tv_data {
1205-
struct tv_data *next;
1206-
void *type;
1207-
union tv_union {
1208-
struct tv_threadprivate tp;
1209-
} u;
1210-
};
1211-
1212-
extern kmp_key_t __kmp_tv_key;
1213-
1214-
#endif /* BUILD_TV */
1215-
1216-
/* ------------------------------------------------------------------------ */
1217-
12181196
#if USE_ITT_BUILD
12191197
// We cannot include "kmp_itt.h" due to circular dependency. Declare the only
12201198
// required type here. Later we will check the type meets requirements.
@@ -1961,10 +1939,6 @@ typedef struct kmp_local {
19611939
#endif /* ! USE_CMP_XCHG_FOR_BGET */
19621940
#endif /* KMP_USE_BGET */
19631941

1964-
#ifdef BUILD_TV
1965-
struct tv_data *tv_data;
1966-
#endif
1967-
19681942
PACKED_REDUCTION_METHOD_T
19691943
packed_reduction_method; /* stored by __kmpc_reduce*(), used by
19701944
__kmpc_end_reduce*() */
@@ -3057,11 +3031,6 @@ extern void __kmp_parallel_dxo(int *gtid_ref, int *cid_ref, ident_t *loc_ref);
30573031
extern int __kmp_get_load_balance(int);
30583032
#endif
30593033

3060-
#ifdef BUILD_TV
3061-
extern void __kmp_tv_threadprivate_store(kmp_info_t *th, void *global_addr,
3062-
void *thread_addr);
3063-
#endif
3064-
30653034
extern int __kmp_get_global_thread_id(void);
30663035
extern int __kmp_get_global_thread_id_reg(void);
30673036
extern void __kmp_exit_thread(int exit_status);

‎openmp/runtime/src/kmp_global.cpp

-7
Original file line numberDiff line numberDiff line change
@@ -502,13 +502,6 @@ kmp_lock_t __kmp_debug_lock; /* Control I/O access for KMP_DEBUG */
502502
int __kmp_handle_signals = FALSE;
503503
#endif
504504

505-
/* ----------------------------------------------- */
506-
#ifdef BUILD_TV
507-
kmp_key_t __kmp_tv_key = 0;
508-
#endif
509-
510-
/* ------------------------------------------------------------------------ */
511-
512505
#ifdef DEBUG_SUSPEND
513506
int get_suspend_count_(void) {
514507
int count = __kmp_suspend_count;

‎openmp/runtime/src/kmp_runtime.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -4082,10 +4082,6 @@ static void __kmp_initialize_info(kmp_info_t *this_thr, kmp_team_t *team,
40824082

40834083
this_thr->th.th_local.this_construct = 0;
40844084

4085-
#ifdef BUILD_TV
4086-
this_thr->th.th_local.tv_data = 0;
4087-
#endif
4088-
40894085
if (!this_thr->th.th_pri_common) {
40904086
this_thr->th.th_pri_common =
40914087
(struct common_table *)__kmp_allocate(sizeof(struct common_table));

‎openmp/runtime/src/kmp_threadprivate.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -445,10 +445,6 @@ struct private_common *kmp_threadprivate_insert(int gtid, void *pc_addr,
445445
tn->link = __kmp_threads[gtid]->th.th_pri_head;
446446
__kmp_threads[gtid]->th.th_pri_head = tn;
447447

448-
#ifdef BUILD_TV
449-
__kmp_tv_threadprivate_store(__kmp_threads[gtid], tn->gbl_addr, tn->par_addr);
450-
#endif
451-
452448
if ((__kmp_foreign_tp) ? (KMP_INITIAL_GTID(gtid)) : (KMP_UBER_GTID(gtid)))
453449
return tn;
454450

‎openmp/runtime/src/z_Linux_util.cpp

-35
Original file line numberDiff line numberDiff line change
@@ -1759,30 +1759,6 @@ void __kmp_clear_system_time(void) {
17591759
TIMEVAL_TO_TIMESPEC(&tval, &__kmp_sys_timer_data.start);
17601760
}
17611761

1762-
#ifdef BUILD_TV
1763-
1764-
void __kmp_tv_threadprivate_store(kmp_info_t *th, void *global_addr,
1765-
void *thread_addr) {
1766-
struct tv_data *p;
1767-
1768-
p = (struct tv_data *)__kmp_allocate(sizeof(*p));
1769-
1770-
p->u.tp.global_addr = global_addr;
1771-
p->u.tp.thread_addr = thread_addr;
1772-
1773-
p->type = (void *)1;
1774-
1775-
p->next = th->th.th_local.tv_data;
1776-
th->th.th_local.tv_data = p;
1777-
1778-
if (p->next == 0) {
1779-
int rc = pthread_setspecific(__kmp_tv_key, p);
1780-
KMP_CHECK_SYSFAIL("pthread_setspecific", rc);
1781-
}
1782-
}
1783-
1784-
#endif /* BUILD_TV */
1785-
17861762
static int __kmp_get_xproc(void) {
17871763

17881764
int r = 0;
@@ -1872,13 +1848,6 @@ void __kmp_runtime_initialize(void) {
18721848
/* Set up minimum number of threads to switch to TLS gtid */
18731849
__kmp_tls_gtid_min = KMP_TLS_GTID_MIN;
18741850

1875-
#ifdef BUILD_TV
1876-
{
1877-
int rc = pthread_key_create(&__kmp_tv_key, 0);
1878-
KMP_CHECK_SYSFAIL("pthread_key_create", rc);
1879-
}
1880-
#endif
1881-
18821851
status = pthread_key_create(&__kmp_gtid_threadprivate_key,
18831852
__kmp_internal_end_dest);
18841853
KMP_CHECK_SYSFAIL("pthread_key_create", status);
@@ -1910,10 +1879,6 @@ void __kmp_runtime_destroy(void) {
19101879

19111880
status = pthread_key_delete(__kmp_gtid_threadprivate_key);
19121881
KMP_CHECK_SYSFAIL("pthread_key_delete", status);
1913-
#ifdef BUILD_TV
1914-
status = pthread_key_delete(__kmp_tv_key);
1915-
KMP_CHECK_SYSFAIL("pthread_key_delete", status);
1916-
#endif
19171882

19181883
status = pthread_mutex_destroy(&__kmp_wait_mx.m_mutex);
19191884
if (status != 0 && status != EBUSY) {

0 commit comments

Comments
 (0)