diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-30 12:37:06 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-30 12:37:06 +0000 |
commit | 73e4df1deaadb719c7649ac0957573ceca55f842 (patch) | |
tree | 975a7ced6842710d01af3678a4a9051684a1bce8 /gcc/jump.c | |
parent | ba60c66472a4a63105c930d419641f75f4d70264 (diff) | |
download | gcc-73e4df1deaadb719c7649ac0957573ceca55f842.tar.gz |
2011-08-30 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 178289 using svnmerge.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@178293 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/jump.c')
-rw-r--r-- | gcc/jump.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/gcc/jump.c b/gcc/jump.c index 8dc78f2aceb..0273adf4af6 100644 --- a/gcc/jump.c +++ b/gcc/jump.c @@ -29,7 +29,8 @@ along with GCC; see the file COPYING3. If not see JUMP_LABEL internal field. With this we can detect labels that become unused because of the deletion of all the jumps that formerly used them. The JUMP_LABEL info is sometimes looked - at by later passes. + at by later passes. For return insns, it contains either a + RETURN or a SIMPLE_RETURN rtx. The subroutines redirect_jump and invert_jump are used from other passes as well. */ @@ -775,10 +776,10 @@ condjump_p (const_rtx insn) return (GET_CODE (x) == IF_THEN_ELSE && ((GET_CODE (XEXP (x, 2)) == PC && (GET_CODE (XEXP (x, 1)) == LABEL_REF - || GET_CODE (XEXP (x, 1)) == RETURN)) + || ANY_RETURN_P (XEXP (x, 1)))) || (GET_CODE (XEXP (x, 1)) == PC && (GET_CODE (XEXP (x, 2)) == LABEL_REF - || GET_CODE (XEXP (x, 2)) == RETURN)))); + || ANY_RETURN_P (XEXP (x, 2)))))); } /* Return nonzero if INSN is a (possibly) conditional jump inside a @@ -807,11 +808,11 @@ condjump_in_parallel_p (const_rtx insn) return 0; if (XEXP (SET_SRC (x), 2) == pc_rtx && (GET_CODE (XEXP (SET_SRC (x), 1)) == LABEL_REF - || GET_CODE (XEXP (SET_SRC (x), 1)) == RETURN)) + || ANY_RETURN_P (XEXP (SET_SRC (x), 1)))) return 1; if (XEXP (SET_SRC (x), 1) == pc_rtx && (GET_CODE (XEXP (SET_SRC (x), 2)) == LABEL_REF - || GET_CODE (XEXP (SET_SRC (x), 2)) == RETURN)) + || ANY_RETURN_P (XEXP (SET_SRC (x), 2)))) return 1; return 0; } @@ -873,8 +874,9 @@ any_condjump_p (const_rtx insn) a = GET_CODE (XEXP (SET_SRC (x), 1)); b = GET_CODE (XEXP (SET_SRC (x), 2)); - return ((b == PC && (a == LABEL_REF || a == RETURN)) - || (a == PC && (b == LABEL_REF || b == RETURN))); + return ((b == PC && (a == LABEL_REF || a == RETURN || a == SIMPLE_RETURN)) + || (a == PC + && (b == LABEL_REF || b == RETURN || b == SIMPLE_RETURN))); } /* Return the label of a conditional jump. */ @@ -911,6 +913,7 @@ returnjump_p_1 (rtx *loc, void *data ATTRIBUTE_UNUSED) switch (GET_CODE (x)) { case RETURN: + case SIMPLE_RETURN: case EH_RETURN: return true; |