public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/48144] New: ICE: in code_motion_path_driver, at sel-sched.c:6575 with -fselective-scheduling2 and custom flags
@ 2011-03-16  2:53 zsojka at seznam dot cz
  2011-03-16  8:36 ` [Bug rtl-optimization/48144] " abel at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: zsojka at seznam dot cz @ 2011-03-16  2:53 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: ICE: in code_motion_path_driver, at sel-sched.c:6575
                    with -fselective-scheduling2 and custom flags
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: zsojka@seznam.cz
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu


Created attachment 23676
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23676
auto-reduced testcase (from gfortran.dg/intrinsic_ifunction_1.f90)

I am sorry for the insane flags needed to reproduce, but I hope this uncovers
some possibly hidden problem.

Compiler output:
$ gfortran -O -fira-region=one -fno-dce -fno-guess-branch-probability
-fno-ivopts -frerun-cse-after-loop -fschedule-insns2 -fsel-sched-pipelining
-fsel-sched-pipelining-outer-loops -fselective-scheduling2 -fno-tree-copyrename
-funroll-loops --param=max-cse-insns=50 --param=max-pipeline-region-blocks=30
testcase.f90 
testcase.f90: In function 'gf0026':
testcase.f90:6:0: internal compiler error: in code_motion_path_driver, at
sel-sched.c:6575
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug rtl-optimization/48144] ICE: in code_motion_path_driver, at sel-sched.c:6575 with -fselective-scheduling2 and custom flags
  2011-03-16  2:53 [Bug rtl-optimization/48144] New: ICE: in code_motion_path_driver, at sel-sched.c:6575 with -fselective-scheduling2 and custom flags zsojka at seznam dot cz
@ 2011-03-16  8:36 ` abel at gcc dot gnu.org
  2011-03-20 18:53 ` zsojka at seznam dot cz
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: abel at gcc dot gnu.org @ 2011-03-16  8:36 UTC (permalink / raw)
  To: gcc-bugs

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

Andrey Belevantsev <abel at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2011.03.16 07:36:05
         AssignedTo|unassigned at gcc dot       |abel at gcc dot gnu.org
                   |gnu.org                     |
     Ever Confirmed|0                           |1

--- Comment #1 from Andrey Belevantsev <abel at gcc dot gnu.org> 2011-03-16 07:36:05 UTC ---
Confirmed.  I might have seen a similar ICE with yet unsubmitted sel-sched
improvements, I will ask around and take a look in any case.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug rtl-optimization/48144] ICE: in code_motion_path_driver, at sel-sched.c:6575 with -fselective-scheduling2 and custom flags
  2011-03-16  2:53 [Bug rtl-optimization/48144] New: ICE: in code_motion_path_driver, at sel-sched.c:6575 with -fselective-scheduling2 and custom flags zsojka at seznam dot cz
  2011-03-16  8:36 ` [Bug rtl-optimization/48144] " abel at gcc dot gnu.org
@ 2011-03-20 18:53 ` zsojka at seznam dot cz
  2011-03-22 16:29 ` abel at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: zsojka at seznam dot cz @ 2011-03-20 18:53 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Zdenek Sojka <zsojka at seznam dot cz> 2011-03-20 18:20:58 UTC ---
Created attachment 23731
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23731
simpler C testcase

This testcase needs less flags to reproduce:

$ gcc -O -frerun-cse-after-loop -fschedule-insns2 -fselective-scheduling2
-fno-tree-ch -funroll-loops --param=max-sched-extend-regions-iters=112
--param=max-sched-region-blocks=43 testcase.c         
testcase.c: In function 'foo':
testcase.c:14:1: internal compiler error: in code_motion_path_driver, at
sel-sched.c:6575
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug rtl-optimization/48144] ICE: in code_motion_path_driver, at sel-sched.c:6575 with -fselective-scheduling2 and custom flags
  2011-03-16  2:53 [Bug rtl-optimization/48144] New: ICE: in code_motion_path_driver, at sel-sched.c:6575 with -fselective-scheduling2 and custom flags zsojka at seznam dot cz
  2011-03-16  8:36 ` [Bug rtl-optimization/48144] " abel at gcc dot gnu.org
  2011-03-20 18:53 ` zsojka at seznam dot cz
@ 2011-03-22 16:29 ` abel at gcc dot gnu.org
  2011-03-22 20:19 ` zsojka at seznam dot cz
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: abel at gcc dot gnu.org @ 2011-03-22 16:29 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Andrey Belevantsev <abel at gcc dot gnu.org> 2011-03-22 15:58:52 UTC ---
Created attachment 23751
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23751
Current patch

The ICE turned out to be the new one.  We are updating the data sets on the
bookkeeping blocks for the reasons outlined in the long comment in sel-sched.c.
 When doing this, we not only remove some insns but also add previous unknown
insns (possibly transformed) to the av set of the bookkeeping block.  The same
insns might also happen to be in the upper av sets, but their transformation
history is not reflecting the mentioned updates.  We were missing this case
when we have fixed the problem only for bookkeeping insns.  

Fixed by simply always picking up the transformation history from the blocks we
are processing on the way down.  This patch may let us get rid of the earlier
originators stuff introduced to solve this for bookkeeping insns.

Zdenek, does this patch work for you?


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug rtl-optimization/48144] ICE: in code_motion_path_driver, at sel-sched.c:6575 with -fselective-scheduling2 and custom flags
  2011-03-16  2:53 [Bug rtl-optimization/48144] New: ICE: in code_motion_path_driver, at sel-sched.c:6575 with -fselective-scheduling2 and custom flags zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2011-03-22 16:29 ` abel at gcc dot gnu.org
@ 2011-03-22 20:19 ` zsojka at seznam dot cz
  2011-03-26 12:35 ` abel at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: zsojka at seznam dot cz @ 2011-03-22 20:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Zdenek Sojka <zsojka at seznam dot cz> 2011-03-22 20:07:05 UTC ---
Hello Andrey,

the patch from comment #3 (r171299) prevents ICE on all (three) testcases I
had.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug rtl-optimization/48144] ICE: in code_motion_path_driver, at sel-sched.c:6575 with -fselective-scheduling2 and custom flags
  2011-03-16  2:53 [Bug rtl-optimization/48144] New: ICE: in code_motion_path_driver, at sel-sched.c:6575 with -fselective-scheduling2 and custom flags zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2011-03-22 20:19 ` zsojka at seznam dot cz
@ 2011-03-26 12:35 ` abel at gcc dot gnu.org
  2011-04-07  7:05 ` abel at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: abel at gcc dot gnu.org @ 2011-03-26 12:35 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Andrey Belevantsev <abel at gcc dot gnu.org> 2011-03-26 11:40:54 UTC ---
Author: abel
Date: Sat Mar 26 11:40:51 2011
New Revision: 171555

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=171555
Log:
    PR rtl-optimization/48144
    * sel-sched-ir.c (merge_history_vect): Factor out from ...
    (merge_expr_data): ... here.
    (av_set_intersect): Rename to av_set_code_motion_filter.
    Update all callers.  Call merge_history_vect when an expression
    is found in both sets.
    * sel-sched-ir.h (av_set_code_motion_filter): Add prototype.

    gcc/testsuite
    PR rtl-optimization/48144
    * gcc.dg/pr48144.c: New test.


Added:
    trunk/gcc/testsuite/gcc.dg/pr48144.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/sel-sched-ir.c
    trunk/gcc/sel-sched-ir.h
    trunk/gcc/sel-sched.c
    trunk/gcc/testsuite/ChangeLog


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug rtl-optimization/48144] ICE: in code_motion_path_driver, at sel-sched.c:6575 with -fselective-scheduling2 and custom flags
  2011-03-16  2:53 [Bug rtl-optimization/48144] New: ICE: in code_motion_path_driver, at sel-sched.c:6575 with -fselective-scheduling2 and custom flags zsojka at seznam dot cz
                   ` (4 preceding siblings ...)
  2011-03-26 12:35 ` abel at gcc dot gnu.org
@ 2011-04-07  7:05 ` abel at gcc dot gnu.org
  2011-04-07 12:07 ` abel at gcc dot gnu.org
  2011-04-07 12:07 ` abel at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: abel at gcc dot gnu.org @ 2011-04-07  7:05 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Andrey Belevantsev <abel at gcc dot gnu.org> 2011-04-07 07:05:19 UTC ---
Author: abel
Date: Thu Apr  7 07:05:16 2011
New Revision: 172089

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=172089
Log:
        Backport from mainline
        2011-03-26  Andrey Belevantsev  <abel@ispras.ru>

        PR rtl-optimization/48144
        * sel-sched-ir.c (merge_history_vect): Factor out from ...
        (merge_expr_data): ... here.
        (av_set_intersect): Rename to av_set_code_motion_filter.
        Update all callers.  Call merge_history_vect when an expression
        is found in both sets.
        * sel-sched-ir.h (av_set_code_motion_filter): Add prototype.


Added:
    branches/gcc-4_5-branch/gcc/testsuite/gcc.dg/pr48144.c
Modified:
    branches/gcc-4_5-branch/gcc/ChangeLog
    branches/gcc-4_5-branch/gcc/sel-sched-ir.c
    branches/gcc-4_5-branch/gcc/sel-sched-ir.h
    branches/gcc-4_5-branch/gcc/sel-sched.c
    branches/gcc-4_5-branch/gcc/testsuite/ChangeLog


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug rtl-optimization/48144] ICE: in code_motion_path_driver, at sel-sched.c:6575 with -fselective-scheduling2 and custom flags
  2011-03-16  2:53 [Bug rtl-optimization/48144] New: ICE: in code_motion_path_driver, at sel-sched.c:6575 with -fselective-scheduling2 and custom flags zsojka at seznam dot cz
                   ` (5 preceding siblings ...)
  2011-04-07  7:05 ` abel at gcc dot gnu.org
@ 2011-04-07 12:07 ` abel at gcc dot gnu.org
  2011-04-07 12:07 ` abel at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: abel at gcc dot gnu.org @ 2011-04-07 12:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Andrey Belevantsev <abel at gcc dot gnu.org> 2011-04-07 12:07:29 UTC ---
Author: abel
Date: Thu Apr  7 12:07:24 2011
New Revision: 172097

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=172097
Log:
        Backport from mainline
        2011-03-26  Andrey Belevantsev  <abel@ispras.ru>

        PR rtl-optimization/48144
        * sel-sched-ir.c (merge_history_vect): Factor out from ...
        (merge_expr_data): ... here.
        (av_set_intersect): Rename to av_set_code_motion_filter.
        Update all callers.  Call merge_history_vect when an
        expression is found in both sets.
        * sel-sched-ir.h (av_set_code_motion_filter): Add prototype.


Added:
    branches/gcc-4_6-branch/gcc/testsuite/gcc.dg/pr48144.c
Modified:
    branches/gcc-4_6-branch/gcc/ChangeLog
    branches/gcc-4_6-branch/gcc/sel-sched-ir.c
    branches/gcc-4_6-branch/gcc/sel-sched-ir.h
    branches/gcc-4_6-branch/gcc/sel-sched.c
    branches/gcc-4_6-branch/gcc/testsuite/ChangeLog


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug rtl-optimization/48144] ICE: in code_motion_path_driver, at sel-sched.c:6575 with -fselective-scheduling2 and custom flags
  2011-03-16  2:53 [Bug rtl-optimization/48144] New: ICE: in code_motion_path_driver, at sel-sched.c:6575 with -fselective-scheduling2 and custom flags zsojka at seznam dot cz
                   ` (6 preceding siblings ...)
  2011-04-07 12:07 ` abel at gcc dot gnu.org
@ 2011-04-07 12:07 ` abel at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: abel at gcc dot gnu.org @ 2011-04-07 12:07 UTC (permalink / raw)
  To: gcc-bugs

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

Andrey Belevantsev <abel at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #8 from Andrey Belevantsev <abel at gcc dot gnu.org> 2011-04-07 12:07:45 UTC ---
Fixed.


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-04-07 12:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-16  2:53 [Bug rtl-optimization/48144] New: ICE: in code_motion_path_driver, at sel-sched.c:6575 with -fselective-scheduling2 and custom flags zsojka at seznam dot cz
2011-03-16  8:36 ` [Bug rtl-optimization/48144] " abel at gcc dot gnu.org
2011-03-20 18:53 ` zsojka at seznam dot cz
2011-03-22 16:29 ` abel at gcc dot gnu.org
2011-03-22 20:19 ` zsojka at seznam dot cz
2011-03-26 12:35 ` abel at gcc dot gnu.org
2011-04-07  7:05 ` abel at gcc dot gnu.org
2011-04-07 12:07 ` abel at gcc dot gnu.org
2011-04-07 12:07 ` abel at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).