Avoid varpool to check TREE_SYMBOL_REFERENCED

Jan Hubicka hubicka@ucw.cz
Thu May 13 17:53:00 GMT 2010


Hi,
this hunk of code originated in times when we did try to track aliases in
varpool by pretending they do not exist.  This was cleaned up and fixed long
time ago.  

Removed thus.

Long time ago I was told to move C++ frotend and backend away from using
TREE_SYMBOL_REFERENCED to drive compilation.  This is complette now,
only place where TREE_SYMBOL_REFERENCES matters in single place in C++
where mark_used is implemented this way (and I think DECL_PRESERVE_P
is correct way to handle that case) and simple hack in dwarf2out.

The plan was to drop symbols and make DECL_ASSEMBLER_NAME and friends to
be direct string pointers that was supposed to save a lot of RAM. Perhaps
we can do this transition now? :)

Bootstrapped/regtested x86_64-linux and comitted.

	* varpool.c (decide_is_variable_needed): Drop code checking
	TREE_SYMBOL_REFERENCED.
Index: varpool.c
===================================================================
--- varpool.c	(revision 159362)
+++ varpool.c	(working copy)
@@ -321,13 +321,6 @@ decide_is_variable_needed (struct varpoo
       || node->force_output)
     return true;
 
-  /* ??? If the assembler name is set by hand, it is possible to assemble
-     the name later after finalizing the function and the fact is noticed
-     in assemble_name then.  This is arguably a bug.  */
-  if (DECL_ASSEMBLER_NAME_SET_P (decl)
-      && TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)))
-    return true;
-
   /* Externally visible variables must be output.  The exception is
      COMDAT variables that must be output only when they are needed.  */
   if (TREE_PUBLIC (decl)



More information about the Gcc-patches mailing list