public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/46900] New: 50% slowdown when linking with LTO in a single step
@ 2010-12-12 10:31 burnus at gcc dot gnu.org
  2010-12-12 10:33 ` [Bug middle-end/46900] " burnus at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: burnus at gcc dot gnu.org @ 2010-12-12 10:31 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: 50% slowdown when linking with LTO in a single step
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org


Cf. PR 44334 for another LTO slowdown. Cf.
http://gcc.gnu.org/ml/fortran/2010-12/msg00067.html


I had expected that doing the LTO linkage in one or in two steps is identical,
but seemingly it is not:

$ gfortran -fexternal-blas -flto -Ofast -march=native \
           test.f90 dgemm.f lsame.f xerbla.f
$ ./a.out 
 Time, MATMUL:    1.4680910       53.480084765505403     
 dgemm:    1.4720919       56.452265589399069


But if one first compiles and then links (w/ or w/o LTO), the programm is 47%
faster:

$ gfortran -fexternal-blas -Ofast -march=native \
           test.f90 dgemm.f lsame.f xerbla.f
 Time, MATMUL:    1.0080630       53.480084765505403     
 dgemm:    1.0200630       56.452265589399069     

$ gfortran -c -fexternal-blas -flto -Ofast -march=native \
              test.f90 dgemm.f lsame.f xerbla.f 
$ gfortran -flto -Ofast -march=native test.o dgemm.o lsame.o xerbla.o
$ ./a.out 
 Time, MATMUL:    1.0080630       53.480084765505403     
 dgemm:    1.0080630       56.452265589399069


(If one


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

end of thread, other threads:[~2011-01-19 22:04 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-12 10:31 [Bug fortran/46900] New: 50% slowdown when linking with LTO in a single step burnus at gcc dot gnu.org
2010-12-12 10:33 ` [Bug middle-end/46900] " burnus at gcc dot gnu.org
2010-12-12 10:34 ` burnus at gcc dot gnu.org
2010-12-12 10:39 ` [Bug middle-end/46900] [4.6 Regression] " burnus at gcc dot gnu.org
2010-12-12 10:50 ` burnus at gcc dot gnu.org
2010-12-16 14:40 ` rguenth at gcc dot gnu.org
2010-12-16 15:24 ` burnus at gcc dot gnu.org
2010-12-17 12:14 ` d.g.gorbachev at gmail dot com
2011-01-19 17:10 ` rguenth at gcc dot gnu.org
2011-01-19 22:11 ` burnus 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).