[Bug gcov-profile/59542] [4.9 Regression] ICE: verify_flow_info failed during Firefox build with 'gold'

2013-12-19 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59542

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

   Priority|P3  |P1
   Target Milestone|--- |4.9.0


[Bug gcov-profile/59542] [4.9 Regression] ICE: verify_flow_info failed during Firefox build with 'gold'

2013-12-19 Thread tejohnson at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59542

--- Comment #4 from tejohnson at gcc dot gnu.org ---
Author: tejohnson
Date: Thu Dec 19 22:11:25 2013
New Revision: 206135

URL: http://gcc.gnu.org/viewcvs?rev=206135root=gccview=rev
Log:
2013-12-19  Teresa Johnson  tejohn...@google.com

PR gcov-profile/59542
* bb-reorder.c (duplicate_computed_gotos): Invoke fixup_partitions
if we have made any changes.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/bb-reorder.c


[Bug gcov-profile/59542] [4.9 Regression] ICE: verify_flow_info failed during Firefox build with 'gold'

2013-12-19 Thread trippels at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59542

Markus Trippelsdorf trippels at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

--- Comment #5 from Markus Trippelsdorf trippels at gcc dot gnu.org ---
Fixed. Thank you.


[Bug gcov-profile/59542] [4.9 Regression] ICE: verify_flow_info failed during Firefox build with 'gold'

2013-12-18 Thread trippels at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59542

--- Comment #1 from Markus Trippelsdorf trippels at gcc dot gnu.org ---
https://sourceware.org/bugzilla/show_bug.cgi?id=12322
is still open.


[Bug gcov-profile/59542] [4.9 Regression] ICE: verify_flow_info failed during Firefox build with 'gold'

2013-12-18 Thread tejohnson at google dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59542

--- Comment #2 from Teresa Johnson tejohnson at google dot com ---
Thanks, I am able to reproduce now with the gold linker option.
Investigating...
Teresa

On Wed, Dec 18, 2013 at 12:52 AM, trippels at gcc dot gnu.org
gcc-bugzi...@gcc.gnu.org wrote:
 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59542

 Markus Trippelsdorf trippels at gcc dot gnu.org changed:

What|Removed |Added
 
  CC||tejohnson at google dot com

 --
 You are receiving this mail because:
 You are on the CC list for the bug.


[Bug gcov-profile/59542] [4.9 Regression] ICE: verify_flow_info failed during Firefox build with 'gold'

2013-12-18 Thread tejohnson at google dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59542

--- Comment #3 from Teresa Johnson tejohnson at google dot com ---
On Wed, Dec 18, 2013 at 6:15 AM, Teresa Johnson tejohn...@google.com wrote:
 Thanks, I am able to reproduce now with the gold linker option. 
 Investigating...
 Teresa

 On Wed, Dec 18, 2013 at 12:52 AM, trippels at gcc dot gnu.org
 gcc-bugzi...@gcc.gnu.org wrote:
 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59542

 Markus Trippelsdorf trippels at gcc dot gnu.org changed:

What|Removed |Added
 
  CC||tejohnson at google dot com

 --
 You are receiving this mail because:
 You are on the CC list for the bug.

Here is the patch that fixes it, and I am currently regression testing:

Teresa

2013-12-18  Teresa Johnson  tejohn...@google.com

* bb-reorder.c (duplicate_computed_gotos): Invoke fixup_partitions
if we have made any changes.

Index: bb-reorder.c
===
--- bb-reorder.c(revision 206100)
+++ bb-reorder.c(working copy)
@@ -2390,6 +2390,7 @@ duplicate_computed_gotos (void)
   basic_block bb, new_bb;
   bitmap candidates;
   int max_size;
+  bool changed = false;

   if (n_basic_blocks_for_fn (cfun) = NUM_FIXED_BLOCKS + 1)
 return 0;
@@ -2486,9 +2487,17 @@ duplicate_computed_gotos (void)
   new_bb-aux = bb-aux;
   bb-aux = new_bb;
   new_bb-flags |= BB_VISITED;
+  changed = true;
 }

 done:
+  /* Duplicating blocks above will redirect edges and may cause hot blocks
+ previously reached by both hot and cold blocks to become dominated only
+ by cold blocks. This will cause the verification when leaving cfg layout
+ mode to fail, and lead to now cold code in the hot section. Invoke
+ fixup_partitions to address these problems.  */
+  if (changed)
+fixup_partitions ();
   cfg_layout_finalize ();

   BITMAP_FREE (candidates);





 --
 Teresa Johnson | Software Engineer | tejohn...@google.com | 408-460-2413