Switch -g disables optimizations.
Kai Nacke via digitalmars-d-ldc
digitalmars-d-ldc at puremagic.com
Sat Oct 10 06:51:24 PDT 2015
On Friday, 9 October 2015 at 07:24:17 UTC, David Nadlinger wrote:
> On 9 Oct 2015, at 7:46, Joakim via digitalmars-d-ldc wrote:
>> On Friday, 9 October 2015 at 04:22:51 UTC, Marco Leise wrote:
>>> push rbp
>>> mov rbp,rsp
>>> xor eax,eax
>>> pop rbp
>>> ret
>> Optimization is turned off in debug mode, with a comment
>> claiming debug info doesn't work with optimization:
>>
>> https://github.com/ldc-developers/ldc/blob/9d3dd1f609e08f001aeec2cacb1c55707f37884b/gen/optimizer.cpp#L179
>
> We should actually look into re-enabling that. I don't know the
> story behind that comment, and I'm not sure who does.
There were once problems with debug info and code optimization.
We should re-check this when we drop support for older LLVM
versions.
Regards,
Kai
More information about the digitalmars-d-ldc
mailing list