From 760edf20ba65b2d6b44a6a8c98683e4eb9490009 Mon Sep 17 00:00:00 2001 From: Trevor Saunders Date: Thu, 9 Jul 2015 02:51:09 +0000 Subject: reduce conditional compilation based on AUTO_INC_DEC gcc/ChangeLog: 2015-07-08 Trevor Saunders * 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 --- gcc/reload.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'gcc/reload.c') 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 -- cgit v1.1