aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraph.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2009-05-10 17:11:01 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2009-05-10 15:11:01 +0000
commit39ff5a967693c3aa56e8abf0e9c75fabe3335d8d (patch)
tree74ceb2f1c2ecc5f55f8c3f84dd6a925d1b0918c4 /gcc/cgraph.c
parent9a0c61875533558e047cb5ef140d9836ed475ab9 (diff)
downloadgcc-39ff5a967693c3aa56e8abf0e9c75fabe3335d8d.zip
gcc-39ff5a967693c3aa56e8abf0e9c75fabe3335d8d.tar.gz
gcc-39ff5a967693c3aa56e8abf0e9c75fabe3335d8d.tar.bz2
cgraphbuild.c (record_reference): Use cgraph_mark_address_taken_node.
* cgraphbuild.c (record_reference): Use cgraph_mark_address_taken_node. * cgraph.c (cgraph_mark_address_taken_node): New function. (dump_cgraph_node): Dump new flag. * cgraph.h (struct cgraph_node): Add address_taken. (cgraph_mark_address_taken_node): New function. * cp/decl2.c (cxx_callgraph_analyze_expr): Use cgraph_mark_address_taken. * ipa.c (cgraph_postorder): Prioritize functions with address taken since new direct calls can be born. From-SVN: r147342
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r--gcc/cgraph.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index 5d2cc1d..60ff168 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -1293,6 +1293,15 @@ cgraph_mark_needed_node (struct cgraph_node *node)
cgraph_mark_reachable_node (node);
}
+/* Likewise indicate that a node is having address taken. */
+
+void
+cgraph_mark_address_taken_node (struct cgraph_node *node)
+{
+ node->address_taken = 1;
+ cgraph_mark_needed_node (node);
+}
+
/* Return local info for the compiled function. */
struct cgraph_local_info *
@@ -1397,6 +1406,8 @@ dump_cgraph_node (FILE *f, struct cgraph_node *node)
fprintf (f, " nested in: %s", cgraph_node_name (node->origin));
if (node->needed)
fprintf (f, " needed");
+ if (node->address_taken)
+ fprintf (f, " address_taken");
else if (node->reachable)
fprintf (f, " reachable");
if (gimple_has_body_p (node->decl))