From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17080 invoked by alias); 3 Feb 2004 15:46:49 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 17052 invoked by alias); 3 Feb 2004 15:46:48 -0000 Date: Tue, 03 Feb 2004 15:46:00 -0000 Message-ID: <20040203154648.17050.qmail@sources.redhat.com> From: "mark at codesourcery dot com" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20040120110040.13768.igodard@pacbell.net> References: <20040120110040.13768.igodard@pacbell.net> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/13768] [3.4/3.5 Regression] -funit-at-a-time compiles unused inline function X-Bugzilla-Reason: CC X-SW-Source: 2004-02/txt/msg00349.txt.bz2 List-Id: ------- Additional Comments From mark at codesourcery dot com 2004-02-03 15:46 ------- Subject: Re: [3.4/3.5 Regression] -funit-at-a-time compiles unused inline function hubicka at ucw dot cz wrote: >------- Additional Comments From hubicka at ucw dot cz 2004-02-03 11:00 ------- >Subject: Re: [3.4/3.5 Regression] -funit-at-a-time compiles unused inline function > > > >>------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-02-03 09:25 ------- >>The code is indeed invalid. >> >>When a complete object of type X is created, the compiler is allowed to >>emit the vtable for X, and that permits instantiating the virtual functions. >> >>However, this is an optimization deficiency in -funit-at-a-time. >> >> > >Yes, the problem is that all dependencies are resolved before >optimization is done. I am planning to address this by doing early pass >of tree-ssa optimization before inlining and cgraph construction. That >way we should catch majority of cases. >I also plan to deffer output of datastrctures to the very end of >compilation and use information about what was really used by backend. > >Honza > What do you suggest, if anything, for GCC 3.4? (This is potentially a regression with respect to the size of the generated code. There is lots of code with trivial constructors that, after inlining, will be eliminated.) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13768