This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH 27/50] jump.c:eh_returnjump_p
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 03 Aug 2014 15:12:05 +0100
- Subject: [PATCH 27/50] jump.c:eh_returnjump_p
- Authentication-results: sourceware.org; auth=none
- References: <87y4v5d77q dot fsf at googlemail dot com>
gcc/
* jump.c (eh_returnjump_p_1): Delete.
(eh_returnjump_p): Use FOR_EACH_SUBRTX rather than for_each_rtx.
Remove handling of null rtxes.
Index: gcc/jump.c
===================================================================
--- gcc/jump.c 2014-08-03 11:25:27.442127486 +0100
+++ gcc/jump.c 2014-08-03 11:25:27.722130254 +0100
@@ -953,18 +953,17 @@ returnjump_p (rtx insn)
/* Return true if INSN is a (possibly conditional) return insn. */
-static int
-eh_returnjump_p_1 (rtx *loc, void *data ATTRIBUTE_UNUSED)
-{
- return *loc && GET_CODE (*loc) == EH_RETURN;
-}
-
int
eh_returnjump_p (rtx insn)
{
- if (!JUMP_P (insn))
- return 0;
- return for_each_rtx (&PATTERN (insn), eh_returnjump_p_1, NULL);
+ if (JUMP_P (insn))
+ {
+ subrtx_iterator::array_type array;
+ FOR_EACH_SUBRTX (iter, array, PATTERN (insn), NONCONST)
+ if (GET_CODE (*iter) == EH_RETURN)
+ return true;
+ }
+ return false;
}
/* Return true if INSN is a jump that only transfers control and