diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2014-10-26 10:40:44 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2014-10-26 10:40:44 +0000 |
commit | d2053f5e8105108e534e608b41e85400fcfa5d0b (patch) | |
tree | f755e66fa27d8f4bc8256f6fb5698b67d4b91212 /gcc | |
parent | f0ac02c03f1ba793022de783a99159194a0be354 (diff) | |
download | gcc-d2053f5e8105108e534e608b41e85400fcfa5d0b.zip gcc-d2053f5e8105108e534e608b41e85400fcfa5d0b.tar.gz gcc-d2053f5e8105108e534e608b41e85400fcfa5d0b.tar.bz2 |
mep.c (mep_store_find_set): Take a const_rtx and return a bool.
gcc/
* config/mep/mep.c (mep_store_find_set): Take a const_rtx and
return a bool. Replace "void *" with specific type. Iterate
over all subrtxes.
(mep_store_data_bypass_1): Update calls accordingly.
From-SVN: r216705
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/mep/mep.c | 17 |
2 files changed, 17 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f46de9a..055cc20 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,12 @@ 2014-10-26 Richard Sandiford <richard.sandiford@arm.com> + * config/mep/mep.c (mep_store_find_set): Take a const_rtx and + return a bool. Replace "void *" with specific type. Iterate + over all subrtxes. + (mep_store_data_bypass_1): Update calls accordingly. + +2014-10-26 Richard Sandiford <richard.sandiford@arm.com> + * config/mep/mep.c: Include rtl-iter.h. (global_reg_mentioned_p_1): Take a const_rtx and return a bool. (xtensa_tls_referenced_p): Return a bool. Use FOR_EACH_SUBRTX. diff --git a/gcc/config/mep/mep.c b/gcc/config/mep/mep.c index a99f37e..b503aff 100644 --- a/gcc/config/mep/mep.c +++ b/gcc/config/mep/mep.c @@ -6644,13 +6644,16 @@ mep_sched_reorder (FILE *dump ATTRIBUTE_UNUSED, return 2; } -/* A for_each_rtx callback. Return true if *X is a register that is - set by insn PREV. */ +/* Return true if X contains a register that is set by insn PREV. */ -static int -mep_store_find_set (rtx *x, void *prev) +static bool +mep_store_find_set (const_rtx x, const rtx_insn *prev) { - return REG_P (*x) && reg_set_p (*x, (const_rtx) prev); + subrtx_iterator::array_type array; + FOR_EACH_SUBRTX (iter, array, x, NONCONST) + if (REG_P (x) && reg_set_p (x, prev)) + return true; + return false; } /* Like mep_store_bypass_p, but takes a pattern as the second argument, @@ -6687,7 +6690,7 @@ mep_store_data_bypass_1 (rtx_insn *prev, rtx pat) src = SET_SRC (pat); for (i = 1; i < XVECLEN (src, 0); i++) - if (for_each_rtx (&XVECEXP (src, 0, i), mep_store_find_set, prev)) + if (mep_store_find_set (XVECEXP (src, 0, i), prev)) return false; return true; @@ -6695,7 +6698,7 @@ mep_store_data_bypass_1 (rtx_insn *prev, rtx pat) /* Otherwise just check that PREV doesn't modify any register mentioned in the memory destination. */ - return !for_each_rtx (&SET_DEST (pat), mep_store_find_set, prev); + return !mep_store_find_set (SET_DEST (pat), prev); } /* Return true if INSN is a store instruction and if the store address |