aboutsummaryrefslogtreecommitdiff
path: root/gcc/reload1.c
diff options
context:
space:
mode:
authorTrevor Saunders <tbsaunde+gcc@tbsaunde.org>2015-07-09 02:51:09 +0000
committerTrevor Saunders <tbsaunde@gcc.gnu.org>2015-07-09 02:51:09 +0000
commit760edf20ba65b2d6b44a6a8c98683e4eb9490009 (patch)
tree3b2f06358a06111a3171d4f07399d8b62fc9689d /gcc/reload1.c
parent16cb56686dba6e45ab5e19b86fbed7712e1e6501 (diff)
downloadgcc-760edf20ba65b2d6b44a6a8c98683e4eb9490009.zip
gcc-760edf20ba65b2d6b44a6a8c98683e4eb9490009.tar.gz
gcc-760edf20ba65b2d6b44a6a8c98683e4eb9490009.tar.bz2
reduce conditional compilation based on AUTO_INC_DEC
gcc/ChangeLog: 2015-07-08 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * auto-inc-dec.c (pass_inc_dec::execute): Don't check the value of AUTO_INC_DEC with the preprocessor. * combine.c (combine_instructions): Likewise. (can_combine_p): Likewise. (try_combine): Likewise. * emit-rtl.c (try_split): Likewise. * loop-invariant.c (calculate_loop_reg_pressure): Likewise. * lower-subreg.c (resolve_simple_move): Likewise. * lra.c (update_inc_notes): Likewise. * recog.c (asm_operand_ok): Likewise. (constrain_operands): Likewise. * regrename.c (scan_rtx_address): Likewise. * reload.c (update_auto_inc_notes): Likewise. (reg_inc_found_and_valid_p): Likewise. * reload1.c (reload): Likewise. (emit_input_reload_insns): Likewise. (delete_output_reload): Likewise. * sched-deps.c (init_insn_reg_pressure_info): Likewise. * valtrack.c (cleanup_auto_inc_dec): Likewise. From-SVN: r225596
Diffstat (limited to 'gcc/reload1.c')
-rw-r--r--gcc/reload1.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 8c3e6e8..956f0eb 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -417,9 +417,7 @@ static void delete_output_reload (rtx_insn *, int, int, rtx);
static void delete_address_reloads (rtx_insn *, rtx_insn *);
static void delete_address_reloads_1 (rtx_insn *, rtx, rtx_insn *);
static void inc_for_reload (rtx, rtx, rtx, int);
-#if AUTO_INC_DEC
static void add_auto_inc_notes (rtx_insn *, rtx);
-#endif
static void substitute (rtx *, const_rtx, rtx);
static bool gen_reload_chain_without_interm_reg_p (int, int);
static int reloads_conflict (int, int);
@@ -1250,9 +1248,8 @@ reload (rtx_insn *first, int global)
pnote = &XEXP (*pnote, 1);
}
-#if AUTO_INC_DEC
- add_auto_inc_notes (insn, PATTERN (insn));
-#endif
+ if (AUTO_INC_DEC)
+ add_auto_inc_notes (insn, PATTERN (insn));
/* Simplify (subreg (reg)) if it appears as an operand. */
cleanup_subreg_operands (insn);
@@ -7397,10 +7394,7 @@ emit_input_reload_insns (struct insn_chain *chain, struct reload *rl,
is ill-formed and we must reject this optimization. */
extract_insn (temp);
if (constrain_operands (1, get_enabled_alternatives (temp))
-#if AUTO_INC_DEC
- && ! find_reg_note (temp, REG_INC, reloadreg)
-#endif
- )
+ && (!AUTO_INC_DEC || ! find_reg_note (temp, REG_INC, reloadreg)))
{
/* If the previous insn is an output reload, the source is
a reload register, and its spill_reg_store entry will
@@ -8870,10 +8864,10 @@ delete_output_reload (rtx_insn *insn, int j, int last_reload_reg,
continue;
if (MEM_P (reg2) || reload_override_in[k])
reg2 = rld[k].in_reg;
-#if AUTO_INC_DEC
- if (rld[k].out && ! rld[k].out_reg)
+
+ if (AUTO_INC_DEC && rld[k].out && ! rld[k].out_reg)
reg2 = XEXP (rld[k].in_reg, 0);
-#endif
+
while (GET_CODE (reg2) == SUBREG)
reg2 = SUBREG_REG (reg2);
if (rtx_equal_p (reg2, reg))
@@ -9266,7 +9260,6 @@ inc_for_reload (rtx reloadreg, rtx in, rtx value, int inc_amount)
}
}
-#if AUTO_INC_DEC
static void
add_auto_inc_notes (rtx_insn *insn, rtx x)
{
@@ -9291,4 +9284,3 @@ add_auto_inc_notes (rtx_insn *insn, rtx x)
add_auto_inc_notes (insn, XVECEXP (x, i, j));
}
}
-#endif