final.c (output_addr_const): Do not call mark_decl_referenced.
authorJan Hubicka <jh@suse.cz>
Thu, 13 May 2010 17:46:21 +0000 (19:46 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Thu, 13 May 2010 17:46:21 +0000 (17:46 +0000)
* final.c (output_addr_const): Do not call mark_decl_referenced.
* cgraphunit.c (process_function_and_variable_attributes): Use
mark_needed_node dirrectly.
(assemble_thunk): Do not call mark_decl_referenced.

From-SVN: r159370

gcc/ChangeLog
gcc/cgraphunit.c
gcc/final.c

index 944989514bcf73c54eed6e3dddf5929f70cc59ae..9a77193f6be3dee8f9990b2f867683ecdbb931bd 100644 (file)
@@ -1,3 +1,10 @@
+2010-05-13  Jan Hubicka  <jh@suse.cz>
+
+       * final.c (output_addr_const): Do not call mark_decl_referenced.
+       * cgraphunit.c (process_function_and_variable_attributes): Use
+       mark_needed_node dirrectly.
+       (assemble_thunk): Do not call mark_decl_referenced.
+
 2010-05-13  Anatoly Sokolov  <aesok@post.ru>
 
        * targhooks.c (default_mode_dependent_address_p): Cast 'addr' to rtx.
index b97a33e274df58e55955937079a880fcf18848d2..7618dd0074346a60a915ac3fcab9e773e629afe4 100644 (file)
@@ -959,11 +959,7 @@ process_function_and_variable_attributes (struct cgraph_node *first,
     {
       tree decl = node->decl;
       if (DECL_PRESERVE_P (decl))
-       {
-         mark_decl_referenced (decl);
-         if (node->local.finalized)
-            cgraph_mark_needed_node (node);
-       }
+       cgraph_mark_needed_node (node);
       if (lookup_attribute ("externally_visible", DECL_ATTRIBUTES (decl)))
        {
          if (! TREE_PUBLIC (node->decl))
@@ -979,7 +975,6 @@ process_function_and_variable_attributes (struct cgraph_node *first,
       tree decl = vnode->decl;
       if (DECL_PRESERVE_P (decl))
        {
-         mark_decl_referenced (decl);
          vnode->force_output = true;
          if (vnode->finalized)
            varpool_mark_needed_node (vnode);
@@ -1602,7 +1597,6 @@ assemble_thunk (struct cgraph_node *node)
       cgraph_remove_same_body_alias (node);
       /* Since we want to emit the thunk, we explicitly mark its name as
         referenced.  */
-      mark_decl_referenced (thunk_fndecl);
       cgraph_add_new_function (thunk_fndecl, true);
       bitmap_obstack_release (NULL);
     }
index 5011b6c5cacf02b5b38164cd326714ea9acc51ff..e9c8748c448dc54c7ab82256bdc2965dd1772317 100644 (file)
@@ -3529,10 +3529,7 @@ output_addr_const (FILE *file, rtx x)
 
     case SYMBOL_REF:
       if (SYMBOL_REF_DECL (x))
-       {
-         mark_decl_referenced (SYMBOL_REF_DECL (x));
-         assemble_external (SYMBOL_REF_DECL (x));
-       }
+       assemble_external (SYMBOL_REF_DECL (x));
 #ifdef ASM_OUTPUT_SYMBOL_REF
       ASM_OUTPUT_SYMBOL_REF (file, x);
 #else