diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2014-10-26 10:40:52 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2014-10-26 10:40:52 +0000 |
commit | 21ffb9589ebd03e7d6e0b6f2d14bb3c437cc9b6f (patch) | |
tree | dadb68c26799f90bc63ee88145c161586b79ce4c /gcc/config/mep | |
parent | d2053f5e8105108e534e608b41e85400fcfa5d0b (diff) | |
download | gcc-21ffb9589ebd03e7d6e0b6f2d14bb3c437cc9b6f.zip gcc-21ffb9589ebd03e7d6e0b6f2d14bb3c437cc9b6f.tar.gz gcc-21ffb9589ebd03e7d6e0b6f2d14bb3c437cc9b6f.tar.bz2 |
mep.c (mep_mul_hilo_bypass_1): Delete.
gcc/
* config/mep/mep.c (mep_mul_hilo_bypass_1): Delete.
(mep_mul_hilo_bypass_p): Use FOR_EACH_SUBRTX.
From-SVN: r216706
Diffstat (limited to 'gcc/config/mep')
-rw-r--r-- | gcc/config/mep/mep.c | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/gcc/config/mep/mep.c b/gcc/config/mep/mep.c index b503aff..838f88b 100644 --- a/gcc/config/mep/mep.c +++ b/gcc/config/mep/mep.c @@ -6710,18 +6710,6 @@ mep_store_data_bypass_p (rtx_insn *prev, rtx_insn *insn) return INSN_P (insn) ? mep_store_data_bypass_1 (prev, PATTERN (insn)) : false; } -/* A for_each_rtx subroutine of mep_mul_hilo_bypass_p. Return 1 if *X - is a register other than LO or HI and if PREV sets *X. */ - -static int -mep_mul_hilo_bypass_1 (rtx *x, void *prev) -{ - return (REG_P (*x) - && REGNO (*x) != LO_REGNO - && REGNO (*x) != HI_REGNO - && reg_set_p (*x, (const_rtx) prev)); -} - /* Return true if, apart from HI/LO, there are no true dependencies between multiplication instructions PREV and INSN. */ @@ -6733,8 +6721,19 @@ mep_mul_hilo_bypass_p (rtx_insn *prev, rtx_insn *insn) pat = PATTERN (insn); if (GET_CODE (pat) == PARALLEL) pat = XVECEXP (pat, 0, 0); - return (GET_CODE (pat) == SET - && !for_each_rtx (&SET_SRC (pat), mep_mul_hilo_bypass_1, prev)); + if (GET_CODE (pat) != SET) + return false; + subrtx_iterator::array_type array; + FOR_EACH_SUBRTX (iter, array, SET_SRC (pat), NONCONST) + { + const_rtx x = *iter; + if (REG_P (x) + && REGNO (x) != LO_REGNO + && REGNO (x) != HI_REGNO + && reg_set_p (x, prev)) + return false; + } + return true; } /* Return true if INSN is an ldc instruction that issues to the |