aboutsummaryrefslogtreecommitdiff
path: root/gcc/cse.c
diff options
context:
space:
mode:
authorJerry Quinn <jlquinn@optonline.net>2004-07-01 12:52:53 +0000
committerJerry Quinn <jlquinn@gcc.gnu.org>2004-07-01 12:52:53 +0000
commit3c0cb5de6a4e067a36096c2141384bf9e3f520b6 (patch)
treef48d60264473680791f8223b21f0c82f2666fcba /gcc/cse.c
parent8436e65ac6e638dd045098516f37d4f2c685a3e1 (diff)
downloadgcc-3c0cb5de6a4e067a36096c2141384bf9e3f520b6.zip
gcc-3c0cb5de6a4e067a36096c2141384bf9e3f520b6.tar.gz
gcc-3c0cb5de6a4e067a36096c2141384bf9e3f520b6.tar.bz2
alias.c (get_alias_set, [...]): Use MEM_P.
2004-07-01 Jerry Quinn <jlquinn@optonline.net> * alias.c (get_alias_set, canon_rtx, get_addr, nonoverlapping_memrefs_p, nonlocal_referenced_p_1, memory_modified_1): Use MEM_P. * builtins.c (expand_builtin_prefetch, expand_builtin_profile_func, expand_builtin): Likewise. * calls.c (expand_call, emit_library_call_value_1, store_one_arg): Likewise. * combine.c (can_combine_p, combinable_i3pat, try_combine, find_split_point, combine_simplify_rtx, simplify_set, make_extraction, rtx_equal_for_field_assignment_p, gen_lowpart_for_combine, record_dead_and_set_regs_1, get_last_value_validate, mark_used_regs_combine, move_deaths, unmentioned_reg_p_1): Likewise. * cse.c (check_dependence, canon_hash, equiv_constant, gen_lowpart_if_possible, cse_insn, invalidate_from_clobbers, cse_around_loop, cse_check_loop_start, cse_set_around_loop, count_reg_usage): Likewise. * cselib.c (rtx_equal_for_cselib_p, add_mem_for_addr, cselib_lookup, cselib_invalidate_mem, cselib_invalidate_rtx, cselib_record_set, cselib_record_sets): Likewise. * dbxout.c (PARM_PASSED_IN_MEMORY, dbxout_symbol, dbxout_symbol_location, dbxout_parms, dbxout_reg_parms): Likewise. * ddg.c (mark_mem_use, mark_mem_store, rtx_mem_access_p): Likewise. * df.c (df_uses_record): Likewise. * dojump (do_jump): Likewise. * dwarf2out.c (stack_adjust_offset, mem_loc_descriptor, loc_descriptor_from_tree, rtl_for_decl_location, add_bound_info, decl_start_label): Likewise. * emit-rtl.c (gen_complex_constant_part, gen_highpart, operand_subword, change_address_1, make_safe_from): Likewise. * explow.c (break_out_memory_refs, copy_all_regs, validize_mem, stabilize, force_not_mem): Likewise. * expmed.c (store_bit_field, store_split_bit_field, extract_bit_field, expand_mult_const, expand_divmod, emit_store_flag): Likewise. * expr.c (convert_move, convert_modes, emit_block_move, emit_group_load, emit_group_store, clear_storage, emit_move_insn, emit_move_insn_1, expand_assignment, store_expr, store_constructor_field, store_constructor, store_field, force_operand, safe_from_p, expand_expr_real_1, expand_increment): Likewise. * final.c (cleanup_subreg_operands, alter_subreg, get_mem_expr_from_op): Likewise. * flow.c (notice_stack_pointer_modification_1, init_propagate_block_info, insn_dead_p, mark_set_1, mark_used_regs): Likewise. * function.c (mark_temp_addr_taken, preserve_temp_slots, preserve_rtl_expr_result, put_var_into_stack, fixup_var_refs_1, optimize_bit_field, flush_addressof, purge_addressof_1, instantiate_decl, instantiate_virtual_regs_1, assign_parms, setjmp_protect, setjmp_protect_args, fix_lexical_addr, keep_stack_depressed): Likewise. * ifcvt.c (noce_try_cmove_arith, noce_try_abs, noce_operand_ok, noce_process_if_block, find_memory): Likewise. * integrate.c (subst_constants, allocate_initial_values): Likewise. * local-alloc.c (validate_equiv_mem_from_store, memref_referenced_p, update_equiv_regs): Likewise. * loop.c (scan_loop, prescan_loop, note_addr_stored, check_store, maybe_eliminate_biv_1, find_mem_in_note_1): Likewise. * optabs.c (expand_abs, emit_unop_insn): Likewise. * passes.c (rest_of_handle_final): Likewise. * postreload.c (reload_cse_simplify_set, reload_cse_simplify_operands, move2add_note_store): Likewise. * ra-build.c (detect_remat_webs): Likewise. * ra-debug.c (dump_static_insn_cost): Likewise. * ra-rewrite.c (slots_overlap_p, insert_stores): Likewise. * recog.c (validate_change, apply_change_group, cancel_changes, validate_replace_rtx_1, general_operand, register_operand, nonmemory_operand, push_operand, pop_operand, memory_operand, indirect_operand, asm_operand_ok, offsettable_memref_p, offsettable_nonstrict_memref_p, constrain_operands, store_data_bypass_p): Likewise. * reg-stack.c (subst_stack_regs_pat): Likewise. * regclass.c (record_operand_costs, scan_one_insn, record_reg_classes, copy_cost, reg_scan_mark_refs): Likewise. * regmove.c (optimize_reg_copy_3, stack_memref_p, combine_stack_adjustments_for_block): Likewise. * regrename.c (copyprop_hardreg_forward_1): Likewise. * reload.c (can_reload_into, push_reload, decompose, immune_p, find_reloads, find_reloads_address, find_reloads_address_1, reg_overlap_mentioned_for_reload_p, refers_to_mem_for_reload_p, find_equiv_reg): Likewise. * reload1.c (reload, eliminate_regs, eliminate_regs_in_insn, reload_as_needed, choose_reload_regs, emit_input_reload_insns, do_input_reload, emit_reload_insns, gen_reload, delete_output_reload, delete_address_reloads): Likewise. * resource.c (mark_referenced_resources): Likewise. * rtlanal.c (get_jump_table_offset, count_occurrences, reg_referenced_p, reg_set_p, set_of_1, set_noop_p, reg_overlap_mentioned_p, note_uses, replace_regs, nonzero_bits1, num_sign_bit_copies1): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * sched-deps.c (sched_analyze_1, sched_analyze_2): Likewise. * sdbout.c (PARM_PASSED_IN_MEMORY, sdbout_symbol, sdbout_toplevel_data, sdbout_parms, sdbout_reg_parms, sdbout_global_decl): Likewise. * simplify-rtx.c (simplify_subreg): Likewise. * stmt.c (expand_asm_operands, expand_expr_stmt_value, expand_decl, expand_anon_union_decl, expand_end_case_type): Likewise. * unroll.c (calculate_giv_inc): Likewise. * var-tracking.c (stack_adjust_offset_pre_post, bb_stack_adjust_offset, track_expr_p, count_uses, add_uses, add_stores, compute_bb_dataflow, vt_get_decl_and_offset, vt_add_function_parameters): Likewise. * varasm.c (make_var_volatile, notice_global_symbol, assemble_external, decode_addr_const, mark_weak, default_encode_section_info): Likewise. From-SVN: r83980
Diffstat (limited to 'gcc/cse.c')
-rw-r--r--gcc/cse.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/gcc/cse.c b/gcc/cse.c
index e322ec7..c50b28a 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -1689,7 +1689,7 @@ static int
check_dependence (rtx *x, void *data)
{
struct check_dependence_data *d = (struct check_dependence_data *) data;
- if (*x && GET_CODE (*x) == MEM)
+ if (*x && MEM_P (*x))
return canon_true_dependence (d->exp, d->mode, d->addr, *x,
cse_rtx_varies_p);
else
@@ -2246,7 +2246,7 @@ canon_hash (rtx x, enum machine_mode mode)
handling since the MEM may be BLKmode which normally
prevents an entry from being made. Pure calls are
marked by a USE which mentions BLKmode memory. */
- if (GET_CODE (XEXP (x, 0)) == MEM
+ if (MEM_P (XEXP (x, 0))
&& ! MEM_VOLATILE_P (XEXP (x, 0)))
{
hash += (unsigned) USE;
@@ -4195,7 +4195,7 @@ equiv_constant (rtx x)
is a constant-pool reference. Then try to look it up in the hash table
in case it is something whose value we have seen before. */
- if (GET_CODE (x) == MEM)
+ if (MEM_P (x))
{
struct table_elt *elt;
@@ -4231,7 +4231,7 @@ gen_lowpart_if_possible (enum machine_mode mode, rtx x)
if (result)
return result;
- else if (GET_CODE (x) == MEM)
+ else if (MEM_P (x))
{
/* This is the only other case we handle. */
int offset = 0;
@@ -4700,7 +4700,7 @@ cse_insn (rtx insn, rtx libcall_insn)
/* If we clobber memory, canon the address.
This does nothing when a register is clobbered
because we have already invalidated the reg. */
- if (GET_CODE (XEXP (y, 0)) == MEM)
+ if (MEM_P (XEXP (y, 0)))
canon_reg (XEXP (y, 0), NULL_RTX);
}
else if (GET_CODE (y) == USE
@@ -4719,7 +4719,7 @@ cse_insn (rtx insn, rtx libcall_insn)
}
else if (GET_CODE (x) == CLOBBER)
{
- if (GET_CODE (XEXP (x, 0)) == MEM)
+ if (MEM_P (XEXP (x, 0)))
canon_reg (XEXP (x, 0), NULL_RTX);
}
@@ -4789,7 +4789,7 @@ cse_insn (rtx insn, rtx libcall_insn)
|| GET_CODE (dest) == SIGN_EXTRACT)
dest = XEXP (dest, 0);
- if (GET_CODE (dest) == MEM)
+ if (MEM_P (dest))
canon_reg (dest, insn);
}
@@ -4916,7 +4916,7 @@ cse_insn (rtx insn, rtx libcall_insn)
RTL would be referring to SRC, so we don't lose any optimization
opportunities by not having SRC in the hash table. */
- if (GET_CODE (src) == MEM
+ if (MEM_P (src)
&& find_reg_note (insn, REG_EQUIV, NULL_RTX) != 0
&& REG_P (dest)
&& REGNO (dest) >= FIRST_PSEUDO_REGISTER)
@@ -5130,7 +5130,7 @@ cse_insn (rtx insn, rtx libcall_insn)
if (flag_expensive_optimizations && src_related == 0
&& (GET_MODE_SIZE (mode) < UNITS_PER_WORD)
&& GET_MODE_CLASS (mode) == MODE_INT
- && GET_CODE (src) == MEM && ! do_not_record
+ && MEM_P (src) && ! do_not_record
&& LOAD_EXTEND_OP (mode) != NIL)
{
enum machine_mode tmode;
@@ -5391,7 +5391,7 @@ cse_insn (rtx insn, rtx libcall_insn)
if (libcall_insn
&& (REG_P (sets[i].orig_src)
|| GET_CODE (sets[i].orig_src) == SUBREG
- || GET_CODE (sets[i].orig_src) == MEM))
+ || MEM_P (sets[i].orig_src)))
{
rtx note = find_reg_equal_equiv_note (libcall_insn);
if (note != 0)
@@ -5426,7 +5426,7 @@ cse_insn (rtx insn, rtx libcall_insn)
&& GET_CODE (XEXP (XEXP (trial, 0), 0)) == LABEL_REF
&& GET_CODE (XEXP (XEXP (trial, 0), 1)) == LABEL_REF)
&& (src_folded == 0
- || (GET_CODE (src_folded) != MEM
+ || (!MEM_P (src_folded)
&& ! src_folded_force_flag))
&& GET_MODE_CLASS (mode) != MODE_CC
&& mode != VOIDmode)
@@ -5542,7 +5542,7 @@ cse_insn (rtx insn, rtx libcall_insn)
sets[i].inner_dest = dest;
- if (GET_CODE (dest) == MEM)
+ if (MEM_P (dest))
{
#ifdef PUSH_ROUNDING
/* Stack pushes invalidate the stack pointer. */
@@ -5658,7 +5658,7 @@ cse_insn (rtx insn, rtx libcall_insn)
{
if (REG_P (dest) || GET_CODE (dest) == SUBREG)
invalidate (dest, VOIDmode);
- else if (GET_CODE (dest) == MEM)
+ else if (MEM_P (dest))
{
/* Outgoing arguments for a libcall don't
affect any recorded expressions. */
@@ -5831,7 +5831,7 @@ cse_insn (rtx insn, rtx libcall_insn)
we have just done an invalidate_memory that covers even those. */
if (REG_P (dest) || GET_CODE (dest) == SUBREG)
invalidate (dest, VOIDmode);
- else if (GET_CODE (dest) == MEM)
+ else if (MEM_P (dest))
{
/* Outgoing arguments for a libcall don't
affect any recorded expressions. */
@@ -5931,7 +5931,7 @@ cse_insn (rtx insn, rtx libcall_insn)
floating-point values in registers that might be wider than
memory. */
if ((flag_float_store
- && GET_CODE (dest) == MEM
+ && MEM_P (dest)
&& FLOAT_MODE_P (GET_MODE (dest)))
/* Don't record BLKmode values, because we don't know the
size of it, and can't be sure that other BLKmode values
@@ -5973,7 +5973,7 @@ cse_insn (rtx insn, rtx libcall_insn)
sets[i].dest_hash = HASH (dest, GET_MODE (dest));
}
- if (GET_CODE (inner_dest) == MEM
+ 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.
@@ -5985,7 +5985,7 @@ cse_insn (rtx insn, rtx libcall_insn)
elt = insert (dest, sets[i].src_elt,
sets[i].dest_hash, GET_MODE (dest));
- elt->in_memory = (GET_CODE (sets[i].inner_dest) == MEM
+ elt->in_memory = (MEM_P (sets[i].inner_dest)
&& (! RTX_UNCHANGING_P (sets[i].inner_dest)
|| fixed_base_plus_p (XEXP (sets[i].inner_dest,
0))));
@@ -6248,7 +6248,7 @@ invalidate_from_clobbers (rtx x)
if (ref)
{
if (REG_P (ref) || GET_CODE (ref) == SUBREG
- || GET_CODE (ref) == MEM)
+ || MEM_P (ref))
invalidate (ref, VOIDmode);
else if (GET_CODE (ref) == STRICT_LOW_PART
|| GET_CODE (ref) == ZERO_EXTRACT)
@@ -6265,7 +6265,7 @@ invalidate_from_clobbers (rtx x)
{
rtx ref = XEXP (y, 0);
if (REG_P (ref) || GET_CODE (ref) == SUBREG
- || GET_CODE (ref) == MEM)
+ || MEM_P (ref))
invalidate (ref, VOIDmode);
else if (GET_CODE (ref) == STRICT_LOW_PART
|| GET_CODE (ref) == ZERO_EXTRACT)
@@ -6517,7 +6517,7 @@ cse_check_loop_start (rtx x, rtx set ATTRIBUTE_UNUSED, void *data)
|| GET_CODE (x) == CC0 || GET_CODE (x) == PC)
return;
- if ((GET_CODE (x) == MEM && GET_CODE (*cse_check_loop_start_value) == MEM)
+ if ((MEM_P (x) && MEM_P (*cse_check_loop_start_value))
|| reg_overlap_mentioned_p (x, *cse_check_loop_start_value))
*cse_check_loop_start_value = NULL_RTX;
}
@@ -6637,7 +6637,7 @@ cse_set_around_loop (rtx x, rtx insn, rtx loop_start)
/* See comment on similar code in cse_insn for explanation of these
tests. */
if (REG_P (SET_DEST (x)) || GET_CODE (SET_DEST (x)) == SUBREG
- || GET_CODE (SET_DEST (x)) == MEM)
+ || MEM_P (SET_DEST (x)))
invalidate (SET_DEST (x), VOIDmode);
else if (GET_CODE (SET_DEST (x)) == STRICT_LOW_PART
|| GET_CODE (SET_DEST (x)) == ZERO_EXTRACT)
@@ -7303,7 +7303,7 @@ count_reg_usage (rtx x, int *counts, int incr)
case CLOBBER:
/* If we are clobbering a MEM, mark any registers inside the address
as being used. */
- if (GET_CODE (XEXP (x, 0)) == MEM)
+ if (MEM_P (XEXP (x, 0)))
count_reg_usage (XEXP (XEXP (x, 0), 0), counts, incr);
return;