From 1d09f0e68f9152817a7f896505d8c6dbe7e14e01 Mon Sep 17 00:00:00 2001 From: rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> Date: Wed, 30 Mar 2005 22:07:51 +0000 Subject: [PATCH] * cgraph.h (struct cgraph_node): Add alias. * varasm.c (assemble_alias): Set it. * cgraphunit.c (cgraph_assemble_pending_functions): Check it and avoid calling cgraph_expand_function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97284 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 7 +++++++ gcc/cgraph.h | 2 ++ gcc/cgraphunit.c | 4 +++- gcc/varasm.c | 2 +- 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2adae1617e3..be4f8c255e4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2005-03-30 Richard Henderson <rth@redhat.com> + + * cgraph.h (struct cgraph_node): Add alias. + * varasm.c (assemble_alias): Set it. + * cgraphunit.c (cgraph_assemble_pending_functions): Check it and + avoid calling cgraph_expand_function. + 2005-03-30 Tom Tromey <tromey@redhat.com> * tree.def (FILE_TYPE): Removed. diff --git a/gcc/cgraph.h b/gcc/cgraph.h index 46f9f0a660d..b9a8d6e319f 100644 --- a/gcc/cgraph.h +++ b/gcc/cgraph.h @@ -118,6 +118,8 @@ struct cgraph_node GTY((chain_next ("%h.next"), chain_prev ("%h.previous"))) bool analyzed; /* Set when function is scheduled to be assembled. */ bool output; + /* Set for aliases once they got through assemble_alias. */ + bool alias; }; struct cgraph_edge GTY((chain_next ("%h.next_caller"), chain_prev ("%h.prev_caller"))) diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index 6e864d5e243..9fef33e9557 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -300,7 +300,9 @@ cgraph_assemble_pending_functions (void) cgraph_nodes_queue = cgraph_nodes_queue->next_needed; n->next_needed = NULL; - if (!n->global.inlined_to && !DECL_EXTERNAL (n->decl)) + if (!n->global.inlined_to + && !n->alias + && !DECL_EXTERNAL (n->decl)) { cgraph_expand_function (n); output = true; diff --git a/gcc/varasm.c b/gcc/varasm.c index c51f6c045d6..cf323f4c31f 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -4516,7 +4516,7 @@ assemble_alias (tree decl, tree target) /* Allow aliases to aliases. */ if (TREE_CODE (decl) == FUNCTION_DECL) - cgraph_node (decl); + cgraph_node (decl)->alias = true; else cgraph_varpool_node (decl)->alias = true; -- GitLab