From: Richard Henderson Date: Thu, 1 Jul 2004 09:54:20 +0000 (-0700) Subject: function.h (struct function): Remove x_function_call_count. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b79c52841bdf69b9788387c9d835d854de09dcb5;p=gcc.git function.h (struct function): Remove x_function_call_count. * function.h (struct function): Remove x_function_call_count. (function_call_count): Remove. * calls.c (expand_call): Don't set it. * integrate.c (copy_rtx_and_substitute): Likewise. * function.h (struct function): Remove x_cleanup_label. (cleanup_label): Remove. * stmt.c (expand_value_return): Don't use it. * function.c (free_after_compilation): Don't set it. (expand_function_start): Likewise. Remove parms_have_cleanups arg. * cfgexpand.c (tree_expand_cfg): Update call. * tree.h (expand_function_start): Update decl. From-SVN: r83966 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9ddb7a73368..12144e81dbb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,18 @@ +2004-07-01 Richard Henderson + + * function.h (struct function): Remove x_function_call_count. + (function_call_count): Remove. + * calls.c (expand_call): Don't set it. + * integrate.c (copy_rtx_and_substitute): Likewise. + + * function.h (struct function): Remove x_cleanup_label. + (cleanup_label): Remove. + * stmt.c (expand_value_return): Don't use it. + * function.c (free_after_compilation): Don't set it. + (expand_function_start): Likewise. Remove parms_have_cleanups arg. + * cfgexpand.c (tree_expand_cfg): Update call. + * tree.h (expand_function_start): Update decl. + 2004-07-01 Joseph S. Myers PR c/1027 diff --git a/gcc/calls.c b/gcc/calls.c index ccefb54992c..43966a6f8cb 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -2488,8 +2488,6 @@ expand_call (tree exp, rtx target, int ignore) preferred_unit_stack_boundary = preferred_stack_boundary / BITS_PER_UNIT; - function_call_count++; - /* We want to make two insn chains; one for a sibling call, the other for a normal call. We will select one of the two chains after initial RTL generation is complete. */ diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index 4227b985f3d..ac76ca37944 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -419,7 +419,7 @@ tree_expand_cfg (void) expand_used_vars (); /* Set up parameters and prepare for return, for the function. */ - expand_function_start (current_function_decl, 0); + expand_function_start (current_function_decl); /* If this function is `main', emit a call to `__main' to run global initializers, etc. */ diff --git a/gcc/function.c b/gcc/function.c index 7cfb1aaae87..aa6cdad5ace 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -436,7 +436,6 @@ free_after_compilation (struct function *f) f->return_rtx = NULL; f->internal_arg_pointer = NULL; f->x_nonlocal_goto_handler_labels = NULL; - f->x_cleanup_label = NULL; f->x_return_label = NULL; f->x_naked_return_label = NULL; f->x_save_expr_regs = NULL; @@ -6310,7 +6309,7 @@ expand_pending_sizes (tree pending_sizes) the function's parameters, which must be run at any return statement. */ void -expand_function_start (tree subr, int parms_have_cleanups) +expand_function_start (tree subr) { /* Make sure volatile mem refs aren't considered valid operands of arithmetic insns. */ @@ -6323,14 +6322,6 @@ expand_function_start (tree subr, int parms_have_cleanups) current_function_limit_stack = (stack_limit_rtx != NULL_RTX && ! DECL_NO_LIMIT_STACK (subr)); - /* If the parameters of this function need cleaning up, get a label - for the beginning of the code which executes those cleanups. This must - be done before doing anything with return_label. */ - if (parms_have_cleanups) - cleanup_label = gen_label_rtx (); - else - cleanup_label = 0; - /* Make the label for return statements to jump to. Do not special case machines with special return instructions -- they will be handled later during jump, ifcvt, or epilogue creation. */ diff --git a/gcc/function.h b/gcc/function.h index ca15492bd86..64c02d0b9ee 100644 --- a/gcc/function.h +++ b/gcc/function.h @@ -236,19 +236,10 @@ struct function GTY(()) has_hard_reg_initial_val (see integrate.[hc]). */ struct initial_value_struct *hard_reg_initial_vals; - /* Number of function calls seen so far in current function. */ - int x_function_call_count; - /* List (chain of EXPR_LIST) of labels heading the current handlers for nonlocal gotos. */ rtx x_nonlocal_goto_handler_labels; - /* Label that will go on parm cleanup code, if any. - Jumping to this label runs cleanup code for parameters, if - such code must be run. Following this code is the logical return - label. */ - rtx x_cleanup_label; - /* Label that will go on function epilogue. Jumping to this label serves as a "return" instruction on machines which require execution of the epilogue on all returns. */ @@ -523,7 +514,6 @@ extern int trampolines_created; #define max_parm_reg (cfun->x_max_parm_reg) #define parm_reg_stack_loc (cfun->x_parm_reg_stack_loc) -#define cleanup_label (cfun->x_cleanup_label) #define return_label (cfun->x_return_label) #define naked_return_label (cfun->x_naked_return_label) #define save_expr_regs (cfun->x_save_expr_regs) @@ -533,7 +523,6 @@ extern int trampolines_created; #define tail_recursion_reentry (cfun->x_tail_recursion_reentry) #define arg_pointer_save_area (cfun->x_arg_pointer_save_area) #define rtl_expr_chain (cfun->x_rtl_expr_chain) -#define function_call_count (cfun->x_function_call_count) #define used_temp_slots (cfun->x_used_temp_slots) #define avail_temp_slots (cfun->x_avail_temp_slots) #define temp_slot_level (cfun->x_temp_slot_level) diff --git a/gcc/integrate.c b/gcc/integrate.c index 80eb84bba8c..ee2c7a7220b 100644 --- a/gcc/integrate.c +++ b/gcc/integrate.c @@ -439,13 +439,6 @@ copy_rtx_and_substitute (rtx orig, struct inline_remap *map, int for_lhs) && ! (CODE_LABEL_NUMBER (XEXP (copy, 0)) >= get_first_label_num () && CODE_LABEL_NUMBER (XEXP (copy, 0)) < max_label_num ())); - /* If we have made a nonlocal label local, it means that this - inlined call will be referring to our nonlocal goto handler. - So make sure we create one for this block; we normally would - not since this is not otherwise considered a "call". */ - if (LABEL_REF_NONLOCAL_P (orig) && ! LABEL_REF_NONLOCAL_P (copy)) - function_call_count++; - return copy; case PC: diff --git a/gcc/stmt.c b/gcc/stmt.c index 5c8a6e8af9c..affeb9d5b0a 100644 --- a/gcc/stmt.c +++ b/gcc/stmt.c @@ -2601,7 +2601,7 @@ expand_value_return (rtx val) static void expand_null_return_1 (rtx last_insn) { - rtx end_label = cleanup_label ? cleanup_label : return_label; + rtx end_label = return_label; clear_pending_stack_adjust (); do_pending_stack_adjust (); diff --git a/gcc/tree.h b/gcc/tree.h index 9890bf8268f..3912faa4749 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -3477,7 +3477,7 @@ extern void type_hash_add (unsigned int, tree); extern int simple_cst_list_equal (tree, tree); extern void dump_tree_statistics (void); extern void expand_function_end (void); -extern void expand_function_start (tree, int); +extern void expand_function_start (tree); extern void expand_pending_sizes (tree); extern void recompute_tree_invarant_for_addr_expr (tree); extern bool needs_to_live_in_memory (tree);