From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12503 invoked by alias); 16 May 2010 11:21:29 -0000 Received: (qmail 12416 invoked by alias); 16 May 2010 11:21:15 -0000 Date: Sun, 16 May 2010 11:21:00 -0000 Message-ID: <20100516112115.12414.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: "rguenther at suse dot de" 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/msg01708.txt.bz2 ------- Comment #10 from rguenther at suse dot de 2010-05-16 11:21 ------- Subject: Re: -fwhole-file -fwhole-program: Wrong decls cause too much to be optimized away On Sun, 16 May 2010, dominiq at lps dot ens dot fr wrote: > ------- Comment #9 from dominiq at lps dot ens dot fr 2010-05-16 11:16 ------- > > You cant' compare -fwhole-file numbers to -fwhole-program numbers. > > -fwhole-file is a correctness option, w/o it the Frontend generates > > an invalid representation for the middle-end. > > Well, from what I saw running the polyhedron tests, -fwhole-file is more than a > correctness option. I think it exposes more optimization opportunities to the > middle end, giving faster executable for ac, aermod, and doduc. Note that > adding -flto gives also some speed up for these tests. Due to this pr one > cannot test the effect of -fwhole-program on half the tests. However using it > for fatigue gives a quite large speed up I do not see for the seven other > tests. It enables more optimization opportunities because calls inside the unit are visible as such. Without -fwhole-file nearly all calls look like calls to external functions and local functions appear unused. Richard. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40873