public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/36908]  New: bootstrap forever with BOOT_CFLAGS="-O2 -ftree-loop-distribution"
@ 2008-07-23 13:23 tomby at gcc dot gnu dot org
  2008-07-28 11:54 ` [Bug bootstrap/36908] " tomby at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: tomby at gcc dot gnu dot org @ 2008-07-23 13:23 UTC (permalink / raw)
  To: gcc-bugs

Bootstrap with BOOT_CFLAGS set to "-O2 -ftree-loop-distribution" runs "forever"
(at least 12 hours then I break compilation). It seems that genautomata in
stage2 run in cycle in merge_states.

configured as:
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --prefix=/abuild/tbily/install/
--enable-bootstrap --disable-multilib --enable-checks --enable-languages=c,c++
Thread model: posix
gcc version 4.4.0 20080723 (experimental) (GCC)


-- 
           Summary: bootstrap forever with BOOT_CFLAGS="-O2 -ftree-loop-
                    distribution"
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tomby at gcc dot gnu dot org
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


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


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

* [Bug bootstrap/36908] bootstrap forever with BOOT_CFLAGS="-O2 -ftree-loop-distribution"
  2008-07-23 13:23 [Bug bootstrap/36908] New: bootstrap forever with BOOT_CFLAGS="-O2 -ftree-loop-distribution" tomby at gcc dot gnu dot org
@ 2008-07-28 11:54 ` tomby at gcc dot gnu dot org
  2008-07-30 10:33 ` [Bug bootstrap/36908] [4.4 Regression] " aldot at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: tomby at gcc dot gnu dot org @ 2008-07-28 11:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from tomby at gcc dot gnu dot org  2008-07-28 11:53 -------
Created an attachment (id=15971)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15971&action=view)
Testcase where loop distribution enabled makes run of binary forever

Compilation with CFLAGS="-O2" and running of testcase is ok (it finish).
Compilation with CLFLAGS="-O2 -ftree-loop-distribution" and running testcase
makes it run forever (last loop cycles). Inlined loop from free_alt_states is
wrongly distributed.


-- 


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


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

* [Bug bootstrap/36908] [4.4 Regression] bootstrap forever with BOOT_CFLAGS="-O2 -ftree-loop-distribution"
  2008-07-23 13:23 [Bug bootstrap/36908] New: bootstrap forever with BOOT_CFLAGS="-O2 -ftree-loop-distribution" tomby at gcc dot gnu dot org
  2008-07-28 11:54 ` [Bug bootstrap/36908] " tomby at gcc dot gnu dot org
@ 2008-07-30 10:33 ` aldot at gcc dot gnu dot org
  2008-08-08 22:50 ` mmitchel at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: aldot at gcc dot gnu dot org @ 2008-07-30 10:33 UTC (permalink / raw)
  To: gcc-bugs



-- 

aldot at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code
      Known to fail|                            |4.4.0
      Known to work|                            |4.3.1
            Summary|bootstrap forever with      |[4.4 Regression] bootstrap
                   |BOOT_CFLAGS="-O2 -ftree-    |forever with BOOT_CFLAGS="-
                   |loop-distribution"          |O2 -ftree-loop-distribution"
   Target Milestone|---                         |4.4.0


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


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

* [Bug bootstrap/36908] [4.4 Regression] bootstrap forever with BOOT_CFLAGS="-O2 -ftree-loop-distribution"
  2008-07-23 13:23 [Bug bootstrap/36908] New: bootstrap forever with BOOT_CFLAGS="-O2 -ftree-loop-distribution" tomby at gcc dot gnu dot org
  2008-07-28 11:54 ` [Bug bootstrap/36908] " tomby at gcc dot gnu dot org
  2008-07-30 10:33 ` [Bug bootstrap/36908] [4.4 Regression] " aldot at gcc dot gnu dot org
@ 2008-08-08 22:50 ` mmitchel at gcc dot gnu dot org
  2008-08-16 23:38 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2008-08-08 22:50 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


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


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

* [Bug bootstrap/36908] [4.4 Regression] bootstrap forever with BOOT_CFLAGS="-O2 -ftree-loop-distribution"
  2008-07-23 13:23 [Bug bootstrap/36908] New: bootstrap forever with BOOT_CFLAGS="-O2 -ftree-loop-distribution" tomby at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2008-08-08 22:50 ` mmitchel at gcc dot gnu dot org
@ 2008-08-16 23:38 ` pinskia at gcc dot gnu dot org
  2008-09-01 13:53 ` jakub at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-08-16 23:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2008-08-16 23:36 -------
I don't see why this is a P1, -ftree-loop-distribution is not enabled default
at all.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |build


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


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

* [Bug bootstrap/36908] [4.4 Regression] bootstrap forever with BOOT_CFLAGS="-O2 -ftree-loop-distribution"
  2008-07-23 13:23 [Bug bootstrap/36908] New: bootstrap forever with BOOT_CFLAGS="-O2 -ftree-loop-distribution" tomby at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2008-08-16 23:38 ` pinskia at gcc dot gnu dot org
@ 2008-09-01 13:53 ` jakub at gcc dot gnu dot org
  2008-09-02 16:46 ` jakub at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-09-01 13:53 UTC (permalink / raw)
  To: gcc-bugs



-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P2


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


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

* [Bug bootstrap/36908] [4.4 Regression] bootstrap forever with BOOT_CFLAGS="-O2 -ftree-loop-distribution"
  2008-07-23 13:23 [Bug bootstrap/36908] New: bootstrap forever with BOOT_CFLAGS="-O2 -ftree-loop-distribution" tomby at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2008-09-01 13:53 ` jakub at gcc dot gnu dot org
@ 2008-09-02 16:46 ` jakub at gcc dot gnu dot org
  2008-10-21 12:52 ` [Bug bootstrap/36908] " jakub at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-09-02 16:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jakub at gcc dot gnu dot org  2008-09-02 16:44 -------
Why got this even marked as regression?  GCC 4.3.1 didn't support
-ftree-loop-distribution, it is a new option, so it can't regress.
The loop in question is:
<bb 8>:
  # state_89 = PHI <state_17(9), state_5(7)>
  # prephitmp.18_6 = PHI <state_89(9), pretmp.17_59(7)>
  state_17 = state_89->next_alt_state;
  state_89->next_alt_state = prephitmp.18_6;
  first_free_alt_state_lsm.29_18 = state_89;
  if (state_17 != 0B)
    goto <bb 9>;
  else
    goto <bb 10>;

<bb 9>:
  goto <bb 8>;
and gets distributed into:
<bb 16>:
  # state_62 = PHI <state_22(17), state_5(7)>
  # prephitmp.18_26 = PHI <state_62(17), pretmp.17_59(7)>
  state_22 = state_62->next_alt_state;
  state_62->next_alt_state = prephitmp.18_26;
  if (state_22 != 0B)
    goto <bb 17>;
  else
    goto <bb 18>;

<bb 17>:
  goto <bb 16>;

<bb 18>:
  # prephitmp.18_90 = PHI <prephitmp.18_26(16)>

<bb 8>:
  # state_89 = PHI <state_17(9), state_5(18)>
  state_17 = state_89->next_alt_state;
  state_89->next_alt_state = prephitmp.18_90;
  first_free_alt_state_lsm.29_18 = state_89;
  if (state_17 != 0B)
    goto <bb 9>;
  else
    goto <bb 10>;

<bb 9>:
  goto <bb 8>;
Perhaps tree-loop-distribution.c is confused by a PHI depending on previous PHI
result?


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |spop at gcc dot gnu dot org


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


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

* [Bug bootstrap/36908] bootstrap forever with BOOT_CFLAGS="-O2 -ftree-loop-distribution"
  2008-07-23 13:23 [Bug bootstrap/36908] New: bootstrap forever with BOOT_CFLAGS="-O2 -ftree-loop-distribution" tomby at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2008-09-02 16:46 ` jakub at gcc dot gnu dot org
@ 2008-10-21 12:52 ` jakub at gcc dot gnu dot org
  2008-10-22 21:10 ` sebpop at gmail dot com
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-10-21 12:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jakub at gcc dot gnu dot org  2008-10-21 12:51 -------
Dropping [4.4 Regression], as -ftree-loop-distribution is a new option.
Sebastian, can you please look at this?


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.4 Regression] bootstrap  |bootstrap forever with
                   |forever with BOOT_CFLAGS="- |BOOT_CFLAGS="-O2 -ftree-
                   |O2 -ftree-loop-distribution"|loop-distribution"


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


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

* [Bug bootstrap/36908] bootstrap forever with BOOT_CFLAGS="-O2 -ftree-loop-distribution"
  2008-07-23 13:23 [Bug bootstrap/36908] New: bootstrap forever with BOOT_CFLAGS="-O2 -ftree-loop-distribution" tomby at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2008-10-21 12:52 ` [Bug bootstrap/36908] " jakub at gcc dot gnu dot org
@ 2008-10-22 21:10 ` sebpop at gmail dot com
  2008-11-03 16:38 ` spop at gcc dot gnu dot org
  2008-11-03 16:38 ` spop at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: sebpop at gmail dot com @ 2008-10-22 21:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from sebpop at gmail dot com  2008-10-22 21:08 -------
Subject: Re:  bootstrap forever with BOOT_CFLAGS="-O2 -ftree-loop-distribution"

> Sebastian, can you please look at this?

Sorry for having missed this bug.  The problem here is that we end
with two identical loops, as we copy almost all the statements in both
loops.  The attached patch solves the problem by counting the number
of memory read and write operations per partition and compares it to
the total number of memory operations in the Reduced Dependence Graph.
Loop distribution is stopped when one of the partitions contains all
the memory ops.

Okay for trunk once it finishes regstrap?

Thanks,
Sebastian


------- Comment #6 from sebpop at gmail dot com  2008-10-22 21:08 -------
Created an attachment (id=16529)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16529&action=view)


-- 


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


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

* [Bug bootstrap/36908] bootstrap forever with BOOT_CFLAGS="-O2 -ftree-loop-distribution"
  2008-07-23 13:23 [Bug bootstrap/36908] New: bootstrap forever with BOOT_CFLAGS="-O2 -ftree-loop-distribution" tomby at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2008-11-03 16:38 ` spop at gcc dot gnu dot org
@ 2008-11-03 16:38 ` spop at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: spop at gcc dot gnu dot org @ 2008-11-03 16:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from spop at gcc dot gnu dot org  2008-11-03 16:36 -------
Fixed.


-- 

spop at gcc dot gnu dot org changed:

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


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


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

* [Bug bootstrap/36908] bootstrap forever with BOOT_CFLAGS="-O2 -ftree-loop-distribution"
  2008-07-23 13:23 [Bug bootstrap/36908] New: bootstrap forever with BOOT_CFLAGS="-O2 -ftree-loop-distribution" tomby at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2008-10-22 21:10 ` sebpop at gmail dot com
@ 2008-11-03 16:38 ` spop at gcc dot gnu dot org
  2008-11-03 16:38 ` spop at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: spop at gcc dot gnu dot org @ 2008-11-03 16:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from spop at gcc dot gnu dot org  2008-11-03 16:36 -------
Subject: Bug 36908

Author: spop
Date: Mon Nov  3 16:35:13 2008
New Revision: 141550

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=141550
Log:
2008-11-03  Sebastian Pop  <sebastian.pop@amd.com>

        PR tree-optimization/36908
        * testsuite/gcc.dg/tree-ssa/pr36908.c: New.
        * tree-loop-distribution.c (number_of_rw_in_rdg): New.
        (number_of_rw_in_partition): New.
        (partition_contains_all_rw): New.
        (ldist_gen): Do not distribute when one of the partitions
        contains all the memory operations.



Added:
    trunk/gcc/testsuite/gcc.dg/tree-ssa/pr36908.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/tree-loop-distribution.c


-- 


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


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

end of thread, other threads:[~2008-11-03 16:38 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-23 13:23 [Bug bootstrap/36908] New: bootstrap forever with BOOT_CFLAGS="-O2 -ftree-loop-distribution" tomby at gcc dot gnu dot org
2008-07-28 11:54 ` [Bug bootstrap/36908] " tomby at gcc dot gnu dot org
2008-07-30 10:33 ` [Bug bootstrap/36908] [4.4 Regression] " aldot at gcc dot gnu dot org
2008-08-08 22:50 ` mmitchel at gcc dot gnu dot org
2008-08-16 23:38 ` pinskia at gcc dot gnu dot org
2008-09-01 13:53 ` jakub at gcc dot gnu dot org
2008-09-02 16:46 ` jakub at gcc dot gnu dot org
2008-10-21 12:52 ` [Bug bootstrap/36908] " jakub at gcc dot gnu dot org
2008-10-22 21:10 ` sebpop at gmail dot com
2008-11-03 16:38 ` spop at gcc dot gnu dot org
2008-11-03 16:38 ` spop at gcc dot gnu dot 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).