aboutsummaryrefslogtreecommitdiff
path: root/gcc/cse.c
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2014-09-11 20:47:39 +0000
committerDavid Malcolm <dmalcolm@gcc.gnu.org>2014-09-11 20:47:39 +0000
commita827d9b1943e966713fbc5cd8f56722791f524aa (patch)
tree99f089d03c5999d04f7bdff5d44e2a6ef6a2568b /gcc/cse.c
parente4fb6f093c1657d590e37f39f832652d133dcb3b (diff)
downloadgcc-a827d9b1943e966713fbc5cd8f56722791f524aa.zip
gcc-a827d9b1943e966713fbc5cd8f56722791f524aa.tar.gz
gcc-a827d9b1943e966713fbc5cd8f56722791f524aa.tar.bz2
Introduce LABEL_REF_LABEL
gcc/ChangeLog: 2014-09-11 David Malcolm <dmalcolm@redhat.com> * rtl.h (LABEL_REF_LABEL): New macro. * alias.c (rtx_equal_for_memref_p): Use LABEL_REF_LABEL in place of XEXP (, 0), where we know that we have a LABEL_REF. * cfgbuild.c (make_edges): Likewise. (purge_dead_tablejump_edges): Likewise. * cfgexpand.c (convert_debug_memory_address): Likewise. * cfgrtl.c (patch_jump_insn): Likewise. * combine.c (distribute_notes): Likewise. * cse.c (hash_rtx_cb): Likewise. (exp_equiv_p): Likewise. (fold_rtx): Likewise. (check_for_label_ref): Likewise. * cselib.c (rtx_equal_for_cselib_1): Likewise. (cselib_hash_rtx): Likewise. * emit-rtl.c (mark_label_nuses): Likewise. * explow.c (convert_memory_address_addr_space): Likewise. * final.c (output_asm_label): Likewise. (output_addr_const): Likewise. * gcse.c (add_label_notes): Likewise. * genconfig.c (walk_insn_part): Likewise. * genrecog.c (validate_pattern): Likewise. * ifcvt.c (cond_exec_get_condition): Likewise. (noce_emit_store_flag): Likewise. (noce_get_alt_condition): Likewise. (noce_get_condition): Likewise. * jump.c (maybe_propagate_label_ref): Likewise. (mark_jump_label_1): Likewise. (redirect_exp_1): Likewise. (rtx_renumbered_equal_p): Likewise. * lra-constraints.c (operands_match_p): Likewise. * reload.c (operands_match_p): Likewise. (find_reloads): Likewise. * reload1.c (set_label_offsets): Likewise. * reorg.c (get_branch_condition): Likewise. * rtl.c (rtx_equal_p_cb): Likewise. (rtx_equal_p): Likewise. * rtlanal.c (reg_mentioned_p): Likewise. (rtx_referenced_p): Likewise. (get_condition): Likewise. * sched-vis.c (print_value): Likewise. * varasm.c (const_hash_1): Likewise. (compare_constant): Likewise. (const_rtx_hash_1): Likewise. (output_constant_pool_1): Likewise. From-SVN: r215190
Diffstat (limited to 'gcc/cse.c')
-rw-r--r--gcc/cse.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/gcc/cse.c b/gcc/cse.c
index 90b08b6..be2f31b 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -2349,7 +2349,7 @@ hash_rtx_cb (const_rtx x, enum machine_mode mode,
/* We don't hash on the address of the CODE_LABEL to avoid bootstrap
differences and differences between each stage's debugging dumps. */
hash += (((unsigned int) LABEL_REF << 7)
- + CODE_LABEL_NUMBER (XEXP (x, 0)));
+ + CODE_LABEL_NUMBER (LABEL_REF_LABEL (x)));
return hash;
case SYMBOL_REF:
@@ -2602,7 +2602,7 @@ exp_equiv_p (const_rtx x, const_rtx y, int validate, bool for_gcse)
return x == y;
case LABEL_REF:
- return XEXP (x, 0) == XEXP (y, 0);
+ return LABEL_REF_LABEL (x) == LABEL_REF_LABEL (y);
case SYMBOL_REF:
return XSTR (x, 0) == XSTR (y, 0);
@@ -3486,7 +3486,7 @@ fold_rtx (rtx x, rtx_insn *insn)
: lookup_as_function (folded_arg0, MINUS);
if (y != 0 && GET_CODE (XEXP (y, 1)) == LABEL_REF
- && XEXP (XEXP (y, 1), 0) == XEXP (const_arg1, 0))
+ && LABEL_REF_LABEL (XEXP (y, 1)) == LABEL_REF_LABEL (const_arg1))
return XEXP (y, 0);
/* Now try for a CONST of a MINUS like the above. */
@@ -3494,7 +3494,7 @@ fold_rtx (rtx x, rtx_insn *insn)
: lookup_as_function (folded_arg0, CONST))) != 0
&& GET_CODE (XEXP (y, 0)) == MINUS
&& GET_CODE (XEXP (XEXP (y, 0), 1)) == LABEL_REF
- && XEXP (XEXP (XEXP (y, 0), 1), 0) == XEXP (const_arg1, 0))
+ && LABEL_REF_LABEL (XEXP (XEXP (y, 0), 1)) == LABEL_REF_LABEL (const_arg1))
return XEXP (XEXP (y, 0), 0);
}
@@ -3506,7 +3506,7 @@ fold_rtx (rtx x, rtx_insn *insn)
: lookup_as_function (folded_arg1, MINUS);
if (y != 0 && GET_CODE (XEXP (y, 1)) == LABEL_REF
- && XEXP (XEXP (y, 1), 0) == XEXP (const_arg0, 0))
+ && LABEL_REF_LABEL (XEXP (y, 1)) == LABEL_REF_LABEL (const_arg0))
return XEXP (y, 0);
/* Now try for a CONST of a MINUS like the above. */
@@ -3514,7 +3514,7 @@ fold_rtx (rtx x, rtx_insn *insn)
: lookup_as_function (folded_arg1, CONST))) != 0
&& GET_CODE (XEXP (y, 0)) == MINUS
&& GET_CODE (XEXP (XEXP (y, 0), 1)) == LABEL_REF
- && XEXP (XEXP (XEXP (y, 0), 1), 0) == XEXP (const_arg0, 0))
+ && LABEL_REF_LABEL (XEXP (XEXP (y, 0), 1)) == LABEL_REF_LABEL (const_arg0))
return XEXP (XEXP (y, 0), 0);
}
@@ -6374,10 +6374,10 @@ check_for_label_ref (rtx_insn *insn)
if (GET_CODE (x) == LABEL_REF
&& !LABEL_REF_NONLOCAL_P (x)
&& (!JUMP_P (insn)
- || !label_is_jump_target_p (XEXP (x, 0), insn))
- && LABEL_P (XEXP (x, 0))
- && INSN_UID (XEXP (x, 0)) != 0
- && !find_reg_note (insn, REG_LABEL_OPERAND, XEXP (x, 0)))
+ || !label_is_jump_target_p (LABEL_REF_LABEL (x), insn))
+ && LABEL_P (LABEL_REF_LABEL (x))
+ && INSN_UID (LABEL_REF_LABEL (x)) != 0
+ && !find_reg_note (insn, REG_LABEL_OPERAND, LABEL_REF_LABEL (x)))
return true;
}
return false;