LDC 0.15.0 alpha1 released! Please help test!

David Nadlinger via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Fri Oct 24 14:21:39 PDT 2014


On Friday, 24 October 2014 at 16:28:13 UTC, Kai Nacke wrote:
> I do not use DUB so I don't know which args were passed to LDC. 
> I would assume that release only passes the -release switch.

That's not the issue, it's something along the lines of -O3 
-release -disable-boundscheck by default.

> Could you try it again with a higher optimization level, e.g. 
> -O2 or -O3? There is also a problem with the inliner (David 
> gave some hints here: 
> http://forum.dlang.org/post/ursgarblzengucvxnmfz@forum.dlang.org). 
> Using -singleobj with multiple objects might help, too.

The issues is most probably not related to optimization at all. I 
obviously can't say any definitive without more context/code, but 
it looks like we might emit a manifest constant once and 
unconditionally instead of on every use (there is/was even an 
ancient fixme note about this in the code at some point).

CTFE itself seems not to be directly related to the issue. It 
only happens to produce the initializer we erroneously emit 
afterwards. And regarding the optimizer, the only thing we could 
there is to catch that the value is never used/escaped and elide 
it, but clearly it just shouldn't be there in the first place.

David


More information about the digitalmars-d-ldc mailing list