diff options
author | jlquinn <jlquinn@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-01 12:52:53 +0000 |
---|---|---|
committer | jlquinn <jlquinn@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-01 12:52:53 +0000 |
commit | e16ceb8e4901e2c6697dc8bab42ffddec26d7ebe (patch) | |
tree | f48d60264473680791f8223b21f0c82f2666fcba /gcc/function.c | |
parent | 22f8ae6ed480ae6d57df41caa9a38dbb085eccf0 (diff) | |
download | gcc-e16ceb8e4901e2c6697dc8bab42ffddec26d7ebe.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83980 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/function.c')
-rw-r--r-- | gcc/function.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/gcc/function.c b/gcc/function.c index aa6cdad5ace..008669fa8d7 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -1134,7 +1134,7 @@ mark_temp_addr_taken (rtx x) /* If X is not in memory or is at a constant address, it cannot be in a temporary slot. */ - if (GET_CODE (x) != MEM || CONSTANT_P (XEXP (x, 0))) + if (!MEM_P (x) || CONSTANT_P (XEXP (x, 0))) return; p = find_temp_slot_from_address (XEXP (x, 0)); @@ -1181,7 +1181,7 @@ preserve_temp_slots (rtx x) /* If X is not in memory or is at a constant address, it cannot be in a temporary slot, but it can contain something whose address was taken. */ - if (p == 0 && (GET_CODE (x) != MEM || CONSTANT_P (XEXP (x, 0)))) + if (p == 0 && (!MEM_P (x) || CONSTANT_P (XEXP (x, 0)))) { for (p = *temp_slots_at_level (temp_slot_level); p; p = next) { @@ -1242,7 +1242,7 @@ preserve_rtl_expr_result (rtx x) /* If X is not in memory or is at a constant address, it cannot be in a temporary slot. */ - if (x == 0 || GET_CODE (x) != MEM || CONSTANT_P (XEXP (x, 0))) + 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 @@ -1400,7 +1400,7 @@ put_var_into_stack (tree decl, int rescan) reference, with a pseudo to address it, put that pseudo into the stack if the var is non-local. */ if (TREE_CODE (decl) != SAVE_EXPR && DECL_NONLOCAL (decl) - && GET_CODE (reg) == MEM + && MEM_P (reg) && REG_P (XEXP (reg, 0)) && REGNO (XEXP (reg, 0)) > LAST_VIRTUAL_REGISTER) { @@ -1425,7 +1425,7 @@ put_var_into_stack (tree decl, int rescan) /* If we can't use ADDRESSOF, make sure we see through one we already generated. */ if (! can_use_addressof_p - && GET_CODE (reg) == MEM + && MEM_P (reg) && GET_CODE (XEXP (reg, 0)) == ADDRESSOF) reg = XEXP (XEXP (reg, 0), 0); @@ -1442,7 +1442,7 @@ put_var_into_stack (tree decl, int rescan) /* If this was previously a MEM but we've removed the ADDRESSOF, set this address into that MEM so we always use the same rtx for this variable. */ - if (orig_reg != reg && GET_CODE (orig_reg) == MEM) + if (orig_reg != reg && MEM_P (orig_reg)) XEXP (orig_reg, 0) = XEXP (reg, 0); } else if (GET_CODE (reg) == CONCAT) @@ -2157,7 +2157,7 @@ fixup_var_refs_1 (rtx var, enum machine_mode promoted_mode, rtx *loc, rtx insn, means that the insn may have become invalid again. We can't in this case make a new replacement since we already have one and we must deal with MATCH_DUPs. */ - if (GET_CODE (replacement->new) == MEM) + if (MEM_P (replacement->new)) { INSN_CODE (insn) = -1; if (recog_memoized (insn) >= 0) @@ -2702,13 +2702,13 @@ optimize_bit_field (rtx body, rtx insn, rtx *equiv_mem) /* Now check that the containing word is memory, not a register, and that it is safe to change the machine mode. */ - if (GET_CODE (XEXP (bitfield, 0)) == MEM) + if (MEM_P (XEXP (bitfield, 0))) memref = XEXP (bitfield, 0); else if (REG_P (XEXP (bitfield, 0)) && equiv_mem != 0) memref = equiv_mem[REGNO (XEXP (bitfield, 0))]; else if (GET_CODE (XEXP (bitfield, 0)) == SUBREG - && GET_CODE (SUBREG_REG (XEXP (bitfield, 0))) == MEM) + && MEM_P (SUBREG_REG (XEXP (bitfield, 0)))) memref = SUBREG_REG (XEXP (bitfield, 0)); else if (GET_CODE (XEXP (bitfield, 0)) == SUBREG && equiv_mem != 0 @@ -2947,7 +2947,7 @@ flush_addressof (tree decl) { if ((TREE_CODE (decl) == PARM_DECL || TREE_CODE (decl) == VAR_DECL) && DECL_RTL (decl) != 0 - && GET_CODE (DECL_RTL (decl)) == MEM + && MEM_P (DECL_RTL (decl)) && GET_CODE (XEXP (DECL_RTL (decl), 0)) == ADDRESSOF && REG_P (XEXP (XEXP (DECL_RTL (decl), 0), 0))) put_addressof_into_stack (XEXP (DECL_RTL (decl), 0), 0); @@ -3043,7 +3043,7 @@ purge_addressof_1 (rtx *loc, rtx insn, int force, int store, int may_postpone, { rtx sub, insns; - if (GET_CODE (XEXP (x, 0)) != MEM) + if (!MEM_P (XEXP (x, 0))) put_addressof_into_stack (x, ht); /* We must create a copy of the rtx because it was created by @@ -3077,7 +3077,7 @@ purge_addressof_1 (rtx *loc, rtx insn, int force, int store, int may_postpone, { rtx sub = XEXP (XEXP (x, 0), 0); - if (GET_CODE (sub) == MEM) + if (MEM_P (sub)) sub = adjust_address_nv (sub, GET_MODE (x), 0); else if (REG_P (sub) && (MEM_VOLATILE_P (x) || GET_MODE (x) == BLKmode)) @@ -3706,7 +3706,7 @@ instantiate_decl (rtx x, HOST_WIDE_INT size, int valid_only) /* If this is not a MEM, no need to do anything. Similarly if the address is a constant or a register that is not a virtual register. */ - if (x == 0 || GET_CODE (x) != MEM) + if (x == 0 || !MEM_P (x)) return; addr = XEXP (x, 0); @@ -4129,7 +4129,7 @@ instantiate_virtual_regs_1 (rtx *loc, rtx object, int extra_insns) go ahead and make the invalid one, but do it to a copy. For a REG, just make the recursive call, since there's no chance of a problem. */ - if ((GET_CODE (XEXP (x, 0)) == MEM + if ((MEM_P (XEXP (x, 0)) && instantiate_virtual_regs_1 (&XEXP (XEXP (x, 0), 0), XEXP (x, 0), 0)) || (REG_P (XEXP (x, 0)) @@ -4169,7 +4169,7 @@ instantiate_virtual_regs_1 (rtx *loc, rtx object, int extra_insns) if (REG_P (XEXP (x, 0))) return 1; - else if (GET_CODE (XEXP (x, 0)) == MEM) + else if (MEM_P (XEXP (x, 0))) { /* If we have a (addressof (mem ..)), do any instantiation inside since we know we'll be making the inside valid when we finally @@ -5106,7 +5106,7 @@ assign_parms (tree fndecl) if (nominal_mode == passed_mode && ! did_conversion && stack_parm != 0 - && GET_CODE (stack_parm) == MEM + && MEM_P (stack_parm) && locate.offset.var == 0 && reg_mentioned_p (virtual_incoming_args_rtx, XEXP (stack_parm, 0))) @@ -5254,7 +5254,7 @@ assign_parms (tree fndecl) /* Set MEM_EXPR to the original decl, i.e. to PARM, instead of the copy of decl, i.e. FNARGS. */ if (DECL_INCOMING_RTL (parm) - && GET_CODE (DECL_INCOMING_RTL (parm)) == MEM) + && MEM_P (DECL_INCOMING_RTL (parm))) set_mem_expr (DECL_INCOMING_RTL (parm), parm); } fnargs = TREE_CHAIN (fnargs); @@ -5737,7 +5737,7 @@ setjmp_protect (tree block) || TREE_CODE (decl) == PARM_DECL) && DECL_RTL (decl) != 0 && (REG_P (DECL_RTL (decl)) - || (GET_CODE (DECL_RTL (decl)) == MEM + || (MEM_P (DECL_RTL (decl)) && GET_CODE (XEXP (DECL_RTL (decl), 0)) == ADDRESSOF)) /* If this variable came from an inline function, it must be that its life doesn't overlap the setjmp. If there was a @@ -5770,7 +5770,7 @@ setjmp_protect_args (void) || TREE_CODE (decl) == PARM_DECL) && DECL_RTL (decl) != 0 && (REG_P (DECL_RTL (decl)) - || (GET_CODE (DECL_RTL (decl)) == MEM + || (MEM_P (DECL_RTL (decl)) && GET_CODE (XEXP (DECL_RTL (decl), 0)) == ADDRESSOF)) && ( /* If longjmp doesn't restore the registers, @@ -5802,7 +5802,7 @@ fix_lexical_addr (rtx addr, tree var) fp = find_function_data (context); - if (GET_CODE (addr) == ADDRESSOF && GET_CODE (XEXP (addr, 0)) == MEM) + if (GET_CODE (addr) == ADDRESSOF && MEM_P (XEXP (addr, 0))) addr = XEXP (XEXP (addr, 0), 0); /* Decode given address as base reg plus displacement. */ @@ -7050,10 +7050,10 @@ keep_stack_depressed (rtx insns) insn = next; continue; } - else if (GET_CODE (retaddr) == MEM + else if (MEM_P (retaddr) && REG_P (XEXP (retaddr, 0))) base = gen_rtx_REG (Pmode, REGNO (XEXP (retaddr, 0))), offset = 0; - else if (GET_CODE (retaddr) == MEM + else if (MEM_P (retaddr) && GET_CODE (XEXP (retaddr, 0)) == PLUS && REG_P (XEXP (XEXP (retaddr, 0), 0)) && GET_CODE (XEXP (XEXP (retaddr, 0), 1)) == CONST_INT) |