Frustrated with dmd codegen bug

H. S. Teoh hsteoh at quickfur.ath.cx
Tue Apr 24 18:53:02 UTC 2018


Yesterday afternoon I ran into a performance issue in one of my D
projects, and thought, "well, it's simple, just compile with -profile,
identify the hotspot, optimize".  Unfortunately, doing that triggered a
latent codegen bug in -O that randomly causes runtime segfaults,
basically halting all progress.  I spent all morning today to reduce the
code in order to identify the codegen bug:

	https://issues.dlang.org/show_bug.cgi?id=18794

The only workaround I know of currently is to compile without -O.  But
that also means it's meaningless to compile with -profile, since it
would give misleading information (e.g., identify hotspots that aren't
really hotspots once the compiler actually optimizes the code).

The next best thing is to use LDC for better (and more reliable!)
codegen.  However, since this project was developed using dmd git master
(I know, I know), some non-trivial changes are needed to make it
compilable by LDC.

At this point, I'm *seriously* tempted to stop following dmd development
completely and just stick with LDC releases for my D projects. :-(


T

-- 
"The number you have dialed is imaginary. Please rotate your phone 90 degrees and try again."


More information about the Digitalmars-d mailing list