From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 663 invoked by alias); 18 Jan 2004 22:22:02 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 656 invoked from network); 18 Jan 2004 22:22:01 -0000 Received: from unknown (HELO atrey.karlin.mff.cuni.cz) (195.113.31.123) by sources.redhat.com with SMTP; 18 Jan 2004 22:22:01 -0000 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 4018) id 273C94C002E; Sun, 18 Jan 2004 23:22:01 +0100 (CET) Date: Sun, 18 Jan 2004 22:22:00 -0000 From: Jan Hubicka To: Richard Henderson , "Joseph S. Myers" , "Kaveh R. Ghazi" , ian@wasabisystems.com, gcc@gcc.gnu.org Subject: Re: Can we speed up the gcc_target structure? Message-ID: <20040118222201.GD11268@atrey.karlin.mff.cuni.cz> References: <20040118083738.10772.qmail@gossamer.airs.com> <200401181357.i0IDvpWF004706@caip.rutgers.edu> <20040118220522.GA14767@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040118220522.GA14767@redhat.com> User-Agent: Mutt/1.5.4i X-SW-Source: 2004-01/txt/msg01197.txt.bz2 > On Sun, Jan 18, 2004 at 09:14:14PM +0000, Joseph S. Myers wrote: > > When --enable-intermodule is used, does (or should) the compiler manage to > > detect which parts of the target structure are in fact constant (even > > without constifying)? > > I'm certain that it doesn't. > > It's not inconcievable that a compiler could not that there are > never any writes to a structure, promote it to readonly, and then > constant propagate the values out of that structure. > > However, that sort of optimization requires that you see the *entire* > program, not just large parts of it, as with the current intermodule > code. So I expect this sort of thing is relatively far away. > > One possibility is a switch that says "except for main, nothing > outside these files reference any of the symbols herein defined." > That might get you the same effect as whole-program optimization > without having to have extra info about external runtime libraries. I do have such prototype of -fwhole-program optimization. What is preventing me from putting it into tree-SSA branch is that I don't like the symbols that are considered local to appear as external symbols in output object file and I am not sure whether frobbing of TREE_PUBLIC flag is best idea around. I also hacked up Makefiles to use it, but with our current way to do IPA it means that all backend functions are parsed and optimized over and over for each frontend binary that results in verly long bootstrap times and memory consumption. What is preventing us from declaring the structure as constant so we should get propagation even with current design? Honza > > > > r~