www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - inlining functions

reply "Jan Hanselaer" <jan.hanselaer gmail.com> writes:
Do I understand it well that there's no function inlining at all when you 
compile without the -inline parameter?

And that the compiler chooses which functions to inline when you compile 
with the -inline parameter?
And if so, anyone knows what the exact criteria are? I read something like 
no inlining when there's a loop in the function, but are there more 
criteria?

Greetz
Jan 
May 01 2007
parent reply Deewiant <deewiant.doesnotlike.spam gmail.com> writes:
Jan Hanselaer wrote:
 Do I understand it well that there's no function inlining at all when you 
 compile without the -inline parameter?
 
Most likely yes.
 And that the compiler chooses which functions to inline when you compile 
 with the -inline parameter?
Yes.
 And if so, anyone knows what the exact criteria are? I read something like 
 no inlining when there's a loop in the function, but are there more 
 criteria?
 
Another one is that functions containing inline asm aren't inlined.
May 01 2007
parent Dave <Dave_member pathlink.com> writes:
Deewiant wrote:
 Jan Hanselaer wrote:
 Do I understand it well that there's no function inlining at all when you 
 compile without the -inline parameter?
Most likely yes.
 And that the compiler chooses which functions to inline when you compile 
 with the -inline parameter?
Yes.
 And if so, anyone knows what the exact criteria are? I read something like 
 no inlining when there's a loop in the function, but are there more 
 criteria?
Another one is that functions containing inline asm aren't inlined.
It would be great if -v listed the functions inlined.
May 01 2007