This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/40873] -fwhole-file -fwhole-program: Wrong decls cause too much to be optimized away
- From: "dominiq at lps dot ens dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 May 2010 19:53:32 -0000
- Subject: [Bug fortran/40873] -fwhole-file -fwhole-program: Wrong decls cause too much to be optimized away
- References: <bug-40873-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from dominiq at lps dot ens dot fr 2010-05-15 19:53 -------
A few comments:
(1) adding -flto or -fwhopr solves the linking problem for the polyhedron tests
and the reduced one in comment #1.
(2) the test in comment #4 is different as it shows up for -fwhole-file and is
not solved with -flto or -fwhopr.
(3) I have been puzzled by the results in
http://users.physik.fu-berlin.de/~tburnus/gcc-trunk/benchmark/ for fatigue.f90.
It is due to -fwhole-program:
[macbook] lin/test% gfc -O3 -ffast-math -fwhole-file -flto fatigue.f90
[macbook] lin/test% time a.out
...
9.223u 0.004s 0:09.23 99.8% 0+0k 0+0io 0pf+0w
[macbook] lin/test% gfc -O3 -ffast-math -fwhole-program fatigue.f90
[macbook] lin/test% time a.out
...
6.482u 0.004s 0:06.49 99.8% 0+0k 0+0io 0pf+0w
It would be interesting to understand why and to keep this nice speed up when
fixing this pr.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40873