diff options
author | aj <aj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-07-12 11:29:18 +0000 |
---|---|---|
committer | aj <aj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-07-12 11:29:18 +0000 |
commit | eeba438a000d19a2ef5cbb85646ac1a21dd655ed (patch) | |
tree | 7178a940ba7ea592bc3891d09051076007d7a9fa /gcc/cgraph.c | |
parent | c50db3a3a171b88795fce000948beddfb722a624 (diff) | |
download | gcc-eeba438a000d19a2ef5cbb85646ac1a21dd655ed.tar.gz |
* fp-test.c (main): Use ISO C90 prototype.
* version.c: Remove unneded include of ansidecl.h.
* cgraph.h: Convert prototypes to ISO C90.
* cgraph.c: Likewise.
* fix-header.c: Likewise.
* ra.h: Likewise.
* protoize.c: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69265 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r-- | gcc/cgraph.c | 68 |
1 files changed, 25 insertions, 43 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c index c1913813381..5caa6f35b20 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -66,17 +66,16 @@ int cgraph_varpool_n_nodes; /* The linked list of cgraph varpool nodes. */ static GTY(()) struct cgraph_varpool_node *cgraph_varpool_nodes; -static struct cgraph_edge *create_edge PARAMS ((struct cgraph_node *, - struct cgraph_node *)); -static void cgraph_remove_edge PARAMS ((struct cgraph_node *, struct cgraph_node *)); -static hashval_t hash_node PARAMS ((const void *)); -static int eq_node PARAMS ((const void *, const void *)); +static struct cgraph_edge *create_edge (struct cgraph_node *, + struct cgraph_node *); +static void cgraph_remove_edge (struct cgraph_node *, struct cgraph_node *); +static hashval_t hash_node (const void *); +static int eq_node (const void *, const void *); /* Returns a hash code for P. */ static hashval_t -hash_node (p) - const void *p; +hash_node (const void *p) { return ((hashval_t) IDENTIFIER_HASH_VALUE (DECL_ASSEMBLER_NAME @@ -86,9 +85,7 @@ hash_node (p) /* Returns nonzero if P1 and P2 are equal. */ static int -eq_node (p1, p2) - const void *p1; - const void *p2; +eq_node (const void *p1, const void *p2) { return ((DECL_ASSEMBLER_NAME (((struct cgraph_node *) p1)->decl)) == (tree) p2); @@ -96,8 +93,7 @@ eq_node (p1, p2) /* Return cgraph node assigned to DECL. Create new one when needed. */ struct cgraph_node * -cgraph_node (decl) - tree decl; +cgraph_node (tree decl) { struct cgraph_node *node; struct cgraph_node **slot; @@ -135,8 +131,7 @@ cgraph_node (decl) /* Try to find existing function for identifier ID. */ struct cgraph_node * -cgraph_node_for_identifier (id) - tree id; +cgraph_node_for_identifier (tree id) { struct cgraph_node **slot; @@ -148,7 +143,7 @@ cgraph_node_for_identifier (id) slot = (struct cgraph_node **) htab_find_slot_with_hash (cgraph_hash, id, - IDENTIFIER_HASH_VALUE (id), 0); + IDENTIFIER_HASH_VALUE (id), 0); if (!slot) return NULL; return *slot; @@ -157,8 +152,7 @@ cgraph_node_for_identifier (id) /* Create edge from CALLER to CALLEE in the cgraph. */ static struct cgraph_edge * -create_edge (caller, callee) - struct cgraph_node *caller, *callee; +create_edge (struct cgraph_node *caller, struct cgraph_node *callee) { struct cgraph_edge *edge = ggc_alloc (sizeof (struct cgraph_edge)); struct cgraph_edge *edge2; @@ -187,8 +181,7 @@ create_edge (caller, callee) /* Remove the edge from CALLER to CALLEE in the cgraph. */ static void -cgraph_remove_edge (caller, callee) - struct cgraph_node *caller, *callee; +cgraph_remove_edge (struct cgraph_node *caller, struct cgraph_node *callee) { struct cgraph_edge **edge, **edge2; @@ -209,8 +202,7 @@ cgraph_remove_edge (caller, callee) /* Remove the node from cgraph. */ void -cgraph_remove_node (node) - struct cgraph_node *node; +cgraph_remove_node (struct cgraph_node *node) { while (node->callers) cgraph_remove_edge (node->callers->caller, node); @@ -239,9 +231,7 @@ cgraph_remove_node (node) /* Notify finalize_compilation_unit that given node is reachable or needed. */ void -cgraph_mark_needed_node (node, needed) - struct cgraph_node *node; - int needed; +cgraph_mark_needed_node (struct cgraph_node *node, int needed) { if (needed) { @@ -262,15 +252,13 @@ cgraph_mark_needed_node (node, needed) /* Record call from CALLER to CALLEE */ struct cgraph_edge * -cgraph_record_call (caller, callee) - tree caller, callee; +cgraph_record_call (tree caller, tree callee) { return create_edge (cgraph_node (caller), cgraph_node (callee)); } void -cgraph_remove_call (caller, callee) - tree caller, callee; +cgraph_remove_call (tree caller, tree callee) { cgraph_remove_edge (cgraph_node (caller), cgraph_node (callee)); } @@ -278,8 +266,7 @@ cgraph_remove_call (caller, callee) /* Return true when CALLER_DECL calls CALLEE_DECL. */ bool -cgraph_calls_p (caller_decl, callee_decl) - tree caller_decl, callee_decl; +cgraph_calls_p (tree caller_decl, tree callee_decl) { struct cgraph_node *caller = cgraph_node (caller_decl); struct cgraph_node *callee = cgraph_node (callee_decl); @@ -294,8 +281,7 @@ cgraph_calls_p (caller_decl, callee_decl) /* Return local info for the compiled function. */ struct cgraph_local_info * -cgraph_local_info (decl) - tree decl; +cgraph_local_info (tree decl) { struct cgraph_node *node; if (TREE_CODE (decl) != FUNCTION_DECL) @@ -307,8 +293,7 @@ cgraph_local_info (decl) /* Return local info for the compiled function. */ struct cgraph_global_info * -cgraph_global_info (decl) - tree decl; +cgraph_global_info (tree decl) { struct cgraph_node *node; if (TREE_CODE (decl) != FUNCTION_DECL || !cgraph_global_info_ready) @@ -320,8 +305,7 @@ cgraph_global_info (decl) /* Return local info for the compiled function. */ struct cgraph_rtl_info * -cgraph_rtl_info (decl) - tree decl; +cgraph_rtl_info (tree decl) { struct cgraph_node *node; if (TREE_CODE (decl) != FUNCTION_DECL) @@ -335,8 +319,7 @@ cgraph_rtl_info (decl) /* Return name of the node used in debug output. */ const char * -cgraph_node_name (node) - struct cgraph_node *node; +cgraph_node_name (struct cgraph_node *node) { return (*lang_hooks.decl_printable_name) (node->decl, 2); } @@ -344,8 +327,7 @@ cgraph_node_name (node) /* Dump the callgraph. */ void -dump_cgraph (f) - FILE *f; +dump_cgraph (FILE *f) { struct cgraph_node *node; @@ -398,7 +380,7 @@ dump_cgraph (f) /* Returns a hash code for P. */ static hashval_t -cgraph_varpool_hash_node (const PTR p) +cgraph_varpool_hash_node (const void *p) { return ((hashval_t) IDENTIFIER_HASH_VALUE (DECL_ASSEMBLER_NAME @@ -408,7 +390,7 @@ cgraph_varpool_hash_node (const PTR p) /* Returns nonzero if P1 and P2 are equal. */ static int -eq_cgraph_varpool_node (const PTR p1, const PTR p2) +eq_cgraph_varpool_node (const void *p1, const void *p2) { return ((DECL_ASSEMBLER_NAME (((struct cgraph_varpool_node *) p1)->decl)) == (tree) p2); @@ -502,7 +484,7 @@ cgraph_varpool_finalize_decl (tree decl) } bool -cgraph_varpool_assemble_pending_decls () +cgraph_varpool_assemble_pending_decls (void) { bool changed = false; |