cgraph.h (cgraph_get_node_or_alias): Removed declaration.
authorMartin Jambor <mjambor@suse.cz>
Tue, 12 Jul 2011 10:29:39 +0000 (12:29 +0200)
committerMartin Jambor <jamborm@gcc.gnu.org>
Tue, 12 Jul 2011 10:29:39 +0000 (12:29 +0200)
2011-07-12  Martin Jambor  <mjambor@suse.cz>

* cgraph.h (cgraph_get_node_or_alias): Removed declaration.
* cgraph.c (cgraph_get_node_or_alias): Removed.
(change_decl_assembler_name): Changed all calls to
cgraph_get_node_or_alias to a call to cgraph_get_node.
(cgraph_make_decl_local): Likewise.
* lto-symtab.c (lto_symtab_resolve_symbols): Likewise.
* varasm.c (default_binds_local_p_1): Likewise.
(decl_binds_to_current_def_p): Likewise.

From-SVN: r176196

gcc/ChangeLog
gcc/cgraph.c
gcc/cgraph.h
gcc/lto-symtab.c
gcc/varasm.c

index 2599e731729485100891fab05ae51a6280353de8..d121c5c40f1e2a2c555db71975f63d545242ec55 100644 (file)
@@ -1,3 +1,14 @@
+2011-07-12  Martin Jambor  <mjambor@suse.cz>
+
+       * cgraph.h (cgraph_get_node_or_alias): Removed declaration.
+       * cgraph.c (cgraph_get_node_or_alias): Removed.
+       (change_decl_assembler_name): Changed all calls to
+       cgraph_get_node_or_alias to a call to cgraph_get_node.
+       (cgraph_make_decl_local): Likewise.
+       * lto-symtab.c (lto_symtab_resolve_symbols): Likewise.
+       * varasm.c (default_binds_local_p_1): Likewise.
+       (decl_binds_to_current_def_p): Likewise.
+
 2011-07-12  Jakub Jelinek  <jakub@redhat.com>
 
        PR tree-optimization/49712
index 09aad60c4d2d5fe6fc85a80ecd1975e3e2cbeaf1..c37158d20c7124f9be661f1bbd6850718e666f46 100644 (file)
@@ -638,29 +638,6 @@ cgraph_add_thunk (struct cgraph_node *decl_node ATTRIBUTE_UNUSED,
   return node;
 }
 
-/* Returns the cgraph node assigned to DECL or NULL if no cgraph node
-   is assigned.  */
-
-struct cgraph_node *
-cgraph_get_node_or_alias (const_tree decl)
-{
-  struct cgraph_node key, *node = NULL, **slot;
-
-  gcc_assert (TREE_CODE (decl) == FUNCTION_DECL);
-
-  if (!cgraph_hash)
-    return NULL;
-
-  key.decl = CONST_CAST2 (tree, const_tree, decl);
-
-  slot = (struct cgraph_node **) htab_find_slot (cgraph_hash, &key,
-                                                NO_INSERT);
-
-  if (slot && *slot)
-    node = *slot;
-  return node;
-}
-
 /* Returns the cgraph node assigned to DECL or NULL if no cgraph node
    is assigned.  */
 
@@ -1984,7 +1961,7 @@ change_decl_assembler_name (tree decl, tree name)
 
       if (assembler_name_hash
          && TREE_CODE (decl) == FUNCTION_DECL
-         && (node = cgraph_get_node_or_alias (decl)) != NULL)
+         && (node = cgraph_get_node (decl)) != NULL)
        {
          tree old_name = DECL_ASSEMBLER_NAME (decl);
          slot = htab_find_slot_with_hash (assembler_name_hash, old_name,
@@ -2002,7 +1979,7 @@ change_decl_assembler_name (tree decl, tree name)
     }
   if (assembler_name_hash
       && TREE_CODE (decl) == FUNCTION_DECL
-      && (node = cgraph_get_node_or_alias (decl)) != NULL)
+      && (node = cgraph_get_node (decl)) != NULL)
     {
       slot = htab_find_slot_with_hash (assembler_name_hash, name,
                                       decl_assembler_name_hash (name),
@@ -2525,7 +2502,7 @@ cgraph_make_decl_local (tree decl)
          old_name  = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
          if (TREE_CODE (decl) == FUNCTION_DECL)
            {
-             struct cgraph_node *node = cgraph_get_node_or_alias (decl);
+             struct cgraph_node *node = cgraph_get_node (decl);
              change_decl_assembler_name (decl,
                                          clone_function_name (decl, "local"));
              if (node->local.lto_file_data)
index 5d6ff7caf61f5ce2bf0c37f91d66190731c80e82..cfc24795917dd997c36062062417edd3224202e6 100644 (file)
@@ -480,7 +480,6 @@ struct cgraph_edge *cgraph_create_indirect_edge (struct cgraph_node *, gimple,
                                                 int, gcov_type, int);
 struct cgraph_indirect_call_info *cgraph_allocate_init_indirect_info (void);
 struct cgraph_node * cgraph_get_node (const_tree);
-struct cgraph_node * cgraph_get_node_or_alias (const_tree);
 struct cgraph_node * cgraph_create_node (tree);
 struct cgraph_node * cgraph_get_create_node (tree);
 struct cgraph_node * cgraph_same_body_alias (struct cgraph_node *, tree, tree);
index 2bbf064ee7d52be4fd99a2e9ee2ad519f04b6f71..3a7c783f770efb3da8aa9facfd9c4ffe3b70f9fb 100644 (file)
@@ -438,7 +438,7 @@ lto_symtab_resolve_symbols (void **slot)
   for (e = (lto_symtab_entry_t) *slot; e; e = e->next)
     {
       if (TREE_CODE (e->decl) == FUNCTION_DECL)
-       e->node = cgraph_get_node_or_alias (e->decl);
+       e->node = cgraph_get_node (e->decl);
       else if (TREE_CODE (e->decl) == VAR_DECL)
        e->vnode = varpool_get_node (e->decl);
     }
index b0690f50a5109f5aa5f310db3936278753088d33..045d6192e2c08dcfb637bea5001a54489ee7bc16 100644 (file)
@@ -6720,7 +6720,7 @@ default_binds_local_p_1 (const_tree exp, int shlib)
     }
   else if (TREE_CODE (exp) == FUNCTION_DECL && TREE_PUBLIC (exp))
     {
-      struct cgraph_node *node = cgraph_get_node_or_alias (exp);
+      struct cgraph_node *node = cgraph_get_node (exp);
       if (node
          && resolution_local_p (node->resolution))
        resolved_locally = true;
@@ -6808,7 +6808,7 @@ decl_binds_to_current_def_p (tree decl)
     }
   else if (TREE_CODE (decl) == FUNCTION_DECL)
     {
-      struct cgraph_node *node = cgraph_get_node_or_alias (decl);
+      struct cgraph_node *node = cgraph_get_node (decl);
       if (node
          && node->resolution != LDPR_UNKNOWN)
        return resolution_to_local_definition_p (node->resolution);