Commit 7efcb746 by Paolo Bonzini Committed by Paolo Bonzini

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
parent c4d70ce3
2004-08-09 Paolo Bonzini <bonzini@gnu.org> 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.
2004-08-09 Paolo Bonzini <bonzini@gnu.org>
* expr.c (expand_expr_real_1): Use optab_for_tree_code. * expr.c (expand_expr_real_1): Use optab_for_tree_code.
2004-08-09 Paolo Bonzini <bonzini@gnu.org> 2004-08-09 Paolo Bonzini <bonzini@gnu.org>
......
...@@ -1809,7 +1809,7 @@ function.o : function.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ ...@@ -1809,7 +1809,7 @@ function.o : function.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
stmt.o : stmt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) $(FLAGS_H) \ stmt.o : stmt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) $(FLAGS_H) \
function.h insn-config.h hard-reg-set.h $(EXPR_H) libfuncs.h except.h \ function.h insn-config.h hard-reg-set.h $(EXPR_H) libfuncs.h except.h \
$(LOOP_H) $(RECOG_H) toplev.h output.h varray.h $(GGC_H) $(TM_P_H) \ $(LOOP_H) $(RECOG_H) toplev.h output.h varray.h $(GGC_H) $(TM_P_H) \
langhooks.h $(PREDICT_H) gt-stmt.h $(OPTABS_H) $(TARGET_H) langhooks.h $(PREDICT_H) $(OPTABS_H) $(TARGET_H)
except.o : except.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ except.o : except.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(TREE_H) $(FLAGS_H) except.h function.h $(EXPR_H) libfuncs.h $(INTEGRATE_H) \ $(TREE_H) $(FLAGS_H) except.h function.h $(EXPR_H) libfuncs.h $(INTEGRATE_H) \
langhooks.h insn-config.h hard-reg-set.h $(BASIC_BLOCK_H) output.h \ langhooks.h insn-config.h hard-reg-set.h $(BASIC_BLOCK_H) output.h \
...@@ -2358,7 +2358,7 @@ GTFILES = $(srcdir)/input.h $(srcdir)/coretypes.h \ ...@@ -2358,7 +2358,7 @@ GTFILES = $(srcdir)/input.h $(srcdir)/coretypes.h \
$(srcdir)/gcse.c $(srcdir)/integrate.c $(srcdir)/lists.c $(srcdir)/optabs.c \ $(srcdir)/gcse.c $(srcdir)/integrate.c $(srcdir)/lists.c $(srcdir)/optabs.c \
$(srcdir)/profile.c $(srcdir)/ra-build.c $(srcdir)/regclass.c \ $(srcdir)/profile.c $(srcdir)/ra-build.c $(srcdir)/regclass.c \
$(srcdir)/reg-stack.c $(srcdir)/cfglayout.c \ $(srcdir)/reg-stack.c $(srcdir)/cfglayout.c \
$(srcdir)/sdbout.c $(srcdir)/stmt.c $(srcdir)/stor-layout.c \ $(srcdir)/sdbout.c $(srcdir)/stor-layout.c \
$(srcdir)/stringpool.c $(srcdir)/tree.c $(srcdir)/varasm.c \ $(srcdir)/stringpool.c $(srcdir)/tree.c $(srcdir)/varasm.c \
$(srcdir)/tree-mudflap.c $(srcdir)/tree-flow.h \ $(srcdir)/tree-mudflap.c $(srcdir)/tree-flow.h \
$(srcdir)/c-objc-common.c $(srcdir)/c-common.c $(srcdir)/c-parse.in \ $(srcdir)/c-objc-common.c $(srcdir)/c-common.c $(srcdir)/c-parse.in \
......
...@@ -4626,8 +4626,6 @@ emit_line_note (location_t location) ...@@ -4626,8 +4626,6 @@ emit_line_note (location_t location)
{ {
rtx note; rtx note;
set_file_and_line_for_stmt (location);
#ifdef USE_MAPPED_LOCATION #ifdef USE_MAPPED_LOCATION
if (location == last_location) if (location == last_location)
return NULL_RTX; return NULL_RTX;
......
...@@ -7697,7 +7697,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, ...@@ -7697,7 +7697,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
goto binop; goto binop;
case TRUTH_OR_EXPR: case TRUTH_OR_EXPR:
code = BIT_OR_EXPR; code = BIT_IOR_EXPR;
case BIT_IOR_EXPR: case BIT_IOR_EXPR:
goto binop; goto binop;
...@@ -8144,27 +8144,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, ...@@ -8144,27 +8144,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
abort (); abort ();
case SWITCH_EXPR: case SWITCH_EXPR:
expand_start_case (SWITCH_COND (exp)); expand_case (exp);
/* The switch body is lowered in gimplify.c, we should never have
switches with a non-NULL SWITCH_BODY here. */
if (SWITCH_BODY (exp))
abort ();
if (SWITCH_LABELS (exp))
{
tree vec = SWITCH_LABELS (exp);
size_t i = TREE_VEC_LENGTH (vec);
do
{
tree elt = TREE_VEC_ELT (vec, --i);
add_case_node (CASE_LOW (elt), CASE_HIGH (elt),
CASE_LABEL (elt));
}
while (i);
}
else
abort ();
expand_end_case_type (SWITCH_COND (exp), TREE_TYPE (exp));
return const0_rtx; return const0_rtx;
case LABEL_EXPR: case LABEL_EXPR:
......
...@@ -315,7 +315,6 @@ free_after_parsing (struct function *f) ...@@ -315,7 +315,6 @@ free_after_parsing (struct function *f)
/* f->eh->eh_return_stub_label is used by code generation. */ /* f->eh->eh_return_stub_label is used by code generation. */
lang_hooks.function.final (f); lang_hooks.function.final (f);
f->stmt = NULL;
} }
/* Clear out all parts of the state in F that can safely be discarded /* 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) ...@@ -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 KEEP is 1 if this slot is to be retained after a call to
free_temp_slots. Automatic variables for a block are allocated free_temp_slots. Automatic variables for a block are allocated
with this flag. KEEP is 2 if we allocate a longer term temporary, with this flag. KEEP values of 2 or 3 were needed respectively
whose lifetime is controlled by CLEANUP_POINT_EXPRs. KEEP is 3 for variables whose lifetime is controlled by CLEANUP_POINT_EXPRs
if we are to allocate something at an inner level to be treated as or for SAVE_EXPRs, but they are now unused and will abort.
a variable in the block (e.g., a SAVE_EXPR).
TYPE is the type that will be used for the stack slot. */ 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 ...@@ -609,6 +607,10 @@ assign_stack_temp_for_type (enum machine_mode mode, HOST_WIDE_INT size, int keep
if (size == -1) if (size == -1)
abort (); abort ();
/* These are now unused. */
if (keep > 1)
abort ();
if (mode == BLKmode) if (mode == BLKmode)
align = BIGGEST_ALIGNMENT; align = BIGGEST_ALIGNMENT;
else else
...@@ -733,22 +735,8 @@ assign_stack_temp_for_type (enum machine_mode mode, HOST_WIDE_INT size, int keep ...@@ -733,22 +735,8 @@ assign_stack_temp_for_type (enum machine_mode mode, HOST_WIDE_INT size, int keep
p->in_use = 1; p->in_use = 1;
p->addr_taken = 0; p->addr_taken = 0;
p->type = type; p->type = type;
p->level = temp_slot_level;
if (keep == 2) p->keep = keep;
{
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;
}
pp = temp_slots_at_level (p->level); pp = temp_slots_at_level (p->level);
insert_slot_to_list (p, pp); insert_slot_to_list (p, pp);
...@@ -1190,8 +1178,6 @@ init_temp_slots (void) ...@@ -1190,8 +1178,6 @@ init_temp_slots (void)
avail_temp_slots = 0; avail_temp_slots = 0;
used_temp_slots = 0; used_temp_slots = 0;
temp_slot_level = 0; temp_slot_level = 0;
var_temp_slot_level = 0;
target_temp_slot_level = 0;
} }
/* These routines are responsible for converting virtual register references /* These routines are responsible for converting virtual register references
...@@ -3784,7 +3770,6 @@ allocate_struct_function (tree fndecl) ...@@ -3784,7 +3770,6 @@ allocate_struct_function (tree fndecl)
cfun->function_frequency = FUNCTION_FREQUENCY_NORMAL; cfun->function_frequency = FUNCTION_FREQUENCY_NORMAL;
init_stmt_for_function ();
init_eh_for_function (); init_eh_for_function ();
lang_hooks.function.init (cfun); lang_hooks.function.init (cfun);
......
...@@ -162,7 +162,6 @@ struct expr_status GTY(()) ...@@ -162,7 +162,6 @@ struct expr_status GTY(())
struct function GTY(()) struct function GTY(())
{ {
struct eh_status *eh; struct eh_status *eh;
struct stmt_status *stmt;
struct expr_status *expr; struct expr_status *expr;
struct emit_status *emit; struct emit_status *emit;
struct varasm_status *varasm; struct varasm_status *varasm;
...@@ -276,15 +275,6 @@ struct function GTY(()) ...@@ -276,15 +275,6 @@ struct function GTY(())
/* Current nesting level for temporaries. */ /* Current nesting level for temporaries. */
int x_temp_slot_level; int x_temp_slot_level;
/* Current nesting level for variables in a block. */
int x_var_temp_slot_level;
/* When temporaries are created by TARGET_EXPRs, they are created at
this level of temp_slot_level, so that they can remain allocated
until no longer needed. CLEANUP_POINT_EXPRs define the lifetime
of TARGET_EXPRs. */
int x_target_temp_slot_level;
/* This slot is initialized as 0 and is added to /* This slot is initialized as 0 and is added to
during the nested function. */ during the nested function. */
struct var_refs_queue *fixup_var_refs_queue; struct var_refs_queue *fixup_var_refs_queue;
...@@ -492,8 +482,6 @@ extern int trampolines_created; ...@@ -492,8 +482,6 @@ extern int trampolines_created;
#define used_temp_slots (cfun->x_used_temp_slots) #define used_temp_slots (cfun->x_used_temp_slots)
#define avail_temp_slots (cfun->x_avail_temp_slots) #define avail_temp_slots (cfun->x_avail_temp_slots)
#define temp_slot_level (cfun->x_temp_slot_level) #define temp_slot_level (cfun->x_temp_slot_level)
#define target_temp_slot_level (cfun->x_target_temp_slot_level)
#define var_temp_slot_level (cfun->x_var_temp_slot_level)
#define nonlocal_labels (cfun->x_nonlocal_labels) #define nonlocal_labels (cfun->x_nonlocal_labels)
#define nonlocal_goto_handler_labels (cfun->x_nonlocal_goto_handler_labels) #define nonlocal_goto_handler_labels (cfun->x_nonlocal_goto_handler_labels)
......
...@@ -2236,7 +2236,6 @@ extern void mark_temp_addr_taken (rtx); ...@@ -2236,7 +2236,6 @@ extern void mark_temp_addr_taken (rtx);
extern void update_temp_slot_address (rtx, rtx); extern void update_temp_slot_address (rtx, rtx);
/* In stmt.c */ /* In stmt.c */
extern void set_file_and_line_for_stmt (location_t);
extern void expand_null_return (void); extern void expand_null_return (void);
extern void expand_naked_return (void); extern void expand_naked_return (void);
extern void emit_jump (rtx); extern void emit_jump (rtx);
......
...@@ -3352,10 +3352,6 @@ extern void expand_decl_init (tree); ...@@ -3352,10 +3352,6 @@ extern void expand_decl_init (tree);
extern void expand_label (tree); extern void expand_label (tree);
extern void expand_goto (tree); extern void expand_goto (tree);
extern void expand_asm (tree, int); extern void expand_asm (tree, int);
extern void expand_start_cond (tree, int);
extern void expand_end_cond (void);
extern void expand_start_else (void);
extern void expand_start_elseif (tree);
extern void expand_stack_alloc (tree, tree); extern void expand_stack_alloc (tree, tree);
extern rtx expand_stack_save (void); extern rtx expand_stack_save (void);
...@@ -3363,12 +3359,6 @@ extern void expand_stack_restore (tree); ...@@ -3363,12 +3359,6 @@ extern void expand_stack_restore (tree);
extern void expand_return (tree); extern void expand_return (tree);
extern int is_body_block (tree); extern int is_body_block (tree);
extern struct nesting * current_nesting_level (void);
extern void expand_start_case (tree);
extern void expand_end_case_type (tree, tree);
#define expand_end_case(cond) expand_end_case_type (cond, NULL)
extern void add_case_node (tree, tree, tree);
/* In tree-eh.c */ /* In tree-eh.c */
extern void using_eh_for_cleanups (void); extern void using_eh_for_cleanups (void);
...@@ -3619,7 +3609,6 @@ extern void notice_global_symbol (tree); ...@@ -3619,7 +3609,6 @@ extern void notice_global_symbol (tree);
extern void set_user_assembler_name (tree, const char *); extern void set_user_assembler_name (tree, const char *);
/* In stmt.c */ /* In stmt.c */
extern void emit_nop (void);
extern void expand_computed_goto (tree); extern void expand_computed_goto (tree);
extern bool parse_output_constraint (const char **, int, int, int, extern bool parse_output_constraint (const char **, int, int, int,
bool *, bool *, bool *); bool *, bool *, bool *);
...@@ -3629,8 +3618,7 @@ extern void expand_asm_operands (tree, tree, tree, tree, int, location_t); ...@@ -3629,8 +3618,7 @@ extern void expand_asm_operands (tree, tree, tree, tree, int, location_t);
extern void expand_asm_expr (tree); extern void expand_asm_expr (tree);
extern bool asm_op_is_mem_input (tree, tree); extern bool asm_op_is_mem_input (tree, tree);
extern tree resolve_asm_operand_names (tree, tree, tree); extern tree resolve_asm_operand_names (tree, tree, tree);
extern void init_stmt_for_function (void); extern void expand_case (tree);
extern void expand_elseif (tree);
extern void expand_decl (tree); extern void expand_decl (tree);
extern void expand_anon_union_decl (tree, tree, tree); extern void expand_anon_union_decl (tree, tree, tree);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment