http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58221

--- Comment #10 from tejohnson at gcc dot gnu.org ---
Author: tejohnson
Date: Sat Nov 23 04:30:07 2013
New Revision: 205298

URL: http://gcc.gnu.org/viewcvs?rev=205298&root=gcc&view=rev
Log:
Backport to google/4_8 new sanity checking and some dwarf emission fixes for
-freorder-blocks-and-partition from trunk (r201883, r201941, r202125).

------------------------------------------------------------------------
r201883 | tejohnson | 2013-08-20 06:29:53 -0700 (Tue, 20 Aug 2013) | 8 lines
Changed paths:
   M /trunk/gcc/ChangeLog
   M /trunk/gcc/final.c
   M /trunk/gcc/testsuite/ChangeLog
   A /trunk/gcc/testsuite/g++.dg/tree-prof/pr57451.C

2013-08-20  Teresa Johnson  <tejohn...@google.com>

    PR rtl-optimizations/57451
    * final.c (reemit_insn_block_notes): Prevent lexical blocks
    from crossing split section boundaries.

    * testsuite/g++.dg/tree-prof/pr57451.C: New test.

------------------------------------------------------------------------
------------------------------------------------------------------------
r201941 | tejohnson | 2013-08-23 07:31:06 -0700 (Fri, 23 Aug 2013) | 7 lines
Changed paths:
   M /trunk/gcc/ChangeLog
   M /trunk/gcc/final.c

2013-08-23  Kaz Kojima  <kkoj...@gcc.gnu.org>

        PR rtl-optimization/58220
        PR regression/58221
    * final.c (reemit_insn_block_notes): Use NEXT_INSN to
        handle SEQUENCE insns properly.

------------------------------------------------------------------------
------------------------------------------------------------------------
r202125 | tejohnson | 2013-08-30 18:43:33 -0700 (Fri, 30 Aug 2013) | 30 lines
Changed paths:
   M /trunk/gcc/ChangeLog
   M /trunk/gcc/basic-block.h
   M /trunk/gcc/bb-reorder.c
   M /trunk/gcc/cfg.c
   M /trunk/gcc/cfgcleanup.c
   M /trunk/gcc/cfgrtl.c
   M /trunk/gcc/predict.c

This patch sanitizes the partitioning to address issues such as edge
weight insanities that sometimes occur due to upstream optimizations,
and ensures that hot blocks are not dominated by cold blocks. This
needs to be resanitized after certain cfg optimizations that may
cause hot blocks previously reached via both hot and cold paths to
only be reached by cold paths.

The verification code in sanitize_dominator_hotness was contributed by
Steven Bosscher.

2013-08-29  Teresa Johnson  <tejohn...@google.com>
            Steven Bosscher  <ste...@gcc.gnu.org>

    * cfgrtl.c (fixup_new_cold_bb): New routine.
    (commit_edge_insertions): Invoke fixup_partitions.
    (find_partition_fixes): New routine.
    (fixup_partitions): Ditto.
    (verify_hot_cold_block_grouping): Update comments.
    (rtl_verify_edges): Invoke find_partition_fixes.
    (rtl_verify_bb_pointers): Update comments.
    (rtl_verify_bb_layout): Ditto.
    * basic-block.h (probably_never_executed_edge_p): Declare.
        (fixup_partitions): Ditto.
    * cfgcleanup.c (try_optimize_cfg): Invoke fixup_partitions.
    * bb-reorder.c (sanitize_hot_paths): New function.
        (find_rarely_executed_basic_blocks_and_crossing_edges): Invoke
        sanitize_hot_paths.
    * predict.c (probably_never_executed_edge_p): New routine.
    * cfg.c (check_bb_profile): Add partition insanity warnings.

------------------------------------------------------------------------

Added:
    branches/google/gcc-4_8/gcc/testsuite/g++.dg/tree-prof/pr57451.C
Modified:
    branches/google/gcc-4_8/gcc/basic-block.h
    branches/google/gcc-4_8/gcc/bb-reorder.c
    branches/google/gcc-4_8/gcc/cfg.c
    branches/google/gcc-4_8/gcc/cfgcleanup.c
    branches/google/gcc-4_8/gcc/cfgrtl.c
    branches/google/gcc-4_8/gcc/final.c
    branches/google/gcc-4_8/gcc/predict.c

Reply via email to