digitalmars.D.learn - avoid codegen pass
- Padlev (4/4) Oct 02 2021 hello,
- Adam D Ruppe (2/5) Oct 02 2021 -o- does skip codegen already....
- Padlev (10/15) Oct 02 2021 so why this? it seems to take a long time from the last import
- max haughton (3/19) Oct 02 2021 Do you have optimizations turned on? i.e. are you compiling with
- Dennis (13/15) Oct 02 2021 Not needed, it's declared:
- max haughton (6/21) Oct 02 2021 I was aware (and am not a fan of) inlining in the frontend, but
- russhy (5/30) Oct 02 2021 DMD optimization are still valuable, DMD still compile faster
hello, i run dmd from editor to check syntax of what i am writing, with -c -o-. how to run only semantic and avoid codegen to have a quicker run?
Oct 02 2021
On Saturday, 2 October 2021 at 13:24:19 UTC, Padlev wrote:-o- how to run only semantic and avoid codegen to have a quicker run?-o- does skip codegen already....
Oct 02 2021
On Saturday, 2 October 2021 at 13:26:27 UTC, Adam D Ruppe wrote:On Saturday, 2 October 2021 at 13:24:19 UTC, Padlev wrote:so why this? it seems to take a long time from the last import xxx semantic3 xxx to reach this inline scan grasshopper inlined std.datetime.systime.SysTime._timezone => std.datetime.systime.SysTime.opAssign!().opAssign inlined std.datetime.systime.SysTime._timezone => std.datetime.systime.SysTime.opAssign!().opAssign can not be avoided? i need only till semantic, no care in inline et cetera-o- how to run only semantic and avoid codegen to have a quicker run?-o- does skip codegen already....
Oct 02 2021
On Saturday, 2 October 2021 at 14:44:16 UTC, Padlev wrote:On Saturday, 2 October 2021 at 13:26:27 UTC, Adam D Ruppe wrote:Do you have optimizations turned on? i.e. are you compiling with -O by accident?On Saturday, 2 October 2021 at 13:24:19 UTC, Padlev wrote:so why this? it seems to take a long time from the last import xxx semantic3 xxx to reach this inline scan grasshopper inlined std.datetime.systime.SysTime._timezone => std.datetime.systime.SysTime.opAssign!().opAssign inlined std.datetime.systime.SysTime._timezone => std.datetime.systime.SysTime.opAssign!().opAssign can not be avoided? i need only till semantic, no care in inline et cetera-o- how to run only semantic and avoid codegen to have a quicker run?-o- does skip codegen already....
Oct 02 2021
On Saturday, 2 October 2021 at 16:57:48 UTC, max haughton wrote:Do you have optimizations turned on? i.e. are you compiling with -O by accident?Not needed, it's declared: ```D pragma(inline, true) property _timezone() safe const pure nothrow nogc ``` DMD does inlining in the frontend, and without the `-inline` flag it still inlines functions when requested by `pragma(inline, true)`. That's why you see it logged even without codegen or `-inline`. That's not what causes the long compile time though, `dmd -v` logs passes before doing them, not after, so it's the semantic3 before the inline pass that's taking all the time.
Oct 02 2021
On Saturday, 2 October 2021 at 18:05:06 UTC, Dennis wrote:On Saturday, 2 October 2021 at 16:57:48 UTC, max haughton wrote:I was aware (and am not a fan of) inlining in the frontend, but didn't look at the Phobos code. Honestly dmd shouldn't have an optimizer IMO, it's not fit for purpose anymore, if you want optimizations use GDC or LDC. Inlining doesn't even respect the semantics of the language IIRCDo you have optimizations turned on? i.e. are you compiling with -O by accident?Not needed, it's declared: ```D pragma(inline, true) property _timezone() safe const pure nothrow nogc ``` DMD does inlining in the frontend, and without the `-inline` flag it still inlines functions when requested by `pragma(inline, true)`. That's why you see it logged even without codegen or `-inline`. That's not what causes the long compile time though, `dmd -v` logs passes before doing them, not after, so it's the semantic3 before the inline pass that's taking all the time.
Oct 02 2021
On Saturday, 2 October 2021 at 22:40:32 UTC, max haughton wrote:On Saturday, 2 October 2021 at 18:05:06 UTC, Dennis wrote:DMD optimization are still valuable, DMD still compile faster than LDC/GDC For games it's even more important you don't want your debug build to run at 5 FPSOn Saturday, 2 October 2021 at 16:57:48 UTC, max haughton wrote:I was aware (and am not a fan of) inlining in the frontend, but didn't look at the Phobos code. Honestly dmd shouldn't have an optimizer IMO, it's not fit for purpose anymore, if you want optimizations use GDC or LDC. Inlining doesn't even respect the semantics of the language IIRCDo you have optimizations turned on? i.e. are you compiling with -O by accident?Not needed, it's declared: ```D pragma(inline, true) property _timezone() safe const pure nothrow nogc ``` DMD does inlining in the frontend, and without the `-inline` flag it still inlines functions when requested by `pragma(inline, true)`. That's why you see it logged even without codegen or `-inline`. That's not what causes the long compile time though, `dmd -v` logs passes before doing them, not after, so it's the semantic3 before the inline pass that's taking all the time.
Oct 02 2021