summaryrefslogtreecommitdiff
path: root/gcc/web.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-04 08:07:15 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-04 08:07:15 +0000
commite8825bb05c80adfdb34722fab0d3030ef5ef4823 (patch)
treed8e587b078a6e56d763f14d68c29fef196cd5322 /gcc/web.c
parent3f56a1abd3114c6a4d08bd7602b88c7d4170b1f2 (diff)
downloadgcc-e8825bb05c80adfdb34722fab0d3030ef5ef4823.tar.gz
* rtl.def (ADDRESSOF): Remove.
* alias.c (rtx_equal_for_memref_p): Don't handle addressof. (find_base_term, memrefs_conflict_p): Likewise. * cse.c (fixed_base_plus_p, find_best_addr: Likewise. (fold_rtx, cse_insn, set_live_p): Likewise. * dwarf2out.c (mem_loc_descriptor): Likewise. (add_location_or_const_value_attribute): Likewise. * emit-rtl.c (copy_insn_1): Likewise. * explow.c (memory_address): Likewise. * expmed.c (store_split_bit_field): Likewise. * expr.c (expand_expr_real_1): Likewise. * function.c (instantiate_decl (instantiate_virtual_regs_1, fix_lexical_addr): Likewise. * genrecog.c (preds, validate_pattern): Likewise. * integrate.c (copy_rtx_and_substitute): Likewise. * recog.c (general_operand, register_operand): Likewise. (memory_address_p): Likwise. * reload1.c (eliminate_regs, elimination_effects): Likewise. * rtl.c (copy_rtx): Likewise. * rtlanal.c (rtx_unstable_p, rtx_varies_p): Likewise. (rtx_addr_can_trap_p, nonzero_address_p, address_cost): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * stmt.c (expand_asm_operands): Likewise. * web.c (entry_register, replace_ref, web_main): Likewise. * config/alpha/alpha.c (input_operand, alpha_legitimate_address_p, alpha_expand_block_move, alpha_expand_block_clear): Likewise. * config/arm/arm.c (thumb_rtx_costs): Likewise. * config/c4x/c4x.c (c4x_valid_operands): Likewise. * config/frv/frv.c (move_destination_operand, move_source_operand, condexec_dest_operand, condexec_source_operand, condexec_memory_operand): Likewise. * config/h8300/h8300.h (PREDICATE_CODES): Likewise. * config/ia64/ia64.c (general_xfmode_operand): Likewise. (destination_xfmode_operand): Likewise. * config/mips/mips.h (PREDICATE_CODES): Likewise. * config/mn10300/mn10300.c (mn10300_address_cost_1): Likewise. * config/s390/s390.c (general_s_operand): Likewise. * config/s390/s390.md (mov*): Likewise. * config/sparc/sparc.h (PREDICATE_CODES): Likewise. * c-typeck.c (c_mark_addressable): Don't put_var_into_stack. * expr.c (expand_expr_real_1): Likewise. * stmt.c (expand_decl): Likewise. * config/c4x/c4x.c (c4x_expand_builtin): Likewise. * function.c (struct fixup_replacement, struct insns_for_mem_entry, postponed_insns, put_var_into_stack, put_reg_into_stack, schedule_fixup_var_refs, fixup_var_refs, find_fixup_replacement, fixup_var_refs_insns, fixup_var_refs_insns_with_hash, fixup_var_refs_insn, fixup_var_refs_1, fixup_memory_subreg, walk_fixup_memory_subreg, fixup_stack_1, optimize_bit_field, gen_mem_addressof, flush_addressof, put_addressof_into_stack, purge_bitfield_addressof_replacements, purge_addressof_replacements, purge_addressof_1, insns_for_mem_hash, insns_for_mem_comp, struct insns_for_mem_walk_info, insns_for_mem_walk, compute_insns_for_mem, is_addressof, purge_addressof, setjmp_protect, setjmp_protect_args): Remove. (push_function_context_to): Don't handle var_refs_queue. (pop_function_context_from, free_after_compilation): Likewise. (instantiate_virtual_regs): Don't handle parm_reg_stack_loc. (assign_parms, allocate_struct_function): Likewise. (use_register_for_decl): New. (expand_function_end): Don't setjmp_protect. * function.h (struct emit_status): Update commentary. (struct function): Remove x_max_parm_reg, x_parm_reg_stack_loc. (max_parm_reg, parm_reg_stack_loc): Remove. * passes.c (DFI_addressof): Remove. (dump_file_info): Remove addressof. (rest_of_handle_addressof): Remove. (rest_of_compilation): Don't call it. * rtl.h (ADDRESSOF_REGNO, ADDRESSOF_DECL): Remove. * stmt.c (expand_decl): Use use_register_for_decl. * tree.h: Update decls. * web.c (mark_addressof): Remove. * doc/invoke.texi (-dF): Remove. ada/ * utils2.c (gnat_mark_addressable): Don't put_var_into_stack. cp/ * typeck.c (cxx_mark_addressable): Don't put_var_into_stack. fortran/ * f95-lang.c (gfc_mark_addressable): Don't put_var_into_stack. treelang/ * treetree.c (tree_mark_addressable): Don't put_var_into_stack. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84072 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/web.c')
-rw-r--r--gcc/web.c44
1 files changed, 4 insertions, 40 deletions
diff --git a/gcc/web.c b/gcc/web.c
index 91dbb90e3c3..01b54254450 100644
--- a/gcc/web.c
+++ b/gcc/web.c
@@ -70,9 +70,8 @@ static struct web_entry *unionfind_root (struct web_entry *);
static void unionfind_union (struct web_entry *, struct web_entry *);
static void union_defs (struct df *, struct ref *, struct web_entry *,
struct web_entry *);
-static rtx entry_register (struct web_entry *, struct ref *, char *, char *);
+static rtx entry_register (struct web_entry *, struct ref *, char *);
static void replace_ref (struct ref *, rtx);
-static int mark_addressof (rtx *, void *);
/* Find the root of unionfind tree (the representative of set). */
@@ -173,8 +172,7 @@ union_defs (struct df *df, struct ref *use, struct web_entry *def_entry,
/* Find the corresponding register for the given entry. */
static rtx
-entry_register (struct web_entry *entry, struct ref *ref, char *used,
- char *use_addressof)
+entry_register (struct web_entry *entry, struct ref *ref, char *used)
{
struct web_entry *root;
rtx reg, newreg;
@@ -198,14 +196,6 @@ entry_register (struct web_entry *entry, struct ref *ref, char *used,
"New web forced to keep reg=%i (user variable)\n",
REGNO (reg));
}
- else if (use_addressof [REGNO (reg)])
- {
- newreg = reg;
- if (dump_file)
- fprintf (dump_file,
- "New web forced to keep reg=%i (address taken)\n",
- REGNO (reg));
- }
else
{
newreg = gen_reg_rtx (GET_MODE (reg));
@@ -239,19 +229,6 @@ replace_ref (struct ref *ref, rtx reg)
*loc = reg;
}
-/* Mark each pseudo whose address is taken. */
-
-static int
-mark_addressof (rtx *rtl, void *data)
-{
- if (!*rtl)
- return 0;
- if (GET_CODE (*rtl) == ADDRESSOF
- && REG_P (XEXP (*rtl, 0)))
- ((char *)data)[REGNO (XEXP (*rtl, 0))] = 1;
- return 0;
-}
-
/* Main entry point. */
void
@@ -263,9 +240,6 @@ web_main (void)
unsigned int i;
int max = max_reg_num ();
char *used;
- char *use_addressof;
- basic_block bb;
- rtx insn;
df = df_init ();
df_analyze (df, 0, DF_UD_CHAIN | DF_EQUIV_NOTES);
@@ -273,7 +247,6 @@ web_main (void)
def_entry = xcalloc (df->n_defs, sizeof (struct web_entry));
use_entry = xcalloc (df->n_uses, sizeof (struct web_entry));
used = xcalloc (max, sizeof (char));
- use_addressof = xcalloc (max, sizeof (char));
if (dump_file)
df_dump (df, DF_UD_CHAIN | DF_DU_CHAIN, dump_file);
@@ -282,22 +255,14 @@ web_main (void)
for (i = 0; i < df->n_uses; i++)
union_defs (df, df->uses[i], def_entry, use_entry);
- /* We can not safely rename registers whose address is taken. */
- FOR_EACH_BB (bb)
- FOR_BB_INSNS (bb, insn)
- {
- if (INSN_P (insn))
- for_each_rtx (&PATTERN (insn), mark_addressof, use_addressof);
- }
-
/* Update the instruction stream, allocating new registers for split pseudos
in progress. */
for (i = 0; i < df->n_uses; i++)
replace_ref (df->uses[i], entry_register (use_entry + i, df->uses[i],
- used, use_addressof));
+ used));
for (i = 0; i < df->n_defs; i++)
replace_ref (df->defs[i], entry_register (def_entry + i, df->defs[i],
- used, use_addressof));
+ used));
/* Dataflow information is corrupt here, but it can be easily updated
by creating new entries for new registers and updates or calling
@@ -305,6 +270,5 @@ web_main (void)
free (def_entry);
free (use_entry);
free (used);
- free (use_addressof);
df_finish (df);
}