intermodule optimisation patch
Geoffrey Keating
geoffk@apple.com
Mon May 19 21:55:00 GMT 2003
On Monday, May 19, 2003, at 01:33 PM, Chris Lattner wrote:
>
>> The attached patch allows GCC to perform optimisations between
>> modules.
> ...
>> I'd like to spark some discussion of this patch. Is it the right way
>> to go for intermodule optimisation,
>
> In my (extremely biased) opinion, no it isn't. :) Take a look at the
> paper I'm planning to present at the GCC summit this weekend for more
> information on what I think is the right approach:
>
> http://llvm.cs.uiuc.edu/pubs/2003-05-01-GCCSummit2003.html
>
>> at least for the moment?
>
> I'm not sure about that. As described in the paper above, the changes
> I
> would like to see made are fairly dramatic, and are thus are unlikely
> to
> be accepted in the near future, if ever. :)
I saw your paper earlier and thought it was interesting. However, your
proposal does have some significant disadvantages:
1. It's not ready now.
2. It's not likely to be ready in the near future, since (among other
things) it requires
implementation of a new GCC frontend to read LLVM files and generate
code.
3. It permits people to write non-GPLed optimisers and code generators
and still use GCC's
parsers.
4. There are other issues with the implementation, for instance it's
written in C++.
5. It seems likely it'd ultimately be slower than a single-compile
approach because of the
overhead of reading and writing LLVM files and converting them to
and from trees.
It does have some advantages, most significantly the compatibility with
existing Makefiles. However, this could be achieved in other ways, for
instance by writing out a 'stub' .o file that contains only compiler
options and a pointer to the real source code.
--
Geoff Keating <geoffk@apple.com>
More information about the Gcc-patches
mailing list