[Openmp-commits] [openmp] r311114 - Remove BUILD_TV

Jonathan Peyton via Openmp-commits openmp-commits at lists.llvm.org
Thu Aug 17 12:09:28 PDT 2017


Author: jlpeyton
Date: Thu Aug 17 12:09:28 2017
New Revision: 311114

URL: http://llvm.org/viewvc/llvm-project?rev=311114&view=rev
Log:
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

Modified:
    openmp/trunk/runtime/src/kmp.h
    openmp/trunk/runtime/src/kmp_global.cpp
    openmp/trunk/runtime/src/kmp_runtime.cpp
    openmp/trunk/runtime/src/kmp_threadprivate.cpp
    openmp/trunk/runtime/src/z_Linux_util.cpp

Modified: openmp/trunk/runtime/src/kmp.h
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp.h?rev=311114&r1=311113&r2=311114&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp.h (original)
+++ openmp/trunk/runtime/src/kmp.h Thu Aug 17 12:09:28 2017
@@ -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
 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);

Modified: openmp/trunk/runtime/src/kmp_global.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_global.cpp?rev=311114&r1=311113&r2=311114&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_global.cpp (original)
+++ openmp/trunk/runtime/src/kmp_global.cpp Thu Aug 17 12:09:28 2017
@@ -502,13 +502,6 @@ kmp_lock_t __kmp_debug_lock; /* Control
 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;

Modified: openmp/trunk/runtime/src/kmp_runtime.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_runtime.cpp?rev=311114&r1=311113&r2=311114&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_runtime.cpp (original)
+++ openmp/trunk/runtime/src/kmp_runtime.cpp Thu Aug 17 12:09:28 2017
@@ -4082,10 +4082,6 @@ static void __kmp_initialize_info(kmp_in
 
   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));

Modified: openmp/trunk/runtime/src/kmp_threadprivate.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_threadprivate.cpp?rev=311114&r1=311113&r2=311114&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_threadprivate.cpp (original)
+++ openmp/trunk/runtime/src/kmp_threadprivate.cpp Thu Aug 17 12:09:28 2017
@@ -445,10 +445,6 @@ struct private_common *kmp_threadprivate
   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;
 

Modified: openmp/trunk/runtime/src/z_Linux_util.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/z_Linux_util.cpp?rev=311114&r1=311113&r2=311114&view=diff
==============================================================================
--- openmp/trunk/runtime/src/z_Linux_util.cpp (original)
+++ openmp/trunk/runtime/src/z_Linux_util.cpp Thu Aug 17 12:09:28 2017
@@ -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) {




More information about the Openmp-commits mailing list