--- gcc-3.4.6/gcc/cgraphunit.c 2004-05-05 19:24:30.000000000 -0400 +++ gcc-3.4.6/gcc/cgraphunit.c 2006-09-10 22:29:57.000000000 -0400 @@ -39,7 +39,6 @@ #include "fibheap.h" #include "c-common.h" #include "intl.h" -#include "function.h" #define INSNS_PER_CALL 10 @@ -233,7 +232,7 @@ /* We will never really output the function body, clear the SAVED_INSNS array early then. */ if (DECL_EXTERNAL (decl)) - DECL_SAVED_INSNS (decl) = NULL; + DECL_STRUCT_FUNCTION (decl) = NULL; } /* Walk tree and record all calls. Called via walk_tree. */ @@ -294,7 +293,7 @@ } if ((unsigned int) TREE_CODE (t) >= LAST_AND_UNUSED_TREE_CODE) - return (*lang_hooks.callgraph.analyze_expr) (tp, walk_subtrees, data); + return lang_hooks.callgraph.analyze_expr (tp, walk_subtrees, data); break; } @@ -330,10 +329,10 @@ node->local.inlinable = tree_inlinable_function_p (decl); if (!node->local.self_insns) node->local.self_insns - = (*lang_hooks.tree_inlining.estimate_num_insns) (decl); + = lang_hooks.tree_inlining.estimate_num_insns (decl); if (node->local.inlinable) node->local.disregard_inline_limits - = (*lang_hooks.tree_inlining.disregard_inline_limits) (decl); + = lang_hooks.tree_inlining.disregard_inline_limits (decl); for (e = node->callers; e; e = e->next_caller) if (e->inline_failed) { @@ -357,10 +356,6 @@ node->analyzed = true; current_function_decl = NULL; - - /* Possibly warn about unused parameters. */ - if (warn_unused_parameter) - do_warn_unused_parameter (decl); } /* Analyze the whole compilation unit once it is parsed completely. */ @@ -403,7 +398,7 @@ cgraph_nodes_queue = cgraph_nodes_queue->next_needed; /* ??? It is possible to create extern inline function and later using - weak alas attribute to kill it's body. See + weak alas attribute to kill its body. See gcc.c-torture/compile/20011119-1.c */ if (!DECL_SAVED_TREE (decl)) continue; @@ -486,7 +481,7 @@ && !DECL_EXTERNAL (decl)) node->output = 1; else - DECL_SAVED_INSNS (decl) = NULL; + DECL_STRUCT_FUNCTION (decl) = NULL; } } @@ -535,7 +530,7 @@ /* Generate RTL for the body of DECL. Nested functions are expanded via lang_expand_decl_stmt. */ - (*lang_hooks.callgraph.expand_function) (decl); + lang_hooks.callgraph.expand_function (decl); if (DECL_DEFER_OUTPUT (decl)) abort (); @@ -559,7 +554,7 @@ /* We have to deal with cycles nicely, so use a depth first traversal output algorithm. Ignore the fact that some functions won't need to be output and put them into order as well, so we get dependencies - right through intline functions. */ + right throughout inline functions. */ for (node = cgraph_nodes; node; node = node->next) node->aux = NULL; for (node = cgraph_nodes; node; node = node->next) @@ -855,7 +850,7 @@ /* Remove unreachable nodes. Extern inline functions need special care; Unreachable extern inline functions shall be removed. Reachable extern inline functions we never inlined shall get their bodies - elliminated + eliminated. Reachable extern inline functions we sometimes inlined will be turned into unanalyzed nodes so they look like for true extern functions to the rest of code. */ @@ -866,7 +861,7 @@ int local_insns; tree decl = node->decl; - if (DECL_SAVED_INSNS (decl)) + if (DECL_STRUCT_FUNCTION (decl)) local_insns = node->local.self_insns; else local_insns = 0; @@ -1513,7 +1508,7 @@ Attempt to topologically sort the nodes so function is output when all called functions are already assembled to allow data to be propagated across the callgraph. Use a stack to get smaller distance - between a function and it's callees (later we may choose to use a more + between a function and its callees (later we may choose to use a more sophisticated algorithm for function reordering; we will likely want to use subsections to make the output functions appear in top-down order). */ @@ -1548,7 +1543,7 @@ /* Mark all local functions. A local function is one whose calls can occur only in the - current compilation unit and all it's calls are explicit, + current compilation unit and all its calls are explicit, so we can change its calling convention. We simply mark all static functions whose address is not taken as local. */