aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authorPaolo Bonzini <bonzini@gnu.org>2004-08-09 07:14:17 +0000
committerPaolo Bonzini <bonzini@gcc.gnu.org>2004-08-09 07:14:17 +0000
commit7efcb746dac871864e4f193ea3abda75ab2b7f5c (patch)
treef50cb79c83ac56867cb419564c6d1993a024a882 /gcc/function.c
parentc4d70ce3b976c161188e2aac6a4e0a1d5c05cb79 (diff)
downloadgcc-7efcb746dac871864e4f193ea3abda75ab2b7f5c.zip
gcc-7efcb746dac871864e4f193ea3abda75ab2b7f5c.tar.gz
gcc-7efcb746dac871864e4f193ea3abda75ab2b7f5c.tar.bz2
Makefile.in (GTFILES): Remove stmt.c
2004-08-09 Paolo Bonzini <bonzini@gnu.org> * Makefile.in (GTFILES): Remove stmt.c (stmt.o): Do not depend on gt-stmt.h. * emit-rtl.c (emit_line_note): Do not call set_file_and_line_for_stmt. * expr.c (expand_expr_real_1) <SWITCH_EXPR>: Let expand_case do everything. * function.c (free_after_parsing): Do not free STMT field. (allocate_struct_function): Do not call init_stmt_for_function. (assign_stack_temp_for_type): Do not accept values of keep other than 0 or 1. (init_temp_slots): Do not initialize removed variables. * function.h (struct function): Remove STMT, X_TARGET_TEMP_SLOT_LEVEL and X_VAR_TEMP_SLOT_LEVEL fields. * rtl.h (set_file_and_line_for_stmt): Remove. * stmt.c (struct nesting, ALLOC_NESTING, POPSTACK, struct stmt_status, cond_stack, case_stack, nesting_stack, nesting_depth, emit_locus, set_file_and_line_for_stmt, same_case_target_p, init_stmt_for_function, emit_nop, expand_start_cond, expand_start_elseif, expand_start_else, expand_elseif, expand_end_cond): Remove. (preserve_subexpressions_p): Remove references to CFUN->STMT. (expand_start_case, expand_end_case_type): Remove, merge into... (expand_case): ... this one, including other bits from expand_expr_real_1. Inline same_case_target_p. Turn members of CASE_STACK into local variables. (emit_case_bit_tests): Inline same_case_target_p. (add_case_node): Add HEAD argument, return new head of the list, do not handle default label here. * tree.h (expand_start_cond, expand_end_cond, expand_start_else, expand_start_elseif, current_nesting_level, expand_start_case, expand_end_case_type, expand_end_case, add_case_node, init_stmt_for_function, expand_elseif): Remove prototypes. (expand_case): Add prototype. From-SVN: r85712
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c33
1 files changed, 9 insertions, 24 deletions
diff --git a/gcc/function.c b/gcc/function.c
index 4de748a..ed7821b 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -315,7 +315,6 @@ free_after_parsing (struct function *f)
/* f->eh->eh_return_stub_label is used by code generation. */
lang_hooks.function.final (f);
- f->stmt = NULL;
}
/* Clear out all parts of the state in F that can safely be discarded
@@ -589,10 +588,9 @@ make_slot_available (struct temp_slot *temp)
KEEP is 1 if this slot is to be retained after a call to
free_temp_slots. Automatic variables for a block are allocated
- with this flag. KEEP is 2 if we allocate a longer term temporary,
- whose lifetime is controlled by CLEANUP_POINT_EXPRs. KEEP is 3
- if we are to allocate something at an inner level to be treated as
- a variable in the block (e.g., a SAVE_EXPR).
+ with this flag. KEEP values of 2 or 3 were needed respectively
+ for variables whose lifetime is controlled by CLEANUP_POINT_EXPRs
+ or for SAVE_EXPRs, but they are now unused and will abort.
TYPE is the type that will be used for the stack slot. */
@@ -609,6 +607,10 @@ assign_stack_temp_for_type (enum machine_mode mode, HOST_WIDE_INT size, int keep
if (size == -1)
abort ();
+ /* These are now unused. */
+ if (keep > 1)
+ abort ();
+
if (mode == BLKmode)
align = BIGGEST_ALIGNMENT;
else
@@ -733,22 +735,8 @@ assign_stack_temp_for_type (enum machine_mode mode, HOST_WIDE_INT size, int keep
p->in_use = 1;
p->addr_taken = 0;
p->type = type;
-
- if (keep == 2)
- {
- p->level = target_temp_slot_level;
- p->keep = 1;
- }
- else if (keep == 3)
- {
- p->level = var_temp_slot_level;
- p->keep = 0;
- }
- else
- {
- p->level = temp_slot_level;
- p->keep = keep;
- }
+ p->level = temp_slot_level;
+ p->keep = keep;
pp = temp_slots_at_level (p->level);
insert_slot_to_list (p, pp);
@@ -1190,8 +1178,6 @@ init_temp_slots (void)
avail_temp_slots = 0;
used_temp_slots = 0;
temp_slot_level = 0;
- var_temp_slot_level = 0;
- target_temp_slot_level = 0;
}
/* These routines are responsible for converting virtual register references
@@ -3784,7 +3770,6 @@ allocate_struct_function (tree fndecl)
cfun->function_frequency = FUNCTION_FREQUENCY_NORMAL;
- init_stmt_for_function ();
init_eh_for_function ();
lang_hooks.function.init (cfun);