From d84f02a81a29b5ca3f37d866bd7c20d908943b03 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Tue, 31 Dec 2013 13:06:28 -0500 Subject: [PATCH 048/159] FIXME: postreload.c --- gcc/postreload.c | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/gcc/postreload.c b/gcc/postreload.c index d16a3bf..a489eba 100644 --- a/gcc/postreload.c +++ b/gcc/postreload.c @@ -52,17 +52,17 @@ static int reload_cse_simplify_set (rtx, rtx); static int reload_cse_simplify_operands (rtx, rtx); static void reload_combine (void); -static void reload_combine_note_use (rtx *, rtx, int, rtx); +static void reload_combine_note_use (rtx *, rtx_base_insn, int, rtx); static void reload_combine_note_store (rtx, const_rtx, void *); -static bool reload_cse_move2add (rtx); +static bool reload_cse_move2add (rtx_base_insn); static void move2add_note_store (rtx, const_rtx, void *); /* Call cse / combine like post-reload optimization phases. FIRST is the first instruction. */ static void -reload_cse_regs (rtx first ATTRIBUTE_UNUSED) +reload_cse_regs (rtx_base_insn first ATTRIBUTE_UNUSED) { bool moves_converted; reload_cse_regs_1 (); @@ -686,7 +686,7 @@ reload_cse_simplify_operands (rtx insn, rtx testreg) struct reg_use { /* The insn where a register has been used. */ - rtx insn; + rtx_base_insn insn; /* Points to the memory reference enclosing the use, if any, NULL_RTX otherwise. */ rtx containing_mem; @@ -869,9 +869,10 @@ reload_combine_closest_single_use (unsigned regno, int ruid_limit) should make this change on debug insns. */ static void -fixup_debug_insns (rtx reg, rtx replacement, rtx from, rtx to) +fixup_debug_insns (rtx reg, rtx replacement, rtx_base_insn from, + rtx_base_insn to) { - rtx insn; + rtx_base_insn insn; for (insn = from; insn != to; insn = NEXT_INSN (insn)) { rtx t; @@ -947,14 +948,14 @@ try_replace_in_use (struct reg_use *use, rtx reg, rtx src) recognized and should be handled normally. */ static bool -reload_combine_recognize_const_pattern (rtx insn) +reload_combine_recognize_const_pattern (rtx_base_insn insn) { int from_ruid = reload_combine_ruid; rtx set, pat, reg, src, addreg; unsigned int regno; struct reg_use *use; bool must_move_add; - rtx add_moved_after_insn = NULL_RTX; + rtx_base_insn add_moved_after_insn = NULL_RTX_BASE_INSN; int add_moved_after_ruid = 0; int clobbered_regno = -1; @@ -1010,7 +1011,7 @@ reload_combine_recognize_const_pattern (rtx insn) if (use && GET_MODE (*use->usep) == Pmode) { bool delete_add = false; - rtx use_insn = use->insn; + rtx_base_insn use_insn = use->insn; int use_ruid = use->ruid; /* Avoid moving the add insn past a jump. */ @@ -1091,7 +1092,7 @@ reload_combine_recognize_const_pattern (rtx insn) INSN; false if it wasn't recognized and should be handled normally. */ static bool -reload_combine_recognize_pattern (rtx insn) +reload_combine_recognize_pattern (rtx_base_insn insn) { rtx set, reg, src; unsigned int regno; @@ -1242,7 +1243,7 @@ reload_combine_recognize_pattern (rtx insn) static void reload_combine (void) { - rtx insn, prev; + rtx_base_insn insn, prev; basic_block bb; unsigned int r; int min_labelno, n_labels; @@ -1507,7 +1508,8 @@ reload_combine_note_store (rtx dst, const_rtx set, void *data ATTRIBUTE_UNUSED) *XP is the pattern of INSN, or a part of it. Called from reload_combine, and recursively by itself. */ static void -reload_combine_note_use (rtx *xp, rtx insn, int ruid, rtx containing_mem) +reload_combine_note_use (rtx *xp, rtx_base_insn insn, int ruid, + rtx containing_mem) { rtx x = *xp; enum rtx_code code = x->code; @@ -1916,10 +1918,10 @@ move2add_use_add3_insn (rtx reg, rtx sym, rtx off, rtx insn) /* Convert move insns with constant inputs to additions if they are cheaper. Return true if any changes were made. */ static bool -reload_cse_move2add (rtx first) +reload_cse_move2add (rtx_base_insn first) { int i; - rtx insn; + rtx_base_insn insn; bool changed = false; for (i = FIRST_PSEUDO_REGISTER - 1; i >= 0; i--) @@ -1999,7 +2001,7 @@ reload_cse_move2add (rtx first) && reg_base_reg[regno] == reg_base_reg[REGNO (src)] && move2add_valid_value_p (REGNO (src), GET_MODE (reg))) { - rtx next = next_nonnote_nondebug_insn (insn); + rtx_base_insn next = next_nonnote_nondebug_insn (insn); rtx set = NULL_RTX; if (next) set = single_set (next); -- 1.7.11.7