summaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-02 01:15:43 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-02 01:15:43 +0000
commit735f4358c84bd478ae8c4b635a4d938447867efe (patch)
treed7b1ab265a5bd2738e55776227182ff82a96a751 /gcc/function.c
parent0870fd6eb283b94035b0911aedec29c050a3b5de (diff)
downloadgcc-735f4358c84bd478ae8c4b635a4d938447867efe.tar.gz
* tree.def (RTL_EXPR): Remove.
* c-typeck.c (lvalue_p): Don't handle it. * expr.c (safe_from_p): Likewise. (expand_expr_real_1): Likewise. * fold-const.c (non_lvalue, operand_equal_p, fold): Likewise. (fold_checksum_tree, tree_expr_nonnegative_p): Likewise. * gengtype.c (adjust_field_tree_exp): Likewise. * stmt.c (warn_if_unused_value): Likewise. * tree-gimple.c (recalculate_side_effects): Likewise. * tree-pretty-print.c (dump_generic_node): Likewise. * tree.c (make_node_stat, first_rtl_op, unsave_expr_1): Likewise. (unsafe_for_reeval, stabilize_reference, build1_stat): Likewise. * tree.h (RTL_EXPR_SEQUENCE, RTL_EXPR_RTL, RTL_EXPR_ALT_RTL): Remove. * stmt.c (struct stmt_status): Remove x_last_expr_type, x_last_expr_value, x_last_expr_alt_rtl, x_expr_stmts_for_value. (last_expr_type, last_expr_value, last_expr_alt_rtl): Remove. (expand_expr_stmt): Merge with expand_expr_stmt_value. Remove all the bits that tracked last_expr. (expand_end_bindings): Don't track last_expr. (expand_start_stmt_expr, expand_end_stmt_expr): Remove. (clear_last_expr): Remove. (expand_asm): Don't call it. (expand_asm_operands, expand_end_cond): Likewise. (expand_naked_return, expand_null_return_1): Likewise. * c-typeck.c (c_begin_compound_stmt): Likewise. * cfgexpand.c (expand_block): Use expand_expr_stmt. * expr.c (expand_expr_real_1): Likewise. * tree.h: Update prototypes. * function.h (struct sequence_stack): Remove sequence_rtl_expr. (struct emit_status): Remove sequence_rtl_expr. (struct function): Remove x_rtl_expr_chain. (seq_rtl_expr, rtl_expr_chain): Remove. * function.c (struct temp_slot): Remove rtl_expr. (assign_stack_temp_for_type): Don't set it. (free_temp_slots, pop_temp_slots): Don't check it. (free_after_compilation): Don't clear x_rtl_expr_chain. (fixup_var_refs): Don't search it. (preserve_rtl_expr_result, free_temps_for_rtl_expr): Remove. * emit-rtl.c (start_sequence): Don't use sequence_rtl_expr or seq_rtl_expr. (push_topmost_sequence): Likewise. (end_sequence, init_emit): Likewise. (start_sequence_for_rtl_expr): Remove. * expmed.c (make_tree): Build a VAR_DECL instead of an RTL_EXPR. * rtl.h (preserve_rtl_expr_result): Remove. ada/ * trans.c (gnat_stabilize_reference): Don't handle RTL_EXPR. * utils.c (max_size): Likewise. cp/ * class.c (fixed_type_or_null): Don't handle RTL_EXPR. * method.c (synthesize_method): Don't clear_last_expr. * name-lookup.c (maybe_push_cleanup_level): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84009 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c88
1 files changed, 4 insertions, 84 deletions
diff --git a/gcc/function.c b/gcc/function.c
index 008669fa8d7..1d17c4fa591 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -186,8 +186,6 @@ struct temp_slot GTY(())
It can be reused if objects of the type of the new slot will always
conflict with objects of the type of the old slot. */
tree type;
- /* The value of `sequence_rtl_expr' when this temporary is allocated. */
- tree rtl_expr;
/* Nonzero if this temporary is currently in use. */
char in_use;
/* Nonzero if this temporary has its address taken. */
@@ -440,7 +438,6 @@ free_after_compilation (struct function *f)
f->x_naked_return_label = NULL;
f->x_save_expr_regs = NULL;
f->x_stack_slot_list = NULL;
- f->x_rtl_expr_chain = NULL;
f->x_tail_recursion_reentry = NULL;
f->x_arg_pointer_save_area = NULL;
f->x_parm_birth_insn = NULL;
@@ -768,7 +765,6 @@ assign_stack_temp_for_type (enum machine_mode mode, HOST_WIDE_INT size, int keep
rounded_size));
p->align = best_p->align;
p->address = 0;
- p->rtl_expr = 0;
p->type = best_p->type;
insert_slot_to_list (p, &avail_temp_slots);
@@ -834,7 +830,6 @@ assign_stack_temp_for_type (enum machine_mode mode, HOST_WIDE_INT size, int keep
p = selected;
p->in_use = 1;
p->addr_taken = 0;
- p->rtl_expr = seq_rtl_expr;
p->type = type;
if (keep == 2)
@@ -1230,39 +1225,8 @@ preserve_temp_slots (rtx x)
}
}
-/* X is the result of an RTL_EXPR. If it is a temporary slot associated
- with that RTL_EXPR, promote it into a temporary slot at the present
- level so it will not be freed when we free slots made in the
- RTL_EXPR. */
-
-void
-preserve_rtl_expr_result (rtx x)
-{
- struct temp_slot *p;
-
- /* If X is not in memory or is at a constant address, it cannot be in
- a temporary slot. */
- if (x == 0 || !MEM_P (x) || CONSTANT_P (XEXP (x, 0)))
- return;
-
- /* If we can find a match, move it to our level unless it is already at
- an upper level. */
- p = find_temp_slot_from_address (XEXP (x, 0));
- if (p != 0)
- {
- move_slot_to_level (p, MIN (p->level, temp_slot_level));
- p->rtl_expr = 0;
- }
-
- return;
-}
-
-/* Free all temporaries used so far. This is normally called at the end
- of generating code for a statement. Don't free any temporaries
- currently in use for an RTL_EXPR that hasn't yet been emitted.
- We could eventually do better than this since it can be reused while
- generating the same RTL_EXPR, but this is complex and probably not
- worthwhile. */
+/* Free all temporaries used so far. This is normally called at the
+ end of generating code for a statement. */
void
free_temp_slots (void)
@@ -1273,40 +1237,13 @@ free_temp_slots (void)
{
next = p->next;
- if (!p->keep && p->rtl_expr == 0)
+ if (!p->keep)
make_slot_available (p);
}
combine_temp_slots ();
}
-/* Free all temporary slots used in T, an RTL_EXPR node. */
-
-void
-free_temps_for_rtl_expr (tree t)
-{
- struct temp_slot *p, *next;
-
- for (p = *temp_slots_at_level (temp_slot_level); p; p = next)
- {
- next = p->next;
-
- if (p->rtl_expr == t)
- {
- /* If this slot is below the current TEMP_SLOT_LEVEL, then it
- needs to be preserved. This can happen if a temporary in
- the RTL_EXPR was addressed; preserve_temp_slots will move
- the temporary into a higher level. */
- if (temp_slot_level <= p->level)
- make_slot_available (p);
- else
- p->rtl_expr = NULL_TREE;
- }
- }
-
- combine_temp_slots ();
-}
-
/* Push deeper into the nesting level for stack temporaries. */
void
@@ -1326,9 +1263,7 @@ pop_temp_slots (void)
for (p = *temp_slots_at_level (temp_slot_level); p; p = next)
{
next = p->next;
-
- if (p->rtl_expr == 0)
- make_slot_available (p);
+ make_slot_available (p);
}
combine_temp_slots ();
@@ -1587,10 +1522,8 @@ static void
fixup_var_refs (rtx var, enum machine_mode promoted_mode, int unsignedp,
rtx may_share, htab_t ht)
{
- tree pending;
rtx first_insn = get_insns ();
struct sequence_stack *stack = seq_stack;
- tree rtl_exps = rtl_expr_chain;
int save_volatile_ok = volatile_ok;
/* If there's a hash table, it must record all uses of VAR. */
@@ -1621,19 +1554,6 @@ fixup_var_refs (rtx var, enum machine_mode promoted_mode, int unsignedp,
end_sequence ();
}
- /* Scan all waiting RTL_EXPRs too. */
- for (pending = rtl_exps; pending; pending = TREE_CHAIN (pending))
- {
- rtx seq = RTL_EXPR_SEQUENCE (TREE_VALUE (pending));
- if (seq != const0_rtx && seq != 0)
- {
- push_to_sequence (seq);
- fixup_var_refs_insns (seq, var, promoted_mode, unsignedp, 0,
- may_share);
- end_sequence ();
- }
- }
-
volatile_ok = save_volatile_ok;
}