ARM first & default LDC

H. S. Teoh hsteoh at quickfur.ath.cx
Thu Dec 17 17:42:33 UTC 2020


On Thu, Dec 17, 2020 at 04:02:05PM +0000, Guillaume Piolat via Digitalmars-d wrote:
[...]
> However I think an ARM backend may be just too much debt when we don't
> have a reliable x86 backend in DMD. And I don't know why it's the
> case, it has been a constant over years.
> 
> (for info: the particular issue that irks me is
> https://issues.dlang.org/show_bug.cgi?id=21474)
> 
> I'd be really wary to release something built with DMD and
> optimizations on.  This is not _only_ about speed imho.

See, it's bugs like these that eventually convinced me no longer to use
DMD for production builds.  For development or small projects where
speed is not important, DMD fine, I just don't use -O or -inline; DMD
compiles lightning fast compared to the other compilers, it's
lightweight and easy to install and run, it's even easy to build (I
build DMD from git master), and really boosts your code-compile-test
cycle.

For production builds of non-trivial projects, though, I can't depend on
it. Over the years I've run into codegen bugs, usually triggered by -O,
-inline, or both. Which unfortunately exacerbates the already well-known
suboptimal output.  Plus cross-compilation is not supported right now.
LDC gives me reliable codegen, very good optimizations, and built-in
cross-compilation.  Plus good CPU targeting, which in some applications
make a big difference (e.g., issuing POPCOUNT instructions on CPUs that
support it, can really boost certain algorithms).  And LDC has been
tracking DMD releases very closely since a year or two ago, so it's not
lacking in the new features department either.  Overall, LDC works much
better for me in the production department.  In this area DMD isn't even
on my radar anymore.


T

-- 
Не дорог подарок, дорога любовь.


More information about the Digitalmars-d mailing list