> Bootstrapped in revision 191429 on i686-pc-linux-gnu. Bootstrap on x86 for a reorg.c patch doesn't say much though. :-)
> The arc.c context can be seen here: > > http://gcc.gnu.org/viewcvs/branches/arc-4_4-20090909-branch/gcc/config/arc/a > rc.c?content-type=text%2Fplain&view=co OK, modulo the following changes: -/* Follow any unconditional jump at LABEL; +/* Follow any unconditional jump at LABEL, for the purpose of redirecting JUMP; return the ultimate label reached by any such chain of jumps. Return a suitable return rtx if the chain ultimately leads to a return instruction. If LABEL is not followed by a jump, return LABEL. If the chain loops or we can't find end, return LABEL, - since that tells caller to avoid changing the insn. */ + since that tells caller to avoid changing the insn. + If the returned label is obtained by following a REG_CROSSING_JUMP + jump, set *cp to (one of) the note(s), otherwise set it to NULL_RTX. */ static rtx -follow_jumps (rtx label) +follow_jumps (rtx label, rtx jump, rtx *cp) You're using `cp' as a boolean named `crossing' throughout, so change follow_jumps accordingly: If the returned label is obtained by following a REG_CROSSING_JUMP jump, set *CROSSING to true, otherwise set it to false. */ static rtx follow_jumps (rtx label, rtx jump, bool *crossing) @@ -1350,6 +1350,16 @@ HOOK_VECTOR_END (vectorize) bool, (void), hook_bool_void_false) +/* True if FOLLOWER may be modified to follow FOLLOWEE. */ +DEFHOOK +(can_follow_jump, + "Return true if FOLLOWER may be modified to follow FOLLOWEE;\ + false, if it can't.\ + For example, on some targets, certain kinds of branches can't be made to\ + follow through a hot/cold partitioning.", + bool, (const_rtx follower, const_rtx followee), + hook_bool_const_rtx_const_rtx_true) Explicitly mention that both FOLLOWER and FOLLOWEE are JUMP_INSN instructions. -- Eric Botcazou