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. */
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
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;
}
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. */
switch (GET_CODE (x))
{
case RETURN:
+ case SIMPLE_RETURN:
case EH_RETURN:
return true;
return;
case RETURN:
+ case SIMPLE_RETURN:
if (is_target)
{
gcc_assert (JUMP_LABEL (insn) == NULL || JUMP_LABEL (insn) == x);
int i;
const char *fmt;
- if ((code == LABEL_REF && XEXP (x, 0) == olabel)
+ if ((code == LABEL_REF && XEXP (x, 0) == olabel)
|| x == olabel)
{
x = redirect_target (nlabel);