Puzzle 8-10-08 (answer)

Christopher Wright dhasenan at gmail.com
Tue Aug 12 15:55:27 PDT 2008


Koroskin Denis wrote:
> On Tue, 12 Aug 2008 15:45:15 +0400, bearophile 
> <bearophileHUGS at lycos.com> wrote:
> 
>> Koroskin Denis:
>>> Yes, it is. And Walter writes it on his own :(
>>
>> I think there can be ways to reduce such complexity (and add a 
>> compile-time GC).
>>
>> I think in a short time LLVM will become good enough as backend for D 
>> (what are the practical problems left that make this adoption 
>> possible? In my benchmarks (all the Shootout C benchmarks) LLMV isn't 
>> efficient as GCC yet, but it's probably already more efficient than 
>> the backend of DMD so that's not a problem, and it's open source), 
>> what I mean it can become the backend for the official D compiler 
>> developed by Walter (and the D community). (side question: can the 
>> front-end for LLMV be written in D? I hope so).
>>
>> Does Walter oppose moving to develop with this back-end? I think it 
>> will lead to solve some of the main current problems in the D 
>> development process (such switch can be aligned to a switch to 
>> phobos+tango too).
>>
>> Bye,
>> bearophile
> 
> Nice idea. IIRC, Walter isn't going to replace its own backend to (or 
> even look at) GCC because of the GPL license. However, LLVM has a 
> BSD-like license and that could be an option.

There are other issues. If Walter only ever looks at his own code, he's 
safe from any infringement issues (at least reasonably so). Of course, 
just using the internal representation from LLVM, and its public APIs, 
won't have any real affect.

Also, moving dmd to llvm would kill dmc.

> It still lacks some features, but it evolves *daily* unlike DMD backend. 
> For example, chances are we won't ever get a native x86_64 codegen from 
> DM backend, but we will get it with LLVM eventually (very soon, hopefully).

I agree completely with this. I'd rather be using llvmdc right now, but 
I couldn't get it to work.


More information about the Digitalmars-d-learn mailing list