|Language Books email@example.com (Russell Rader) (1998-07-20)|
|Re: Language Books firstname.lastname@example.org (Russell Rader) (1998-07-26)|
|Re: Language Books email@example.com (1998-07-27)|
|opinions wanted on control of extern inlines KittyCrap@severins-child.demon.co.uk (Rachel-Louise Koktava) (1998-07-27)|
|Re: opinions wanted on control of extern inlines firstname.lastname@example.org (1998-07-28)|
|Re: opinions wanted on control of extern inlines email@example.com (1998-07-30)|
|Re: opinions wanted on control of extern inlines KittyCrap@severins-child.demon.co.uk (Rachel-Louise Koktava) (1998-08-02)|
|Re: opinions wanted on control of extern inlines firstname.lastname@example.org (1998-08-02)|
|Re: opinions wanted on control of extern inlines email@example.com (Jason Merrill) (1998-08-04)|
|Re: opinions wanted on control of extern inlines KittyCrap@severins-child.demon.co.uk (Rachel-Louise Koktava) (1998-08-10)|
|From:||Rachel-Louise Koktava <KittyCrap@severins-child.demon.co.uk>|
|Date:||27 Jul 1998 23:18:27 -0400|
|References:||98-07-131 98-07-187 98-07-198|
|Keywords:||C++, performance, linker, comment|
I have a problem, and a hopeful solution.
I wish to control the production of so called "extern inlines" during
the compilation of c++ code. In particular, template instantiation,
vtables and copies of inline functions are causing unacceptable levels
of code bloat.
We (a division of Lucent Technologies) use vxworks/tornado as an
embedded operating system running on a sparc cpu. Unfortunately Wind
river systems don't support ELF on this platform and nor will they for
the forseeable future. They have switched to using gcc version 2.7.2
which, by default, produces local copies of such "external
inlines". The result is an executable that is 4 times too large (32 Mb
compared to 8Mb at present).
I propose to patch the compiler with an addition pass after
preprocessing. This would seed the preprocessed source with pragma
directives that contol which files to create instantiation of
templates, vtables, inlines etc with external linkage while inhibiting
creation in other files. A history would be kept in a repository like
I'm looking for opinions on the feasibilty, any pitfalls, alternative
suggestions that will be of us. My level of computer skills is high,
but I've never modified a compiler before -although I know the
prinicples of operation.
Help would be much appreciated.
[Sounds reasonable to me. The alternative is to do a pass on the object
files before you link them, but I suspect fiddling the source would be
more productive. This is an obvious problem, I'd be surprised if there
weren't existing tools you could adapt. -John]
Return to the
Search the comp.compilers archives again.