opinions wanted on control of extern inlines

Rachel-Louise Koktava <KittyCrap@severins-child.demon.co.uk>
27 Jul 1998 23:18:27 -0400

          From comp.compilers

Related articles
Language Books rrader@ford.com (Russell Rader) (1998-07-20)
Re: Language Books rlrader@ix.netcom.com (Russell Rader) (1998-07-26)
Re: Language Books rkneusel@post.its.mcw.edu (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 dwight@pentasoft.com (1998-07-28)
Re: opinions wanted on control of extern inlines saroj@my-dejanews.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 bothner@cygnus.com (1998-08-02)
Re: opinions wanted on control of extern inlines jason@cygnus.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)
| List of all articles for this month |

From: Rachel-Louise Koktava <KittyCrap@severins-child.demon.co.uk>
Newsgroups: comp.compilers
Date: 27 Jul 1998 23:18:27 -0400
Organization: KittyCrap
References: 98-07-131 98-07-187 98-07-198
Keywords: C++, performance, linker, comment

Hi all,


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
mechanism.


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.


regards,


R-L
--
Rachel-Louise Koktava
KittyCrap@severins-child.demon.co.uk
[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]
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.