public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/46590] New: long compile time with -O2 and many loops
@ 2010-11-21 13:23 tkoenig at gcc dot gnu.org
  2010-11-21 13:25 ` [Bug tree-optimization/46590] " tkoenig at gcc dot gnu.org
                   ` (45 more replies)
  0 siblings, 46 replies; 47+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2010-11-21 13:23 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: long compile time with -O2 and many loops
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Keywords: compile-time-hog
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: tkoenig@gcc.gnu.org


The attached program, which is a stress-test to test array assignment
dependencies for gfortran, compiles just about forever at -O2;
so far, it's 90 minutes and still no sign of finishing.

Compilation time without -O2 is 45 seconds.

Here is the perl script used to generate the test case.

#! /usr/bin/perl                                                         

$cnt = 0;
# @ind = (-6, -3, -1, 1, 3, 6);
@ind = (-5, -3, -1, 1, 3, 5);  
$n = 6;                        

print <<EOF;
program main
  implicit none
  integer, dimension(-100:100) :: a,b,original
  integer :: i
  original = [(15*i+2,i=-100,100)]

EOF
foreach $stride_l (@ind) {
    foreach $stride_r (@ind) {
        for ($start_l = 1; $start_l < $n; $start_l ++) {
            for ($start_r = 1; $start_r < $n; $start_r ++) {
                for ($times = 0; $times < $n; $times ++) {
                    $end_l = $start_l + ($times-1)*$stride_l;
                    $end_r = $start_r + ($times-1)*$stride_r;
                    print <<EOF;
  a = original
  b = original
  a($start_l:$end_l:$stride_l) =  a($start_r:$end_r:$stride_r)
  b($start_l:$end_l:$stride_l) = original($start_r:$end_r:$stride_r)
  if (any (a /= b)) then
    print *,$start_l, $end_l,$stride_l,$start_r,$end_r, $stride_r
    call abort
  end if

EOF
                }
            }
        }
    }
}
print "end program main\n";


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

end of thread, other threads:[~2014-10-21  9:22 UTC | newest]

Thread overview: 47+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-21 13:23 [Bug tree-optimization/46590] New: long compile time with -O2 and many loops tkoenig at gcc dot gnu.org
2010-11-21 13:25 ` [Bug tree-optimization/46590] " tkoenig at gcc dot gnu.org
2010-11-21 17:19 ` dominiq at lps dot ens.fr
2010-11-21 18:55 ` tkoenig at gcc dot gnu.org
2010-11-21 19:13 ` rguenth at gcc dot gnu.org
2010-11-21 19:49 ` tkoenig at gcc dot gnu.org
2010-11-21 19:49 ` tkoenig at gcc dot gnu.org
2010-11-21 21:13 ` tkoenig at gcc dot gnu.org
2010-11-21 21:46 ` [Bug tree-optimization/46590] [4.6 Regression] " tkoenig at gcc dot gnu.org
2010-11-21 23:14 ` tkoenig at gcc dot gnu.org
2010-11-22 13:30 ` rguenth at gcc dot gnu.org
2010-11-22 13:30 ` [Bug tree-optimization/46590] [4.5/4.6 " rguenth at gcc dot gnu.org
2010-11-22 16:19 ` rguenth at gcc dot gnu.org
2010-11-24 12:40 ` rguenth at gcc dot gnu.org
2010-11-24 14:19 ` rguenth at gcc dot gnu.org
2011-01-03 20:25 ` rguenth at gcc dot gnu.org
2011-03-25 19:55 ` [Bug tree-optimization/46590] [4.5/4.6/4.7 " jakub at gcc dot gnu.org
2011-06-27 16:23 ` jakub at gcc dot gnu.org
2011-10-26 17:37 ` jakub at gcc dot gnu.org
2012-01-05  1:48 ` pinskia at gcc dot gnu.org
2012-01-19 15:20 ` matz at gcc dot gnu.org
2012-01-19 15:26 ` matz at gcc dot gnu.org
2012-01-26 16:23 ` matz at gcc dot gnu.org
2012-03-01 14:45 ` jakub at gcc dot gnu.org
2012-08-21  8:10 ` [Bug tree-optimization/46590] [4.6/4.7/4.8 " rguenth at gcc dot gnu.org
2012-08-21  9:44 ` steven at gcc dot gnu.org
2012-08-21 10:00 ` rguenther at suse dot de
2012-08-21 14:11 ` rguenth at gcc dot gnu.org
2012-08-21 14:57 ` rguenth at gcc dot gnu.org
2012-08-22 11:43 ` rguenth at gcc dot gnu.org
2012-08-22 13:21 ` rguenth at gcc dot gnu.org
2012-08-22 17:34 ` stevenb.gcc at gmail dot com
2012-08-23  7:14 ` rguenther at suse dot de
2012-08-23 11:43 ` rguenth at gcc dot gnu.org
2012-08-23 13:46 ` steven at gcc dot gnu.org
2012-09-03 10:46 ` rguenth at gcc dot gnu.org
2012-09-03 15:41 ` matz at gcc dot gnu.org
2012-09-04 13:18 ` rguenth at gcc dot gnu.org
2012-09-05 11:01 ` rguenth at gcc dot gnu.org
2012-09-05 13:30 ` rguenth at gcc dot gnu.org
2012-12-03 15:52 ` [Bug tree-optimization/46590] " rguenth at gcc dot gnu.org
2014-01-16 13:49 ` rguenth at gcc dot gnu.org
2014-01-16 15:51 ` rguenth at gcc dot gnu.org
2014-01-17 11:37 ` rguenth at gcc dot gnu.org
2014-01-17 12:09 ` rguenth at gcc dot gnu.org
2014-01-17 14:49 ` rguenth at gcc dot gnu.org
2014-10-21  9:23 ` rguenth 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).