DIP56 Provide pragma to control function inlining
Dmitry Olshansky
dmitry.olsh at gmail.com
Sun Feb 23 05:07:27 PST 2014
23-Feb-2014 16:57, Walter Bright пишет:
> On 2/23/2014 4:25 AM, Tove wrote:
>> The DIP should probably specify what happens if inlining fails,
>> i.e. generate a compilation error.
>
> I suspect that may cause problems, because different compilers will have
> different inlining capabilities. I think it should be a 'recommendation'
> to the compiler.
It's going to be near useless if it doesn't make sure inlining happened.
Part of the reason for forced inline is always inlining some core
primitives, even in debug builds.
The other point is what Vladimir mentioned - we already doing
micro-optimization, hence it better error out then turn a blind eye on
our tinkering. I wouldn't not like to ever have to get down and look at
ASM for every function just to make sure it was inlined.
--
Dmitry Olshansky
More information about the Digitalmars-d
mailing list