|Inlining functions with loops firstname.lastname@example.org (Michael Rice) (1995-11-29)|
|Re: Inlining functions with loops email@example.com (1995-11-30)|
|Re: firstname.lastname@example.org email@example.com (Arch Robison) (1995-11-30)|
|Re: Inlining functions with loops firstname.lastname@example.org (Michael Meissner) (1995-11-30)|
|Re: Inlining functions with loops email@example.com (1995-11-30)|
|Re: Inlining functions with loops firstname.lastname@example.org (1995-11-30)|
|Re: Inlining functions with loops email@example.com (1995-12-01)|
|[9 later articles]|
|From:||"Michael Rice" <firstname.lastname@example.org>|
|Keywords:||optimize, C++, question|
|Date:||Wed, 29 Nov 1995 18:01:25 GMT|
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?
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.
For example: if(c1) e1 else e2 can be converted to c1 ? e1 : e2
e1; e2; e3 can be converted to e1,e2,e3
What other languages allow inlining functions, and what constructs
make the function un-inlinable in these languages?
I suppose some pseudo-expression for loops could be created to handle
I also have to wonder if this is worth the work. Any comments?
Mike Rice (email@example.com)
Return to the
Search the comp.compilers archives again.