summaryrefslogtreecommitdiff
path: root/gcc/tree-profile.c
diff options
context:
space:
mode:
authordavidxl <davidxl@138bc75d-0d04-0410-961f-82ee72b054a4>2011-04-29 17:13:23 +0000
committerdavidxl <davidxl@138bc75d-0d04-0410-961f-82ee72b054a4>2011-04-29 17:13:23 +0000
commit109cfbe48f83da1dc395ec01bb131fc502dc2a14 (patch)
tree59d3c54a746b457f6cb108cccbb5acecb2d38909 /gcc/tree-profile.c
parentd6a853a78e567b7e902e34c5bd1e17df1cafefb6 (diff)
downloadgcc-109cfbe48f83da1dc395ec01bb131fc502dc2a14.tar.gz
use tls for ic vars
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173177 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-profile.c')
-rw-r--r--gcc/tree-profile.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/tree-profile.c b/gcc/tree-profile.c
index c296dffe3c3..69d77f07892 100644
--- a/gcc/tree-profile.c
+++ b/gcc/tree-profile.c
@@ -44,6 +44,8 @@ along with GCC; see the file COPYING3. If not see
#include "value-prof.h"
#include "cgraph.h"
#include "profile.h"
+#include "target.h"
+#include "output.h"
static GTY(()) tree gcov_type_node;
static GTY(()) tree gcov_type_tmp_var;
@@ -80,6 +82,10 @@ init_ic_make_global_vars (void)
TREE_PUBLIC (ic_void_ptr_var) = 0;
DECL_ARTIFICIAL (ic_void_ptr_var) = 1;
DECL_INITIAL (ic_void_ptr_var) = NULL;
+ if (targetm.have_tls)
+ DECL_TLS_MODEL (ic_void_ptr_var) =
+ decl_default_tls_model (ic_void_ptr_var);
+
varpool_finalize_decl (ic_void_ptr_var);
varpool_mark_needed_node (varpool_node (ic_void_ptr_var));
@@ -92,6 +98,10 @@ init_ic_make_global_vars (void)
TREE_PUBLIC (ic_gcov_type_ptr_var) = 0;
DECL_ARTIFICIAL (ic_gcov_type_ptr_var) = 1;
DECL_INITIAL (ic_gcov_type_ptr_var) = NULL;
+ if (targetm.have_tls)
+ 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);
varpool_mark_needed_node (varpool_node (ic_gcov_type_ptr_var));
}