X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Fcfgcleanup.c;h=91412cf84d5810d5734768f88d88e62324fc614f;hb=5d4b6e9c06cae8242813f303f804f31222500c65;hp=22821f3a4e60a36acac1d4d986f62f2c6419aecb;hpb=7562ed74219c1160afbc9331b2512062af969495;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c index 22821f3a4e6..91412cf84d5 100644 --- a/gcc/cfgcleanup.c +++ b/gcc/cfgcleanup.c @@ -150,7 +150,13 @@ try_simplify_condjump (basic_block cbranch_block) /* If we are partitioning hot/cold basic blocks, we don't want to mess up unconditional or indirect jumps that cross between hot - and cold sections. */ + and cold sections. + + Basic block partitioning may result in some jumps that appear to + be optimizable (or blocks that appear to be mergeable), but which really + must be left untouched (they are required to make it safely across + partition boundaries). See the comments at the top of + bb-reorder.c:partition_hot_cold_basic_blocks for complete details. */ if (flag_reorder_blocks_and_partition && (BB_PARTITION (jump_block) != BB_PARTITION (jump_dest_block) @@ -419,8 +425,14 @@ try_forward_edges (int mode, basic_block b) /* If we are partitioning hot/cold basic blocks, we don't want to mess up unconditional or indirect jumps that cross between hot - and cold sections. */ + and cold sections. + Basic block partitioning may result in some jumps that appear to + be optimizable (or blocks that appear to be mergeable), but which really m + ust be left untouched (they are required to make it safely across + partition boundaries). See the comments at the top of + bb-reorder.c:partition_hot_cold_basic_blocks for complete details. */ + if (flag_reorder_blocks_and_partition && find_reg_note (BB_END (b), REG_CROSSING_JUMP, NULL_RTX)) return false; @@ -447,7 +459,14 @@ try_forward_edges (int mode, basic_block b) counter = 0; /* If we are partitioning hot/cold basic_blocks, we don't want to mess - up jumps that cross between hot/cold sections. */ + up jumps that cross between hot/cold sections. + + Basic block partitioning may result in some jumps that appear + to be optimizable (or blocks that appear to be mergeable), but which + really must be left untouched (they are required to make it safely + across partition boundaries). See the comments at the top of + bb-reorder.c:partition_hot_cold_basic_blocks for complete + details. */ if (flag_reorder_blocks_and_partition && first != EXIT_BLOCK_PTR @@ -670,8 +689,14 @@ merge_blocks_move_predecessor_nojumps (basic_block a, basic_block b) /* If we are partitioning hot/cold basic blocks, we don't want to mess up unconditional or indirect jumps that cross between hot - and cold sections. */ + and cold sections. + Basic block partitioning may result in some jumps that appear to + be optimizable (or blocks that appear to be mergeable), but which really + must be left untouched (they are required to make it safely across + partition boundaries). See the comments at the top of + bb-reorder.c:partition_hot_cold_basic_blocks for complete details. */ + if (flag_reorder_blocks_and_partition && (BB_PARTITION (a) != BB_PARTITION (b) || find_reg_note (BB_END (a), REG_CROSSING_JUMP, NULL_RTX))) @@ -722,8 +747,14 @@ merge_blocks_move_successor_nojumps (basic_block a, basic_block b) /* If we are partitioning hot/cold basic blocks, we don't want to mess up unconditional or indirect jumps that cross between hot - and cold sections. */ + and cold sections. + Basic block partitioning may result in some jumps that appear to + be optimizable (or blocks that appear to be mergeable), but which really + must be left untouched (they are required to make it safely across + partition boundaries). See the comments at the top of + bb-reorder.c:partition_hot_cold_basic_blocks for complete details. */ + if (flag_reorder_blocks_and_partition && (find_reg_note (BB_END (a), REG_CROSSING_JUMP, NULL_RTX) || BB_PARTITION (a) != BB_PARTITION (b))) @@ -787,8 +818,14 @@ merge_blocks_move (edge e, basic_block b, basic_block c, int mode) /* If we are partitioning hot/cold basic blocks, we don't want to mess up unconditional or indirect jumps that cross between hot - and cold sections. */ + and cold sections. + Basic block partitioning may result in some jumps that appear to + be optimizable (or blocks that appear to be mergeable), but which really + must be left untouched (they are required to make it safely across + partition boundaries). See the comments at the top of + bb-reorder.c:partition_hot_cold_basic_blocks for complete details. */ + if (flag_reorder_blocks_and_partition && (find_reg_note (BB_END (b), REG_CROSSING_JUMP, NULL_RTX) || find_reg_note (BB_END (c), REG_CROSSING_JUMP, NULL_RTX) @@ -1471,7 +1508,13 @@ try_crossjump_to_edge (int mode, edge e1, edge e2) newpos1 = newpos2 = NULL_RTX; /* If we have partitioned hot/cold basic blocks, it is a bad idea - to try this optimization. */ + to try this optimization. + + Basic block partitioning may result in some jumps that appear to + be optimizable (or blocks that appear to be mergeable), but which really + must be left untouched (they are required to make it safely across + partition boundaries). See the comments at the top of + bb-reorder.c:partition_hot_cold_basic_blocks for complete details. */ if (flag_reorder_blocks_and_partition && no_new_pseudos) return false; @@ -1670,8 +1713,14 @@ try_crossjump_bb (int mode, basic_block bb) /* If we are partitioning hot/cold basic blocks, we don't want to mess up unconditional or indirect jumps that cross between hot - and cold sections. */ + and cold sections. + Basic block partitioning may result in some jumps that appear to + be optimizable (or blocks that appear to be mergeable), but which really + must be left untouched (they are required to make it safely across + partition boundaries). See the comments at the top of + bb-reorder.c:partition_hot_cold_basic_blocks for complete details. */ + if (flag_reorder_blocks_and_partition && (BB_PARTITION (bb->pred->src) != BB_PARTITION (bb->pred->pred_next->src) || (bb->pred->flags & EDGE_CROSSING)))