mirror of git://gcc.gnu.org/git/gcc.git
rtl.def (ADDRESSOF): Remove.
* 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.
From-SVN: r84072
This commit is contained in:
parent
68d22aa55a
commit
8fff4fc136
|
|
@ -1,3 +1,81 @@
|
|||
2004-07-04 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* 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.
|
||||
|
||||
2004-07-03 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* config/ia64/ia64.c (spill_xfmode_operand): Use assign_stack_temp
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
2004-07-04 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* utils2.c (gnat_mark_addressable): Don't put_var_into_stack.
|
||||
|
||||
2004-07-01 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* trans.c (gnat_stabilize_reference): Don't handle RTL_EXPR.
|
||||
|
|
|
|||
|
|
@ -1987,7 +1987,6 @@ gnat_mark_addressable (tree expr_node)
|
|||
case VAR_DECL:
|
||||
case PARM_DECL:
|
||||
case RESULT_DECL:
|
||||
put_var_into_stack (expr_node, 1);
|
||||
TREE_ADDRESSABLE (expr_node) = 1;
|
||||
return true;
|
||||
|
||||
|
|
|
|||
20
gcc/alias.c
20
gcc/alias.c
|
|
@ -1256,11 +1256,6 @@ rtx_equal_for_memref_p (rtx x, rtx y)
|
|||
comparison for these nodes. */
|
||||
return 0;
|
||||
|
||||
case ADDRESSOF:
|
||||
return (XINT (x, 1) == XINT (y, 1)
|
||||
&& rtx_equal_for_memref_p (XEXP (x, 0),
|
||||
XEXP (y, 0)));
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -1502,9 +1497,6 @@ find_base_term (rtx x)
|
|||
case LABEL_REF:
|
||||
return x;
|
||||
|
||||
case ADDRESSOF:
|
||||
return REG_BASE_VALUE (frame_pointer_rtx);
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1826,18 +1818,6 @@ memrefs_conflict_p (int xsize, rtx x, int ysize, rtx y, HOST_WIDE_INT c)
|
|||
return memrefs_conflict_p (xsize, x, ysize, canon_rtx (XEXP (y, 0)), c);
|
||||
}
|
||||
|
||||
if (GET_CODE (x) == ADDRESSOF)
|
||||
{
|
||||
if (y == frame_pointer_rtx
|
||||
|| GET_CODE (y) == ADDRESSOF)
|
||||
return xsize <= 0 || ysize <= 0;
|
||||
}
|
||||
if (GET_CODE (y) == ADDRESSOF)
|
||||
{
|
||||
if (x == frame_pointer_rtx)
|
||||
return xsize <= 0 || ysize <= 0;
|
||||
}
|
||||
|
||||
if (CONSTANT_P (x))
|
||||
{
|
||||
if (GET_CODE (x) == CONST_INT && GET_CODE (y) == CONST_INT)
|
||||
|
|
|
|||
|
|
@ -2714,7 +2714,6 @@ c_mark_addressable (tree exp)
|
|||
pedwarn ("address of register variable `%s' requested",
|
||||
IDENTIFIER_POINTER (DECL_NAME (x)));
|
||||
}
|
||||
put_var_into_stack (x, /*rescan=*/true);
|
||||
|
||||
/* drops in */
|
||||
case FUNCTION_DECL:
|
||||
|
|
|
|||
|
|
@ -806,7 +806,6 @@ input_operand (rtx op, enum machine_mode mode)
|
|||
&& local_symbolic_operand (XEXP (op, 0), mode));
|
||||
|
||||
case REG:
|
||||
case ADDRESSOF:
|
||||
return 1;
|
||||
|
||||
case SUBREG:
|
||||
|
|
@ -1725,9 +1724,6 @@ alpha_legitimate_address_p (enum machine_mode mode, rtx x, int strict)
|
|||
&& CONSTANT_ADDRESS_P (ofs))
|
||||
return true;
|
||||
}
|
||||
else if (GET_CODE (x) == ADDRESSOF
|
||||
&& GET_CODE (ofs) == CONST_INT)
|
||||
return true;
|
||||
}
|
||||
|
||||
/* If we're managing explicit relocations, LO_SUM is valid, as
|
||||
|
|
@ -4486,39 +4482,6 @@ alpha_expand_block_move (rtx operands[])
|
|||
}
|
||||
}
|
||||
|
||||
/* Load the entire block into registers. */
|
||||
if (GET_CODE (XEXP (orig_src, 0)) == ADDRESSOF)
|
||||
{
|
||||
enum machine_mode mode;
|
||||
|
||||
tmp = XEXP (XEXP (orig_src, 0), 0);
|
||||
|
||||
/* Don't use the existing register if we're reading more than
|
||||
is held in the register. Nor if there is not a mode that
|
||||
handles the exact size. */
|
||||
mode = mode_for_size (bytes * BITS_PER_UNIT, MODE_INT, 1);
|
||||
if (GET_CODE (tmp) == REG
|
||||
&& mode != BLKmode
|
||||
&& GET_MODE_SIZE (GET_MODE (tmp)) >= bytes)
|
||||
{
|
||||
if (mode == TImode)
|
||||
{
|
||||
data_regs[nregs] = gen_lowpart (DImode, tmp);
|
||||
data_regs[nregs + 1] = gen_highpart (DImode, tmp);
|
||||
nregs += 2;
|
||||
}
|
||||
else
|
||||
data_regs[nregs++] = gen_lowpart (mode, tmp);
|
||||
|
||||
goto src_done;
|
||||
}
|
||||
|
||||
/* No appropriate mode; fall back on memory. */
|
||||
orig_src = replace_equiv_address (orig_src,
|
||||
copy_addr_to_reg (XEXP (orig_src, 0)));
|
||||
src_align = GET_MODE_BITSIZE (GET_MODE (tmp));
|
||||
}
|
||||
|
||||
ofs = 0;
|
||||
if (src_align >= 64 && bytes >= 8)
|
||||
{
|
||||
|
|
@ -4603,8 +4566,6 @@ alpha_expand_block_move (rtx operands[])
|
|||
ofs += 1;
|
||||
}
|
||||
|
||||
src_done:
|
||||
|
||||
if (nregs > ARRAY_SIZE (data_regs))
|
||||
abort ();
|
||||
|
||||
|
|
@ -4612,57 +4573,6 @@ alpha_expand_block_move (rtx operands[])
|
|||
|
||||
i = 0, ofs = 0;
|
||||
|
||||
if (GET_CODE (XEXP (orig_dst, 0)) == ADDRESSOF)
|
||||
{
|
||||
enum machine_mode mode;
|
||||
tmp = XEXP (XEXP (orig_dst, 0), 0);
|
||||
|
||||
mode = mode_for_size (orig_bytes * BITS_PER_UNIT, MODE_INT, 1);
|
||||
if (GET_CODE (tmp) == REG && GET_MODE (tmp) == mode)
|
||||
{
|
||||
if (nregs == 1)
|
||||
{
|
||||
emit_move_insn (tmp, data_regs[0]);
|
||||
i = 1;
|
||||
goto dst_done;
|
||||
}
|
||||
|
||||
else if (nregs == 2 && mode == TImode)
|
||||
{
|
||||
/* Undo the subregging done above when copying between
|
||||
two TImode registers. */
|
||||
if (GET_CODE (data_regs[0]) == SUBREG
|
||||
&& GET_MODE (SUBREG_REG (data_regs[0])) == TImode)
|
||||
emit_move_insn (tmp, SUBREG_REG (data_regs[0]));
|
||||
else
|
||||
{
|
||||
rtx seq;
|
||||
|
||||
start_sequence ();
|
||||
emit_move_insn (gen_lowpart (DImode, tmp), data_regs[0]);
|
||||
emit_move_insn (gen_highpart (DImode, tmp), data_regs[1]);
|
||||
seq = get_insns ();
|
||||
end_sequence ();
|
||||
|
||||
emit_no_conflict_block (seq, tmp, data_regs[0],
|
||||
data_regs[1], NULL_RTX);
|
||||
}
|
||||
|
||||
i = 2;
|
||||
goto dst_done;
|
||||
}
|
||||
}
|
||||
|
||||
/* ??? If nregs > 1, consider reconstructing the word in regs. */
|
||||
/* ??? Optimize mode < dst_mode with strict_low_part. */
|
||||
|
||||
/* No appropriate mode; fall back on memory. We can speed things
|
||||
up by recognizing extra alignment information. */
|
||||
orig_dst = replace_equiv_address (orig_dst,
|
||||
copy_addr_to_reg (XEXP (orig_dst, 0)));
|
||||
dst_align = GET_MODE_BITSIZE (GET_MODE (tmp));
|
||||
}
|
||||
|
||||
/* Write out the data in whatever chunks reading the source allowed. */
|
||||
if (dst_align >= 64)
|
||||
{
|
||||
|
|
@ -4751,8 +4661,6 @@ alpha_expand_block_move (rtx operands[])
|
|||
ofs += 1;
|
||||
}
|
||||
|
||||
dst_done:
|
||||
|
||||
if (i != nregs)
|
||||
abort ();
|
||||
|
||||
|
|
@ -4798,21 +4706,6 @@ alpha_expand_block_clear (rtx operands[])
|
|||
align = a, alignofs = 2 - c % 2;
|
||||
}
|
||||
}
|
||||
else if (GET_CODE (tmp) == ADDRESSOF)
|
||||
{
|
||||
enum machine_mode mode;
|
||||
|
||||
mode = mode_for_size (bytes * BITS_PER_UNIT, MODE_INT, 1);
|
||||
if (GET_MODE (XEXP (tmp, 0)) == mode)
|
||||
{
|
||||
emit_move_insn (XEXP (tmp, 0), const0_rtx);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* No appropriate mode; fall back on memory. */
|
||||
orig_dst = replace_equiv_address (orig_dst, copy_addr_to_reg (tmp));
|
||||
align = GET_MODE_BITSIZE (GET_MODE (XEXP (tmp, 0)));
|
||||
}
|
||||
|
||||
/* Handle an unaligned prefix first. */
|
||||
|
||||
|
|
|
|||
|
|
@ -3550,7 +3550,6 @@ thumb_rtx_costs (rtx x, enum rtx_code code, enum rtx_code outer)
|
|||
/* XXX guess. */
|
||||
return 8;
|
||||
|
||||
case ADDRESSOF:
|
||||
case MEM:
|
||||
/* XXX another guess. */
|
||||
/* Memory costs quite a lot for the first word, but subsequent words
|
||||
|
|
|
|||
|
|
@ -3812,12 +3812,6 @@ c4x_valid_operands (enum rtx_code code, rtx *operands,
|
|||
case MEM:
|
||||
break;
|
||||
|
||||
/* After CSE, any remaining (ADDRESSOF:P reg) gets converted
|
||||
into a stack slot memory address comprising a PLUS and a
|
||||
constant. */
|
||||
case ADDRESSOF:
|
||||
break;
|
||||
|
||||
default:
|
||||
fatal_insn ("c4x_valid_operands: Internal error", op2);
|
||||
break;
|
||||
|
|
@ -3862,12 +3856,6 @@ c4x_valid_operands (enum rtx_code code, rtx *operands,
|
|||
case MEM:
|
||||
break;
|
||||
|
||||
/* After CSE, any remaining (ADDRESSOF:P reg) gets converted
|
||||
into a stack slot memory address comprising a PLUS and a
|
||||
constant. */
|
||||
case ADDRESSOF:
|
||||
break;
|
||||
|
||||
default:
|
||||
abort ();
|
||||
break;
|
||||
|
|
@ -4863,8 +4851,6 @@ c4x_expand_builtin (tree exp, rtx target,
|
|||
if (TARGET_C3X)
|
||||
break;
|
||||
arg0 = TREE_VALUE (arglist);
|
||||
if (TREE_CODE (arg0) == VAR_DECL || TREE_CODE (arg0) == PARM_DECL)
|
||||
put_var_into_stack (arg0, /*rescan=*/true);
|
||||
r0 = expand_expr (arg0, NULL_RTX, QFmode, 0);
|
||||
r0 = protect_from_queue (r0, 0);
|
||||
if (register_operand (r0, QFmode))
|
||||
|
|
|
|||
|
|
@ -4370,9 +4370,6 @@ move_destination_operand (rtx op, enum machine_mode mode)
|
|||
return TRUE;
|
||||
|
||||
case MEM:
|
||||
if (GET_CODE (XEXP (op, 0)) == ADDRESSOF)
|
||||
return TRUE;
|
||||
|
||||
return frv_legitimate_memory_operand (op, mode, FALSE);
|
||||
}
|
||||
|
||||
|
|
@ -4463,9 +4460,6 @@ move_source_operand (rtx op, enum machine_mode mode)
|
|||
return TRUE;
|
||||
|
||||
case MEM:
|
||||
if (GET_CODE (XEXP (op, 0)) == ADDRESSOF)
|
||||
return TRUE;
|
||||
|
||||
return frv_legitimate_memory_operand (op, mode, FALSE);
|
||||
}
|
||||
|
||||
|
|
@ -4505,9 +4499,6 @@ condexec_dest_operand (rtx op, enum machine_mode mode)
|
|||
return TRUE;
|
||||
|
||||
case MEM:
|
||||
if (GET_CODE (XEXP (op, 0)) == ADDRESSOF)
|
||||
return TRUE;
|
||||
|
||||
return frv_legitimate_memory_operand (op, mode, TRUE);
|
||||
}
|
||||
|
||||
|
|
@ -4551,9 +4542,6 @@ condexec_source_operand (rtx op, enum machine_mode mode)
|
|||
return TRUE;
|
||||
|
||||
case MEM:
|
||||
if (GET_CODE (XEXP (op, 0)) == ADDRESSOF)
|
||||
return TRUE;
|
||||
|
||||
return frv_legitimate_memory_operand (op, mode, TRUE);
|
||||
}
|
||||
|
||||
|
|
@ -5237,9 +5225,6 @@ condexec_memory_operand (rtx op, enum machine_mode mode)
|
|||
return FALSE;
|
||||
|
||||
addr = XEXP (op, 0);
|
||||
if (GET_CODE (addr) == ADDRESSOF)
|
||||
return TRUE;
|
||||
|
||||
return frv_legitimate_address_p (mode, addr, reload_completed, TRUE, FALSE);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1150,9 +1150,9 @@ struct cum_arg
|
|||
|
||||
#define PREDICATE_CODES \
|
||||
{"general_operand_src", {CONST_INT, CONST_DOUBLE, CONST, SYMBOL_REF, \
|
||||
LABEL_REF, SUBREG, REG, MEM, ADDRESSOF}}, \
|
||||
LABEL_REF, SUBREG, REG, MEM}}, \
|
||||
{"general_operand_dst", {CONST_INT, CONST_DOUBLE, CONST, SYMBOL_REF, \
|
||||
LABEL_REF, SUBREG, REG, MEM, ADDRESSOF}}, \
|
||||
LABEL_REF, SUBREG, REG, MEM}}, \
|
||||
{"single_one_operand", {CONST_INT}}, \
|
||||
{"single_zero_operand", {CONST_INT}}, \
|
||||
{"call_insn_operand", {MEM}}, \
|
||||
|
|
|
|||
|
|
@ -958,8 +958,6 @@ general_xfmode_operand (rtx op, enum machine_mode mode)
|
|||
{
|
||||
if (! general_operand (op, mode))
|
||||
return 0;
|
||||
if (GET_CODE (op) == MEM && GET_CODE (XEXP (op, 0)) == ADDRESSOF)
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
@ -970,8 +968,6 @@ destination_xfmode_operand (rtx op, enum machine_mode mode)
|
|||
{
|
||||
if (! destination_operand (op, mode))
|
||||
return 0;
|
||||
if (GET_CODE (op) == MEM && GET_CODE (XEXP (op, 0)) == ADDRESSOF)
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2743,7 +2743,7 @@ typedef struct mips_args {
|
|||
macro are thoses used in the most insn patterns. */
|
||||
|
||||
#define PREDICATE_CODES \
|
||||
{"uns_arith_operand", { REG, CONST_INT, SUBREG, ADDRESSOF }}, \
|
||||
{"uns_arith_operand", { REG, CONST_INT, SUBREG }}, \
|
||||
{"symbolic_operand", { CONST, SYMBOL_REF, LABEL_REF }}, \
|
||||
{"general_symbolic_operand", { CONST, SYMBOL_REF, LABEL_REF }}, \
|
||||
{"global_got_operand", { CONST, SYMBOL_REF, LABEL_REF }}, \
|
||||
|
|
@ -2751,8 +2751,8 @@ typedef struct mips_args {
|
|||
{"const_arith_operand", { CONST_INT }}, \
|
||||
{"small_data_pattern", { SET, PARALLEL, UNSPEC, \
|
||||
UNSPEC_VOLATILE }}, \
|
||||
{"arith_operand", { REG, CONST_INT, CONST, SUBREG, ADDRESSOF }}, \
|
||||
{"reg_or_0_operand", { REG, CONST_INT, CONST_DOUBLE, SUBREG, ADDRESSOF }}, \
|
||||
{"arith_operand", { REG, CONST_INT, CONST, SUBREG }}, \
|
||||
{"reg_or_0_operand", { REG, CONST_INT, CONST_DOUBLE, SUBREG }}, \
|
||||
{"small_int", { CONST_INT }}, \
|
||||
{"const_float_1_operand", { CONST_DOUBLE }}, \
|
||||
{"reg_or_const_float_1_operand", { CONST_DOUBLE, REG}}, \
|
||||
|
|
|
|||
|
|
@ -1974,19 +1974,6 @@ mn10300_address_cost_1 (rtx x, int *unsig)
|
|||
case LABEL_REF:
|
||||
return 8;
|
||||
|
||||
case ADDRESSOF:
|
||||
switch (GET_CODE (XEXP (x, 0)))
|
||||
{
|
||||
case MEM:
|
||||
return mn10300_address_cost (XEXP (x, 0));
|
||||
|
||||
case REG:
|
||||
return 1;
|
||||
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
|
||||
default:
|
||||
abort ();
|
||||
|
||||
|
|
|
|||
|
|
@ -1181,8 +1181,6 @@ general_s_operand (register rtx op, enum machine_mode mode,
|
|||
/* Memory operands are OK unless they already use an
|
||||
index register. */
|
||||
case MEM:
|
||||
if (GET_CODE (XEXP (op, 0)) == ADDRESSOF)
|
||||
return 1;
|
||||
if (!s390_decompose_address (XEXP (op, 0), &addr))
|
||||
return 0;
|
||||
if (addr.indx)
|
||||
|
|
|
|||
|
|
@ -1338,8 +1338,7 @@
|
|||
always sign-extends (at least) to SImode. */
|
||||
if (optimize && !no_new_pseudos
|
||||
&& register_operand (operands[0], VOIDmode)
|
||||
&& GET_CODE (operands[1]) == MEM
|
||||
&& GET_CODE (XEXP (operands[1], 0)) != ADDRESSOF)
|
||||
&& GET_CODE (operands[1]) == MEM)
|
||||
{
|
||||
rtx tmp = gen_reg_rtx (SImode);
|
||||
rtx ext = gen_rtx_SIGN_EXTEND (SImode, operands[1]);
|
||||
|
|
@ -1386,8 +1385,7 @@
|
|||
is just as fast as a QImode load. */
|
||||
if (TARGET_ZARCH && optimize && !no_new_pseudos
|
||||
&& register_operand (operands[0], VOIDmode)
|
||||
&& GET_CODE (operands[1]) == MEM
|
||||
&& GET_CODE (XEXP (operands[1], 0)) != ADDRESSOF)
|
||||
&& GET_CODE (operands[1]) == MEM)
|
||||
{
|
||||
rtx tmp = gen_reg_rtx (word_mode);
|
||||
rtx ext = gen_rtx_ZERO_EXTEND (word_mode, operands[1]);
|
||||
|
|
|
|||
|
|
@ -2578,7 +2578,7 @@ do { \
|
|||
{"icc_or_fcc_reg_operand", {REG}}, \
|
||||
{"call_operand", {MEM}}, \
|
||||
{"call_operand_address", {SYMBOL_REF, LABEL_REF, CONST, CONST_DOUBLE, \
|
||||
ADDRESSOF, SUBREG, REG, PLUS, LO_SUM, CONST_INT}}, \
|
||||
SUBREG, REG, PLUS, LO_SUM, CONST_INT}}, \
|
||||
{"symbolic_operand", {SYMBOL_REF, LABEL_REF, CONST}}, \
|
||||
{"symbolic_memory_operand", {SUBREG, MEM}}, \
|
||||
{"label_ref_operand", {LABEL_REF}}, \
|
||||
|
|
|
|||
|
|
@ -1,10 +1,14 @@
|
|||
2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
|
||||
|
||||
PR c++/3761
|
||||
* name-lookup.c (push_class_level_binding): Don't pass a
|
||||
TREE_LIST of ambiguous names to check_template_shadow as it
|
||||
only handles declarations. Instead, pull the declaration
|
||||
out and pass that.
|
||||
2004-07-04 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
|
||||
|
||||
2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
|
||||
|
||||
PR c++/3761
|
||||
* name-lookup.c (push_class_level_binding): Don't pass a
|
||||
TREE_LIST of ambiguous names to check_template_shadow as it
|
||||
only handles declarations. Instead, pull the declaration
|
||||
out and pass that.
|
||||
|
||||
2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
|
||||
|
||||
|
|
|
|||
|
|
@ -4295,7 +4295,6 @@ cxx_mark_addressable (tree exp)
|
|||
warning ("address requested for `%D', which is declared `register'",
|
||||
x);
|
||||
TREE_ADDRESSABLE (x) = 1;
|
||||
put_var_into_stack (x, /*rescan=*/true);
|
||||
return true;
|
||||
|
||||
case FUNCTION_DECL:
|
||||
|
|
|
|||
31
gcc/cse.c
31
gcc/cse.c
|
|
@ -695,9 +695,6 @@ fixed_base_plus_p (rtx x)
|
|||
return false;
|
||||
return fixed_base_plus_p (XEXP (x, 0));
|
||||
|
||||
case ADDRESSOF:
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
|
@ -2769,7 +2766,6 @@ find_best_addr (rtx insn, rtx *loc, enum machine_mode mode)
|
|||
&& (regno = REGNO (addr), regno == FRAME_POINTER_REGNUM
|
||||
|| regno == HARD_FRAME_POINTER_REGNUM
|
||||
|| regno == ARG_POINTER_REGNUM))
|
||||
|| GET_CODE (addr) == ADDRESSOF
|
||||
|| CONSTANT_ADDRESS_P (addr))
|
||||
return;
|
||||
|
||||
|
|
@ -3188,10 +3184,6 @@ fold_rtx (rtx x, rtx insn)
|
|||
since they are used only for lists of args
|
||||
in a function call's REG_EQUAL note. */
|
||||
case EXPR_LIST:
|
||||
/* Changing anything inside an ADDRESSOF is incorrect; we don't
|
||||
want to (e.g.,) make (addressof (const_int 0)) just because
|
||||
the location is known to be zero. */
|
||||
case ADDRESSOF:
|
||||
return x;
|
||||
|
||||
#ifdef HAVE_cc0
|
||||
|
|
@ -3444,8 +3436,6 @@ fold_rtx (rtx x, rtx insn)
|
|||
else if (GET_CODE (addr) == LO_SUM
|
||||
&& GET_CODE (XEXP (addr, 1)) == SYMBOL_REF)
|
||||
base = XEXP (addr, 1);
|
||||
else if (GET_CODE (addr) == ADDRESSOF)
|
||||
return change_address (x, VOIDmode, addr);
|
||||
|
||||
/* If this is a constant pool reference, we can fold it into its
|
||||
constant to allow better value tracking. */
|
||||
|
|
@ -5924,7 +5914,6 @@ cse_insn (rtx insn, rtx libcall_insn)
|
|||
if (sets[i].rtl)
|
||||
{
|
||||
rtx dest = SET_DEST (sets[i].rtl);
|
||||
rtx inner_dest = sets[i].inner_dest;
|
||||
struct table_elt *elt;
|
||||
|
||||
/* Don't record value if we are not supposed to risk allocating
|
||||
|
|
@ -5973,17 +5962,8 @@ cse_insn (rtx insn, rtx libcall_insn)
|
|||
sets[i].dest_hash = HASH (dest, GET_MODE (dest));
|
||||
}
|
||||
|
||||
if (MEM_P (inner_dest)
|
||||
&& GET_CODE (XEXP (inner_dest, 0)) == ADDRESSOF)
|
||||
/* Given (SET (MEM (ADDRESSOF (X))) Y) we don't want to say
|
||||
that (MEM (ADDRESSOF (X))) is equivalent to Y.
|
||||
Consider the case in which the address of the MEM is
|
||||
passed to a function, which alters the MEM. Then, if we
|
||||
later use Y instead of the MEM we'll miss the update. */
|
||||
elt = insert (dest, 0, sets[i].dest_hash, GET_MODE (dest));
|
||||
else
|
||||
elt = insert (dest, sets[i].src_elt,
|
||||
sets[i].dest_hash, GET_MODE (dest));
|
||||
elt = insert (dest, sets[i].src_elt,
|
||||
sets[i].dest_hash, GET_MODE (dest));
|
||||
|
||||
elt->in_memory = (MEM_P (sets[i].inner_dest)
|
||||
&& (! RTX_UNCHANGING_P (sets[i].inner_dest)
|
||||
|
|
@ -7402,12 +7382,7 @@ set_live_p (rtx set, rtx insn ATTRIBUTE_UNUSED, /* Only used with HAVE_cc0. */
|
|||
else if (!REG_P (SET_DEST (set))
|
||||
|| REGNO (SET_DEST (set)) < FIRST_PSEUDO_REGISTER
|
||||
|| counts[REGNO (SET_DEST (set))] != 0
|
||||
|| side_effects_p (SET_SRC (set))
|
||||
/* An ADDRESSOF expression can turn into a use of the
|
||||
internal arg pointer, so always consider the
|
||||
internal arg pointer live. If it is truly dead,
|
||||
flow will delete the initializing insn. */
|
||||
|| (SET_DEST (set) == current_function_internal_arg_pointer))
|
||||
|| side_effects_p (SET_SRC (set)))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3315,9 +3315,6 @@ Dump after the third if conversion, to @file{@var{file}.31.ce3}.
|
|||
@opindex df
|
||||
Dump after control and data flow analysis, to @file{@var{file}.11.cfg}.
|
||||
Also dump after life analysis, to @file{@var{file}.19.life}.
|
||||
@item F
|
||||
@opindex dF
|
||||
Dump after purging @code{ADDRESSOF} codes, to @file{@var{file}.07.addressof}.
|
||||
@item g
|
||||
@opindex dg
|
||||
Dump after global register allocation, to @file{@var{file}.26.greg}.
|
||||
|
|
|
|||
|
|
@ -8736,15 +8736,6 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode, bool can_use_fbreg)
|
|||
mem_loc_result = int_loc_descriptor (INTVAL (rtl));
|
||||
break;
|
||||
|
||||
case ADDRESSOF:
|
||||
/* If this is a MEM, return its address. Otherwise, we can't
|
||||
represent this. */
|
||||
if (MEM_P (XEXP (rtl, 0)))
|
||||
return mem_loc_descriptor (XEXP (XEXP (rtl, 0), 0), mode,
|
||||
can_use_fbreg);
|
||||
else
|
||||
return 0;
|
||||
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
|
|
@ -10093,11 +10084,6 @@ add_location_or_const_value_attribute (dw_die_ref die, tree decl,
|
|||
|
||||
switch (GET_CODE (rtl))
|
||||
{
|
||||
case ADDRESSOF:
|
||||
/* The address of a variable that was optimized away;
|
||||
don't emit anything. */
|
||||
break;
|
||||
|
||||
case CONST_INT:
|
||||
case CONST_DOUBLE:
|
||||
case CONST_VECTOR:
|
||||
|
|
|
|||
|
|
@ -5013,7 +5013,6 @@ copy_insn_1 (rtx orig)
|
|||
case CODE_LABEL:
|
||||
case PC:
|
||||
case CC0:
|
||||
case ADDRESSOF:
|
||||
return orig;
|
||||
case CLOBBER:
|
||||
if (REG_P (XEXP (orig, 0)) && REGNO (XEXP (orig, 0)) < FIRST_PSEUDO_REGISTER)
|
||||
|
|
|
|||
|
|
@ -436,9 +436,6 @@ memory_address (enum machine_mode mode, rtx x)
|
|||
{
|
||||
rtx oldx = x;
|
||||
|
||||
if (GET_CODE (x) == ADDRESSOF)
|
||||
return x;
|
||||
|
||||
x = convert_memory_address (Pmode, x);
|
||||
|
||||
/* By passing constant addresses through registers
|
||||
|
|
|
|||
|
|
@ -945,8 +945,6 @@ store_split_bit_field (rtx op0, unsigned HOST_WIDE_INT bitsize,
|
|||
? GET_MODE (value)
|
||||
: word_mode, value));
|
||||
}
|
||||
else if (GET_CODE (value) == ADDRESSOF)
|
||||
value = copy_to_reg (value);
|
||||
|
||||
while (bitsdone < bitsize)
|
||||
{
|
||||
|
|
|
|||
14
gcc/expr.c
14
gcc/expr.c
|
|
@ -8740,8 +8740,6 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
|
|||
{
|
||||
target = assign_temp (type, 2, 0, 1);
|
||||
SET_DECL_RTL (slot, target);
|
||||
if (TREE_ADDRESSABLE (slot))
|
||||
put_var_into_stack (slot, /*rescan=*/false);
|
||||
|
||||
/* Since SLOT is not known to the called function
|
||||
to belong to its stack frame, we must build an explicit
|
||||
|
|
@ -8775,13 +8773,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
|
|||
return target;
|
||||
}
|
||||
else
|
||||
{
|
||||
SET_DECL_RTL (slot, target);
|
||||
/* If we must have an addressable slot, then make sure that
|
||||
the RTL that we just stored in slot is OK. */
|
||||
if (TREE_ADDRESSABLE (slot))
|
||||
put_var_into_stack (slot, /*rescan=*/true);
|
||||
}
|
||||
SET_DECL_RTL (slot, target);
|
||||
}
|
||||
|
||||
exp1 = TREE_OPERAND (exp, 3) = TREE_OPERAND (exp, 1);
|
||||
|
|
@ -8919,8 +8911,8 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
|
|||
op0 = force_const_mem (TYPE_MODE (TREE_TYPE (TREE_OPERAND (exp, 0))),
|
||||
op0);
|
||||
else if (REG_P (op0) || GET_CODE (op0) == SUBREG
|
||||
|| GET_CODE (op0) == CONCAT || GET_CODE (op0) == ADDRESSOF
|
||||
|| GET_CODE (op0) == PARALLEL || GET_CODE (op0) == LO_SUM)
|
||||
|| GET_CODE (op0) == CONCAT || GET_CODE (op0) == PARALLEL
|
||||
|| GET_CODE (op0) == LO_SUM)
|
||||
{
|
||||
/* If this object is in a register, it can't be BLKmode. */
|
||||
tree inner_type = TREE_TYPE (TREE_OPERAND (exp, 0));
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
2004-07-04 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* f95-lang.c (gfc_mark_addressable): Don't put_var_into_stack.
|
||||
|
||||
2004-07-04 Paul Brook <paul@codesourcery.com>
|
||||
|
||||
* decl.c (gfc_match_implicit_range): Don't use typespec.
|
||||
|
|
|
|||
|
|
@ -668,7 +668,6 @@ gfc_mark_addressable (tree exp)
|
|||
pedwarn ("address of register variable `%s' requested",
|
||||
IDENTIFIER_POINTER (DECL_NAME (x)));
|
||||
}
|
||||
put_var_into_stack (x, /*rescan=*/true);
|
||||
|
||||
/* drops in */
|
||||
case FUNCTION_DECL:
|
||||
|
|
|
|||
2466
gcc/function.c
2466
gcc/function.c
File diff suppressed because it is too large
Load Diff
|
|
@ -97,10 +97,7 @@ struct emit_status GTY(())
|
|||
regno_pointer_align;
|
||||
|
||||
/* Indexed by pseudo register number, gives the rtx for that pseudo.
|
||||
Allocated in parallel with regno_pointer_align.
|
||||
|
||||
Note MEM expressions can appear in this array due to the actions
|
||||
of put_var_into_stack. */
|
||||
Allocated in parallel with regno_pointer_align. */
|
||||
rtx * GTY ((length ("%h.x_reg_rtx_no"))) x_regno_reg_rtx;
|
||||
};
|
||||
|
||||
|
|
@ -273,16 +270,6 @@ struct function GTY(())
|
|||
/* Insn after which register parms and SAVE_EXPRs are born, if nonopt. */
|
||||
rtx x_parm_birth_insn;
|
||||
|
||||
/* 1 + last pseudo register number possibly used for loading a copy
|
||||
of a parameter of this function. */
|
||||
unsigned int x_max_parm_reg;
|
||||
|
||||
/* Vector indexed by REGNO, containing location on stack in which
|
||||
to put the parm which is nominally in pseudo register REGNO,
|
||||
if we discover that that parm must go in the stack. The highest
|
||||
element in this vector is one less than MAX_PARM_REG, above. */
|
||||
rtx * GTY ((length ("%h.x_max_parm_reg"))) x_parm_reg_stack_loc;
|
||||
|
||||
/* List of all used temporaries allocated, by level. */
|
||||
struct varray_head_tag * GTY((param_is (struct temp_slot))) x_used_temp_slots;
|
||||
|
||||
|
|
@ -498,8 +485,6 @@ extern int trampolines_created;
|
|||
#define current_function_has_nonlocal_label (cfun->has_nonlocal_label)
|
||||
#define current_function_has_nonlocal_goto (cfun->has_nonlocal_goto)
|
||||
|
||||
#define max_parm_reg (cfun->x_max_parm_reg)
|
||||
#define parm_reg_stack_loc (cfun->x_parm_reg_stack_loc)
|
||||
#define return_label (cfun->x_return_label)
|
||||
#define naked_return_label (cfun->x_naked_return_label)
|
||||
#define stack_slot_list (cfun->x_stack_slot_list)
|
||||
|
|
|
|||
|
|
@ -190,23 +190,23 @@ static const struct pred_table
|
|||
const RTX_CODE codes[NUM_RTX_CODE];
|
||||
} preds[] = {
|
||||
{"general_operand", {CONST_INT, CONST_DOUBLE, CONST, SYMBOL_REF,
|
||||
LABEL_REF, SUBREG, REG, MEM, ADDRESSOF}},
|
||||
LABEL_REF, SUBREG, REG, MEM }},
|
||||
#ifdef PREDICATE_CODES
|
||||
PREDICATE_CODES
|
||||
#endif
|
||||
{"address_operand", {CONST_INT, CONST_DOUBLE, CONST, SYMBOL_REF,
|
||||
LABEL_REF, SUBREG, REG, MEM, ADDRESSOF,
|
||||
LABEL_REF, SUBREG, REG, MEM,
|
||||
PLUS, MINUS, MULT}},
|
||||
{"register_operand", {SUBREG, REG, ADDRESSOF}},
|
||||
{"pmode_register_operand", {SUBREG, REG, ADDRESSOF}},
|
||||
{"register_operand", {SUBREG, REG}},
|
||||
{"pmode_register_operand", {SUBREG, REG}},
|
||||
{"scratch_operand", {SCRATCH, REG}},
|
||||
{"immediate_operand", {CONST_INT, CONST_DOUBLE, CONST, SYMBOL_REF,
|
||||
LABEL_REF}},
|
||||
{"const_int_operand", {CONST_INT}},
|
||||
{"const_double_operand", {CONST_INT, CONST_DOUBLE}},
|
||||
{"nonimmediate_operand", {SUBREG, REG, MEM, ADDRESSOF}},
|
||||
{"nonimmediate_operand", {SUBREG, REG, MEM}},
|
||||
{"nonmemory_operand", {CONST_INT, CONST_DOUBLE, CONST, SYMBOL_REF,
|
||||
LABEL_REF, SUBREG, REG, ADDRESSOF}},
|
||||
LABEL_REF, SUBREG, REG}},
|
||||
{"push_operand", {MEM}},
|
||||
{"pop_operand", {MEM}},
|
||||
{"memory_operand", {SUBREG, MEM}},
|
||||
|
|
@ -519,7 +519,6 @@ validate_pattern (rtx pattern, rtx insn, rtx set, int set_code)
|
|||
if (c != REG
|
||||
&& c != SUBREG
|
||||
&& c != MEM
|
||||
&& c != ADDRESSOF
|
||||
&& c != CONCAT
|
||||
&& c != PARALLEL
|
||||
&& c != STRICT_LOW_PART)
|
||||
|
|
|
|||
|
|
@ -364,41 +364,6 @@ copy_rtx_and_substitute (rtx orig, struct inline_remap *map, int for_lhs)
|
|||
GET_MODE (SUBREG_REG (orig)),
|
||||
SUBREG_BYTE (orig));
|
||||
|
||||
case ADDRESSOF:
|
||||
copy = gen_rtx_ADDRESSOF (mode,
|
||||
copy_rtx_and_substitute (XEXP (orig, 0),
|
||||
map, for_lhs),
|
||||
0, ADDRESSOF_DECL (orig));
|
||||
regno = ADDRESSOF_REGNO (orig);
|
||||
if (map->reg_map[regno])
|
||||
regno = REGNO (map->reg_map[regno]);
|
||||
else if (regno > LAST_VIRTUAL_REGISTER)
|
||||
{
|
||||
temp = XEXP (orig, 0);
|
||||
map->reg_map[regno] = gen_reg_rtx (GET_MODE (temp));
|
||||
REG_USERVAR_P (map->reg_map[regno]) = REG_USERVAR_P (temp);
|
||||
REG_LOOP_TEST_P (map->reg_map[regno]) = REG_LOOP_TEST_P (temp);
|
||||
RTX_UNCHANGING_P (map->reg_map[regno]) = RTX_UNCHANGING_P (temp);
|
||||
/* A reg with REG_FUNCTION_VALUE_P true will never reach here. */
|
||||
|
||||
/* Objects may initially be represented as registers, but
|
||||
but turned into a MEM if their address is taken by
|
||||
put_var_into_stack. Therefore, the register table may have
|
||||
entries which are MEMs.
|
||||
|
||||
We briefly tried to clear such entries, but that ended up
|
||||
cascading into many changes due to the optimizers not being
|
||||
prepared for empty entries in the register table. So we've
|
||||
decided to allow the MEMs in the register table for now. */
|
||||
if (REG_P (map->x_regno_reg_rtx[regno])
|
||||
&& REG_POINTER (map->x_regno_reg_rtx[regno]))
|
||||
mark_reg_pointer (map->reg_map[regno],
|
||||
map->regno_pointer_align[regno]);
|
||||
regno = REGNO (map->reg_map[regno]);
|
||||
}
|
||||
ADDRESSOF_REGNO (copy) = regno;
|
||||
return copy;
|
||||
|
||||
case USE:
|
||||
case CLOBBER:
|
||||
/* USE and CLOBBER are ordinary, but we convert (use (subreg foo))
|
||||
|
|
|
|||
20
gcc/passes.c
20
gcc/passes.c
|
|
@ -139,7 +139,6 @@ enum dump_file_index
|
|||
DFI_jump,
|
||||
DFI_null,
|
||||
DFI_cse,
|
||||
DFI_addressof,
|
||||
DFI_gcse,
|
||||
DFI_loop,
|
||||
DFI_bypass,
|
||||
|
|
@ -181,7 +180,7 @@ enum dump_file_index
|
|||
Remaining -d letters:
|
||||
|
||||
" e q "
|
||||
" K O Q WXY "
|
||||
" F K O Q WXY "
|
||||
*/
|
||||
|
||||
static struct dump_file_info dump_file_tbl[DFI_MAX] =
|
||||
|
|
@ -193,7 +192,6 @@ static struct dump_file_info dump_file_tbl[DFI_MAX] =
|
|||
{ "jump", 'j', 0, 0, 0 },
|
||||
{ "null", 'u', 0, 0, 0 },
|
||||
{ "cse", 's', 0, 0, 0 },
|
||||
{ "addressof", 'F', 0, 0, 0 },
|
||||
{ "gcse", 'G', 1, 0, 0 },
|
||||
{ "loop", 'L', 1, 0, 0 },
|
||||
{ "bypass", 'G', 1, 0, 0 }, /* Yes, duplicate enable switch. */
|
||||
|
|
@ -989,20 +987,6 @@ rest_of_handle_cfg (void)
|
|||
close_dump_file (DFI_cfg, print_rtl_with_bb, get_insns ());
|
||||
}
|
||||
|
||||
/* Purge addressofs. */
|
||||
static void
|
||||
rest_of_handle_addressof (void)
|
||||
{
|
||||
open_dump_file (DFI_addressof, current_function_decl);
|
||||
|
||||
purge_addressof (get_insns ());
|
||||
if (optimize && purge_all_dead_edges (0))
|
||||
delete_unreachable_blocks ();
|
||||
reg_scan (get_insns (), max_reg_num (), 1);
|
||||
|
||||
close_dump_file (DFI_addressof, print_rtl, get_insns ());
|
||||
}
|
||||
|
||||
/* Perform jump bypassing and control flow optimizations. */
|
||||
static void
|
||||
rest_of_handle_jump_bypass (void)
|
||||
|
|
@ -1543,8 +1527,6 @@ rest_of_compilation (void)
|
|||
if (optimize > 0)
|
||||
rest_of_handle_cse ();
|
||||
|
||||
rest_of_handle_addressof ();
|
||||
|
||||
ggc_collect ();
|
||||
|
||||
if (optimize > 0)
|
||||
|
|
|
|||
16
gcc/recog.c
16
gcc/recog.c
|
|
@ -978,19 +978,11 @@ general_operand (rtx op, enum machine_mode mode)
|
|||
if (! volatile_ok && MEM_VOLATILE_P (op))
|
||||
return 0;
|
||||
|
||||
if (GET_CODE (y) == ADDRESSOF)
|
||||
return 1;
|
||||
|
||||
/* Use the mem's mode, since it will be reloaded thus. */
|
||||
mode = GET_MODE (op);
|
||||
GO_IF_LEGITIMATE_ADDRESS (mode, y, win);
|
||||
}
|
||||
|
||||
/* Pretend this is an operand for now; we'll run force_operand
|
||||
on its replacement in fixup_var_refs_1. */
|
||||
if (code == ADDRESSOF)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
|
||||
win:
|
||||
|
|
@ -1060,11 +1052,6 @@ register_operand (rtx op, enum machine_mode mode)
|
|||
op = sub;
|
||||
}
|
||||
|
||||
/* If we have an ADDRESSOF, consider it valid since it will be
|
||||
converted into something that will not be a MEM. */
|
||||
if (GET_CODE (op) == ADDRESSOF)
|
||||
return 1;
|
||||
|
||||
/* We don't consider registers whose class is NO_REGS
|
||||
to be a register operand. */
|
||||
return (REG_P (op)
|
||||
|
|
@ -1288,9 +1275,6 @@ pop_operand (rtx op, enum machine_mode mode)
|
|||
int
|
||||
memory_address_p (enum machine_mode mode ATTRIBUTE_UNUSED, rtx addr)
|
||||
{
|
||||
if (GET_CODE (addr) == ADDRESSOF)
|
||||
return 1;
|
||||
|
||||
GO_IF_LEGITIMATE_ADDRESS (mode, addr, win);
|
||||
return 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -2282,15 +2282,6 @@ eliminate_regs (rtx x, enum machine_mode mem_mode, rtx insn)
|
|||
case RETURN:
|
||||
return x;
|
||||
|
||||
case ADDRESSOF:
|
||||
/* This is only for the benefit of the debugging backends, which call
|
||||
eliminate_regs on DECL_RTL; any ADDRESSOFs in the actual insns are
|
||||
removed after CSE. */
|
||||
new = eliminate_regs (XEXP (x, 0), 0, insn);
|
||||
if (MEM_P (new))
|
||||
return XEXP (new, 0);
|
||||
return x;
|
||||
|
||||
case REG:
|
||||
regno = REGNO (x);
|
||||
|
||||
|
|
@ -2553,12 +2544,6 @@ eliminate_regs (rtx x, enum machine_mode mem_mode, rtx insn)
|
|||
return x;
|
||||
|
||||
case MEM:
|
||||
/* This is only for the benefit of the debugging backends, which call
|
||||
eliminate_regs on DECL_RTL; any ADDRESSOFs in the actual insns are
|
||||
removed after CSE. */
|
||||
if (GET_CODE (XEXP (x, 0)) == ADDRESSOF)
|
||||
return eliminate_regs (XEXP (XEXP (x, 0), 0), 0, insn);
|
||||
|
||||
/* Our only special processing is to pass the mode of the MEM to our
|
||||
recursive call and copy the flags. While we are here, handle this
|
||||
case more efficiently. */
|
||||
|
|
@ -2657,9 +2642,6 @@ elimination_effects (rtx x, enum machine_mode mem_mode)
|
|||
case RETURN:
|
||||
return;
|
||||
|
||||
case ADDRESSOF:
|
||||
abort ();
|
||||
|
||||
case REG:
|
||||
regno = REGNO (x);
|
||||
|
||||
|
|
@ -2802,9 +2784,6 @@ elimination_effects (rtx x, enum machine_mode mem_mode)
|
|||
return;
|
||||
|
||||
case MEM:
|
||||
if (GET_CODE (XEXP (x, 0)) == ADDRESSOF)
|
||||
abort ();
|
||||
|
||||
/* Our only special processing is to pass the mode of the MEM to our
|
||||
recursive call. */
|
||||
elimination_effects (XEXP (x, 0), GET_MODE (x));
|
||||
|
|
|
|||
|
|
@ -224,7 +224,6 @@ copy_rtx (rtx orig)
|
|||
case CC0:
|
||||
case SCRATCH:
|
||||
/* SCRATCH must be shared because they represent distinct values. */
|
||||
case ADDRESSOF:
|
||||
return orig;
|
||||
case CLOBBER:
|
||||
if (REG_P (XEXP (orig, 0)) && REGNO (XEXP (orig, 0)) < FIRST_PSEUDO_REGISTER)
|
||||
|
|
|
|||
|
|
@ -906,15 +906,6 @@ DEF_RTL_EXPR(SYMBOL_REF, "symbol_ref", "s00", RTX_CONST_OBJ)
|
|||
pretend to be looking at the entire value and comparing it. */
|
||||
DEF_RTL_EXPR(CC0, "cc0", "", RTX_OBJ)
|
||||
|
||||
/* Reference to the address of a register. Removed by purge_addressof after
|
||||
CSE has elided as many as possible.
|
||||
1st operand: the register we may need the address of.
|
||||
2nd operand: the original pseudo regno we were generated for.
|
||||
3rd operand: the decl for the object in the register, for
|
||||
put_reg_in_stack. */
|
||||
|
||||
DEF_RTL_EXPR(ADDRESSOF, "addressof", "eit", RTX_OBJ)
|
||||
|
||||
/* =====================================================================
|
||||
A QUEUED expression really points to a member of the queue of instructions
|
||||
to be output later for postincrement/postdecrement.
|
||||
|
|
|
|||
10
gcc/rtl.h
10
gcc/rtl.h
|
|
@ -1115,12 +1115,6 @@ enum label_kind
|
|||
|
||||
#define LABEL_ALT_ENTRY_P(LABEL) (LABEL_KIND (LABEL) != LABEL_NORMAL)
|
||||
|
||||
/* The original regno this ADDRESSOF was built for. */
|
||||
#define ADDRESSOF_REGNO(RTX) XCUINT (RTX, 1, ADDRESSOF)
|
||||
|
||||
/* The variable in the register we took the address of. */
|
||||
#define ADDRESSOF_DECL(RTX) XCTREE (RTX, 2, ADDRESSOF)
|
||||
|
||||
/* In jump.c, each JUMP_INSN can point to a label that it can jump to,
|
||||
so that if the JUMP_INSN is deleted, the label's LABEL_NUSES can
|
||||
be decremented and possibly the label can be deleted. */
|
||||
|
|
@ -1801,9 +1795,6 @@ extern rtx simplify_replace_rtx (rtx, rtx, rtx);
|
|||
extern rtx simplify_rtx (rtx);
|
||||
extern rtx avoid_constant_pool_reference (rtx);
|
||||
|
||||
/* In function.c */
|
||||
extern rtx gen_mem_addressof (rtx, tree, int);
|
||||
|
||||
/* In regclass.c */
|
||||
extern enum machine_mode choose_hard_reg_mode (unsigned int, unsigned int,
|
||||
bool);
|
||||
|
|
@ -2280,7 +2271,6 @@ extern int prologue_epilogue_contains (rtx);
|
|||
extern int sibcall_epilogue_contains (rtx);
|
||||
extern void mark_temp_addr_taken (rtx);
|
||||
extern void update_temp_slot_address (rtx, rtx);
|
||||
extern void purge_addressof (rtx);
|
||||
extern void purge_hard_subreg_sets (rtx);
|
||||
|
||||
/* In stmt.c */
|
||||
|
|
|
|||
|
|
@ -86,7 +86,6 @@ rtx_unstable_p (rtx x)
|
|||
case QUEUED:
|
||||
return 1;
|
||||
|
||||
case ADDRESSOF:
|
||||
case CONST:
|
||||
case CONST_INT:
|
||||
case CONST_DOUBLE:
|
||||
|
|
@ -173,10 +172,6 @@ rtx_varies_p (rtx x, int for_alias)
|
|||
case LABEL_REF:
|
||||
return 0;
|
||||
|
||||
case ADDRESSOF:
|
||||
/* This will resolve to some offset from the frame pointer. */
|
||||
return 0;
|
||||
|
||||
case REG:
|
||||
/* Note that we have to test for the actual rtx used for the frame
|
||||
and arg pointers and not just the register number in case we have
|
||||
|
|
@ -248,10 +243,6 @@ rtx_addr_can_trap_p (rtx x)
|
|||
case LABEL_REF:
|
||||
return 0;
|
||||
|
||||
case ADDRESSOF:
|
||||
/* This will resolve to some offset from the frame pointer. */
|
||||
return 0;
|
||||
|
||||
case REG:
|
||||
/* As in rtx_varies_p, we have to use the actual rtx, not reg number. */
|
||||
if (x == frame_pointer_rtx || x == hard_frame_pointer_rtx
|
||||
|
|
@ -311,10 +302,6 @@ nonzero_address_p (rtx x)
|
|||
case LABEL_REF:
|
||||
return true;
|
||||
|
||||
case ADDRESSOF:
|
||||
/* This will resolve to some offset from the frame pointer. */
|
||||
return true;
|
||||
|
||||
case REG:
|
||||
/* As in rtx_varies_p, we have to use the actual rtx, not reg number. */
|
||||
if (x == frame_pointer_rtx || x == hard_frame_pointer_rtx
|
||||
|
|
@ -3838,14 +3825,6 @@ rtx_cost (rtx x, enum rtx_code outer_code ATTRIBUTE_UNUSED)
|
|||
int
|
||||
address_cost (rtx x, enum machine_mode mode)
|
||||
{
|
||||
/* The address_cost target hook does not deal with ADDRESSOF nodes. But,
|
||||
during CSE, such nodes are present. Using an ADDRESSOF node which
|
||||
refers to the address of a REG is a good thing because we can then
|
||||
turn (MEM (ADDRESSOF (REG))) into just plain REG. */
|
||||
|
||||
if (GET_CODE (x) == ADDRESSOF && REG_P (XEXP ((x), 0)))
|
||||
return -1;
|
||||
|
||||
/* We may be asked for cost of various unusual addresses, such as operands
|
||||
of push instruction. It is not worthwhile to complicate writing
|
||||
of the target hook by such cases. */
|
||||
|
|
|
|||
|
|
@ -76,8 +76,6 @@ gen_lowpart_general (enum machine_mode mode, rtx x)
|
|||
|
||||
return adjust_address (x, mode, offset);
|
||||
}
|
||||
else if (GET_CODE (x) == ADDRESSOF)
|
||||
return gen_lowpart_general (mode, force_reg (GET_MODE (x), x));
|
||||
else
|
||||
abort ();
|
||||
}
|
||||
|
|
|
|||
14
gcc/stmt.c
14
gcc/stmt.c
|
|
@ -1600,7 +1600,6 @@ expand_asm_operands (tree string, tree outputs, tree inputs,
|
|||
}
|
||||
if (REG_P (op)
|
||||
|| GET_CODE (op) == SUBREG
|
||||
|| GET_CODE (op) == ADDRESSOF
|
||||
|| GET_CODE (op) == CONCAT)
|
||||
{
|
||||
tree qual_type = build_qualified_type (type,
|
||||
|
|
@ -3070,14 +3069,7 @@ expand_decl (tree decl)
|
|||
set_mem_attributes (x, decl, 1);
|
||||
SET_DECL_RTL (decl, x);
|
||||
}
|
||||
else if (DECL_MODE (decl) != BLKmode
|
||||
/* If -ffloat-store, don't put explicit float vars
|
||||
into regs. */
|
||||
&& !(flag_float_store
|
||||
&& TREE_CODE (type) == REAL_TYPE)
|
||||
&& ! TREE_THIS_VOLATILE (decl)
|
||||
&& ! DECL_NONLOCAL (decl)
|
||||
&& (DECL_REGISTER (decl) || DECL_ARTIFICIAL (decl) || optimize))
|
||||
else if (use_register_for_decl (decl))
|
||||
{
|
||||
/* Automatic variable that can go in a register. */
|
||||
int unsignedp = TYPE_UNSIGNED (type);
|
||||
|
|
@ -3103,10 +3095,6 @@ expand_decl (tree decl)
|
|||
}
|
||||
|
||||
maybe_set_unchanging (DECL_RTL (decl), decl);
|
||||
|
||||
/* If something wants our address, try to use ADDRESSOF. */
|
||||
if (TREE_ADDRESSABLE (decl))
|
||||
put_var_into_stack (decl, /*rescan=*/false);
|
||||
}
|
||||
|
||||
else if (TREE_CODE (DECL_SIZE_UNIT (decl)) == INTEGER_CST
|
||||
|
|
|
|||
|
|
@ -3465,17 +3465,14 @@ extern void build_common_tree_nodes_2 (int);
|
|||
extern tree build_range_type (tree, tree, tree);
|
||||
|
||||
/* In function.c */
|
||||
extern void setjmp_protect_args (void);
|
||||
extern void setjmp_protect (tree);
|
||||
extern void expand_main_function (void);
|
||||
extern void init_dummy_function_start (void);
|
||||
extern void expand_dummy_function_end (void);
|
||||
extern void init_function_for_compilation (void);
|
||||
extern void allocate_struct_function (tree);
|
||||
extern void init_function_start (tree);
|
||||
extern bool use_register_for_decl (tree);
|
||||
extern void assign_parms (tree);
|
||||
extern void put_var_into_stack (tree, int);
|
||||
extern void flush_addressof (tree);
|
||||
extern void setjmp_vars_warning (tree);
|
||||
extern void setjmp_args_warning (void);
|
||||
extern void init_temp_slots (void);
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
2004-04-07 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* treetree.c (tree_mark_addressable): Don't put_var_into_stack.
|
||||
|
||||
2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
|
||||
|
||||
* treetree.c (tree_lang_signed_or_unsigned_type): Use TYPE_UNSIGNED,
|
||||
|
|
|
|||
|
|
@ -962,7 +962,6 @@ tree_mark_addressable (tree exp)
|
|||
pedwarn ("address of register variable `%s' requested",
|
||||
IDENTIFIER_POINTER (DECL_NAME (x)));
|
||||
}
|
||||
put_var_into_stack (x, /*rescan=*/ true);
|
||||
|
||||
/* drops in */
|
||||
case FUNCTION_DECL:
|
||||
|
|
|
|||
44
gcc/web.c
44
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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue