This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH][Revised] Fix a race condition in indirect call value profiling


  The attached patch was previously rejected since it broke the darwin
target (back when it was a primary) due the absence of emutls support
in its versioned libgcc. 

http://gcc.gnu.org/ml/gcc-patches/2008-12/msg00892.html
http://gcc.gnu.org/ml/gcc-patches/2008-12/msg01257.html

Now we have libgcc_ext to provide the additional libgcc symbols
and this patch produces no regressions on x86_64-apple-darwin10
provided the proposed fix for passing -DHAVE_EMUTLS via the
GCC_CHECK_EMUTLS in the libgcc build (PR43553)...

http://gcc.gnu.org/ml/gcc-patches/2010-03/msg01333.html

is also applied.

http://gcc.gnu.org/ml/gcc-testresults/2010-03/msg02490.html.

Okay for gcc trunk?
               Jack


2010-03-28  Seongbae Park <seongbae.park@gmail.com>
	    Jack Howarth <howarth@bromo.med.uc.edu>

	* tree-profile.c (tree_init_ic_make_global_vars): Make static variables TLS.

Index: gcc/tree-profile.c
===================================================================
--- gcc/tree-profile.c	(revision 157765)
+++ gcc/tree-profile.c	(working copy)
@@ -82,6 +82,7 @@
   TREE_PUBLIC (ic_void_ptr_var) = 0;
   DECL_ARTIFICIAL (ic_void_ptr_var) = 1;
   DECL_INITIAL (ic_void_ptr_var) = NULL;
+  DECL_TLS_MODEL (ic_void_ptr_var) = decl_default_tls_model (ic_void_ptr_var);
   varpool_finalize_decl (ic_void_ptr_var);
 
   gcov_type_ptr = build_pointer_type (get_gcov_type ());
@@ -93,6 +94,7 @@
   TREE_PUBLIC (ic_gcov_type_ptr_var) = 0;
   DECL_ARTIFICIAL (ic_gcov_type_ptr_var) = 1;
   DECL_INITIAL (ic_gcov_type_ptr_var) = NULL;
+  DECL_TLS_MODEL (ic_gcov_type_ptr_var) = decl_default_tls_model (ic_gcov_type_ptr_var);
   varpool_finalize_decl (ic_gcov_type_ptr_var);
 }
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]