public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/57268] New: c nested loops hang compiler
@ 2013-05-13 22:12 dhazeghi at yahoo dot com
  2013-05-14  9:54 ` [Bug rtl-optimization/57268] [4.9 Regression] c nested loops hang compiler in sched-deps.c rguenth at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: dhazeghi at yahoo dot com @ 2013-05-13 22:12 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 57268
           Summary: c nested loops hang compiler
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dhazeghi at yahoo dot com

Created attachment 30106
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30106&action=edit
testcase

The attached testcase causes current gcc trunk to hang on
x86_64-unknown-linux-gnu, when compiled at -O2 or higher optimization levels. 
It compiles successfully with gcc 4.8.  I have not succeeded in reducing the
testcase to a manageable size.

$ gcc-trunk -v
gcc-trunk (GCC) 4.9.0 20130513 (experimental) [trunk revision 198822]
...
$ gcc-trunk -Os -w test.c
$ gcc-4.8 -O2 -w test.c
$ gcc-trunk -O2 -w test.c
<hangs>


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

* [Bug rtl-optimization/57268] [4.9 Regression] c nested loops hang compiler in sched-deps.c
  2013-05-13 22:12 [Bug tree-optimization/57268] New: c nested loops hang compiler dhazeghi at yahoo dot com
@ 2013-05-14  9:54 ` rguenth at gcc dot gnu.org
  2013-05-14 15:37 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-05-14  9:54 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-05-14
          Component|tree-optimization           |rtl-optimization
   Target Milestone|---                         |4.9.0
            Summary|c nested loops hang         |[4.9 Regression] c nested
                   |compiler                    |loops hang compiler in
                   |                            |sched-deps.c
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.

(gdb) 
Run till exit from #0  sched_analyze (deps=0x7fff881eecc0, 
    head=0x7fc27676ec18, tail=0x7fc2767b3168)
    at /space/rguenther/src/svn/trunk/gcc/sched-deps.c:3734
....

while processing func_62 at -O2.


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

* [Bug rtl-optimization/57268] [4.9 Regression] c nested loops hang compiler in sched-deps.c
  2013-05-13 22:12 [Bug tree-optimization/57268] New: c nested loops hang compiler dhazeghi at yahoo dot com
  2013-05-14  9:54 ` [Bug rtl-optimization/57268] [4.9 Regression] c nested loops hang compiler in sched-deps.c rguenth at gcc dot gnu.org
@ 2013-05-14 15:37 ` jakub at gcc dot gnu.org
  2013-05-28 11:50 ` dtemirbulatov at gmail dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-05-14 15:37 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
This is weird, I've tried to bisect it, r197678 still compiled it without
hanging, r197681 ICEd somewhere in lra-constraints.c, but if I rebuild
lra-constraints.o with -O0, it instead ICEs on frame reg uses during
final_scan_insns (i.e. LRA hasn't replaced the frame pointer with hard frame
pointer or stack pointer), r197696 still ICEs, r197700 hangs.
BTW, doing -da before it hangs, I'm seeing right in *.split4 dump REG_EQUIV
notes like:
(insn 20109 70 20110 19 (set (reg/f:DI 38 r9 [19927])
        (plus:DI (reg/f:DI 7 sp)
            (const_int 16 [0x10]))) 254 {*leadi}
     (expr_list:REG_EQUIV (plus:DI (reg/f:DI 20 frame)
            (const_int -8 [0xfffffffffffffff8]))
        (nil)))
wonder if it isn't a bug that RA hasn't replaced the eliminable register in the
note with sp (or hfp).


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

* [Bug rtl-optimization/57268] [4.9 Regression] c nested loops hang compiler in sched-deps.c
  2013-05-13 22:12 [Bug tree-optimization/57268] New: c nested loops hang compiler dhazeghi at yahoo dot com
  2013-05-14  9:54 ` [Bug rtl-optimization/57268] [4.9 Regression] c nested loops hang compiler in sched-deps.c rguenth at gcc dot gnu.org
  2013-05-14 15:37 ` jakub at gcc dot gnu.org
@ 2013-05-28 11:50 ` dtemirbulatov at gmail dot com
  2013-05-29 12:50 ` dtemirbulatov at gmail dot com
  2013-06-04 22:15 ` dinar at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: dtemirbulatov at gmail dot com @ 2013-05-28 11:50 UTC (permalink / raw)
  To: gcc-bugs

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

Dinar Temirbulatov <dtemirbulatov at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dtemirbulatov at gmail dot com

--- Comment #3 from Dinar Temirbulatov <dtemirbulatov at gmail dot com> ---
(In reply to Jakub Jelinek from comment #2)
> This is weird, I've tried to bisect it, r197678 still compiled it without
> hanging, r197681 ICEd somewhere in lra-constraints.c, but if I rebuild
> lra-constraints.o with -O0, it instead ICEs on frame reg uses during
> final_scan_insns (i.e. LRA hasn't replaced the frame pointer with hard frame
> pointer or stack pointer), r197696 still ICEs, r197700 hangs.
> BTW, doing -da before it hangs, I'm seeing right in *.split4 dump REG_EQUIV
> notes like:
> (insn 20109 70 20110 19 (set (reg/f:DI 38 r9 [19927])
>         (plus:DI (reg/f:DI 7 sp)
>             (const_int 16 [0x10]))) 254 {*leadi}
>      (expr_list:REG_EQUIV (plus:DI (reg/f:DI 20 frame)
>             (const_int -8 [0xfffffffffffffff8]))
>         (nil)))
> wonder if it isn't a bug that RA hasn't replaced the eliminable register in
> the note with sp (or hfp).

Problem was triggered by
Author: amker <amker@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Thu Apr 11 03:55:14 2013 +0000

         PR target/56124
         * ira-costs.c (scan_one_insn): Check whether the source rtx of
         loading has side effect.

And the problem in my view is in the scheduling 2 pass, it creates too long
read dependents list without flushing.


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

* [Bug rtl-optimization/57268] [4.9 Regression] c nested loops hang compiler in sched-deps.c
  2013-05-13 22:12 [Bug tree-optimization/57268] New: c nested loops hang compiler dhazeghi at yahoo dot com
                   ` (2 preceding siblings ...)
  2013-05-28 11:50 ` dtemirbulatov at gmail dot com
@ 2013-05-29 12:50 ` dtemirbulatov at gmail dot com
  2013-06-04 22:15 ` dinar at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: dtemirbulatov at gmail dot com @ 2013-05-29 12:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Dinar Temirbulatov <dtemirbulatov at gmail dot com> ---
proposed fix posted here
http://gcc.gnu.org/ml/gcc-patches/2013-05/msg01713.html


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

* [Bug rtl-optimization/57268] [4.9 Regression] c nested loops hang compiler in sched-deps.c
  2013-05-13 22:12 [Bug tree-optimization/57268] New: c nested loops hang compiler dhazeghi at yahoo dot com
                   ` (3 preceding siblings ...)
  2013-05-29 12:50 ` dtemirbulatov at gmail dot com
@ 2013-06-04 22:15 ` dinar at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: dinar at gcc dot gnu.org @ 2013-06-04 22:15 UTC (permalink / raw)
  To: gcc-bugs

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

dinar at gcc dot gnu.org changed:

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

--- Comment #5 from dinar at gcc dot gnu.org ---
Fixed.


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

end of thread, other threads:[~2013-06-04 22:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-13 22:12 [Bug tree-optimization/57268] New: c nested loops hang compiler dhazeghi at yahoo dot com
2013-05-14  9:54 ` [Bug rtl-optimization/57268] [4.9 Regression] c nested loops hang compiler in sched-deps.c rguenth at gcc dot gnu.org
2013-05-14 15:37 ` jakub at gcc dot gnu.org
2013-05-28 11:50 ` dtemirbulatov at gmail dot com
2013-05-29 12:50 ` dtemirbulatov at gmail dot com
2013-06-04 22:15 ` dinar 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).