aboutsummaryrefslogtreecommitdiff
path: root/gcc/recog.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/recog.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/recog.c')
-rw-r--r--gcc/recog.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/gcc/recog.c b/gcc/recog.c
index 3e50fa9..b69ace56 100644
--- a/gcc/recog.c
+++ b/gcc/recog.c
@@ -1704,9 +1704,7 @@ int
asm_operand_ok (rtx op, const char *constraint, const char **constraints)
{
int result = 0;
-#if AUTO_INC_DEC
bool incdec_ok = false;
-#endif
/* Use constrain_operands after reload. */
gcc_assert (!reload_completed);
@@ -1774,7 +1772,6 @@ asm_operand_ok (rtx op, const char *constraint, const char **constraints)
result = 1;
break;
-#if AUTO_INC_DEC
case '<':
case '>':
/* ??? Before auto-inc-dec, auto inc/dec insns are not supposed
@@ -1784,7 +1781,6 @@ asm_operand_ok (rtx op, const char *constraint, const char **constraints)
Match any memory and hope things are resolved after reload. */
incdec_ok = true;
-#endif
default:
cn = lookup_constraint (constraint);
switch (get_constraint_type (cn))
@@ -1828,9 +1824,8 @@ asm_operand_ok (rtx op, const char *constraint, const char **constraints)
return 0;
}
-#if AUTO_INC_DEC
/* For operands without < or > constraints reject side-effects. */
- if (!incdec_ok && result && MEM_P (op))
+ if (AUTO_INC_DEC && !incdec_ok && result && MEM_P (op))
switch (GET_CODE (XEXP (op, 0)))
{
case PRE_INC:
@@ -1843,7 +1838,6 @@ asm_operand_ok (rtx op, const char *constraint, const char **constraints)
default:
break;
}
-#endif
return result;
}
@@ -2806,9 +2800,8 @@ constrain_operands (int strict, alternative_mask alternatives)
= recog_data.operand[funny_match[funny_match_index].this_op];
}
-#if AUTO_INC_DEC
/* For operands without < or > constraints reject side-effects. */
- if (recog_data.is_asm)
+ if (AUTO_INC_DEC && recog_data.is_asm)
{
for (opno = 0; opno < recog_data.n_operands; opno++)
if (MEM_P (recog_data.operand[opno]))
@@ -2829,7 +2822,7 @@ constrain_operands (int strict, alternative_mask alternatives)
break;
}
}
-#endif
+
return 1;
}
}