From f30cfcb12fbf2c92212ac3e1e144328743244d95 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Thu, 19 Jun 2008 10:59:19 +0200 Subject: [PATCH] cgraphunit.c (cgraph_finalize_function): Remove redundant setting of node->decl. 2008-06-19 Bernhard Fischer * cgraphunit.c (cgraph_finalize_function): Remove redundant setting of node->decl. (cgraph_expand_function): Use local copy of decl. (cgraph_expand_all_functions): Remove redundant initialization of order_pos. (cgraph_optimize): Reword internal_error message. From-SVN: r136941 --- gcc/ChangeLog | 13 +++++++++++-- gcc/cgraphunit.c | 11 +++++------ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e5bbef9740d..315155af5b7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,4 +1,13 @@ -2008-06-16 Chung-Lin Tang +2008-06-19 Bernhard Fischer + + * cgraphunit.c (cgraph_finalize_function): Remove redundant setting of + node->decl. + (cgraph_expand_function): Use local copy of decl. + (cgraph_expand_all_functions): Remove redundant initialization of + order_pos. + (cgraph_optimize): Reword internal_error message. + +2008-06-19 Chung-Lin Tang * arm-protos.h (arm_return_in_memory): Remove public arm_return_in_memory() prototype. @@ -54,7 +63,7 @@ (spu_split_load): Use regno_aligned_for_load instead of reg_align. (spu_split_store): Likewise. -2006-06-18 Bernhard Fischer +2008-06-18 Bernhard Fischer * gcc/tree-vn.c: Fix typo in comment. diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index a5b116b4de8..6b00bd59c41 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -603,7 +603,6 @@ cgraph_finalize_function (tree decl, bool nested) node->pid = cgraph_max_pid ++; notice_global_symbol (decl); - node->decl = decl; node->local.finalized = true; node->lowered = DECL_STRUCT_FUNCTION (decl)->cfg != NULL; record_cdtor_fn (node->decl); @@ -1161,10 +1160,10 @@ cgraph_expand_function (struct cgraph_node *node) /* Make sure that BE didn't give up on compiling. */ /* ??? Can happen with nested function of extern inline. */ - gcc_assert (TREE_ASM_WRITTEN (node->decl)); + gcc_assert (TREE_ASM_WRITTEN (decl)); current_function_decl = NULL; - if (!cgraph_preserve_function_body_p (node->decl)) + if (!cgraph_preserve_function_body_p (decl)) { cgraph_release_function_body (node); /* Eliminate all call edges. This is important so the call_expr no longer @@ -1201,7 +1200,7 @@ cgraph_expand_all_functions (void) { struct cgraph_node *node; struct cgraph_node **order = XCNEWVEC (struct cgraph_node *, cgraph_n_nodes); - int order_pos = 0, new_order_pos = 0; + int order_pos, new_order_pos = 0; int i; order_pos = cgraph_postorder (order); @@ -1389,7 +1388,7 @@ cgraph_optimize (void) if (!quiet_flag) fprintf (stderr, "Performing interprocedural optimizations\n"); cgraph_state = CGRAPH_STATE_IPA; - + /* Don't run the IPA passes if there was any error or sorry messages. */ if (errorcount == 0 && sorrycount == 0) ipa_passes (); @@ -1460,7 +1459,7 @@ cgraph_optimize (void) dump_cgraph_node (stderr, node); } if (error_found) - internal_error ("nodes with no released memory found"); + internal_error ("nodes with unreleased memory found"); } #endif } -- 2.30.2