On Tue, Oct 30, 2012 at 8:49 AM, Matthew Gretton-Dann wrote: > On 30 October 2012 05:20, Teresa Johnson wrote: >> Index: cfgrtl.c >> =================================================================== >> --- cfgrtl.c (revision 192692) >> +++ cfgrtl.c (working copy) >> @@ -912,7 +912,8 @@ rtl_can_merge_blocks (basic_block a, basic_block b >> partition boundaries). See the comments at the top of >> bb-reorder.c:partition_hot_cold_basic_blocks for complete details. */ >> >> - if (BB_PARTITION (a) != BB_PARTITION (b)) >> + if (find_reg_note (BB_END (a), REG_CROSSING_JUMP, NULL_RTX) >> + || BB_PARTITION (a) != BB_PARTITION (b)) >> return false; >> >> /* Protect the loop latches. */ >> @@ -3978,7 +3979,8 @@ cfg_layout_can_merge_blocks_p (basic_block a, basi >> partition boundaries). See the comments at the top of >> bb-reorder.c:partition_hot_cold_basic_blocks for complete details. */ >> >> - if (BB_PARTITION (a) != BB_PARTITION (b)) >> + if (find_reg_note (BB_END (a), REG_CROSSING_JUMP, NULL_RTX) >> + || BB_PARTITION (a) != BB_PARTITION (b)) >> return false; >> >> /* Protect the loop latches. */ > > As this if() condition seems to be the canonical way to detect being > in a different partition should it be moved out into a query function, > and all of cfgrtl.c updated to use it?
Not just in cfgrtl.c but for example also in ifcvt.c (which currently only tests for notes, that's broken). Ciao! Steven
