aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2012-04-16 14:34:22 +0000
committerJan Hubicka <jh@suse.cz>2012-04-16 14:34:22 +0000
commit55bf9e6a09dfc6e5a4a66fba48544ce8e193bc71 (patch)
tree5faa94b4b722d5a4697b6faeb99c4c72e121c4ff /gcc/ipa.c
parentcd17bd0391f0cbc286fd01121e055245a12d83d3 (diff)
* cgraph.h (symtab_node_base): Add next and previous pointers.
(cgraph_node): Remove next and preivous pointers. (varpool_node): Likewise; remove next/previous GTY marker; it is not type safe. (symtab_node_def): Update GTY marker (x_cgraph_nodes, cgraph_nodes): Remove. (symtab_nodes): New function. (cgraph_order): Rename to ... (symtab_order): ... this one. (symtab_register_node, symtab_unregister_node, symtab_remove_node): Declare. (x_varpool_nodes, varpool_nodes): Remove. (FOR_EACH_STATIC_VARIABLE): Update. (symtab_function_p, symtab_variable_p): New function. (FOR_EACH_VARIABLE): Update. (varpool_first_variable, varpool_next_variable): New functions. (FOR_EACH_VARIABLE): Update. (cgraph_first_defined_function): Update. (cgraph_next_defined_function, cgraph_next_defined_function): Update. (FOR_EACH_DEFINED_FUNCTION, FOR_EACH_FUNCTION): Update. (cgraph_first_function, cgraph_next_function): New. (FOR_EACH_FUNCTION): Update. (cgraph_first_function_with_gimple_body, cgraph_next_function_with_gimple_body): Update. * symtab.c: New file. * cgraph.c: Update copyright dates. (x_cgraph_nodes, cgraph_order): Remove. (NEXT_FREE_NODE): Update. (SET_NEXT_FREE_NODE): New. (cgraph_create_node_1): Remove common code. (cgraph_create_node); Remove common code; call symtab_register_node. (cgraph_remove_node): Remove common code; call symtab_unregister-node. (cgraph_add_asm_node); update. (cgraph_clone_node): Register new node. * cgraphunit.c (process_function_and_variable_attributes): Update. (cgraph_analyze_functions): Update. (cgraph_analyze_functions): Update. (cgraph_output_in_order): Update. * lto-cgraph.c (input_node, input_varpool_node, input_cgraph_1): Update. * ipa-inline.c (recursive_inlining); update. * lto-streamer-in.c (lto_input_toplevel_asms); Update. * ipa.c (cgraph_remove_unreachable_nodes): Update. * Makefile.in: Add symtab.o * varpool.c (x_varpool_nodes): Remove (varpool_node): Remove common code; call symtab_register_node. (varpool_remove_node); Remove common code; call symtab_unregister_node. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@186496 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa.c')
-rw-r--r--gcc/ipa.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/ipa.c b/gcc/ipa.c
index 7c35346fcbf..b46618809df 100644
--- a/gcc/ipa.c
+++ b/gcc/ipa.c
@@ -329,9 +329,9 @@ cgraph_remove_unreachable_nodes (bool before_inlining_p, FILE *file)
Also we need to care functions that are unreachable but we need to keep them around
for later clonning. In this case we also turn them to unanalyzed nodes, but
keep the body around. */
- for (node = cgraph_nodes; node; node = next)
+ for (node = cgraph_first_function (); node; node = next)
{
- next = node->next;
+ next = cgraph_next_function (node);
if (node->symbol.aux && !node->reachable)
{
cgraph_node_remove_callees (node);
@@ -425,9 +425,9 @@ cgraph_remove_unreachable_nodes (bool before_inlining_p, FILE *file)
if (file)
fprintf (file, "Reclaiming variables:");
- for (vnode = varpool_nodes; vnode; vnode = vnext)
+ for (vnode = varpool_first_variable (); vnode; vnode = vnext)
{
- vnext = vnode->next;
+ vnext = varpool_next_variable (vnode);
if (!vnode->needed)
{
if (file)