summaryrefslogtreecommitdiff
path: root/gcc/config/sh
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2014-10-26 10:40:22 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2014-10-26 10:40:22 +0000
commitff2136d46c4a71e55daa6bae1e8a0934daa91099 (patch)
treee841dd94ee2597f8fb3e2addc09389a8e757b4af /gcc/config/sh
parent727d658bf210ee401899cfc77b07fe9430483445 (diff)
downloadgcc-ff2136d46c4a71e55daa6bae1e8a0934daa91099.tar.gz
gcc/
* config/sh/sh.c (sh_contains_memref_p_1): Delete. (sh_contains_memref_p): Use FOR_EACH_SUBRTX. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216702 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/sh')
-rw-r--r--gcc/config/sh/sh.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index 2d1a9273a75..2b1f98bba49 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -12972,18 +12972,15 @@ shmedia_cleanup_truncate (rtx x)
so we must look at the rtl ourselves to see if any of the feeding
registers is used in a memref.
- Called by sh_contains_memref_p via for_each_rtx. */
-static int
-sh_contains_memref_p_1 (rtx *loc, void *data ATTRIBUTE_UNUSED)
-{
- return (MEM_P (*loc));
-}
-
-/* Return true iff INSN contains a MEM. */
+ Return true iff INSN contains a MEM. */
bool
sh_contains_memref_p (rtx insn)
{
- return for_each_rtx (&PATTERN (insn), &sh_contains_memref_p_1, NULL);
+ subrtx_iterator::array_type array;
+ FOR_EACH_SUBRTX (iter, array, PATTERN (insn), NONCONST)
+ if (MEM_P (*iter))
+ return true;
+ return false;
}
/* Return true iff INSN loads a banked register. */