Thread overview | |||||
---|---|---|---|---|---|
|
October 01, 2005 DMD's inline switch | ||||
---|---|---|---|---|
| ||||
I have a question about DMD's -inline switch. IMPORTANT: I *do* already know the general idea of inline from C, so you don't need to explain the basics to me (unless my questions reveal a misconception about inline that I'm not aware of). What I'd like to know is: - If I *don't* use -inline, will DMD refuse to inline any function? - If I *do* use -inline, will DMD inline all functions? - Is there a way to let DMD's optimizer decide which functions to inline? Thanks, Def |
October 01, 2005 Re: DMD's inline switch | ||||
---|---|---|---|---|
| ||||
Posted in reply to Def | > - If I *don't* use -inline, will DMD refuse to inline any function? I believe so, but whether or not... I suggest not depending on it. > - If I *do* use -inline, will DMD inline all functions? No. It will only inline certain functions which seem worthwhile. > - Is there a way to let DMD's optimizer decide which functions to inline? That would be what the option does ;). Of course, I would suggest using -O too, for optimized builds. -[Unknown] |
October 01, 2005 Re: DMD's inline switch | ||||
---|---|---|---|---|
| ||||
Posted in reply to Unknown W. Brackets | In article <dhn0gi$1jnf$1@digitaldaemon.com>, Unknown W. Brackets says... > >> - If I *don't* use -inline, will DMD refuse to inline any function? > >I believe so, but whether or not... I suggest not depending on it. > >> - If I *do* use -inline, will DMD inline all functions? > >No. It will only inline certain functions which seem worthwhile. > >> - Is there a way to let DMD's optimizer decide which functions to inline? > >That would be what the option does ;). Of course, I would suggest using -O too, for optimized builds. > >-[Unknown] Sounds reasonable. Unless someone tells me otherwise, I will stick to your advice. Thanks heaps, Def |
Copyright © 1999-2021 by the D Language Foundation