This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/77278] Use LTO for libgfortran
- From: "tkoenig at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 20 Aug 2016 17:27:28 +0000
- Subject: [Bug libfortran/77278] Use LTO for libgfortran
- Authentication-results: sourceware.org; auth=none
- Auto-submitted: auto-generated
- References: <bug-77278-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77278
Thomas Koenig <tkoenig at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2016-08-20
Ever confirmed|0 |1
--- Comment #1 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
It is not easy to find a simple test case where an advantage
can be found. With my hand-hacked LTO libgfortran, I get
ig25@linux-fd1f:~/Krempel/LTO> cat write.f90
program main
implicit none
integer :: i
real(kind=8) :: a
do i=1,10**7
call random_number(a)
write (10,'(E17.8," ")',advance="NO") a
end do
end program main
With -static-libgfortran -lto I get for three consecutive runs
real 0m16.463s
user 0m15.979s
sys 0m0.449s
real 0m17.839s
user 0m17.440s
sys 0m0.388s
real 0m16.824s
user 0m16.378s
sys 0m0.436s
and with the normal shared library
real 0m19.508s
user 0m19.086s
sys 0m0.410s
real 0m19.850s
user 0m19.395s
sys 0m0.444s
real 0m18.213s
user 0m17.802s
sys 0m0.400s