[Bug bootstrap/57154] [4.9 Regression] Bootstrap broken for powerpc64-unknown-linux-gnu

2013-05-07 Thread ro at gcc dot gnu.org


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



Rainer Orth  changed:



   What|Removed |Added



 CC||ro at gcc dot gnu.org



--- Comment #15 from Rainer Orth  2013-05-07 10:10:50 
UTC ---

*** Bug 57187 has been marked as a duplicate of this bug. ***


[Bug bootstrap/57154] [4.9 Regression] Bootstrap broken for powerpc64-unknown-linux-gnu

2013-05-03 Thread wschmidt at gcc dot gnu.org


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



Bill Schmidt  changed:



   What|Removed |Added



 Status|NEW |RESOLVED

 Resolution||FIXED



--- Comment #14 from Bill Schmidt  2013-05-03 
20:21:26 UTC ---

Fixed by:



2013-05-03  Teresa Johnson  



PR bootstrap/57154

* sched-rgn.c (compute_dom_prob_ps): Ensure accumulated probabilities

do not exceed REG_BR_PROB_BASE.



Thanks again.


[Bug bootstrap/57154] [4.9 Regression] Bootstrap broken for powerpc64-unknown-linux-gnu

2013-05-03 Thread wschmidt at gcc dot gnu.org


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



--- Comment #13 from Bill Schmidt  2013-05-03 
17:32:05 UTC ---

Teresa, thanks for the prompt fix!


[Bug bootstrap/57154] [4.9 Regression] Bootstrap broken for powerpc64-unknown-linux-gnu

2013-05-03 Thread tejohnson at google dot com


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



--- Comment #12 from Teresa Johnson  2013-05-03 
16:24:33 UTC ---

My powerpc bootstrap completed successfully. Sent patch out for review.

Teresa



On Fri, May 3, 2013 at 9:03 AM, sje at gcc dot gnu.org

 wrote:

>

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

>

> --- Comment #11 from Steve Ellcey  2013-05-03 
> 16:03:48 UTC ---

> My mips build seems to be working with the patch.  It has gotten past the 
> point

> where it died last night but the complete bootstrap isn't finished yet.

>

> --

> Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email

> --- You are receiving this mail because: ---

> You are on the CC list for the bug.


[Bug bootstrap/57154] [4.9 Regression] Bootstrap broken for powerpc64-unknown-linux-gnu

2013-05-03 Thread sje at gcc dot gnu.org


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



--- Comment #11 from Steve Ellcey  2013-05-03 16:03:48 
UTC ---

My mips build seems to be working with the patch.  It has gotten past the point

where it died last night but the complete bootstrap isn't finished yet.


[Bug bootstrap/57154] [4.9 Regression] Bootstrap broken for powerpc64-unknown-linux-gnu

2013-05-03 Thread tejohnson at google dot com


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



--- Comment #10 from Teresa Johnson  2013-05-03 
15:41:14 UTC ---

Hi Steve!

Can you confirm whether the patch I just sent also fixes the mips failure?



Thanks,

Teresa



On Fri, May 3, 2013 at 8:40 AM, sje at gcc dot gnu.org

 wrote:

>

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

>

> Steve Ellcey  changed:

>

>What|Removed |Added

> 

>  CC||sje at gcc dot gnu.org

>

> --- Comment #8 from Steve Ellcey  2013-05-03 15:40:07 
> UTC ---

> I am seeing this on mips-mti-linux-gnu as well.

>

> --

> Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email

> --- You are receiving this mail because: ---

> You are on the CC list for the bug.


[Bug bootstrap/57154] [4.9 Regression] Bootstrap broken for powerpc64-unknown-linux-gnu

2013-05-03 Thread tejohnson at google dot com


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



--- Comment #9 from Teresa Johnson  2013-05-03 
15:40:16 UTC ---

The problem is that with the rounding divide, an odd numbered

probability being propagated along a 50-50 branch will be rounded up

along both edges, resulting in 1 higher probability being propagated

along the graph than with the earlier truncating divide. The algorithm

in sched-rgn.c is propagating the probabilities along the whole cfg,

and when these edges merge, we have 10001 as the accumulated

probability, which is higher than REG_BR_PROB_BASE.



The following patch fixes this for the attached test case:



Index: sched-rgn.c

===

--- sched-rgn.c (revision 198581)

+++ sched-rgn.c (working copy)

@@ -1442,6 +1442,8 @@ compute_dom_prob_ps (int bb)

  bitmap_set_bit (pot_split[bb], EDGE_TO_BIT (out_edge));



   prob[bb] += combine_probabilities (prob[pred_bb], in_edge->probability);

+  if (prob[bb] > REG_BR_PROB_BASE)

+ prob[bb] = REG_BR_PROB_BASE;

 }



   bitmap_set_bit (dom[bb], bb);



I am now testing with the full powerpc bootstrap build. This was the

only additional use of combine_probabilities in my patch, so there

shouldn't be any other issues like this. Will send the patch for

review once the bootstrap completes.



Teresa



On Fri, May 3, 2013 at 8:10 AM, tejohnson at google dot com

 wrote:

>

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

>

> --- Comment #7 from Teresa Johnson  2013-05-03 
> 15:10:50 UTC ---

> Thanks for the test case - reproduced with my stage1 compiler on gcc110. 
> Teresa

>

> On Fri, May 3, 2013 at 8:02 AM, dje at gcc dot gnu.org

>  wrote:

>>

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

>>

>> --- Comment #6 from David Edelsohn  2013-05-03 
>> 15:02:18 UTC ---

>> Created attachment 30022

>>   --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30022

>> Testcase

>>

>> Testcase from Anton Blanchard transferred from PR 57161

>>

>> # gcc -O2 -c foo.c

>> foo.c: In function 'testcase':

>> foo.c:40:1: internal compiler error: in check_probability, at 
>> basic-block.h:941

>>  }

>>  ^

>> 0x105bb57b check_probability

>> ../../gcc/gcc/basic-block.h:941

>> 0x105bb57b check_probability

>> ../../gcc/gcc/sched-rgn.c:3247

>> 0x105bb57b combine_probabilities

>> ../../gcc/gcc/basic-block.h:950

>> 0x105bb57b compute_dom_prob_ps

>> ../../gcc/gcc/sched-rgn.c:1444

>> 0x105bb57b sched_rgn_local_init(int)

>> ../../gcc/gcc/sched-rgn.c:3291

>> 0x105bd393 schedule_region

>> ../../gcc/gcc/sched-rgn.c:2984

>> 0x105bd393 schedule_insns

>> ../../gcc/gcc/sched-rgn.c:3384

>> 0x105bd393 schedule_insns()

>> ../../gcc/gcc/sched-rgn.c:3363

>> 0x105bdbb3 rest_of_handle_sched

>> ../../gcc/gcc/sched-rgn.c:3577

>>

>> --

>> Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email

>> --- You are receiving this mail because: ---

>> You are on the CC list for the bug.

>

> --

> Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email

> --- You are receiving this mail because: ---

> You are on the CC list for the bug.


[Bug bootstrap/57154] [4.9 Regression] Bootstrap broken for powerpc64-unknown-linux-gnu

2013-05-03 Thread sje at gcc dot gnu.org


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



Steve Ellcey  changed:



   What|Removed |Added



 CC||sje at gcc dot gnu.org



--- Comment #8 from Steve Ellcey  2013-05-03 15:40:07 
UTC ---

I am seeing this on mips-mti-linux-gnu as well.


[Bug bootstrap/57154] [4.9 Regression] Bootstrap broken for powerpc64-unknown-linux-gnu

2013-05-03 Thread tejohnson at google dot com


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



--- Comment #7 from Teresa Johnson  2013-05-03 
15:10:50 UTC ---

Thanks for the test case - reproduced with my stage1 compiler on gcc110. Teresa



On Fri, May 3, 2013 at 8:02 AM, dje at gcc dot gnu.org

 wrote:

>

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

>

> --- Comment #6 from David Edelsohn  2013-05-03 
> 15:02:18 UTC ---

> Created attachment 30022

>   --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30022

> Testcase

>

> Testcase from Anton Blanchard transferred from PR 57161

>

> # gcc -O2 -c foo.c

> foo.c: In function 'testcase':

> foo.c:40:1: internal compiler error: in check_probability, at 
> basic-block.h:941

>  }

>  ^

> 0x105bb57b check_probability

> ../../gcc/gcc/basic-block.h:941

> 0x105bb57b check_probability

> ../../gcc/gcc/sched-rgn.c:3247

> 0x105bb57b combine_probabilities

> ../../gcc/gcc/basic-block.h:950

> 0x105bb57b compute_dom_prob_ps

> ../../gcc/gcc/sched-rgn.c:1444

> 0x105bb57b sched_rgn_local_init(int)

> ../../gcc/gcc/sched-rgn.c:3291

> 0x105bd393 schedule_region

> ../../gcc/gcc/sched-rgn.c:2984

> 0x105bd393 schedule_insns

> ../../gcc/gcc/sched-rgn.c:3384

> 0x105bd393 schedule_insns()

> ../../gcc/gcc/sched-rgn.c:3363

> 0x105bdbb3 rest_of_handle_sched

> ../../gcc/gcc/sched-rgn.c:3577

>

> --

> Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email

> --- You are receiving this mail because: ---

> You are on the CC list for the bug.


[Bug bootstrap/57154] [4.9 Regression] Bootstrap broken for powerpc64-unknown-linux-gnu

2013-05-03 Thread dje at gcc dot gnu.org


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



--- Comment #6 from David Edelsohn  2013-05-03 15:02:18 
UTC ---

Created attachment 30022

  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30022

Testcase



Testcase from Anton Blanchard transferred from PR 57161



# gcc -O2 -c foo.c

foo.c: In function 'testcase':

foo.c:40:1: internal compiler error: in check_probability, at basic-block.h:941

 }

 ^

0x105bb57b check_probability

../../gcc/gcc/basic-block.h:941

0x105bb57b check_probability

../../gcc/gcc/sched-rgn.c:3247

0x105bb57b combine_probabilities

../../gcc/gcc/basic-block.h:950

0x105bb57b compute_dom_prob_ps

../../gcc/gcc/sched-rgn.c:1444

0x105bb57b sched_rgn_local_init(int)

../../gcc/gcc/sched-rgn.c:3291

0x105bd393 schedule_region

../../gcc/gcc/sched-rgn.c:2984

0x105bd393 schedule_insns

../../gcc/gcc/sched-rgn.c:3384

0x105bd393 schedule_insns()

../../gcc/gcc/sched-rgn.c:3363

0x105bdbb3 rest_of_handle_sched

../../gcc/gcc/sched-rgn.c:3577


[Bug bootstrap/57154] [4.9 Regression] Bootstrap broken for powerpc64-unknown-linux-gnu

2013-05-03 Thread tejohnson at google dot com


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



--- Comment #5 from Teresa Johnson  2013-05-03 
15:01:51 UTC ---

Couldn't reproduce on x86_64, so I am on gcc110 trying to get a

bootstrap compiler build going to reproduce. Also see the dup with

testcase (again doesn't reproduce on x86_64, so I will try this on

gcc110 as soon as I get the compiler built).



Thanks,

Teresa



On Fri, May 3, 2013 at 4:45 AM, wschmidt at gcc dot gnu.org

 wrote:

>

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

>

> --- Comment #2 from Bill Schmidt  2013-05-03 
> 11:45:06 UTC ---

> There is a powerpc64 pool machine available.  I believe it's gcc110.

>

> --

> Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email

> --- You are receiving this mail because: ---

> You are on the CC list for the bug.


[Bug bootstrap/57154] [4.9 Regression] Bootstrap broken for powerpc64-unknown-linux-gnu

2013-05-03 Thread dje at gcc dot gnu.org


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



David Edelsohn  changed:



   What|Removed |Added



   Priority|P3  |P1

 Status|UNCONFIRMED |NEW

   Last reconfirmed||2013-05-03

 CC||dje at gcc dot gnu.org

 Ever Confirmed|0   |1



--- Comment #4 from David Edelsohn  2013-05-03 14:58:24 
UTC ---

Confirmed.


[Bug bootstrap/57154] [4.9 Regression] Bootstrap broken for powerpc64-unknown-linux-gnu

2013-05-03 Thread dje at gcc dot gnu.org


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



David Edelsohn  changed:



   What|Removed |Added



 CC||anton at samba dot org



--- Comment #3 from David Edelsohn  2013-05-03 14:53:51 
UTC ---

*** Bug 57161 has been marked as a duplicate of this bug. ***


[Bug bootstrap/57154] [4.9 Regression] Bootstrap broken for powerpc64-unknown-linux-gnu

2013-05-03 Thread wschmidt at gcc dot gnu.org


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



--- Comment #2 from Bill Schmidt  2013-05-03 
11:45:06 UTC ---

There is a powerpc64 pool machine available.  I believe it's gcc110.


[Bug bootstrap/57154] [4.9 Regression] Bootstrap broken for powerpc64-unknown-linux-gnu

2013-05-03 Thread rguenth at gcc dot gnu.org


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



Richard Biener  changed:



   What|Removed |Added



   Target Milestone|--- |4.9.0


[Bug bootstrap/57154] [4.9 Regression] Bootstrap broken for powerpc64-unknown-linux-gnu

2013-05-02 Thread tejohnson at google dot com

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

--- Comment #1 from Teresa Johnson  2013-05-03 
05:13:07 UTC ---
Investigating. I am not sure I have access to a powerpc64, but I am
trying to trigger it on x86_64.

Teresa

On Thu, May 2, 2013 at 9:16 PM, wschmidt at gcc dot gnu.org
 wrote:
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57154
>
>  Bug #: 57154
>Summary: [4.9 Regression] Bootstrap broken for
> powerpc64-unknown-linux-gnu
> Classification: Unclassified
>Product: gcc
>Version: 4.9.0
> Status: UNCONFIRMED
>   Keywords: build
>   Severity: normal
>   Priority: P3
>  Component: bootstrap
> AssignedTo: unassig...@gcc.gnu.org
> ReportedBy: wschm...@gcc.gnu.org
> CC: berg...@gcc.gnu.org, meiss...@gcc.gnu.org,
> pthau...@gcc.gnu.org, tejohn...@gcc.gnu.org
>   Host: powerpc*-*-*
> Target: powerpc*-*-*
>  Build: powerpc*-*-*
>
>
> Bootstrap has been broken for PowerPC Linux since r198532:
>
> 2013-05-02  Teresa Johnson  
>
> * loop-unswitch.c (unswitch_loop): Use helper routines with rounding
> divides.
> * cfg.c (update_bb_profile_for_threading): Ditto.
> * tree-inline.c (copy_bb): Ditto.
> (copy_edges_for_bb): Ditto.
> (initialize_cfun): Ditto.
> (copy_cfg_body): Ditto.
> (expand_call_inline): Ditto.
> * ipa-inline-analysis.c (estimate_edge_size_and_time): Ditto.
> (estimate_node_size_and_time): Ditto.
> (inline_merge_summary): Ditto.
> * cgraphclones.c (cgraph_clone_edge): Ditto.
> (cgraph_clone_node): Ditto.
> * sched-rgn.c (compute_dom_prob_ps): Ditto.
> (compute_trg_info): Ditto.
>
> Configuration information:
>
>   $ /home/wschmidt/gcc/gcc-mainline-base/configure --target=powerpc64-linux
> --host=powerpc64-linux --build=powerpc64-linux --enable-threads=posix
> --enable-shared --enable-__cxa_atexit
> --enable-languages=c,c++,fortran,objc,obj-c++ --enable-secureplt
> --enable-checking=yes --with-gmp=/home/wschmidt/gcc-libs/gcc-host-libs
> --with-mpfr=/home/wschmidt/gcc-libs/gcc-host-libs
> --with-mpc=/home/wschmidt/gcc-libs/gcc-host-libs-ppc64
> --with-libelf=/home/wschmidt/gcc-libs/gcc-host-libs
> --with-ppl=/home/wschmidt/gcc-libs/gcc-host-libs
> --with-cloog=/home/wschmidt/gcc-libs/gcc-host-libs --with-long-double-128
> --enable-decimal-float --disable-alsa
> --prefix=/home/wschmidt/gcc/install/gcc-mainline-base --enable-lto
> --with-plugin-ld=/home/meissner/tools-binutils/ppc64/bin/ld
> --with-host-libstdcxx=-Wl,-Bstatic,-L/home/wschmidt/gcc-libs/gcc-host-libs/lib,-lstdc++,-Bdynamic,-lm
>
> Failure details during stage2:
>
> /home/wschmidt/gcc/gcc-mainline-base/gcc/cse.c: In function ‘void
> remove_invalid_refs(unsigned int)’:
> /home/wschmidt/gcc/gcc-mainline-base/gcc/cse.c:2005:1: internal compiler 
> error:
> in check_probability, at basic-block.h:941
>  }
>  ^
> 0x10a9351b check_probability
> /home/wschmidt/gcc/gcc-mainline-base/gcc/basic-block.h:941
> 0x10a93573 combine_probabilities
> /home/wschmidt/gcc/gcc-mainline-base/gcc/basic-block.h:950
> 0x10a9abcb compute_dom_prob_ps
> /home/wschmidt/gcc/gcc-mainline-base/gcc/sched-rgn.c:1444
> 0x10a9b17b sched_rgn_local_init(int)
> /home/wschmidt/gcc/gcc-mainline-base/gcc/sched-rgn.c:3291
> 0x10a9b313 schedule_region
> /home/wschmidt/gcc/gcc-mainline-base/gcc/sched-rgn.c:2984
> 0x10a9f05f schedule_insns()
> /home/wschmidt/gcc/gcc-mainline-base/gcc/sched-rgn.c:3384
> 0x10a9f1fb rest_of_handle_sched
> /home/wschmidt/gcc/gcc-mainline-base/gcc/sched-rgn.c:3577
> Please submit a full bug report,
> with preprocessed source if appropriate.
> Please include the complete backtrace with any bug report.
> See  for instructions.
> make[3]: *** [cse.o] Error 1
> make[3]: *** Waiting for unfinished jobs
> /home/wschmidt/gcc/gcc-mainline-base/gcc/emit-rtl.c: In function ‘rtx_def*
> emit_pattern_after_setloc(rtx, rtx, int, rtx_def* (*)(rtx))’:
> /home/wschmidt/gcc/gcc-mainline-base/gcc/emit-rtl.c:4542:1: internal compiler
> error: in check_probability, at basic-block.h:941
>  }
>  ^
> 0x10a9351b check_probability
> /home/wschmidt/gcc/gcc-mainline-base/gcc/basic-block.h:941
> 0x10a93573 combine_probabilities
> /home/wschmidt/gcc/gcc-mainline-base/gcc/basic-block.h:950
> 0x10a9abcb compute_dom_prob_ps
> /home/wschmidt/gcc/gcc-mainline-base/gcc/sched-rgn.c:1444
> 0x10a9b17b sched_rgn_local_init(int)
> /home/wschmidt/gcc/gcc-mainline-base/gcc/sched-rgn.c:3291
> 0x10a9b313 schedule_region
> /home/wschmidt/gcc/gcc-mainline-base/gcc/sched-rgn.c:2984
> 0x10a9f05f schedule_insns()
> /home/wschmidt/gcc/gcc-mainline-base/gcc/sched-rgn.c:3384
> 0x10a9f1fb rest_of_handle_sched
> /home/wschmidt/gcc/gcc-mainline-base/gcc/sched-rgn.c:3577
> Please submit a full bug report,
> with preprocessed source if appropriate.
> Please i