public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/44576]  New: testsuite/gfortran.dg/zero_sized_1.f90 with huge compile time on prefetching+peeling
@ 2010-06-18  7:51 borntraeger at de dot ibm dot com
  2010-06-18  7:59 ` [Bug middle-end/44576] testsuite/gfortran.dg/zero_sized_1.f90 with huge compile time on prefetching + peeling borntraeger at de dot ibm dot com
                   ` (22 more replies)
  0 siblings, 23 replies; 24+ messages in thread
From: borntraeger at de dot ibm dot com @ 2010-06-18  7:51 UTC (permalink / raw)
  To: gcc-bugs

testsuite/gfortran.dg/zero_sized_1.f90 takes almost 11 minutes to compile on my
notebook when combining aggressive loop prefetching with loop peeling:

$ time gfortran-4.5 -O3 -march=core2  zero_sized_1.f90 -S
-fprefetch-loop-arrays  -funroll-loops --param max-completely-peeled-insns=2000

real    10m54.594s
user    10m48.638s
sys     0m0.393s

The compiler is almost always in compute_miss_rate introduced by
http://gcc.gnu.org/ml/gcc-patches/2009-08/msg00641.html

The problem is triggered by several things:
- loop peeling creates thousands of references (with only a small delta)  and
each reference is compared with every other reference
- for each comparison we iterate over all alignments
- for each alignment we iterate over all distinct iterators

As you can see this causes an exploding complexitiy.
Furthermore,since the cache line size is passed in via an external variable,
the compiler cannot optimize the integer division into shifts.

I think the right solution would be to reduce the complexity of
compute_miss_rate, but I have not found a good solution yet.


-- 
           Summary: testsuite/gfortran.dg/zero_sized_1.f90 with huge compile
                    time on prefetching+peeling
           Product: gcc
           Version: 4.5.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: borntraeger at de dot ibm dot com
  GCC host triplet: several, i486, s390..


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


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

end of thread, other threads:[~2010-07-09 23:12 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-18  7:51 [Bug middle-end/44576] New: testsuite/gfortran.dg/zero_sized_1.f90 with huge compile time on prefetching+peeling borntraeger at de dot ibm dot com
2010-06-18  7:59 ` [Bug middle-end/44576] testsuite/gfortran.dg/zero_sized_1.f90 with huge compile time on prefetching + peeling borntraeger at de dot ibm dot com
2010-06-18 10:52 ` [Bug middle-end/44576] [4.5/4.6 Regression] " rguenth at gcc dot gnu dot org
2010-06-24 21:44 ` rguenth at gcc dot gnu dot org
2010-06-25  9:03 ` borntraeger at de dot ibm dot com
2010-06-25 17:08 ` changpeng dot fang at amd dot com
2010-06-26 14:25 ` rguenth at gcc dot gnu dot org
2010-06-26 20:30 ` borntraeger at de dot ibm dot com
2010-06-27  9:16 ` rguenth at gcc dot gnu dot org
2010-06-27  9:17 ` rguenth at gcc dot gnu dot org
2010-06-27 11:09 ` borntraeger at de dot ibm dot com
2010-06-27 11:20 ` rguenth at gcc dot gnu dot org
2010-06-29  0:07 ` changpeng dot fang at amd dot com
2010-06-29  0:49 ` changpeng dot fang at amd dot com
2010-06-30  0:23 ` changpeng dot fang at amd dot com
2010-06-30  0:36 ` changpeng dot fang at amd dot com
2010-07-01  0:34 ` changpeng dot fang at amd dot com
2010-07-02 16:34 ` spop at gcc dot gnu dot org
2010-07-02 23:58 ` changpeng dot fang at amd dot com
2010-07-07 18:15 ` spop at gcc dot gnu dot org
2010-07-07 19:00 ` changpeng dot fang at amd dot com
2010-07-09  1:59 ` changpeng dot fang at amd dot com
2010-07-09 23:09 ` spop at gcc dot gnu dot org
2010-07-09 23:12 ` 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).