[Bug rtl-optimization/58960] [4.9 regression] ICE in bmp_iter_set_init

2014-02-17 Thread abel at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58960

--- Comment #9 from Andrey Belevantsev abel at gcc dot gnu.org ---
Author: abel
Date: Tue Feb 18 05:41:29 2014
New Revision: 207832

URL: http://gcc.gnu.org/viewcvs?rev=207832root=gccview=rev
Log:
PR rtl-optimization/58960
* haifa-sched.c (alloc_global_sched_pressure_data): New,
factored out from ...
(sched_init): ... here.
(free_global_sched_pressure_data): New, factored out from ...
(sched_finish): ... here.
* sched-int.h (free_global_sched_pressure_data): Declare.
* sched-rgn.c (nr_regions_initial): New static global.
(haifa_find_rgns): Initialize it.
(schedule_region): Disable sched-pressure for the newly
generated regions.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/haifa-sched.c
trunk/gcc/sched-int.h
trunk/gcc/sched-rgn.c


[Bug rtl-optimization/58960] [4.9 regression] ICE in bmp_iter_set_init

2014-02-17 Thread abel at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58960

Andrey Belevantsev abel at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #10 from Andrey Belevantsev abel at gcc dot gnu.org ---
Fixed on trunk.


[Bug rtl-optimization/58960] [4.9 regression] ICE in bmp_iter_set_init

2014-01-23 Thread sch...@linux-m68k.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58960

--- Comment #7 from Andreas Schwab sch...@linux-m68k.org ---
Testresults: http://gcc.gnu.org/ml/gcc-testresults/2014-01/msg01781.html

No regressions, and g++.dg/opt/pr48272.C now passes.


[Bug rtl-optimization/58960] [4.9 regression] ICE in bmp_iter_set_init

2014-01-23 Thread abel at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58960

--- Comment #8 from Andrey Belevantsev abel at gcc dot gnu.org ---
(In reply to Andreas Schwab from comment #7)
 Testresults: http://gcc.gnu.org/ml/gcc-testresults/2014-01/msg01781.html
 
 No regressions, and g++.dg/opt/pr48272.C now passes.

Thank you, my own run is still working.  If that would be fine and Vlad would
agree with this option, I will install the patch.


[Bug rtl-optimization/58960] [4.9 regression] ICE in bmp_iter_set_init

2014-01-22 Thread abel at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58960

Andrey Belevantsev abel at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2014-01-22
   Assignee|unassigned at gcc dot gnu.org  |abel at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #5 from Andrey Belevantsev abel at gcc dot gnu.org ---
Created attachment 31915
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=31915action=edit
proposed patch


[Bug rtl-optimization/58960] [4.9 regression] ICE in bmp_iter_set_init

2014-01-22 Thread abel at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58960

Andrey Belevantsev abel at gcc dot gnu.org changed:

   What|Removed |Added

 CC||vmakarov at gcc dot gnu.org

--- Comment #6 from Andrey Belevantsev abel at gcc dot gnu.org ---
Well, I guess one is responsible for what one has tamed, so reproduced now.

The issue is actually simple -- we add new blocks when scheduling (they are
recovery blocks for speculation insns) and for them we do not calculate
DF_LIVE_IN bitmaps so we segfault when we try to read those bitmaps in the
sched pressure info initialization code.  I see the following possible fixes:

1) calculate liveness for the new blocks via the DF interface.  Now it doesn't
look like anyone is using the partial analysis interface via df_set_blocks
nowadays, and the new blocks do not form a loop so df_analyze_loop Richard has
added would not work.  What can be done is gather the new blocks in a separate
bitmap and add their preds/succs which should hopefully have the right liveness
info, so partial df_analyze on those can do the trick.

2) manually calculate liveness for the new blocks.  Again DF doesn't offer much
for this, you'd need to df_grow_block_info for df_live and then try deriving
the liveness information from the original block's successor.  This will need
some manual propagation through the new block as we do in the selective
scheduler.

3) decide that the recovery code is supposed to be cold enough so we don't care
about applying register pressure sensitive code to it, thus reset
sched_pressure to SCHED_PRESSURE_NONE for all newly created regions.  The patch
from the previous comment does just that; we only need to free the
sched-pressure data immediately at this point as we later fail to do that and
ICE in IRA later.  I had to factorize the finalization code in a separate
function for that.  
The patch supports only blocks ending up in the new region, not the same
region, but it looks like the current code always puts recovery blocks in the
new region.

Vlad, what's your opinion on this?


[Bug rtl-optimization/58960] [4.9 regression] ICE in bmp_iter_set_init

2014-01-21 Thread abel at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58960

Andrey Belevantsev abel at gcc dot gnu.org changed:

   What|Removed |Added

 CC||abel at gcc dot gnu.org

--- Comment #3 from Andrey Belevantsev abel at gcc dot gnu.org ---
I've tried to reproduce this with a simple cross (no includes, just ./gcc/xg++
-Bgcc/ -nostdinc++ -nostdinc++ -std=gnu++11 -O3 -ftracer -fsched-pressure -S
~/develop/trunk/gcc/testsuite/g++.dg/opt/pr48272.C -S); this doesn't fail but
instead valgrind spills out a number of ira-related warnings of uninitialized
values -- does this still fails for you?  Do I need to try the native build?


[Bug rtl-optimization/58960] [4.9 regression] ICE in bmp_iter_set_init

2014-01-21 Thread sch...@linux-m68k.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58960

--- Comment #4 from Andreas Schwab sch...@linux-m68k.org ---
Still fails as of r206866.

http://gcc.gnu.org/ml/gcc-testresults/2014-01/msg01656.html


[Bug rtl-optimization/58960] [4.9 regression] ICE in bmp_iter_set_init

2013-12-04 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58960

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek jakub at gcc dot gnu.org ---
ia64-*-* is neither primary nor secondary target, why is this P1?


[Bug rtl-optimization/58960] [4.9 regression] ICE in bmp_iter_set_init

2013-12-04 Thread mpolacek at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58960

Marek Polacek mpolacek at gcc dot gnu.org changed:

   What|Removed |Added

   Priority|P1  |P2
 CC||mpolacek at gcc dot gnu.org

--- Comment #2 from Marek Polacek mpolacek at gcc dot gnu.org ---
I also wondered why is this P1.  Decreasing to P2...


[Bug rtl-optimization/58960] [4.9 regression] ICE in bmp_iter_set_init

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

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

   Priority|P3  |P1
 CC||pinskia at gcc dot gnu.org


[Bug rtl-optimization/58960] [4.9 regression] ICE in bmp_iter_set_init

2013-11-04 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58960

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

   Target Milestone|--- |4.9.0