|Inlining functions with loops firstname.lastname@example.org (Michael Rice) (1995-11-29)|
|Re: email@example.com firstname.lastname@example.org (Arch Robison) (1995-11-30)|
|From:||Arch Robison <email@example.com>|
|Date:||Thu, 30 Nov 1995 21:34:21 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?
> 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 statement presumes that inlining is done at a near-source level
with C-like expressions, as in Cfront. Many non-Cfront compilers
allow inlining of loops. KAI's Photon C++ compiler
(http://www.kai.com/photon/photon_what_is.html) readily inlines loops.
> I also have to wonder if this is worth the work. Any comments?
That depends upon how many customers (that care about performance)
write inline functions with loops, and how well the rest of the
compiler optimizes loops. Now that compilers inline loops, creative
C++ programmers will no doubt find uses for inline loops.
Arch D. Robison Kuck & Associates Inc.
firstname.lastname@example.org 1906 Fox Drive
217-356-2288 Champaign IL 61820
Return to the
Search the comp.compilers archives again.