dmd codegen improvements

deadalnix via Digitalmars-d digitalmars-d at puremagic.com
Wed Aug 19 10:25:10 PDT 2015


On Wednesday, 19 August 2015 at 09:26:43 UTC, Ola Fosheim Grøstad 
wrote:
> 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…
>

Apple is invested in LLVM. For other thing you mention, 
WebAssembly is an AST representation, which is both dumb and do 
not look like anything like LLVM IR.

> 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)
>

WAT ?

> Or a high level compile-time oriented IR for D that can boost 
> templates semantics and compilation speed.
>

That's impossible in the state of template right now (I know I've 
been there and dropped it as the return on investement was too 
low).



More information about the Digitalmars-d mailing list