From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20033 invoked by alias); 16 May 2010 10:53:43 -0000 Received: (qmail 19979 invoked by uid 48); 16 May 2010 10:53:32 -0000 Date: Sun, 16 May 2010 10:53:00 -0000 Message-ID: <20100516105332.19978.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/40873] -fwhole-file -fwhole-program: Wrong decls cause too much to be optimized away In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenth at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-05/txt/msg01700.txt.bz2 ------- Comment #6 from rguenth at gcc dot gnu dot org 2010-05-16 10:53 ------- (In reply to comment #5) > 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. -fwhole-program enables -fwhole-file. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40873