From: Trevor Saunders Date: Mon, 21 Nov 2016 06:15:00 +0000 (+0000) Subject: split up variables to use rtx_insn * more X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f370536c9c6a1eca30fe9685b9cbcb8dca681e36;p=gcc.git split up variables to use rtx_insn * more gcc/ChangeLog: 2016-11-21 Trevor Saunders * config/aarch64/aarch64.c (aarch64_emit_unlikely_jump): split up variables to make some rtx_insn *. * config/alpha/alpha.c (emit_unlikely_jump): Likewise. * config/arc/arc.c: Likewise. * config/arm/arm.c: Likewise. * config/mn10300/mn10300.c (mn10300_legitimize_pic_address): Likewise. * config/rs6000/rs6000.c (rs6000_expand_split_stack_prologue): Likewise. * config/spu/spu.c (spu_emit_branch_hint): Likewise. From-SVN: r242650 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 98151600a30..b9f2dc814f8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,16 @@ +2016-11-21 Trevor Saunders + + * config/aarch64/aarch64.c (aarch64_emit_unlikely_jump): split + up variables to make some rtx_insn *. + * config/alpha/alpha.c (emit_unlikely_jump): Likewise. + * config/arc/arc.c: Likewise. + * config/arm/arm.c: Likewise. + * config/mn10300/mn10300.c (mn10300_legitimize_pic_address): + Likewise. + * config/rs6000/rs6000.c (rs6000_expand_split_stack_prologue): + Likewise. + * config/spu/spu.c (spu_emit_branch_hint): Likewise. + 2016-11-21 Trevor Saunders * config/arm/arm.c (legitimize_pic_address): Change to use diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index e5ca5eb0ad7..efcba836bdb 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -11476,8 +11476,8 @@ aarch64_emit_unlikely_jump (rtx insn) { int very_unlikely = REG_BR_PROB_BASE / 100 - 1; - insn = emit_jump_insn (insn); - add_int_reg_note (insn, REG_BR_PROB, very_unlikely); + rtx_insn *jump = emit_jump_insn (insn); + add_int_reg_note (jump, REG_BR_PROB, very_unlikely); } /* Expand a compare and swap pattern. */ diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c index 6d390ae6dfa..6c63a8f96aa 100644 --- a/gcc/config/alpha/alpha.c +++ b/gcc/config/alpha/alpha.c @@ -4320,11 +4320,9 @@ static void emit_unlikely_jump (rtx cond, rtx label) { int very_unlikely = REG_BR_PROB_BASE / 100 - 1; - rtx x; - - x = gen_rtx_IF_THEN_ELSE (VOIDmode, cond, label, pc_rtx); - x = emit_jump_insn (gen_rtx_SET (pc_rtx, x)); - add_int_reg_note (x, REG_BR_PROB, very_unlikely); + rtx x = gen_rtx_IF_THEN_ELSE (VOIDmode, cond, label, pc_rtx); + rtx_insn *insn = emit_jump_insn (gen_rtx_SET (pc_rtx, x)); + add_int_reg_note (insn, REG_BR_PROB, very_unlikely); } /* A subroutine of the atomic operation splitters. Emit a load-locked diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c index beac39b9a27..c73668f2e34 100644 --- a/gcc/config/arc/arc.c +++ b/gcc/config/arc/arc.c @@ -9553,8 +9553,8 @@ emit_unlikely_jump (rtx insn) { int very_unlikely = REG_BR_PROB_BASE / 100 - 1; - insn = emit_jump_insn (insn); - add_int_reg_note (insn, REG_BR_PROB, very_unlikely); + rtx_insn *jump = emit_jump_insn (insn); + add_int_reg_note (jump, REG_BR_PROB, very_unlikely); } /* Expand code to perform a 8 or 16-bit compare and swap by doing diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 1935810d469..69c4a2bba81 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -26936,8 +26936,8 @@ emit_unlikely_jump (rtx insn) { int very_unlikely = REG_BR_PROB_BASE / 100 - 1; - insn = emit_jump_insn (insn); - add_int_reg_note (insn, REG_BR_PROB, very_unlikely); + rtx_insn *jump = emit_jump_insn (insn); + add_int_reg_note (jump, REG_BR_PROB, very_unlikely); } /* Expand a compare and swap pattern. */ diff --git a/gcc/config/mn10300/mn10300.c b/gcc/config/mn10300/mn10300.c index e61bf408d5a..cfc8604f9c8 100644 --- a/gcc/config/mn10300/mn10300.c +++ b/gcc/config/mn10300/mn10300.c @@ -1860,6 +1860,7 @@ rtx mn10300_legitimize_pic_address (rtx orig, rtx reg) { rtx x; + rtx_insn *insn; if (GET_CODE (orig) == LABEL_REF || (GET_CODE (orig) == SYMBOL_REF @@ -1873,7 +1874,7 @@ mn10300_legitimize_pic_address (rtx orig, rtx reg) x = gen_rtx_CONST (SImode, x); emit_move_insn (reg, x); - x = emit_insn (gen_addsi3 (reg, reg, pic_offset_table_rtx)); + insn = emit_insn (gen_addsi3 (reg, reg, pic_offset_table_rtx)); } else if (GET_CODE (orig) == SYMBOL_REF) { @@ -1885,12 +1886,12 @@ mn10300_legitimize_pic_address (rtx orig, rtx reg) x = gen_rtx_PLUS (SImode, pic_offset_table_rtx, x); x = gen_const_mem (SImode, x); - x = emit_move_insn (reg, x); + insn = emit_move_insn (reg, x); } else return orig; - set_unique_reg_note (x, REG_EQUAL, orig); + set_unique_reg_note (insn, REG_EQUAL, orig); return reg; } @@ -3163,7 +3164,7 @@ mn10300_bundle_liw (void) Insert a SETLB insn just before LABEL. */ static void -mn10300_insert_setlb_lcc (rtx_insn *label, rtx branch) +mn10300_insert_setlb_lcc (rtx_insn *label, rtx_insn *branch) { rtx lcc, comparison, cmp_reg; diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 84b15b9fa5b..fa62e2e50ea 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -24670,11 +24670,9 @@ static void emit_unlikely_jump (rtx cond, rtx label) { int very_unlikely = REG_BR_PROB_BASE / 100 - 1; - rtx x; - - x = gen_rtx_IF_THEN_ELSE (VOIDmode, cond, label, pc_rtx); - x = emit_jump_insn (gen_rtx_SET (pc_rtx, x)); - add_int_reg_note (x, REG_BR_PROB, very_unlikely); + rtx x = gen_rtx_IF_THEN_ELSE (VOIDmode, cond, label, pc_rtx); + rtx_insn *insn = emit_jump_insn (gen_rtx_SET (pc_rtx, x)); + add_int_reg_note (insn, REG_BR_PROB, very_unlikely); } /* A subroutine of the atomic operation splitters. Emit a load-locked @@ -30599,10 +30597,10 @@ rs6000_expand_split_stack_prologue (void) gen_rtx_GEU (VOIDmode, compare, const0_rtx), gen_rtx_LABEL_REF (VOIDmode, ok_label), pc_rtx); - jump = emit_jump_insn (gen_rtx_SET (pc_rtx, jump)); - JUMP_LABEL (jump) = ok_label; + insn = emit_jump_insn (gen_rtx_SET (pc_rtx, jump)); + JUMP_LABEL (insn) = ok_label; /* Mark the jump as very likely to be taken. */ - add_int_reg_note (jump, REG_BR_PROB, + add_int_reg_note (insn, REG_BR_PROB, REG_BR_PROB_BASE - REG_BR_PROB_BASE / 100); lr = gen_rtx_REG (Pmode, LR_REGNO); diff --git a/gcc/config/spu/spu.c b/gcc/config/spu/spu.c index 820924e0882..e8a3ed9462b 100644 --- a/gcc/config/spu/spu.c +++ b/gcc/config/spu/spu.c @@ -2087,7 +2087,6 @@ static void spu_emit_branch_hint (rtx_insn *before, rtx_insn *branch, rtx target, int distance, sbitmap blocks) { - rtx branch_label = 0; rtx_insn *hint; rtx_insn *insn; rtx_jump_table_data *table; @@ -2104,14 +2103,14 @@ spu_emit_branch_hint (rtx_insn *before, rtx_insn *branch, rtx target, if (NOTE_INSN_BASIC_BLOCK_P (before)) before = NEXT_INSN (before); - branch_label = gen_label_rtx (); + rtx_code_label *branch_label = gen_label_rtx (); LABEL_NUSES (branch_label)++; LABEL_PRESERVE_P (branch_label) = 1; insn = emit_label_before (branch_label, branch); - branch_label = gen_rtx_LABEL_REF (VOIDmode, branch_label); + rtx branch_label_ref = gen_rtx_LABEL_REF (VOIDmode, branch_label); bitmap_set_bit (blocks, BLOCK_FOR_INSN (branch)->index); - hint = emit_insn_before (gen_hbr (branch_label, target), before); + hint = emit_insn_before (gen_hbr (branch_label_ref, target), before); recog_memoized (hint); INSN_LOCATION (hint) = INSN_LOCATION (branch); HINTED_P (branch) = 1;