digitalmars.D.ldc - bitmanip.FloatRep functions not inlined?
- Guillaume Chatelet (20/20) Jul 07 2017 Please have a look at the following (incorrect) code:
- kinke (4/5) Jul 07 2017 Phobos isn't compiled with LTO support. See what huge potential
- Guillaume Chatelet (2/8) Jul 07 2017 Very interesting read. Thx a lot for the explanation.
Please have a look at the following (incorrect) code: struct half { import std.bitmanip; enum uint bias = 15, fractionBits = 10, exponentBits = 5, signBits = 1; this(float value) { const f_rep = FloatRep(value); sign = f_rep.sign; exponent = cast(ubyte)(f_rep.exponent - FloatRep.bias + bias); fraction = f_rep.fraction; } private: mixin(bitfields!( uint, "fraction", fractionBits, ubyte, "exponent", exponentBits, bool, "sign", signBits)); } Any idea why LDC wouldn't inline the FloatRep's functions ? https://godbolt.org/g/Pzoebd
Jul 07 2017
On Friday, 7 July 2017 at 18:34:50 UTC, Guillaume Chatelet wrote:Any idea why LDC wouldn't inline the FloatRep's functions ?Phobos isn't compiled with LTO support. See what huge potential that has here: https://github.com/ldc-developers/ldc/issues/2168#issuecomment-313634616
Jul 07 2017
On Friday, 7 July 2017 at 20:54:27 UTC, kinke wrote:On Friday, 7 July 2017 at 18:34:50 UTC, Guillaume Chatelet wrote:Very interesting read. Thx a lot for the explanation.Any idea why LDC wouldn't inline the FloatRep's functions ?Phobos isn't compiled with LTO support. See what huge potential that has here: https://github.com/ldc-developers/ldc/issues/2168#issuecomment-313634616
Jul 07 2017