On 05/14/2013 03:42 PM, Teresa Johnson wrote:
Patch 1 of 3 split out from the patch I sent last week that fixes problems with
-freorder-blocks-and-partition, with some additional verification improvements.

See http://gcc.gnu.org/ml/gcc-patches/2013-05/threads.html#00388 for context.

This patch adds a flag to the rtl_data structure to indicate whether any
partitioning was actually performed, so that optimizations which were
conservatively disabled whenever the flag_reorder_blocks_and_partition
is enabled (e.g. try_crossjump_to_edge, part of connect_traces) can be less
conservative for functions where no partitions were formed (e.g. they are
completely hot).

It also adds another flag to the rtl_data structure to indicate whether bb
reordering is complete, and if so enables sanity checking that there is
at most one transition in the layout order between hot and cold sections.
This was moved from verify_hot_cold_block_grouping, which was only called
once at the end of the bbro pass and is now removed.

Tested on x86_64-unknown-linux-gnu with bootstrap and profiledbootstrap
builds and regression testing. Additionally built/ran cpu2006 with profile
feedback and -freorder-blocks-and-partition enabled (which currently has
build failures from splitting until my follow-on patches are in, but confirmed
no new failures due to this patch), as well as gcc regression testing with
-freorder-blocks-and-partition enabled.

Ok for trunk?

Thanks,
Teresa

2013-05-14  Teresa Johnson  <tejohn...@google.com>

        * function.h (has_bb_partition): New rtl_data flag.
         (bb_reorder_complete): Ditto.
         * cfgrtl.c (rtl_verify_flow_info_1): After bbro, verify
         that text sections switch at most once in layout order.
        * bb-reorder.c (connect_traces): Check for has_bb_partition
         instead of flag_reorder_blocks_and_partition.
        (verify_hot_cold_block_grouping): Remove.
        (reorder_basic_blocks): Remove call to deleted
         verify_hot_cold_block_grouping, and set bb_reorder_complete.
        (partition_hot_cold_basic_blocks): Set has_bb_partition.
        * cfgcleanup.c (try_crossjump_to_edge): Check for has_bb_partition
         instead of flag_reorder_blocks_and_partition.
This is good.  Please install on the trunk.

jeff

Reply via email to