|Inlining functions with loops email@example.com (Michael Rice) (1995-11-29)|
|Re: Inlining functions with loops firstname.lastname@example.org (1995-11-30)|
|Re: Inlining functions with loops email@example.com (Michael Meissner) (1995-11-30)|
|Re: Inlining functions with loops firstname.lastname@example.org (1995-11-30)|
|Re: Inlining functions with loops email@example.com (1995-11-30)|
|Re: Inlining functions with loops firstname.lastname@example.org (1995-12-01)|
|Re: Inlining functions with loops email@example.com (1995-12-01)|
|Inlining functions with loops firstname.lastname@example.org (Dave Lloyd) (1995-12-01)|
|Re: Inlining functions with loops serrano@ardeche.IRO.UMontreal.CA (1995-12-01)|
|Re: Inlining functions with loops email@example.com (1995-12-09)|
|Re: Inlining functions with loops firstname.lastname@example.org (1995-12-09)|
|[4 later articles]|
|From:||email@example.com (Andrew Ayers)|
|Organization:||HP/Apollo Massachusetts Language Lab|
|Date:||Thu, 30 Nov 1995 18:59:32 GMT|
"Michael Rice" <firstname.lastname@example.org> writes:
> All C++ compilers that I am aware of will not inline a function if it
> contains any type of loop. Is anyone aware of ANY C++ compiler that
> will do this? Is anyone aware of a compiler for any language which is
> able to do this?
HP's compilers can inline almost anything, save perhaps certain types
of vararg calls. They can also do cross-language inlines (eg inline
FORTRAN into C++, or vice-versa). This inlining is done by the
optimizer, not by the frontend.
> I believe the basic problem is the inability to convert such a function
> to a suitable expression tree. That is, loops are syntactically statements
> with no equivalent expression-like construct.
This is only an issue if you do your inlining when the code is
expresed as syntax trees.
> I also have to wonder if this is worth the work. Any comments?
There are certainly substantial performance gains to be had by
choosing the right set of functions to inline. Whether either the
programmer or the compiler is capable of identifying this set is
another problem altogether.
-- Andy Ayers
Return to the
Search the comp.compilers archives again.