diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2014-08-28 06:23:39 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2014-08-28 06:23:39 +0000 |
commit | e7c44276618b5ee91df8eb2f9bdd3e4a79829226 (patch) | |
tree | 98bf250071034b5b6fa26a8b408fc11f40c97357 /gcc | |
parent | bc702273a728f2840c2c9603926f0066e8e8cd3c (diff) | |
download | gcc-e7c44276618b5ee91df8eb2f9bdd3e4a79829226.zip gcc-e7c44276618b5ee91df8eb2f9bdd3e4a79829226.tar.gz gcc-e7c44276618b5ee91df8eb2f9bdd3e4a79829226.tar.bz2 |
jump.c (eh_returnjump_p_1): Delete.
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.
From-SVN: r214644
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/jump.c | 17 |
2 files changed, 14 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 32f519d..1b3ab28 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2014-08-28 Richard Sandiford <rdsandiford@googlemail.com> + * jump.c (eh_returnjump_p_1): Delete. + (eh_returnjump_p): Use FOR_EACH_SUBRTX rather than for_each_rtx. + Remove handling of null rtxes. + +2014-08-28 Richard Sandiford <rdsandiford@googlemail.com> + * jump.c: Include rtl-iter.h. (returnjump_p_1): Delete. (returnjump_p): Use FOR_EACH_SUBRTX rather than for_each_rtx. @@ -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 |