On inlining in D libraries

Artur Skawina art.08.09 at gmail.com
Tue Sep 10 02:57:51 PDT 2013


On 09/09/13 16:34, Dmitry Olshansky wrote:
> 09-Sep-2013 18:26, Joseph Rushton Wakeling пишет:
>> On 09/09/13 15:01, Dmitry Olshansky wrote:
>>> While investigating std.regex performance in Phobos I've found that a
>>> lot of
>>> stuff never gets inlined (contrary to my expectations).
>>
>> Is that just with dmd, or with gdc and ldc as well?
> 
> For DMD and LDC confirmed. Would be interesting to test GDC but I bet it's the same (does LTO work here btw?).

It used to, back in the gcc4.6 days. Right now gdc LTO is broken (unless
things changed in the last couple of months).
So you have the choice of using an old frontend with LTO or a reasonably
recent one without (with no cross-module inlining). The fact that it is
effectively impossible to use both gdc versions (ie the old LTO-enabled
one just for release builds) makes the situation even worse (the language
accepted by gdc was changed in a backward incompatible way; pragma-gcc-
-attributes became errors).

artur


More information about the Digitalmars-d mailing list