aboutsummaryrefslogtreecommitdiff
path: root/gcc/jump.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/jump.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/jump.c')
-rw-r--r--gcc/jump.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/jump.c b/gcc/jump.c
index ef2f9e5..34466b6 100644
--- a/gcc/jump.c
+++ b/gcc/jump.c
@@ -264,7 +264,7 @@ maybe_propagate_label_ref (rtx_insn *jump_insn, rtx_insn *prev_nonjump_insn)
CODE_LABEL in the LABEL_REF of the "set". We can
conveniently use it for the marker function, which
requires a LABEL_REF wrapping. */
- gcc_assert (XEXP (label_note, 0) == XEXP (SET_SRC (label_set), 0));
+ gcc_assert (XEXP (label_note, 0) == LABEL_REF_LABEL (SET_SRC (label_set)));
mark_jump_label_1 (label_set, jump_insn, false, true);
@@ -1141,7 +1141,7 @@ mark_jump_label_1 (rtx x, rtx insn, bool in_mem, bool is_target)
case LABEL_REF:
{
- rtx label = XEXP (x, 0);
+ rtx label = LABEL_REF_LABEL (x);
/* Ignore remaining references to unreachable labels that
have been deleted. */
@@ -1155,7 +1155,7 @@ mark_jump_label_1 (rtx x, rtx insn, bool in_mem, bool is_target)
if (LABEL_REF_NONLOCAL_P (x))
break;
- XEXP (x, 0) = label;
+ LABEL_REF_LABEL (x) = label;
if (! insn || ! INSN_DELETED_P (insn))
++LABEL_NUSES (label);
@@ -1454,7 +1454,7 @@ redirect_exp_1 (rtx *loc, rtx olabel, rtx nlabel, rtx insn)
int i;
const char *fmt;
- if ((code == LABEL_REF && XEXP (x, 0) == olabel)
+ if ((code == LABEL_REF && LABEL_REF_LABEL (x) == olabel)
|| x == olabel)
{
x = redirect_target (nlabel);
@@ -1467,7 +1467,7 @@ redirect_exp_1 (rtx *loc, rtx olabel, rtx nlabel, rtx insn)
if (code == SET && SET_DEST (x) == pc_rtx
&& ANY_RETURN_P (nlabel)
&& GET_CODE (SET_SRC (x)) == LABEL_REF
- && XEXP (SET_SRC (x), 0) == olabel)
+ && LABEL_REF_LABEL (SET_SRC (x)) == olabel)
{
validate_change (insn, loc, nlabel, 1);
return;
@@ -1791,12 +1791,12 @@ rtx_renumbered_equal_p (const_rtx x, const_rtx y)
case LABEL_REF:
/* We can't assume nonlocal labels have their following insns yet. */
if (LABEL_REF_NONLOCAL_P (x) || LABEL_REF_NONLOCAL_P (y))
- return XEXP (x, 0) == XEXP (y, 0);
+ return LABEL_REF_LABEL (x) == LABEL_REF_LABEL (y);
/* Two label-refs are equivalent if they point at labels
in the same position in the instruction stream. */
- return (next_real_insn (XEXP (x, 0))
- == next_real_insn (XEXP (y, 0)));
+ return (next_real_insn (LABEL_REF_LABEL (x))
+ == next_real_insn (LABEL_REF_LABEL (y)));
case SYMBOL_REF:
return XSTR (x, 0) == XSTR (y, 0);