[Bug rtl-optimization/54472] ICE (spill_failure): unable to find a register to spill in class 'AREG' with -O -fschedule-insns -fselective-scheduling

2016-01-21 Thread abel at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54472

Andrey Belevantsev  changed:

   What|Removed |Added

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

--- Comment #12 from Andrey Belevantsev  ---
4.7 is not maintained anymore.

[Bug rtl-optimization/54472] ICE (spill_failure): unable to find a register to spill in class 'AREG' with -O -fschedule-insns -fselective-scheduling

2013-04-03 Thread mpolacek at gcc dot gnu.org


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



Marek Polacek mpolacek at gcc dot gnu.org changed:



   What|Removed |Added



 CC||mpolacek at gcc dot gnu.org



--- Comment #10 from Marek Polacek mpolacek at gcc dot gnu.org 2013-04-03 
14:53:36 UTC ---

So are we going to backport this one?


[Bug rtl-optimization/54472] ICE (spill_failure): unable to find a register to spill in class 'AREG' with -O -fschedule-insns -fselective-scheduling

2013-04-03 Thread abel at gcc dot gnu.org


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



--- Comment #11 from Andrey Belevantsev abel at gcc dot gnu.org 2013-04-03 
15:51:50 UTC ---

(In reply to comment #10)

 So are we going to backport this one?



Sorry, I've missed this one when backporting other stuff. I can do this

tomorrow, the patch is safe. However, the branch is frozen now, we need to ask

Richi for approval to squeeze it into the next 4.7 release.


[Bug rtl-optimization/54472] ICE (spill_failure): unable to find a register to spill in class 'AREG' with -O -fschedule-insns -fselective-scheduling

2012-11-09 Thread abel at gcc dot gnu.org


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



--- Comment #8 from Andrey Belevantsev abel at gcc dot gnu.org 2012-11-09 
12:28:30 UTC ---

Author: abel

Date: Fri Nov  9 12:28:21 2012

New Revision: 193358



URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=193358

Log:

PR rtl-optimization/54472



* sel-sched-ir.c (has_dependence_note_reg_set): Handle implicit sets.

(has_dependence_note_reg_clobber,

has_dependence_note_reg_use): Likewise.



* gcc.dg/pr54472.c: New test.



Added:

trunk/gcc/testsuite/gcc.dg/pr54472.c

Modified:

trunk/gcc/ChangeLog

trunk/gcc/sel-sched-ir.c

trunk/gcc/testsuite/ChangeLog


[Bug rtl-optimization/54472] ICE (spill_failure): unable to find a register to spill in class 'AREG' with -O -fschedule-insns -fselective-scheduling

2012-11-09 Thread abel at gcc dot gnu.org


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



--- Comment #9 from Andrey Belevantsev abel at gcc dot gnu.org 2012-11-09 
12:33:33 UTC ---

Fixed on trunk, backports to 4.7/4.6 are needed.


[Bug rtl-optimization/54472] ICE (spill_failure): unable to find a register to spill in class 'AREG' with -O -fschedule-insns -fselective-scheduling

2012-10-26 Thread abel at gcc dot gnu.org


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



--- Comment #7 from Andrey Belevantsev abel at gcc dot gnu.org 2012-10-26 
14:04:03 UTC ---

(In reply to comment #6)

 Have you managed to check the patch?



The patch does the right thing for sets and clobbers, but the uses case should

be amended, too, judging from the sched-deps.c code.   Sorry, I was too busy to

send the patch, now, I'll try doing this on the next week.


[Bug rtl-optimization/54472] ICE (spill_failure): unable to find a register to spill in class 'AREG' with -O -fschedule-insns -fselective-scheduling

2012-10-24 Thread izamyatin at gmail dot com


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



--- Comment #6 from Igor Zamyatin izamyatin at gmail dot com 2012-10-24 
11:09:49 UTC ---

Have you managed to check the patch?


[Bug rtl-optimization/54472] ICE (spill_failure): unable to find a register to spill in class 'AREG' with -O -fschedule-insns -fselective-scheduling

2012-10-04 Thread ubizjak at gmail dot com


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



--- Comment #4 from Uros Bizjak ubizjak at gmail dot com 2012-10-04 09:29:15 
UTC ---

(In reply to comment #3)

  For some reason, -fselective-scheduling is moving

  

  (insn 19 16 22 2 (use (reg/i:SI 0 ax)) testcase.c:6 -1

   (nil))

  

  around. This insn marks function return, so IMO should be at the function 
  exit

  all the time. -fschedule-insns (without -fselective-scheduling) leaves the 
  insn

  at the function exit. Is it OK to move this marker around?

 

 I will take a look but I'm out of office until Friday at least (maybe Monday).



Any progress on this?


[Bug rtl-optimization/54472] ICE (spill_failure): unable to find a register to spill in class 'AREG' with -O -fschedule-insns -fselective-scheduling

2012-10-04 Thread abel at gcc dot gnu.org


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



Andrey Belevantsev abel at gcc dot gnu.org changed:



   What|Removed |Added



 Status|UNCONFIRMED |ASSIGNED

   Last reconfirmed||2012-10-04

 AssignedTo|unassigned at gcc dot   |abel at gcc dot gnu.org

   |gnu.org |

 Ever Confirmed|0   |1



--- Comment #5 from Andrey Belevantsev abel at gcc dot gnu.org 2012-10-04 
12:43:36 UTC ---

(In reply to comment #4)

 (In reply to comment #3)

   For some reason, -fselective-scheduling is moving

   

   (insn 19 16 22 2 (use (reg/i:SI 0 ax)) testcase.c:6 -1

(nil))

   

   around. This insn marks function return, so IMO should be at the function 
   exit

   all the time. -fschedule-insns (without -fselective-scheduling) leaves 
   the insn

   at the function exit. Is it OK to move this marker around?

  

  I will take a look but I'm out of office until Friday at least (maybe 
  Monday).

 

 Any progress on this?



Sorry Uros, I forgot about this.  I took a look, the reason is actually in

selective scheduler not handling implicit_sets (we miss dependencies between

implicit_sets register sets and other sets/clobbers).  In this example, we miss

a dependency between insns 9 and 16 and thus schedule insn #16 earlier than

insn #9 and then its dependent insn #19 earlier than insn #9.  Thus we are

moving the return mark before the actual function code.



The below patch fixes the test case for me.  I need to double-check whether I

have caught all cases of implicit_sets generating dependencies in sched-deps.c

and then I will submit the patch for review.



diff --git a/gcc/sel-sched-ir.c b/gcc/sel-sched-ir.c

index e7ca3f1..0fbfdbe 100644

--- a/gcc/sel-sched-ir.c

+++ b/gcc/sel-sched-ir.c

@@ -3185,7 +3185,7 @@ has_dependence_note_reg_set (int regno)

  || reg_last-clobbers != NULL)

*dsp = (*dsp  ~SPECULATIVE) | DEP_OUTPUT;



-  if (reg_last-uses)

+  if (reg_last-uses || reg_last-implicit_sets)

*dsp = (*dsp  ~SPECULATIVE) | DEP_ANTI;

 }

 }

@@ -3205,7 +3205,7 @@ has_dependence_note_reg_clobber (int regno)

   if (reg_last-sets)

*dsp = (*dsp  ~SPECULATIVE) | DEP_OUTPUT;



-  if (reg_last-uses)

+  if (reg_last-uses || reg_last-implicit_sets)

*dsp = (*dsp  ~SPECULATIVE) | DEP_ANTI;

 }

 }


[Bug rtl-optimization/54472] ICE (spill_failure): unable to find a register to spill in class 'AREG' with -O -fschedule-insns -fselective-scheduling

2012-09-04 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54472

--- Comment #2 from Uros Bizjak ubizjak at gmail dot com 2012-09-04 14:48:02 
UTC ---
For some reason, -fselective-scheduling is moving

(insn 19 16 22 2 (use (reg/i:SI 0 ax)) testcase.c:6 -1
 (nil))

around. This insn marks function return, so IMO should be at the function exit
all the time. -fschedule-insns (without -fselective-scheduling) leaves the insn
at the function exit. Is it OK to move this marker around?


[Bug rtl-optimization/54472] ICE (spill_failure): unable to find a register to spill in class 'AREG' with -O -fschedule-insns -fselective-scheduling

2012-09-04 Thread abel at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54472

--- Comment #3 from Andrey Belevantsev abel at gcc dot gnu.org 2012-09-04 
17:47:24 UTC ---
(In reply to comment #2)
 For some reason, -fselective-scheduling is moving
 
 (insn 19 16 22 2 (use (reg/i:SI 0 ax)) testcase.c:6 -1
  (nil))
 
 around. This insn marks function return, so IMO should be at the function exit
 all the time. -fschedule-insns (without -fselective-scheduling) leaves the 
 insn
 at the function exit. Is it OK to move this marker around?

I will take a look but I'm out of office until Friday at least (maybe Monday).


[Bug rtl-optimization/54472] ICE (spill_failure): unable to find a register to spill in class 'AREG' with -O -fschedule-insns -fselective-scheduling

2012-09-03 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54472

Uros Bizjak ubizjak at gmail dot com changed:

   What|Removed |Added

 CC||izamyatin at gmail dot com

--- Comment #1 from Uros Bizjak ubizjak at gmail dot com 2012-09-03 18:24:59 
UTC ---
This is the problem with scheduler, where insns involving hard registers are
moved around. This part should be fixed by the WIP patch at [1].

[1] http://gcc.gnu.org/ml/gcc-patches/2012-08/msg00810.html