This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Can we speed up the gcc_target structure?
- From: Chris Lattner <sabre at nondot dot org>
- To: Richard Henderson <rth at redhat dot com>
- Cc: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>,<ian at wasabisystems dot com>, <gcc at gcc dot gnu dot org>,"Joseph S. Myers" <jsm at polyomino dot org dot uk>
- Date: Sun, 18 Jan 2004 17:01:18 -0600 (CST)
- Subject: Re: Can we speed up the gcc_target structure?
On Sun, 18 Jan 2004, Richard Henderson wrote:
> On Sun, Jan 18, 2004 at 04:37:22PM -0600, Chris Lattner wrote:
> > > 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.
> >
> > This is _extremely_ dangerous, and in practice, cannot be done.
> [...]
> > The nice thing about LLVM using the internalize pass is that if it is used
> > incorrectly, a program will not link.
>
> We're talking about the *exact* same transformation.
Ok, I guess it depends on how you write the transformation. Does the
_transformation_ assume it has the whole program, or will it actually do
the analysis to determing what "escapes" out to unknown portions of the
program? Doing this analysis is nontrivial but worth it. For a
datapoint, many IPO transformations are run at LLVM compile time (not link
time), to good effect.
-Chris
--
http://llvm.cs.uiuc.edu/
http://www.nondot.org/~sabre/Projects/