aboutsummaryrefslogtreecommitdiff
path: root/gcc/reload.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/reload.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/reload.c')
-rw-r--r--gcc/reload.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/gcc/reload.c b/gcc/reload.c
index 3b6df37..a670f13 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -5447,14 +5447,13 @@ static void
update_auto_inc_notes (rtx_insn *insn ATTRIBUTE_UNUSED, int regno ATTRIBUTE_UNUSED,
int reloadnum ATTRIBUTE_UNUSED)
{
-#if AUTO_INC_DEC
- rtx link;
+ if (!AUTO_INC_DEC)
+ return;
- for (link = REG_NOTES (insn); link; link = XEXP (link, 1))
+ for (rtx link = REG_NOTES (insn); link; link = XEXP (link, 1))
if (REG_NOTE_KIND (link) == REG_INC
&& (int) REGNO (XEXP (link, 0)) == regno)
push_replacement (&XEXP (link, 0), reloadnum, VOIDmode);
-#endif
}
/* Record the pseudo registers we must reload into hard registers in a
@@ -7168,13 +7167,15 @@ find_inc_amount (rtx x, rtx inced)
/* Return 1 if registers from REGNO to ENDREGNO are the subjects of a
REG_INC note in insn INSN. REGNO must refer to a hard register. */
-#if AUTO_INC_DEC
static int
reg_inc_found_and_valid_p (unsigned int regno, unsigned int endregno,
rtx insn)
{
rtx link;
+ if (!AUTO_INC_DEC)
+ return 0;
+
gcc_assert (insn);
if (! INSN_P (insn))
@@ -7189,11 +7190,6 @@ reg_inc_found_and_valid_p (unsigned int regno, unsigned int endregno,
}
return 0;
}
-#else
-
-#define reg_inc_found_and_valid_p(regno,endregno,insn) 0
-
-#endif
/* Return 1 if register REGNO is the subject of a clobber in insn INSN.
If SETS is 1, also consider SETs. If SETS is 2, enable checking