2
0
mirror of git://gcc.gnu.org/git/gcc.git synced 2025-03-17 09:30:31 +08:00

* cgraphunit.c: Convert prototypes to ISO C90.

From-SVN: r69285
This commit is contained in:
Andreas Jaeger 2003-07-13 10:40:07 +02:00 committed by Andreas Jaeger
parent 4146d8d0c4
commit db0e878d33
2 changed files with 30 additions and 39 deletions

@ -1,3 +1,7 @@
2003-07-13 Andreas Jaeger <aj@suse.de>
* cgraphunit.c: Convert prototypes to ISO C90.
2003-07-13 Nathanael Nerode <neroden@gcc.gnu.org> 2003-07-13 Nathanael Nerode <neroden@gcc.gnu.org>
* fixinc/inclhack.def (avoid_wchar_t_type): Use __cplusplus bypass * fixinc/inclhack.def (avoid_wchar_t_type): Use __cplusplus bypass

@ -41,12 +41,12 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#define INSNS_PER_CALL 10 #define INSNS_PER_CALL 10
static void cgraph_expand_functions PARAMS ((void)); static void cgraph_expand_functions (void);
static void cgraph_mark_functions_to_output PARAMS ((void)); static void cgraph_mark_functions_to_output (void);
static void cgraph_expand_function PARAMS ((struct cgraph_node *)); static void cgraph_expand_function (struct cgraph_node *);
static tree record_call_1 PARAMS ((tree *, int *, void *)); static tree record_call_1 (tree *, int *, void *);
static void cgraph_mark_local_functions PARAMS ((void)); static void cgraph_mark_local_functions (void);
static void cgraph_optimize_function PARAMS ((struct cgraph_node *)); static void cgraph_optimize_function (struct cgraph_node *);
/* Statistics we collect about inlining algorithm. */ /* Statistics we collect about inlining algorithm. */
static int ncalls_inlined; static int ncalls_inlined;
@ -58,9 +58,7 @@ static int overall_insns;
available - create cgraph edges for function calls via BODY. */ available - create cgraph edges for function calls via BODY. */
void void
cgraph_finalize_function (decl, body) cgraph_finalize_function (tree decl, tree body ATTRIBUTE_UNUSED)
tree decl;
tree body ATTRIBUTE_UNUSED;
{ {
struct cgraph_node *node = cgraph_node (decl); struct cgraph_node *node = cgraph_node (decl);
@ -92,10 +90,7 @@ cgraph_finalize_function (decl, body)
/* Walk tree and record all calls. Called via walk_tree. */ /* Walk tree and record all calls. Called via walk_tree. */
static tree static tree
record_call_1 (tp, walk_subtrees, data) record_call_1 (tree *tp, int *walk_subtrees, void *data)
tree *tp;
int *walk_subtrees;
void *data;
{ {
if (TREE_CODE (*tp) == VAR_DECL && TREE_STATIC (*tp)) if (TREE_CODE (*tp) == VAR_DECL && TREE_STATIC (*tp))
cgraph_varpool_mark_needed_node (cgraph_varpool_node (*tp)); cgraph_varpool_mark_needed_node (cgraph_varpool_node (*tp));
@ -133,9 +128,7 @@ record_call_1 (tp, walk_subtrees, data)
/* Create cgraph edges for function calls inside BODY from DECL. */ /* Create cgraph edges for function calls inside BODY from DECL. */
void void
cgraph_create_edges (decl, body) cgraph_create_edges (tree decl, tree body)
tree decl;
tree body;
{ {
/* The nodes we're interested in are never shared, so walk /* The nodes we're interested in are never shared, so walk
the tree ignoring duplicates. */ the tree ignoring duplicates. */
@ -145,7 +138,7 @@ cgraph_create_edges (decl, body)
/* Analyze the whole compilation unit once it is parsed completely. */ /* Analyze the whole compilation unit once it is parsed completely. */
void void
cgraph_finalize_compilation_unit () cgraph_finalize_compilation_unit (void)
{ {
struct cgraph_node *node; struct cgraph_node *node;
struct cgraph_edge *edge; struct cgraph_edge *edge;
@ -247,7 +240,7 @@ cgraph_finalize_compilation_unit ()
/* Figure out what functions we want to assemble. */ /* Figure out what functions we want to assemble. */
static void static void
cgraph_mark_functions_to_output () cgraph_mark_functions_to_output (void)
{ {
struct cgraph_node *node; struct cgraph_node *node;
@ -277,8 +270,7 @@ cgraph_mark_functions_to_output ()
/* Optimize the function before expansion. */ /* Optimize the function before expansion. */
static void static void
cgraph_optimize_function (node) cgraph_optimize_function (struct cgraph_node *node)
struct cgraph_node *node;
{ {
tree decl = node->decl; tree decl = node->decl;
@ -298,8 +290,7 @@ cgraph_optimize_function (node)
/* Expand function specified by NODE. */ /* Expand function specified by NODE. */
static void static void
cgraph_expand_function (node) cgraph_expand_function (struct cgraph_node *node)
struct cgraph_node *node;
{ {
tree decl = node->decl; tree decl = node->decl;
struct cgraph_edge *e; struct cgraph_edge *e;
@ -584,8 +575,7 @@ cgraph_inlined_callees (struct cgraph_node *node, struct cgraph_node **array)
/* Estimate size of the function after inlining WHAT into TO. */ /* Estimate size of the function after inlining WHAT into TO. */
static int static int
cgraph_estimate_size_after_inlining (int times, cgraph_estimate_size_after_inlining (int times, struct cgraph_node *to,
struct cgraph_node *to,
struct cgraph_node *what) struct cgraph_node *what)
{ {
return (what->global.insns - INSNS_PER_CALL) *times + to->global.insns; return (what->global.insns - INSNS_PER_CALL) *times + to->global.insns;
@ -627,8 +617,7 @@ cgraph_estimate_growth (struct cgraph_node *node)
all nodes in INLINED array. */ all nodes in INLINED array. */
static void static void
cgraph_mark_inline (struct cgraph_node *to, cgraph_mark_inline (struct cgraph_node *to, struct cgraph_node *what,
struct cgraph_node *what,
struct cgraph_node **inlined, int ninlined, struct cgraph_node **inlined, int ninlined,
struct cgraph_node **inlined_callees, struct cgraph_node **inlined_callees,
int ninlined_callees) int ninlined_callees)
@ -700,8 +689,7 @@ cgraph_mark_inline (struct cgraph_node *to,
too large growth of function bodies. */ too large growth of function bodies. */
static bool static bool
cgraph_check_inline_limits (struct cgraph_node *to, cgraph_check_inline_limits (struct cgraph_node *to, struct cgraph_node *what,
struct cgraph_node *what,
struct cgraph_node **inlined, int ninlined) struct cgraph_node **inlined, int ninlined)
{ {
int i; int i;
@ -763,8 +751,7 @@ cgraph_default_inline_p (struct cgraph_node *n)
static void static void
cgraph_decide_inlining_of_small_functions (struct cgraph_node **inlined, cgraph_decide_inlining_of_small_functions (struct cgraph_node **inlined,
struct cgraph_node struct cgraph_node **inlined_callees)
**inlined_callees)
{ {
int i; int i;
struct cgraph_node *node; struct cgraph_node *node;
@ -1048,7 +1035,7 @@ cgraph_inline_p (tree caller_decl, tree callee_decl)
order). */ order). */
static void static void
cgraph_expand_functions () cgraph_expand_functions (void)
{ {
struct cgraph_node *node; struct cgraph_node *node;
struct cgraph_node **order = struct cgraph_node **order =
@ -1082,7 +1069,7 @@ cgraph_expand_functions ()
as local. */ as local. */
static void static void
cgraph_mark_local_functions () cgraph_mark_local_functions (void)
{ {
struct cgraph_node *node; struct cgraph_node *node;
@ -1105,7 +1092,7 @@ cgraph_mark_local_functions ()
/* Perform simple optimizations based on callgraph. */ /* Perform simple optimizations based on callgraph. */
void void
cgraph_optimize () cgraph_optimize (void)
{ {
timevar_push (TV_CGRAPHOPT); timevar_push (TV_CGRAPHOPT);
if (!quiet_flag) if (!quiet_flag)