aboutsummaryrefslogtreecommitdiff
path: root/gcc/cse.c
diff options
context:
space:
mode:
authorJerry Quinn <jlquinn@optonline.net>2004-06-15 18:02:40 +0000
committerJerry Quinn <jlquinn@gcc.gnu.org>2004-06-15 18:02:40 +0000
commitf8cfc6aa070047007c18468b54996c116e593642 (patch)
tree59650bc9433b72fce58b94b5d3cd187f0dde42a0 /gcc/cse.c
parent347b63a2c9e48740e8d79c9be8d620d22e1eb40f (diff)
downloadgcc-f8cfc6aa070047007c18468b54996c116e593642.zip
gcc-f8cfc6aa070047007c18468b54996c116e593642.tar.gz
gcc-f8cfc6aa070047007c18468b54996c116e593642.tar.bz2
alias.c (record_set, [...]): Use REG_P.
2004-06-15 Jerry Quinn <jlquinn@optonline.net> * alias.c (record_set, record_base_value, canon_rtx, get_addr, nonlocal_mentioned_p_1, init_alias_analysis): Use REG_P. * bt-load.c (find_btr_reference, insn_sets_btr_p, note_btr_set): Likewise. * builtins.c (expand_builtin_setjmp, expand_builtin_apply, expand_builtin_mathfn, expand_builtin_strlen, expand_builtin_memcmp, expand_builtin_strcmp, expand_builtin_strncmp, expand_builtin_frame_address): Likewise. * caller-save.c (mark_set_regs, add_stored_regs, mark_referenced_regs, insert_one_insn): Likewise. * calls.c (prepare_call_address, precompute_register_parameters, precompute_arguments, expand_call, emit_library_call_value_1): Likewise. * cfganal.c (flow_active_insn_p): Likewise. * combine.c (set_nonzero_bits_and_sign_copies, can_combine_p, combinable_i3pat, try_combine, find_split_point, COMBINE_RTX_EQUAL_P, subst, combine_simplify_rtx, simplify_if_then_else, simplify_set, make_extraction, recog_for_combine, gen_lowpart_for_combine, simplify_comparison, record_dead_and_set_regs_1, record_dead_and_set_regs, record_promoted_value, check_promoted_subreg, get_last_value_validate, get_last_value, reg_dead_at_p_1, reg_bitfield_target_p, distribute_notes, unmentioned_reg_p_1): Likewise. * conflict.c (mark_reg): Likewise. * cse.c (HASH, COST, COST_IN, approx_reg_cost_1, notreg_cost, mention_regs, insert_regs, lookup, lookup_for_remove, insert, merge_equiv_classes, flush_hash_table, invalidate, remove_invalid_refs, remove_invalid_subreg_refs, rehash_using_reg, invalidate_for_call, use_related_value, canon_hash, exp_equiv_p, cse_rtx_varies_p, canon_reg, find_best_addr, fold_rtx, equiv_constant, record_jump_cond, cse_insn, addr_affects_sp_p, invalidate_from_clobbers, cse_process_notes, cse_around_loop, cse_set_around_loop, count_reg_usage, set_live_p, cse_change_cc_mode, cse_cc_succs, cse_condition_code_reg): Likewise. * cselib.c (cselib_reg_set_mode, rtx_equal_for_cselib_p, cselib_lookup, cselib_invalidate_regno, cselib_invalidate_rtx, cselib_record_set, cselib_record_sets): Likewise. * dbxout.c (dbxout_symbol_location, dbxout_parms, dbxout_reg_parms, dbxout_block): Likewise. * df.c (df_ref_record, df_def_record_1, df_uses_record): Likewise. * dojump.c (do_jump): Likewise. * dwarf2out.c (dwarf2out_frame_debug_expr, is_pseudo_reg, is_based_loc, rtl_for_decl_location): Likewise. * emit-rtl.c (set_reg_attrs_for_parm, set_decl_rtl, set_decl_incoming_rtl, mark_user_reg): Likewise. * explow.c (copy_all_regs, copy_all_regs, memory_address, force_reg, copy_to_suggested_reg, allocate_dynamic_stack_space, probe_stack_range, hard_function_value): Likewise. * expmed.c (store_bit_field, store_fixed_bit_field, store_split_bit_field, extract_bit_field, extract_fixed_bit_field, extract_split_bit_field, expand_divmod, emit_store_flag_force): Likewise. * expr.c (convert_move, convert_modes, block_move_libcall_safe_for_call_parm, emit_group_load, use_reg, use_group_regs, emit_move_insn, emit_move_insn_1, compress_float_constant, push_block, emit_single_push_insn, emit_push_insn, get_subtarget, expand_assignment, store_expr, store_constructor, store_field, force_operand, safe_from_p, expand_expr_real_1, expand_increment, do_store_flag, do_tablejump): Likewise. * final.c (profile_function, final_scan_insn, alter_subreg, get_mem_expr_from_op, output_asm_operand_names, output_operand, only_leaf_regs_used, leaf_renumber_regs_insn): Likewise. * flow.c (verify_wide_reg_1, mark_regs_live_at_end, find_regno_partial, propagate_one_insn, init_propagate_block_info, insn_dead_p, libcall_dead_p, mark_set_1, not_reg_cond, attempt_auto_inc, find_auto_inc, mark_used_regs, count_or_remove_death_notes_bb): Likewise. * function.c (find_temp_slot_from_address, update_temp_slot_address, preserve_temp_slots, put_var_into_stack, fixup_var_refs_insn, fixup_var_refs_1, fixup_stack_1, optimize_bit_field, flush_addressof, put_addressof_into_stack, purge_addressof_1, insns_for_mem_walk, purge_single_hard_subreg_set, instantiate_decl, instantiate_virtual_regs_1, aggregate_value_p, assign_parms, promoted_input_arg, setjmp_vars_warning, setjmp_args_warning, setjmp_protect, setjmp_protect_args, fix_lexical_addr, expand_function_start, diddle_return_value, clobber_return_register, expand_function_end, keep_stack_depressed, handle_epilogue_set, update_epilogue_consts): Likewise. * genemit.c (gen_exp, gen_insn): Likewise. * genrecog.c (make_insn_sequence): Likewise. * global.c (global_conflicts, expand_preferences, mark_reg_store, mark_reg_conflicts, set_preference, reg_becomes_live, build_insn_chain, mark_reg_change): Likewise. * haifa_sched.c (CONST_BASED_ADDRESS_P, find_set_reg_weight): Likewise. * ifcvt.c (noce_try_abs, noce_get_condition, noce_process_if_block): Likewise. * integrate.c (copy_rtx_and_substitute, try_constants, subst_constants, mark_stores, allocate_initial_values): Likewise. * jump.c (reversed_comparison_code_parts, delete_prior_computation, delete_computation, rtx_renumbered_equal_p, true_regnum, reg_or_subregno): Likewise. * lcm.c (reg_dies, reg_becomes_live): Likewise. * local-alloc.c (validate_equiv_mem_from_store, validate_equiv_mem, update_equiv_regs, no_equiv, block_alloc, combine_regs, reg_is_set, wipe_dead_reg, no_conflict_p): Likewise. * loop-iv.c (simple_reg_p, simple_set_p, kill_sets, iv_get_reaching_def, iv_analyze_biv, altered_reg_used, mark_altered, simple_rhs_p, simplify_using_assignment, implies_p): Likewise. * loop.c (scan_loop, combine_movables, rtx_equal_for_loop_p, move_movables, note_set_pseudo_multiple_uses, consec_sets_invariant_p, find_single_use_in_loop, count_one_set, loop_bivs_init_find, loop_givs_rescan, check_insn_for_bivs, check_insn_for_givs, valid_initial_value_p, simplify_giv_expr, consec_sets_giv, loop_regs_update, check_dbra_loop, maybe_eliminate_biv, maybe_eliminate_biv_1, record_initial, update_reg_last_use, canonicalize_condition, loop_regs_scan, load_mems, try_copy_prop, try_swap_copy_prop): Likewise. * optabs.c (expand_binop, expand_vector_binop, expand_vector_unop, expand_abs, emit_no_conflict_block, emit_libcall_block, expand_float): Likewise. * postreload.c (reload_cse_simplify, reload_cse_simplify_set, reload_cse_simplify_operands, reload_combine, reload_combine_note_store, reload_combine_note_use, reload_cse_move2add, move2add_note_store): Likewise. * print-rtl.c (print_rtx): Likewise. * ra-build.c (copy_insn_p, remember_move, init_one_web_common, contains_pseudo, handle_asm_insn): Likewise. * ra-debug.c (ra_print_rtx_object, dump_constraints, dump_static_insn_cost): Likewise. * ra-rewrite.c (slots_overlap_p, emit_colors, remove_suspicious_death_notes): Likewise. * recog.c (validate_replace_rtx_1, find_single_use_1, find_single_use, register_operand, scratch_operand, nonmemory_operand, constrain_operands): Likewise. * reg-stack (check_asm_stack_operands, remove_regno_note, emit_swap_insn, swap_rtx_condition, subst_stack_regs_pat, subst_asm_stack_regs): Likewise. * regclass.c (scan_one_insn, record_reg_classes, copy_cost, record_address_regs, reg_scan_mark_refs): Likewise. * regmove.c (discover_flags_reg, replacement_quality, copy_src_to_dest, reg_is_remote_constant_p, regmove_optimize, fixup_match_1): Likewise. * regrename.c (note_sets, clear_dead_regs, build_def_use, kill_value, kill_set_value, copyprop_hardreg_forward_1): Likewise. * reload.c (MATCHES, push_secondary_reload, find_reusable_reload, reload_inner_reg_of_subreg, can_reload_into, push_reload, combine_reloads, find_dummy_reload, hard_reg_set_here_p, operands_match_p, decompose, find_reloads, find_reloads_toplev, find_reloads_address, subst_indexed_address, find_reloads_address_1, find_reloads_subreg_address, find_replacement, refers_to_regno_for_reload_p, reg_overlap_mentioned_for_reload_p, refers_to_mem_for_reload_p, find_equiv_reg, regno_clobbered_p): Likewise. * reload1.c (replace_pseudos_in, reload, calculate_needs_all_insns, find_reg, delete_dead_insn, alter_reg, eliminate_regs, elimination_effects, eliminate_regs_in_insn, scan_paradoxical_subregs, forget_old_reloads_1, reload_reg_free_for_value_p, choose_reload_regs, emit_input_reload_insns, emit_output_reload_insns, do_input_reload, do_output_reload, emit_reload_insns, gen_reload, delete_address_reloads_1, inc_for_reload): Likewise. * reorg.c (update_reg_dead_notes, fix_reg_dead_note, update_reg_unused_notes, fill_slots_from_thread): Likewise. * resource.c (update_live_status, mark_referenced_resources, mark_set_resources, mark_target_live_regs): Likewise. * rtlanal.c (nonzero_address_p, get_jump_table_offset, global_reg_mentioned_p_1, reg_mentioned_p, reg_referenced_p, reg_set_p, set_noop_p, find_last_value, refers_to_regno_p, note_stores, dead_or_set_p, dead_or_set_regno_p, find_regno_note, find_reg_fusage, find_regno_fusage, replace_regs, regno_use_in, parms_set, find_first_parameter_load, keep_with_call_p, hoist_test_store, hoist_update_store, address_cost, nonzero_bits1, num_sign_bit_copies1): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * sched-deps.c (deps_may_trap_p, sched_analyze_1, sched_analyze_insn, sched_analyze): Likewise. * sched-rgn.c (check_live_1, update_live_1, sets_likely_spilled_1): Likewise. * sdbout.c (sdbout_symbol, sdbout_parms, sdbout_reg_parms): Likewise. * simplify-rtx.c (simplify_replace_rtx, simplify_unary_operation, simplify_binary_operation, simplify_const_relational_operation, simplify_subreg): Likewise. * stmt.c (decl_conflicts_with_clobbers_p, expand_asm_operands, expand_end_stmt_expr, expand_return, expand_decl, expand_anon_union_decl): Likewise. * unroll.c (precondition_loop_p, calculate_giv_inc, copy_loop_body, find_splittable_regs, find_splittable_givs, find_common_reg_term, loop_iterations): Likewise. * var-tracking.c (variable_union, variable_part_different_p, variable_different_p, count_uses, add_uses, add_stores, compute_bb_dataflow, set_variable_part, delete_variable_part, emit_notes_in_bb, vt_get_decl_and_offset, vt_add_function_parameters): Likewise. * varasm.c (assemble_variable): Likewise. From-SVN: r83195
Diffstat (limited to 'gcc/cse.c')
-rw-r--r--gcc/cse.c206
1 files changed, 103 insertions, 103 deletions
diff --git a/gcc/cse.c b/gcc/cse.c
index 5f1107c..bb898d0 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -485,7 +485,7 @@ struct table_elt
register (hard registers may require `do_not_record' to be set). */
#define HASH(X, M) \
- ((GET_CODE (X) == REG && REGNO (X) >= FIRST_PSEUDO_REGISTER \
+ ((REG_P (X) && REGNO (X) >= FIRST_PSEUDO_REGISTER \
? (((unsigned) REG << 7) + (unsigned) REG_QTY (REGNO (X))) \
: canon_hash (X, M)) & HASH_MASK)
@@ -510,8 +510,8 @@ struct table_elt
|| ((N) < FIRST_PSEUDO_REGISTER \
&& FIXED_REGNO_P (N) && REGNO_REG_CLASS (N) != NO_REGS))
-#define COST(X) (GET_CODE (X) == REG ? 0 : notreg_cost (X, SET))
-#define COST_IN(X,OUTER) (GET_CODE (X) == REG ? 0 : notreg_cost (X, OUTER))
+#define COST(X) (REG_P (X) ? 0 : notreg_cost (X, SET))
+#define COST_IN(X,OUTER) (REG_P (X) ? 0 : notreg_cost (X, OUTER))
/* Get the info associated with register N. */
@@ -729,7 +729,7 @@ approx_reg_cost_1 (rtx *xp, void *data)
rtx x = *xp;
int *cost_p = data;
- if (x && GET_CODE (x) == REG)
+ if (x && REG_P (x))
{
unsigned int regno = REGNO (x);
@@ -807,7 +807,7 @@ static int
notreg_cost (rtx x, enum rtx_code outer)
{
return ((GET_CODE (x) == SUBREG
- && GET_CODE (SUBREG_REG (x)) == REG
+ && REG_P (SUBREG_REG (x))
&& GET_MODE_CLASS (GET_MODE (x)) == MODE_INT
&& GET_MODE_CLASS (GET_MODE (SUBREG_REG (x))) == MODE_INT
&& (GET_MODE_SIZE (GET_MODE (x))
@@ -1086,7 +1086,7 @@ mention_regs (rtx x)
/* If this is a SUBREG, we don't want to discard other SUBREGs of the same
pseudo if they don't use overlapping words. We handle only pseudos
here for simplicity. */
- if (code == SUBREG && GET_CODE (SUBREG_REG (x)) == REG
+ if (code == SUBREG && REG_P (SUBREG_REG (x))
&& REGNO (SUBREG_REG (x)) >= FIRST_PSEUDO_REGISTER)
{
unsigned int i = REGNO (SUBREG_REG (x));
@@ -1122,7 +1122,7 @@ mention_regs (rtx x)
if (code == COMPARE || COMPARISON_P (x))
{
- if (GET_CODE (XEXP (x, 0)) == REG
+ if (REG_P (XEXP (x, 0))
&& ! REGNO_QTY_VALID_P (REGNO (XEXP (x, 0))))
if (insert_regs (XEXP (x, 0), NULL, 0))
{
@@ -1130,7 +1130,7 @@ mention_regs (rtx x)
changed = 1;
}
- if (GET_CODE (XEXP (x, 1)) == REG
+ if (REG_P (XEXP (x, 1))
&& ! REGNO_QTY_VALID_P (REGNO (XEXP (x, 1))))
if (insert_regs (XEXP (x, 1), NULL, 0))
{
@@ -1163,7 +1163,7 @@ mention_regs (rtx x)
static int
insert_regs (rtx x, struct table_elt *classp, int modified)
{
- if (GET_CODE (x) == REG)
+ if (REG_P (x))
{
unsigned int regno = REGNO (x);
int qty_valid;
@@ -1186,7 +1186,7 @@ insert_regs (rtx x, struct table_elt *classp, int modified)
for (classp = classp->first_same_value;
classp != 0;
classp = classp->next_same_value)
- if (GET_CODE (classp->exp) == REG
+ if (REG_P (classp->exp)
&& GET_MODE (classp->exp) == GET_MODE (x))
{
make_regs_eqv (regno, REGNO (classp->exp));
@@ -1219,7 +1219,7 @@ insert_regs (rtx x, struct table_elt *classp, int modified)
not be accessible because its hash code will have changed. So assign
a quantity number now. */
- else if (GET_CODE (x) == SUBREG && GET_CODE (SUBREG_REG (x)) == REG
+ else if (GET_CODE (x) == SUBREG && REG_P (SUBREG_REG (x))
&& ! REGNO_QTY_VALID_P (REGNO (SUBREG_REG (x))))
{
insert_regs (SUBREG_REG (x), NULL, 0);
@@ -1326,8 +1326,8 @@ lookup (rtx x, unsigned int hash, enum machine_mode mode)
struct table_elt *p;
for (p = table[hash]; p; p = p->next_same_hash)
- if (mode == p->mode && ((x == p->exp && GET_CODE (x) == REG)
- || exp_equiv_p (x, p->exp, GET_CODE (x) != REG, 0)))
+ if (mode == p->mode && ((x == p->exp && REG_P (x))
+ || exp_equiv_p (x, p->exp, !REG_P (x), 0)))
return p;
return 0;
@@ -1341,14 +1341,14 @@ lookup_for_remove (rtx x, unsigned int hash, enum machine_mode mode)
{
struct table_elt *p;
- if (GET_CODE (x) == REG)
+ if (REG_P (x))
{
unsigned int regno = REGNO (x);
/* Don't check the machine mode when comparing registers;
invalidating (REG:SI 0) also invalidates (REG:DF 0). */
for (p = table[hash]; p; p = p->next_same_hash)
- if (GET_CODE (p->exp) == REG
+ if (REG_P (p->exp)
&& REGNO (p->exp) == regno)
return p;
}
@@ -1428,11 +1428,11 @@ insert (rtx x, struct table_elt *classp, unsigned int hash, enum machine_mode mo
/* If X is a register and we haven't made a quantity for it,
something is wrong. */
- if (GET_CODE (x) == REG && ! REGNO_QTY_VALID_P (REGNO (x)))
+ if (REG_P (x) && ! REGNO_QTY_VALID_P (REGNO (x)))
abort ();
/* If X is a hard register, show it is being put in the table. */
- if (GET_CODE (x) == REG && REGNO (x) < FIRST_PSEUDO_REGISTER)
+ if (REG_P (x) && REGNO (x) < FIRST_PSEUDO_REGISTER)
{
unsigned int regno = REGNO (x);
unsigned int endregno = regno + hard_regno_nregs[regno][GET_MODE (x)];
@@ -1467,7 +1467,7 @@ insert (rtx x, struct table_elt *classp, unsigned int hash, enum machine_mode mo
elt->is_const = (CONSTANT_P (x)
/* GNU C++ takes advantage of this for `this'
(and other const values). */
- || (GET_CODE (x) == REG
+ || (REG_P (x)
&& RTX_UNCHANGING_P (x)
&& REGNO (x) >= FIRST_PSEUDO_REGISTER)
|| fixed_base_plus_p (x));
@@ -1528,8 +1528,8 @@ insert (rtx x, struct table_elt *classp, unsigned int hash, enum machine_mode mo
update the qtys `const_insn' to show that `this_insn' is the latest
insn making that quantity equivalent to the constant. */
- if (elt->is_const && classp && GET_CODE (classp->exp) == REG
- && GET_CODE (x) != REG)
+ if (elt->is_const && classp && REG_P (classp->exp)
+ && !REG_P (x))
{
int exp_q = REG_QTY (REGNO (classp->exp));
struct qty_table_elem *exp_ent = &qty_table[exp_q];
@@ -1538,7 +1538,7 @@ insert (rtx x, struct table_elt *classp, unsigned int hash, enum machine_mode mo
exp_ent->const_insn = this_insn;
}
- else if (GET_CODE (x) == REG
+ else if (REG_P (x)
&& classp
&& ! qty_table[REG_QTY (REGNO (x))].const_rtx
&& ! elt->is_const)
@@ -1547,7 +1547,7 @@ insert (rtx x, struct table_elt *classp, unsigned int hash, enum machine_mode mo
for (p = classp; p != 0; p = p->next_same_value)
{
- if (p->is_const && GET_CODE (p->exp) != REG)
+ if (p->is_const && !REG_P (p->exp))
{
int x_q = REG_QTY (REGNO (x));
struct qty_table_elem *x_ent = &qty_table[x_q];
@@ -1560,7 +1560,7 @@ insert (rtx x, struct table_elt *classp, unsigned int hash, enum machine_mode mo
}
}
- else if (GET_CODE (x) == REG
+ else if (REG_P (x)
&& qty_table[REG_QTY (REGNO (x))].const_rtx
&& GET_MODE (x) == qty_table[REG_QTY (REGNO (x))].mode)
qty_table[REG_QTY (REGNO (x))].const_insn = this_insn;
@@ -1631,12 +1631,12 @@ merge_equiv_classes (struct table_elt *class1, struct table_elt *class2)
/* Remove old entry, make a new one in CLASS1's class.
Don't do this for invalid entries as we cannot find their
hash code (it also isn't necessary). */
- if (GET_CODE (exp) == REG || exp_equiv_p (exp, exp, 1, 0))
+ if (REG_P (exp) || exp_equiv_p (exp, exp, 1, 0))
{
hash_arg_in_memory = 0;
hash = HASH (exp, mode);
- if (GET_CODE (exp) == REG)
+ if (REG_P (exp))
delete_reg_equiv (REGNO (exp));
remove_from_table (elt, hash);
@@ -1665,7 +1665,7 @@ flush_hash_table (void)
{
/* Note that invalidate can remove elements
after P in the current hash chain. */
- if (GET_CODE (p->exp) == REG)
+ if (REG_P (p->exp))
invalidate (p->exp, p->mode);
else
remove_from_table (p, i);
@@ -1769,7 +1769,7 @@ invalidate (rtx x, enum machine_mode full_mode)
{
next = p->next_same_hash;
- if (GET_CODE (p->exp) != REG
+ if (!REG_P (p->exp)
|| REGNO (p->exp) >= FIRST_PSEUDO_REGISTER)
continue;
@@ -1856,7 +1856,7 @@ remove_invalid_refs (unsigned int regno)
for (p = table[i]; p; p = next)
{
next = p->next_same_hash;
- if (GET_CODE (p->exp) != REG
+ if (!REG_P (p->exp)
&& refers_to_regno_p (regno, regno + 1, p->exp, (rtx *) 0))
remove_from_table (p, i);
}
@@ -1878,9 +1878,9 @@ remove_invalid_subreg_refs (unsigned int regno, unsigned int offset,
rtx exp = p->exp;
next = p->next_same_hash;
- if (GET_CODE (exp) != REG
+ if (!REG_P (exp)
&& (GET_CODE (exp) != SUBREG
- || GET_CODE (SUBREG_REG (exp)) != REG
+ || !REG_P (SUBREG_REG (exp))
|| REGNO (SUBREG_REG (exp)) != regno
|| (((SUBREG_BYTE (exp)
+ (GET_MODE_SIZE (GET_MODE (exp)) - 1)) >= offset)
@@ -1908,7 +1908,7 @@ rehash_using_reg (rtx x)
/* If X is not a register or if the register is known not to be in any
valid entries in the table, we have no work to do. */
- if (GET_CODE (x) != REG
+ if (!REG_P (x)
|| REG_IN_TABLE (REGNO (x)) < 0
|| REG_IN_TABLE (REGNO (x)) != REG_TICK (REGNO (x)))
return;
@@ -1921,7 +1921,7 @@ rehash_using_reg (rtx x)
for (p = table[i]; p; p = next)
{
next = p->next_same_hash;
- if (GET_CODE (p->exp) != REG && reg_mentioned_p (x, p->exp)
+ if (!REG_P (p->exp) && reg_mentioned_p (x, p->exp)
&& exp_equiv_p (p->exp, p->exp, 1, 0)
&& i != (hash = safe_hash (p->exp, p->mode) & HASH_MASK))
{
@@ -1982,7 +1982,7 @@ invalidate_for_call (void)
{
next = p->next_same_hash;
- if (GET_CODE (p->exp) != REG
+ if (!REG_P (p->exp)
|| REGNO (p->exp) >= FIRST_PSEUDO_REGISTER)
continue;
@@ -2048,7 +2048,7 @@ use_related_value (rtx x, struct table_elt *elt)
q = 0;
else
for (q = p->first_same_value; q; q = q->next_same_value)
- if (GET_CODE (q->exp) == REG)
+ if (REG_P (q->exp))
break;
if (q)
@@ -2167,7 +2167,7 @@ canon_hash (rtx x, enum machine_mode mode)
want to have to forget unrelated subregs when one subreg changes. */
case SUBREG:
{
- if (GET_CODE (SUBREG_REG (x)) == REG)
+ if (REG_P (SUBREG_REG (x)))
{
hash += (((unsigned) SUBREG << 7)
+ REGNO (SUBREG_REG (x))
@@ -2398,7 +2398,7 @@ exp_equiv_p (rtx x, rtx y, int validate, int equal_values)
/* If X is a constant and Y is a register or vice versa, they may be
equivalent. We only have to validate if Y is a register. */
- if (CONSTANT_P (x) && GET_CODE (y) == REG
+ if (CONSTANT_P (x) && REG_P (y)
&& REGNO_QTY_VALID_P (REGNO (y)))
{
int y_q = REG_QTY (REGNO (y));
@@ -2575,7 +2575,7 @@ cse_rtx_varies_p (rtx x, int from_alias)
mode because if X is equivalent to a constant in some mode, it
doesn't vary in any mode. */
- if (GET_CODE (x) == REG
+ if (REG_P (x)
&& REGNO_QTY_VALID_P (REGNO (x)))
{
int x_q = REG_QTY (REGNO (x));
@@ -2588,7 +2588,7 @@ cse_rtx_varies_p (rtx x, int from_alias)
if (GET_CODE (x) == PLUS
&& GET_CODE (XEXP (x, 1)) == CONST_INT
- && GET_CODE (XEXP (x, 0)) == REG
+ && REG_P (XEXP (x, 0))
&& REGNO_QTY_VALID_P (REGNO (XEXP (x, 0))))
{
int x0_q = REG_QTY (REGNO (XEXP (x, 0)));
@@ -2605,8 +2605,8 @@ cse_rtx_varies_p (rtx x, int from_alias)
load fp minus a constant into a register, then a MEM which is the
sum of the two `constant' registers. */
if (GET_CODE (x) == PLUS
- && GET_CODE (XEXP (x, 0)) == REG
- && GET_CODE (XEXP (x, 1)) == REG
+ && REG_P (XEXP (x, 0))
+ && REG_P (XEXP (x, 1))
&& REGNO_QTY_VALID_P (REGNO (XEXP (x, 0)))
&& REGNO_QTY_VALID_P (REGNO (XEXP (x, 1))))
{
@@ -2701,7 +2701,7 @@ canon_reg (rtx x, rtx insn)
/* If replacing pseudo with hard reg or vice versa, ensure the
insn remains valid. Likewise if the insn has MATCH_DUPs. */
if (insn != 0 && new != 0
- && GET_CODE (new) == REG && GET_CODE (XEXP (x, i)) == REG
+ && REG_P (new) && REG_P (XEXP (x, i))
&& (((REGNO (new) < FIRST_PSEUDO_REGISTER)
!= (REGNO (XEXP (x, i)) < FIRST_PSEUDO_REGISTER))
|| (insn_code = recog_memoized (insn)) < 0
@@ -2756,12 +2756,12 @@ find_best_addr (rtx insn, rtx *loc, enum machine_mode mode)
no easy way to unshare the MEM. In addition, looking up all stack
addresses is costly. */
if ((GET_CODE (addr) == PLUS
- && GET_CODE (XEXP (addr, 0)) == REG
+ && REG_P (XEXP (addr, 0))
&& GET_CODE (XEXP (addr, 1)) == CONST_INT
&& (regno = REGNO (XEXP (addr, 0)),
regno == FRAME_POINTER_REGNUM || regno == HARD_FRAME_POINTER_REGNUM
|| regno == ARG_POINTER_REGNUM))
- || (GET_CODE (addr) == REG
+ || (REG_P (addr)
&& (regno = REGNO (addr), regno == FRAME_POINTER_REGNUM
|| regno == HARD_FRAME_POINTER_REGNUM
|| regno == ARG_POINTER_REGNUM))
@@ -2773,7 +2773,7 @@ find_best_addr (rtx insn, rtx *loc, enum machine_mode mode)
sometimes simplify the expression. Many simplifications
will not be valid, but some, usually applying the associative rule, will
be valid and produce better code. */
- if (GET_CODE (addr) != REG)
+ if (!REG_P (addr))
{
rtx folded = fold_rtx (copy_rtx (addr), NULL_RTX);
int addr_folded_cost = address_cost (folded, mode);
@@ -2824,7 +2824,7 @@ find_best_addr (rtx insn, rtx *loc, enum machine_mode mode)
for (p = elt->first_same_value; p; p = p->next_same_value)
if (! p->flag)
{
- if ((GET_CODE (p->exp) == REG
+ if ((REG_P (p->exp)
|| exp_equiv_p (p->exp, p->exp, 1, 0))
&& ((exp_cost = address_cost (p->exp, mode)) < best_addr_cost
|| (exp_cost == best_addr_cost
@@ -2860,7 +2860,7 @@ find_best_addr (rtx insn, rtx *loc, enum machine_mode mode)
if (flag_expensive_optimizations
&& ARITHMETIC_P (*loc)
- && GET_CODE (XEXP (*loc, 0)) == REG)
+ && REG_P (XEXP (*loc, 0)))
{
rtx op1 = XEXP (*loc, 1);
@@ -2900,7 +2900,7 @@ find_best_addr (rtx insn, rtx *loc, enum machine_mode mode)
p && count < 32;
p = p->next_same_value, count++)
if (! p->flag
- && (GET_CODE (p->exp) == REG
+ && (REG_P (p->exp)
|| exp_equiv_p (p->exp, p->exp, 1, 0)))
{
rtx new = simplify_gen_binary (GET_CODE (*loc), Pmode,
@@ -3261,7 +3261,7 @@ fold_rtx (rtx x, rtx insn)
return new;
}
- if (GET_CODE (folded_arg0) == REG
+ if (REG_P (folded_arg0)
&& GET_MODE_SIZE (mode) < GET_MODE_SIZE (GET_MODE (folded_arg0)))
{
struct table_elt *elt;
@@ -3306,7 +3306,7 @@ fold_rtx (rtx x, rtx insn)
{
rtx op0 = SUBREG_REG (XEXP (elt->exp, 0));
- if (GET_CODE (op0) != REG && ! CONSTANT_P (op0))
+ if (!REG_P (op0) && ! CONSTANT_P (op0))
op0 = fold_rtx (op0, NULL_RTX);
op0 = equiv_constant (op0);
@@ -3331,13 +3331,13 @@ fold_rtx (rtx x, rtx insn)
rtx op0 = gen_lowpart_common (mode, XEXP (elt->exp, 0));
rtx op1 = gen_lowpart_common (mode, XEXP (elt->exp, 1));
- if (op0 && GET_CODE (op0) != REG && ! CONSTANT_P (op0))
+ if (op0 && !REG_P (op0) && ! CONSTANT_P (op0))
op0 = fold_rtx (op0, NULL_RTX);
if (op0)
op0 = equiv_constant (op0);
- if (op1 && GET_CODE (op1) != REG && ! CONSTANT_P (op1))
+ if (op1 && !REG_P (op1) && ! CONSTANT_P (op1))
op1 = fold_rtx (op1, NULL_RTX);
if (op1)
@@ -3417,7 +3417,7 @@ fold_rtx (rtx x, rtx insn)
rtx base = 0;
HOST_WIDE_INT offset = 0;
- if (GET_CODE (addr) == REG
+ if (REG_P (addr)
&& REGNO_QTY_VALID_P (REGNO (addr)))
{
int addr_q = REG_QTY (REGNO (addr));
@@ -3584,7 +3584,7 @@ fold_rtx (rtx x, rtx insn)
struct qty_table_elem *arg_ent = &qty_table[arg_q];
if (arg_ent->const_rtx != NULL_RTX
- && GET_CODE (arg_ent->const_rtx) != REG
+ && !REG_P (arg_ent->const_rtx)
&& GET_CODE (arg_ent->const_rtx) != PLUS)
const_arg
= gen_lowpart (GET_MODE (arg),
@@ -3828,8 +3828,8 @@ fold_rtx (rtx x, rtx insn)
/* See if the two operands are the same. */
if (folded_arg0 == folded_arg1
- || (GET_CODE (folded_arg0) == REG
- && GET_CODE (folded_arg1) == REG
+ || (REG_P (folded_arg0)
+ && REG_P (folded_arg1)
&& (REG_QTY (REGNO (folded_arg0))
== REG_QTY (REGNO (folded_arg1))))
|| ((p0 = lookup (folded_arg0,
@@ -3857,7 +3857,7 @@ fold_rtx (rtx x, rtx insn)
/* If FOLDED_ARG0 is a register, see if the comparison we are
doing now is either the same as we did before or the reverse
(we only check the reverse if not floating-point). */
- else if (GET_CODE (folded_arg0) == REG)
+ else if (REG_P (folded_arg0))
{
int qty = REG_QTY (REGNO (folded_arg0));
@@ -3873,7 +3873,7 @@ fold_rtx (rtx x, rtx insn)
|| (const_arg1
&& rtx_equal_p (ent->comparison_const,
const_arg1))
- || (GET_CODE (folded_arg1) == REG
+ || (REG_P (folded_arg1)
&& (REG_QTY (REGNO (folded_arg1)) == ent->comparison_qty))))
return (comparison_dominates_p (ent->comparison_code, code)
? true_rtx : false_rtx);
@@ -4007,7 +4007,7 @@ fold_rtx (rtx x, rtx insn)
manner and hope the Sun compilers get it correct. */
&& INTVAL (const_arg1) !=
((HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT - 1))
- && GET_CODE (folded_arg1) == REG)
+ && REG_P (folded_arg1))
{
rtx new_const = GEN_INT (-INTVAL (const_arg1));
struct table_elt *p
@@ -4016,7 +4016,7 @@ fold_rtx (rtx x, rtx insn)
if (p)
for (p = p->first_same_value; p; p = p->next_same_value)
- if (GET_CODE (p->exp) == REG)
+ if (REG_P (p->exp))
return simplify_gen_binary (MINUS, mode, folded_arg0,
canon_reg (p->exp, NULL_RTX));
}
@@ -4048,7 +4048,7 @@ fold_rtx (rtx x, rtx insn)
Note that the similar optimization done by combine.c only works
if the intermediate operation's result has only one reference. */
- if (GET_CODE (folded_arg0) == REG
+ if (REG_P (folded_arg0)
&& const_arg1 && GET_CODE (const_arg1) == CONST_INT)
{
int is_shift
@@ -4173,7 +4173,7 @@ fold_rtx (rtx x, rtx insn)
static rtx
equiv_constant (rtx x)
{
- if (GET_CODE (x) == REG
+ if (REG_P (x)
&& REGNO_QTY_VALID_P (REGNO (x)))
{
int x_q = REG_QTY (REGNO (x));
@@ -4429,11 +4429,11 @@ record_jump_cond (enum rtx_code code, enum machine_mode mode, rtx op0,
register, or if OP1 is neither a register or constant, we can't
do anything. */
- if (GET_CODE (op1) != REG)
+ if (!REG_P (op1))
op1 = equiv_constant (op1);
if ((reversed_nonequality && FLOAT_MODE_P (mode))
- || GET_CODE (op0) != REG || op1 == 0)
+ || !REG_P (op0) || op1 == 0)
return;
/* Put OP0 in the hash table if it isn't already. This gives it a
@@ -4460,7 +4460,7 @@ record_jump_cond (enum rtx_code code, enum machine_mode mode, rtx op0,
ent = &qty_table[qty];
ent->comparison_code = code;
- if (GET_CODE (op1) == REG)
+ if (REG_P (op1))
{
/* Look it up again--in case op0 and op1 are the same. */
op1_elt = lookup (op1, op1_hash, mode);
@@ -4662,7 +4662,7 @@ cse_insn (rtx insn, rtx libcall_insn)
{
rtx clobbered = XEXP (y, 0);
- if (GET_CODE (clobbered) == REG
+ if (REG_P (clobbered)
|| GET_CODE (clobbered) == SUBREG)
invalidate (clobbered, VOIDmode);
else if (GET_CODE (clobbered) == STRICT_LOW_PART
@@ -4700,7 +4700,7 @@ cse_insn (rtx insn, rtx libcall_insn)
canon_reg (XEXP (y, 0), NULL_RTX);
}
else if (GET_CODE (y) == USE
- && ! (GET_CODE (XEXP (y, 0)) == REG
+ && ! (REG_P (XEXP (y, 0))
&& REGNO (XEXP (y, 0)) < FIRST_PSEUDO_REGISTER))
canon_reg (y, NULL_RTX);
else if (GET_CODE (y) == CALL)
@@ -4721,7 +4721,7 @@ cse_insn (rtx insn, rtx libcall_insn)
/* Canonicalize a USE of a pseudo register or memory location. */
else if (GET_CODE (x) == USE
- && ! (GET_CODE (XEXP (x, 0)) == REG
+ && ! (REG_P (XEXP (x, 0))
&& REGNO (XEXP (x, 0)) < FIRST_PSEUDO_REGISTER))
canon_reg (XEXP (x, 0), NULL_RTX);
else if (GET_CODE (x) == CALL)
@@ -4763,7 +4763,7 @@ cse_insn (rtx insn, rtx libcall_insn)
int insn_code;
sets[i].orig_src = src;
- if ((GET_CODE (new) == REG && GET_CODE (src) == REG
+ if ((REG_P (new) && REG_P (src)
&& ((REGNO (new) < FIRST_PSEUDO_REGISTER)
!= (REGNO (src) < FIRST_PSEUDO_REGISTER)))
|| (insn_code = recog_memoized (insn)) < 0
@@ -4914,7 +4914,7 @@ cse_insn (rtx insn, rtx libcall_insn)
if (GET_CODE (src) == MEM
&& find_reg_note (insn, REG_EQUIV, NULL_RTX) != 0
- && GET_CODE (dest) == REG
+ && REG_P (dest)
&& REGNO (dest) >= FIRST_PSEUDO_REGISTER)
sets[i].src_volatile = 1;
@@ -5065,7 +5065,7 @@ cse_insn (rtx insn, rtx libcall_insn)
for (const_elt = const_elt->first_same_value;
const_elt; const_elt = const_elt->next_same_value)
- if (GET_CODE (const_elt->exp) == REG)
+ if (REG_P (const_elt->exp))
{
src_related = gen_lowpart (mode,
const_elt->exp);
@@ -5104,7 +5104,7 @@ cse_insn (rtx insn, rtx libcall_insn)
for (larger_elt = larger_elt->first_same_value;
larger_elt; larger_elt = larger_elt->next_same_value)
- if (GET_CODE (larger_elt->exp) == REG)
+ if (REG_P (larger_elt->exp))
{
src_related
= gen_lowpart (mode, larger_elt->exp);
@@ -5150,7 +5150,7 @@ cse_insn (rtx insn, rtx libcall_insn)
for (larger_elt = larger_elt->first_same_value;
larger_elt; larger_elt = larger_elt->next_same_value)
- if (GET_CODE (larger_elt->exp) == REG)
+ if (REG_P (larger_elt->exp))
{
src_related = gen_lowpart (mode,
larger_elt->exp);
@@ -5282,7 +5282,7 @@ cse_insn (rtx insn, rtx libcall_insn)
rtx trial;
/* Skip invalid entries. */
- while (elt && GET_CODE (elt->exp) != REG
+ while (elt && !REG_P (elt->exp)
&& ! exp_equiv_p (elt->exp, elt->exp, 1, 0))
elt = elt->next_same_value;
@@ -5385,7 +5385,7 @@ cse_insn (rtx insn, rtx libcall_insn)
need to make the same substitution in any notes attached
to the RETVAL insn. */
if (libcall_insn
- && (GET_CODE (sets[i].orig_src) == REG
+ && (REG_P (sets[i].orig_src)
|| GET_CODE (sets[i].orig_src) == SUBREG
|| GET_CODE (sets[i].orig_src) == MEM))
{
@@ -5442,7 +5442,7 @@ cse_insn (rtx insn, rtx libcall_insn)
with the head of the class. If we do not do this, we will have
both registers live over a portion of the basic block. This way,
their lifetimes will likely abut instead of overlapping. */
- if (GET_CODE (dest) == REG
+ if (REG_P (dest)
&& REGNO_QTY_VALID_P (REGNO (dest)))
{
int dest_q = REG_QTY (REGNO (dest));
@@ -5450,12 +5450,12 @@ cse_insn (rtx insn, rtx libcall_insn)
if (dest_ent->mode == GET_MODE (dest)
&& dest_ent->first_reg != REGNO (dest)
- && GET_CODE (src) == REG && REGNO (src) == REGNO (dest)
+ && REG_P (src) && REGNO (src) == REGNO (dest)
/* Don't do this if the original insn had a hard reg as
SET_SRC or SET_DEST. */
- && (GET_CODE (sets[i].src) != REG
+ && (!REG_P (sets[i].src)
|| REGNO (sets[i].src) >= FIRST_PSEUDO_REGISTER)
- && (GET_CODE (dest) != REG || REGNO (dest) >= FIRST_PSEUDO_REGISTER))
+ && (!REG_P (dest) || REGNO (dest) >= FIRST_PSEUDO_REGISTER))
/* We can't call canon_reg here because it won't do anything if
SRC is a hard register. */
{
@@ -5506,8 +5506,8 @@ cse_insn (rtx insn, rtx libcall_insn)
which can be created for a reference to a compile time computable
entry in a jump table. */
- if (n_sets == 1 && src_const && GET_CODE (dest) == REG
- && GET_CODE (src_const) != REG
+ if (n_sets == 1 && src_const && REG_P (dest)
+ && !REG_P (src_const)
&& ! (GET_CODE (src_const) == CONST
&& GET_CODE (XEXP (src_const, 0)) == MINUS
&& GET_CODE (XEXP (XEXP (src_const, 0), 0)) == LABEL_REF
@@ -5652,7 +5652,7 @@ cse_insn (rtx insn, rtx libcall_insn)
else if (do_not_record)
{
- if (GET_CODE (dest) == REG || GET_CODE (dest) == SUBREG)
+ if (REG_P (dest) || GET_CODE (dest) == SUBREG)
invalidate (dest, VOIDmode);
else if (GET_CODE (dest) == MEM)
{
@@ -5825,7 +5825,7 @@ cse_insn (rtx insn, rtx libcall_insn)
previous quantity's chain.
Needed for memory if this is a nonvarying address, unless
we have just done an invalidate_memory that covers even those. */
- if (GET_CODE (dest) == REG || GET_CODE (dest) == SUBREG)
+ if (REG_P (dest) || GET_CODE (dest) == SUBREG)
invalidate (dest, VOIDmode);
else if (GET_CODE (dest) == MEM)
{
@@ -5859,7 +5859,7 @@ cse_insn (rtx insn, rtx libcall_insn)
{
rtx x = SET_DEST (sets[i].rtl);
- if (GET_CODE (x) != REG)
+ if (!REG_P (x))
mention_regs (x);
else
{
@@ -5959,7 +5959,7 @@ cse_insn (rtx insn, rtx libcall_insn)
if (GET_CODE (dest) == STRICT_LOW_PART)
dest = SUBREG_REG (XEXP (dest, 0));
- if (GET_CODE (dest) == REG || GET_CODE (dest) == SUBREG)
+ if (REG_P (dest) || GET_CODE (dest) == SUBREG)
/* Registers must also be inserted into chains for quantities. */
if (insert_regs (dest, sets[i].src_elt, 1))
{
@@ -6021,7 +6021,7 @@ cse_insn (rtx insn, rtx libcall_insn)
int byte = 0;
/* Ignore invalid entries. */
- if (GET_CODE (elt->exp) != REG
+ if (!REG_P (elt->exp)
&& ! exp_equiv_p (elt->exp, elt->exp, 1, 0))
continue;
@@ -6074,7 +6074,7 @@ cse_insn (rtx insn, rtx libcall_insn)
classp = src_elt->first_same_value;
/* Ignore invalid entries. */
while (classp
- && GET_CODE (classp->exp) != REG
+ && !REG_P (classp->exp)
&& ! exp_equiv_p (classp->exp, classp->exp, 1, 0))
classp = classp->next_same_value;
}
@@ -6098,9 +6098,9 @@ cse_insn (rtx insn, rtx libcall_insn)
register to be set in the middle of a libcall, and we then get bad code
if the libcall is deleted. */
- if (n_sets == 1 && sets[0].rtl && GET_CODE (SET_DEST (sets[0].rtl)) == REG
+ if (n_sets == 1 && sets[0].rtl && REG_P (SET_DEST (sets[0].rtl))
&& NEXT_INSN (PREV_INSN (insn)) == insn
- && GET_CODE (SET_SRC (sets[0].rtl)) == REG
+ && REG_P (SET_SRC (sets[0].rtl))
&& REGNO (SET_SRC (sets[0].rtl)) >= FIRST_PSEUDO_REGISTER
&& REGNO_QTY_VALID_P (REGNO (SET_SRC (sets[0].rtl))))
{
@@ -6208,7 +6208,7 @@ static int
addr_affects_sp_p (rtx addr)
{
if (GET_RTX_CLASS (GET_CODE (addr)) == RTX_AUTOINC
- && GET_CODE (XEXP (addr, 0)) == REG
+ && REG_P (XEXP (addr, 0))
&& REGNO (XEXP (addr, 0)) == STACK_POINTER_REGNUM)
{
if (REG_TICK (STACK_POINTER_REGNUM) >= 0)
@@ -6243,7 +6243,7 @@ invalidate_from_clobbers (rtx x)
rtx ref = XEXP (x, 0);
if (ref)
{
- if (GET_CODE (ref) == REG || GET_CODE (ref) == SUBREG
+ if (REG_P (ref) || GET_CODE (ref) == SUBREG
|| GET_CODE (ref) == MEM)
invalidate (ref, VOIDmode);
else if (GET_CODE (ref) == STRICT_LOW_PART
@@ -6260,7 +6260,7 @@ invalidate_from_clobbers (rtx x)
if (GET_CODE (y) == CLOBBER)
{
rtx ref = XEXP (y, 0);
- if (GET_CODE (ref) == REG || GET_CODE (ref) == SUBREG
+ if (REG_P (ref) || GET_CODE (ref) == SUBREG
|| GET_CODE (ref) == MEM)
invalidate (ref, VOIDmode);
else if (GET_CODE (ref) == STRICT_LOW_PART
@@ -6335,7 +6335,7 @@ cse_process_notes (rtx x, rtx object)
if (ent->const_rtx != NULL_RTX
&& (CONSTANT_P (ent->const_rtx)
- || GET_CODE (ent->const_rtx) == REG))
+ || REG_P (ent->const_rtx)))
{
rtx new = gen_lowpart (GET_MODE (x), ent->const_rtx);
if (new)
@@ -6399,9 +6399,9 @@ cse_around_loop (rtx loop_start)
for (p = last_jump_equiv_class->first_same_value; p;
p = p->next_same_value)
{
- if (GET_CODE (p->exp) == MEM || GET_CODE (p->exp) == REG
+ if (MEM_P (p->exp) || REG_P (p->exp)
|| (GET_CODE (p->exp) == SUBREG
- && GET_CODE (SUBREG_REG (p->exp)) == REG))
+ && REG_P (SUBREG_REG (p->exp))))
invalidate (p->exp, VOIDmode);
else if (GET_CODE (p->exp) == STRICT_LOW_PART
|| GET_CODE (p->exp) == ZERO_EXTRACT)
@@ -6544,7 +6544,7 @@ cse_set_around_loop (rtx x, rtx insn, rtx loop_start)
are setting PC or CC0 or whose SET_SRC is already a register. */
if (GET_CODE (x) == SET
&& GET_CODE (SET_DEST (x)) != PC && GET_CODE (SET_DEST (x)) != CC0
- && GET_CODE (SET_SRC (x)) != REG)
+ && !REG_P (SET_SRC (x)))
{
src_elt = lookup (SET_SRC (x),
HASH (SET_SRC (x), GET_MODE (SET_DEST (x))),
@@ -6553,7 +6553,7 @@ cse_set_around_loop (rtx x, rtx insn, rtx loop_start)
if (src_elt)
for (src_elt = src_elt->first_same_value; src_elt;
src_elt = src_elt->next_same_value)
- if (GET_CODE (src_elt->exp) == REG && REG_LOOP_TEST_P (src_elt->exp)
+ if (REG_P (src_elt->exp) && REG_LOOP_TEST_P (src_elt->exp)
&& COST (src_elt->exp) < COST (SET_SRC (x)))
{
rtx p, set;
@@ -6567,7 +6567,7 @@ cse_set_around_loop (rtx x, rtx insn, rtx loop_start)
&& GET_CODE (p) != CODE_LABEL;
p = prev_nonnote_insn (p))
if ((set = single_set (p)) != 0
- && GET_CODE (SET_DEST (set)) == REG
+ && REG_P (SET_DEST (set))
&& GET_MODE (SET_DEST (set)) == src_elt->mode
&& rtx_equal_p (SET_SRC (set), SET_SRC (x)))
{
@@ -6632,7 +6632,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 (GET_CODE (SET_DEST (x)) == REG || GET_CODE (SET_DEST (x)) == SUBREG
+ if (REG_P (SET_DEST (x)) || GET_CODE (SET_DEST (x)) == SUBREG
|| GET_CODE (SET_DEST (x)) == MEM)
invalidate (SET_DEST (x), VOIDmode);
else if (GET_CODE (SET_DEST (x)) == STRICT_LOW_PART
@@ -7305,7 +7305,7 @@ count_reg_usage (rtx x, int *counts, int incr)
case SET:
/* Unless we are setting a REG, count everything in SET_DEST. */
- if (GET_CODE (SET_DEST (x)) != REG)
+ if (!REG_P (SET_DEST (x)))
count_reg_usage (SET_DEST (x), counts, incr);
count_reg_usage (SET_SRC (x), counts, incr);
return;
@@ -7395,7 +7395,7 @@ set_live_p (rtx set, rtx insn ATTRIBUTE_UNUSED, /* Only used with HAVE_cc0. */
|| !reg_referenced_p (cc0_rtx, PATTERN (tem))))
return false;
#endif
- else if (GET_CODE (SET_DEST (set)) != REG
+ 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))
@@ -7587,7 +7587,7 @@ cse_change_cc_mode (rtx *loc, void *data)
rtx newreg = (rtx) data;
if (*loc
- && GET_CODE (*loc) == REG
+ && REG_P (*loc)
&& REGNO (*loc) == REGNO (newreg)
&& GET_MODE (*loc) != GET_MODE (newreg))
{
@@ -7683,7 +7683,7 @@ cse_cc_succs (basic_block bb, rtx cc_reg, rtx cc_src, bool can_change_mode)
/* Check whether INSN sets CC_REG to CC_SRC. */
set = single_set (insn);
if (set
- && GET_CODE (SET_DEST (set)) == REG
+ && REG_P (SET_DEST (set))
&& REGNO (SET_DEST (set)) == REGNO (cc_reg))
{
bool found;
@@ -7873,7 +7873,7 @@ cse_condition_code_reg (void)
continue;
set = single_set (insn);
if (set
- && GET_CODE (SET_DEST (set)) == REG
+ && REG_P (SET_DEST (set))
&& REGNO (SET_DEST (set)) == REGNO (cc_reg))
{
cc_src_insn = insn;