Commit 714c800f by Jan Hubicka Committed by Jan Hubicka

cgraph.h (tls_model_names): New variable.


	* cgraph.h (tls_model_names): New variable.
	* print-tree.c (print_node): Simplify.
	* varpool.c (tls_model_names): New variable.
	(dump_varpool_node): Output tls model.

	* lto-symtab.c (lto_varpool_replace_node): Report TLS model conflicts.

From-SVN: r211865
parent b4897212
2014-06-20 Jan Hubicka <hubicka@ucw.cz>
* cgraph.h (tls_model_names): New variable.
* print-tree.c (print_node): Simplify.
* varpool.c (tls_model_names): New variable.
(dump_varpool_node): Output tls model.
2014-06-20 Jan Hubicka <hubicka@ucw.cz>
* ipa-visibility.c (function_and_variable_visibility): Disable
temporarily local aliases for some targets.
......
......@@ -244,6 +244,7 @@ struct lto_file_decl_data;
extern const char * const cgraph_availability_names[];
extern const char * const ld_plugin_symbol_resolution_names[];
extern const char * const tls_model_names[];
/* Information about thunk, used only for same body aliases. */
......
2014-06-20 Jan Hubicka <hubicka@ucw.cz>
* lto-symtab.c (lto_varpool_replace_node): Report TLS model conflicts.
2014-06-20 Jan Hubicka <hubicka@ucw.cz>
* lto.c (compare_tree_sccs_1): Do not compare priorities.
2014-06-15 Jan Hubicka <hubicka@ucw.cz>
......
......@@ -116,6 +116,15 @@ lto_varpool_replace_node (varpool_node *vnode,
if (DECL_INITIAL (vnode->decl)
&& vnode->decl != prevailing_node->decl)
DECL_INITIAL (vnode->decl) = error_mark_node;
if (vnode->tls_model != prevailing_node->tls_model)
{
error_at (DECL_SOURCE_LOCATION (vnode->decl),
"%qD is defined as %s", vnode->decl, tls_model_names [vnode->tls_model]);
inform (DECL_SOURCE_LOCATION (prevailing_node->decl),
"previously defined here as %s",
tls_model_names [prevailing_node->tls_model]);
}
/* Finally remove the replaced node. */
varpool_remove_node (vnode);
}
......
......@@ -418,24 +418,8 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
fputs (" common", file);
if (code == VAR_DECL && DECL_THREAD_LOCAL_P (node))
{
enum tls_model kind = DECL_TLS_MODEL (node);
switch (kind)
{
case TLS_MODEL_GLOBAL_DYNAMIC:
fputs (" tls-global-dynamic", file);
break;
case TLS_MODEL_LOCAL_DYNAMIC:
fputs (" tls-local-dynamic", file);
break;
case TLS_MODEL_INITIAL_EXEC:
fputs (" tls-initial-exec", file);
break;
case TLS_MODEL_LOCAL_EXEC:
fputs (" tls-local-exec", file);
break;
default:
gcc_unreachable ();
}
fputs (" ", file);
fputs (tls_model_names[DECL_TLS_MODEL (node)], file);
}
if (CODE_CONTAINS_STRUCT (code, TS_DECL_COMMON))
......
......@@ -36,6 +36,10 @@ along with GCC; see the file COPYING3. If not see
#include "flags.h"
#include "pointer-set.h"
const char * const tls_model_names[]={"none", "tls-emulated", "tls-real",
"tls-global-dynamic", "tls-local-dynamic",
"tls-initial-exec", "tls-local-exec"};
/* List of hooks triggered on varpool_node events. */
struct varpool_node_hook_list {
varpool_node_hook hook;
......@@ -213,6 +217,8 @@ dump_varpool_node (FILE *f, varpool_node *node)
fprintf (f, " const-value-known");
if (node->writeonly)
fprintf (f, " write-only");
if (node->tls_model)
fprintf (f, " %s", tls_model_names [node->tls_model]);
fprintf (f, "\n");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment