+Thu Dec 20 16:58:46 CET 2001 Jan Hubicka <jh@suse.cz>
+
+ * cfgcleanup.c (flow_find_cross_jump): Avoid incrementing of ninsns
+ if one of block does not contain jump.
+ (outgoing_edge_math): Revert last path; require edges to be noncomplex
+ nonfake to match single exit edge; require conditional jumps to not
+ have side effect.
+
2001-12-20 Turly O'Connor <turly@apple.com>
* tm.texi (ASM_OUTPUT_OPERAND): Change documentation references to
|| (returnjump_p (i1) && !side_effects_p (PATTERN (i1))))
{
last1 = i1;
- /* Count everything except for unconditional jump as insn. */
- if (!simplejump_p (i1) && !returnjump_p (i1))
- ninsns++;
i1 = PREV_INSN (i1);
}
i2 = bb2->end;
|| (returnjump_p (i2) && !side_effects_p (PATTERN (i2))))
{
last2 = i2;
+ /* Count everything except for unconditional jump as insn. */
+ if (!simplejump_p (i2) && !returnjump_p (i2) && last1)
+ ninsns++;
i2 = PREV_INSN (i2);
}
/* If BB1 has only one successor, we may be looking at either an
unconditional jump, or a fake edge to exit. */
- if (bb1->succ && !bb1->succ->succ_next)
+ if (bb1->succ && !bb1->succ->succ_next
+ && !(bb1->succ->flags & (EDGE_COMPLEX | EDGE_FAKE)))
{
- if (! bb2->succ || bb2->succ->succ_next)
+ if (! bb2->succ || bb2->succ->succ_next
+ || (bb2->succ->flags & (EDGE_COMPLEX | EDGE_FAKE)))
return false;
- return insns_match_p (mode, bb1->end, bb2->end);
+ return true;
}
/* Match conditional jumps - this may get tricky when fallthru and branch
if (bb1->succ
&& bb1->succ->succ_next
&& !bb1->succ->succ_next->succ_next
- && any_condjump_p (bb1->end))
+ && any_condjump_p (bb1->end)
+ && onlyjump_p (bb1->end))
{
edge b1, f1, b2, f2;
bool reverse, match;
if (!bb2->succ
|| !bb2->succ->succ_next
|| bb1->succ->succ_next->succ_next
- || !any_condjump_p (bb2->end))
+ || !any_condjump_p (bb2->end)
+ || !onlyjump_p (bb1->end))
return false;
b1 = BRANCH_EDGE (bb1);