Hello,
While testing the patch to enable shrink-wrapping on SH [PR54546], we
hit an the "error: EDGE_CROSSING missing across section boundary"
Indeed, shrink-wrap duplicates a bb with successors (containing the
return sequence) into an unlikely section. I first thought about setting
the EDGE_CROSSING on flag on those edge, but I feel that this block
duplication doesn't go in the direction of this optimization. Not
duplicating BBs between partitions solves the problem.
Does this restriction look right to you ? (regression tests are still
running on x86 and sh)
Thanks a lot for any comment.
Christian
Index: function.c
===================================================================
--- function.c (revision 191177)
+++ function.c (working copy)
@@ -6063,6 +6063,7 @@
FOR_EACH_EDGE (e, ei, tmp_bb->preds)
if (single_succ_p (e->src)
&& !bitmap_bit_p (&bb_on_list, e->src->index)
+ && (BB_PARTITION (e->src) == BB_PARTITION (e->dest))
&& can_duplicate_block_p (e->src))
{
edge pe;