public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/57370] New: [4.9 Regression] compile time hog in reassoc
@ 2013-05-22 14:18 Joost.VandeVondele at mat dot ethz.ch
2013-05-22 14:18 ` [Bug middle-end/57370] " Joost.VandeVondele at mat dot ethz.ch
` (11 more replies)
0 siblings, 12 replies; 13+ messages in thread
From: Joost.VandeVondele at mat dot ethz.ch @ 2013-05-22 14:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57370
Bug ID: 57370
Summary: [4.9 Regression] compile time hog in reassoc
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: Joost.VandeVondele at mat dot ethz.ch
Between rev 199047 and 199075 the attached testcase started using an excessive
amount of time (up from about 4s with 4.7.2). The important option seems to be
-ffast-math (16s without this option).
Reproduce with:
time gfortran -c -g -O2 -ffast-math bug.f90
The stack looks like:
#0 0x0000000000af4b79 in reassociate_bb(basic_block_def*) ()
#1 0x0000000000af4ae8 in reassociate_bb(basic_block_def*) ()
#2 0x0000000000af4ae8 in reassociate_bb(basic_block_def*) ()
#3 0x0000000000af4ae8 in reassociate_bb(basic_block_def*) ()
#4 0x0000000000af4ae8 in reassociate_bb(basic_block_def*) ()
#5 0x0000000000af6701 in execute_reassoc() ()
#6 0x0000000000906550 in execute_one_pass(opt_pass*) ()
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/57370] [4.9 Regression] compile time hog in reassoc
2013-05-22 14:18 [Bug middle-end/57370] New: [4.9 Regression] compile time hog in reassoc Joost.VandeVondele at mat dot ethz.ch
@ 2013-05-22 14:18 ` Joost.VandeVondele at mat dot ethz.ch
2013-05-22 14:19 ` Joost.VandeVondele at mat dot ethz.ch
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Joost.VandeVondele at mat dot ethz.ch @ 2013-05-22 14:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57370
Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |Joost.VandeVondele at mat dot ethz
| |.ch
--- Comment #1 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> ---
Created attachment 30162
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30162&action=edit
testcase
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/57370] [4.9 Regression] compile time hog in reassoc
2013-05-22 14:18 [Bug middle-end/57370] New: [4.9 Regression] compile time hog in reassoc Joost.VandeVondele at mat dot ethz.ch
2013-05-22 14:18 ` [Bug middle-end/57370] " Joost.VandeVondele at mat dot ethz.ch
@ 2013-05-22 14:19 ` Joost.VandeVondele at mat dot ethz.ch
2013-05-22 14:28 ` rguenth at gcc dot gnu.org
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Joost.VandeVondele at mat dot ethz.ch @ 2013-05-22 14:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57370
Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |eraman at google dot com
--- Comment #2 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> ---
I assume it is caused by
http://gcc.gnu.org/viewcvs/gcc?view=revision&revision=199048
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/57370] [4.9 Regression] compile time hog in reassoc
2013-05-22 14:18 [Bug middle-end/57370] New: [4.9 Regression] compile time hog in reassoc Joost.VandeVondele at mat dot ethz.ch
2013-05-22 14:18 ` [Bug middle-end/57370] " Joost.VandeVondele at mat dot ethz.ch
2013-05-22 14:19 ` Joost.VandeVondele at mat dot ethz.ch
@ 2013-05-22 14:28 ` rguenth at gcc dot gnu.org
2013-05-22 14:32 ` Joost.VandeVondele at mat dot ethz.ch
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-05-22 14:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57370
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.9.0
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/57370] [4.9 Regression] compile time hog in reassoc
2013-05-22 14:18 [Bug middle-end/57370] New: [4.9 Regression] compile time hog in reassoc Joost.VandeVondele at mat dot ethz.ch
` (2 preceding siblings ...)
2013-05-22 14:28 ` rguenth at gcc dot gnu.org
@ 2013-05-22 14:32 ` Joost.VandeVondele at mat dot ethz.ch
2013-05-23 6:14 ` Joost.VandeVondele at mat dot ethz.ch
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Joost.VandeVondele at mat dot ethz.ch @ 2013-05-22 14:32 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57370
--- Comment #3 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> ---
I actually suspect the compilation is in an infinite loop. Still running after
15min.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/57370] [4.9 Regression] compile time hog in reassoc
2013-05-22 14:18 [Bug middle-end/57370] New: [4.9 Regression] compile time hog in reassoc Joost.VandeVondele at mat dot ethz.ch
` (3 preceding siblings ...)
2013-05-22 14:32 ` Joost.VandeVondele at mat dot ethz.ch
@ 2013-05-23 6:14 ` Joost.VandeVondele at mat dot ethz.ch
2013-05-24 6:36 ` [Bug middle-end/57370] [4.9 Regression] compiler hangs " Joost.VandeVondele at mat dot ethz.ch
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Joost.VandeVondele at mat dot ethz.ch @ 2013-05-23 6:14 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57370
--- Comment #4 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> ---
I killed the compilation after 15h...
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/57370] [4.9 Regression] compiler hangs in reassoc
2013-05-22 14:18 [Bug middle-end/57370] New: [4.9 Regression] compile time hog in reassoc Joost.VandeVondele at mat dot ethz.ch
` (4 preceding siblings ...)
2013-05-23 6:14 ` Joost.VandeVondele at mat dot ethz.ch
@ 2013-05-24 6:36 ` Joost.VandeVondele at mat dot ethz.ch
2013-06-05 11:19 ` Joost.VandeVondele at mat dot ethz.ch
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Joost.VandeVondele at mat dot ethz.ch @ 2013-05-24 6:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57370
Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.9 Regression] compile |[4.9 Regression] compiler
|time hog in reassoc |hangs in reassoc
--- Comment #5 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> ---
This is actually hanging and not just taking a long time.
I've also create PR57393 which is an ICE that happened during an attempt to
reduce the testcase of this PR. This might or might not be related.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/57370] [4.9 Regression] compiler hangs in reassoc
2013-05-22 14:18 [Bug middle-end/57370] New: [4.9 Regression] compile time hog in reassoc Joost.VandeVondele at mat dot ethz.ch
` (5 preceding siblings ...)
2013-05-24 6:36 ` [Bug middle-end/57370] [4.9 Regression] compiler hangs " Joost.VandeVondele at mat dot ethz.ch
@ 2013-06-05 11:19 ` Joost.VandeVondele at mat dot ethz.ch
2013-06-13 6:04 ` Joost.VandeVondele at mat dot ethz.ch
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Joost.VandeVondele at mat dot ethz.ch @ 2013-06-05 11:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57370
--- Comment #6 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> ---
Reduced testcase, which appears 'minimal' to trigger a hanging compilation at
gfortran -c -O2 -ffast-math bug.f90
> cat bug.f90
SUBROUTINE xb88_lr_adiabatic_lda_calc(e_ndrho_ndrho_ndrho, &
grad_deriv,npoints, sx)
IMPLICIT REAL*8 (t)
INTEGER, PARAMETER :: dp=8
REAL(kind=dp), DIMENSION(1:npoints) :: e_ndrho_ndrho_ndrho, &
e_ndrho_ndrho_rho
DO ii=1,npoints
IF( grad_deriv >= 2 .OR. grad_deriv == -2 ) THEN
t1425 = t233 * t557
t1429 = beta * t225
t1622 = t327 * t1621
t1626 = t327 * t1625
t1632 = t327 * t1631
t1685 = t105 * t1684
t2057 = t1636 + t8 * (t2635 + t3288)
END IF
IF( grad_deriv >= 3 .OR. grad_deriv == -3 ) THEN
t5469 = t5440 - t5443 - t5446 - t5449 - &
t5451 - t5454 - t5456 + t5459 - &
t5462 + t5466 - t5468
t5478 = 0.240e2_dp * t1616 * t973 * t645 * t1425
t5489 = 0.1600000000e2_dp * t1429 * t1658
t5531 = 0.160e2_dp * t112 * t1626
t5533 = 0.160e2_dp * t112 * t1632
t5537 = 0.160e2_dp * t112 * t1622
t5541 = t5472 - t5478 - t5523 + t5525 + &
t5531 + t5533 + t5535 + t5537 + &
t5540
t5565 = t112 * t1685
t5575 = t5545 - t5548 + t5551 + t5553 - &
t5558 + t5560 - t5562 + t5564 - &
0.80e1_dp * t5565 + t5568 + t5572 + &
t5574
t5611 = t5579 - t5585 + t5590 - t5595 + &
t5597 - t5602 + t5604 + t5607 + &
t5610
t5613 = t5469 + t5541 + t5575 + t5611
t6223 = t6189 - &
0.3333333336e0_dp * t83 * t84 * t5613 + &
t6222
t6227 = - t8 * (t5305 + t6223)
e_ndrho_ndrho_rho(ii) = e_ndrho_ndrho_rho(ii) + &
t6227 * sx
t6352 = t5440 - t5443 - t5446 - t5449 - &
t5451 - t5454 + &
0.40e1_dp * t102 * t327 * t2057 * t557 - &
t5456 + t5459 - t5462 + t5466 - &
t5468
t6363 = t5480 - t5489 + &
0.9600000000e2_dp * t1054 * t640 * t3679
t6367 = t5472 - t5474 - t5478 - t5523 + &
t5525 + t5531 + t5533 + t5535 + &
t5537 - 0.20e1_dp * t102 * t105 * t6363 + &
t5540
t6370 = t5545 - t5548 + t5551 + t5553 - &
t5558 + t5560 - t5562 + t5564 - &
0.40e1_dp * t5565 + &
t5568 + t5572 + t5574
t6373 = t5579 - t5585 + t5590 - t5595 + &
t5597 - t5602 + t5604 + t5607 + &
t5610
t6375 = t6352 + t6367 + t6370 + t6373
t6380 = - 0.3333333336e0_dp * t83 * t84 * t6375 + t5701
t6669 = -t4704 - t8 * (t6344 + t6380 + t6665)
e_ndrho_ndrho_ndrho(ii) = e_ndrho_ndrho_ndrho(ii) + &
t6669 * sx
END IF
END DO
END SUBROUTINE xb88_lr_adiabatic_lda_calc
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/57370] [4.9 Regression] compiler hangs in reassoc
2013-05-22 14:18 [Bug middle-end/57370] New: [4.9 Regression] compile time hog in reassoc Joost.VandeVondele at mat dot ethz.ch
` (6 preceding siblings ...)
2013-06-05 11:19 ` Joost.VandeVondele at mat dot ethz.ch
@ 2013-06-13 6:04 ` Joost.VandeVondele at mat dot ethz.ch
2013-06-13 7:43 ` [Bug tree-optimization/57370] " glisse at gcc dot gnu.org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Joost.VandeVondele at mat dot ethz.ch @ 2013-06-13 6:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57370
--- Comment #7 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> ---
Since the bug is still 'unconfirmed', I'm wondering if this can not be
reproduced, or if I can provide some more information (more than the small
testcase in comment #6 and the revision that caused it in comment #2) ?
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/57370] [4.9 Regression] compiler hangs in reassoc
2013-05-22 14:18 [Bug middle-end/57370] New: [4.9 Regression] compile time hog in reassoc Joost.VandeVondele at mat dot ethz.ch
` (7 preceding siblings ...)
2013-06-13 6:04 ` Joost.VandeVondele at mat dot ethz.ch
@ 2013-06-13 7:43 ` glisse at gcc dot gnu.org
2013-08-20 18:32 ` Joost.VandeVondele at mat dot ethz.ch
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: glisse at gcc dot gnu.org @ 2013-06-13 7:43 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57370
Marc Glisse <glisse at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-06-13
Component|middle-end |tree-optimization
Ever confirmed|0 |1
--- Comment #8 from Marc Glisse <glisse at gcc dot gnu.org> ---
Confirmed.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/57370] [4.9 Regression] compiler hangs in reassoc
2013-05-22 14:18 [Bug middle-end/57370] New: [4.9 Regression] compile time hog in reassoc Joost.VandeVondele at mat dot ethz.ch
` (8 preceding siblings ...)
2013-06-13 7:43 ` [Bug tree-optimization/57370] " glisse at gcc dot gnu.org
@ 2013-08-20 18:32 ` Joost.VandeVondele at mat dot ethz.ch
2013-09-04 17:48 ` eraman at gcc dot gnu.org
2013-09-14 9:02 ` Joost.VandeVondele at mat dot ethz.ch
11 siblings, 0 replies; 13+ messages in thread
From: Joost.VandeVondele at mat dot ethz.ch @ 2013-08-20 18:32 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57370
Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> changed:
What |Removed |Added
----------------------------------------------------------------------------
URL| |http://gcc.gnu.org/ml/gcc-p
| |atches/2013-07/msg01584.htm
| |l
--- Comment #9 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> ---
fixed with the patch in :
http://gcc.gnu.org/ml/gcc-patches/2013-07/msg01584.html
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/57370] [4.9 Regression] compiler hangs in reassoc
2013-05-22 14:18 [Bug middle-end/57370] New: [4.9 Regression] compile time hog in reassoc Joost.VandeVondele at mat dot ethz.ch
` (9 preceding siblings ...)
2013-08-20 18:32 ` Joost.VandeVondele at mat dot ethz.ch
@ 2013-09-04 17:48 ` eraman at gcc dot gnu.org
2013-09-14 9:02 ` Joost.VandeVondele at mat dot ethz.ch
11 siblings, 0 replies; 13+ messages in thread
From: eraman at gcc dot gnu.org @ 2013-09-04 17:48 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57370
--- Comment #10 from eraman at gcc dot gnu.org ---
Author: eraman
Date: Wed Sep 4 17:48:15 2013
New Revision: 202262
URL: http://gcc.gnu.org/viewcvs?rev=202262&root=gcc&view=rev
Log:
2013-09-04 Easwaran Raman <eraman@google.com>
PR middle-end/57370
PR tree-optimization/58011
* tree-ssa-reassoc.c (get_stmt_uid_with_default): New function,
(build_and_add_sum): Use it.
(appears_later_in_bb): Simplify code.
gcc/testsuite/ChangeLog:
2013-09-04 Easwaran Raman <eraman@google.com>
PR middle-end/57370
PR tree-optimization/58011
* gfortran.dg/reassoc_12.f90: New testcase.
* gcc.dg/tree-ssa/reassoc-31.c: New testcase.
Added:
trunk/gcc/testsuite/gcc.dg/tree-ssa/reassoc-31.c
trunk/gcc/testsuite/gfortran.dg/reassoc_12.f90
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-reassoc.c
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/57370] [4.9 Regression] compiler hangs in reassoc
2013-05-22 14:18 [Bug middle-end/57370] New: [4.9 Regression] compile time hog in reassoc Joost.VandeVondele at mat dot ethz.ch
` (10 preceding siblings ...)
2013-09-04 17:48 ` eraman at gcc dot gnu.org
@ 2013-09-14 9:02 ` Joost.VandeVondele at mat dot ethz.ch
11 siblings, 0 replies; 13+ messages in thread
From: Joost.VandeVondele at mat dot ethz.ch @ 2013-09-14 9:02 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57370
Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #11 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> ---
Fixed.
Easwaran please reopen if you have a specific reason for not closing this PR
(usually developers close the PRs for which they commit patches).
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2013-09-14 9:02 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-22 14:18 [Bug middle-end/57370] New: [4.9 Regression] compile time hog in reassoc Joost.VandeVondele at mat dot ethz.ch
2013-05-22 14:18 ` [Bug middle-end/57370] " Joost.VandeVondele at mat dot ethz.ch
2013-05-22 14:19 ` Joost.VandeVondele at mat dot ethz.ch
2013-05-22 14:28 ` rguenth at gcc dot gnu.org
2013-05-22 14:32 ` Joost.VandeVondele at mat dot ethz.ch
2013-05-23 6:14 ` Joost.VandeVondele at mat dot ethz.ch
2013-05-24 6:36 ` [Bug middle-end/57370] [4.9 Regression] compiler hangs " Joost.VandeVondele at mat dot ethz.ch
2013-06-05 11:19 ` Joost.VandeVondele at mat dot ethz.ch
2013-06-13 6:04 ` Joost.VandeVondele at mat dot ethz.ch
2013-06-13 7:43 ` [Bug tree-optimization/57370] " glisse at gcc dot gnu.org
2013-08-20 18:32 ` Joost.VandeVondele at mat dot ethz.ch
2013-09-04 17:48 ` eraman at gcc dot gnu.org
2013-09-14 9:02 ` Joost.VandeVondele at mat dot ethz.ch
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).