On Wednesday, 19 August 2015 at 08:22:58 UTC, Dmitry Olshansky
wrote:
Also DMD's backend strives to stay fast _and_ generate fine
machine code. Getting within 10% of GCC/LLVM and being fast is
IMHO both possible and should be done.
But if iOS/OS-X and others are essentially requiring an LLVM-like
IR as the object code format then it makes most sense to have
LLVM as the default backend. If WebAsm et al is focusing on
mimicing LLVM, then D's backend have to do the same. And that is
not unlikely giving PNACL being LLVM based. Intel is also
supportive of LLVM…
Replicating a scalar SSA like LLVM does not make a lot of sense.
What would make a lot of sense would be to start work on an
experimental SIMD SSA implemented in D that could leverage
benefits for next gen x86 SIMD and make Phobos target it. That
could attract new people to D and make D beat LLVM. You could
even combine LLVM and your own SIMD backend (run both, then
profile and pick the best code in production on a
function-by-function base)
Or a high level compile-time oriented IR for D that can boost
templates semantics and compilation speed.
And there is plenty of research papers on optimization floating
around and implemented in GCC/LLVM/MSVC so most of R&D cost is
payed by other backends/researchers.
I think you underestimate the amount of experimental work that
has gone into those backends, work that ends up being trashed.
It's not like you have to implement what LLVM has now. You have
to implement what LLVM has and a lot of the stuff they have
thrown out.
- Re: dmd codegen improvements via Digitalmars-d
-