dmd-x64

Travis Boucher boucher.travis at gmail.com
Tue Dec 22 19:33:36 PST 2009


bearophile wrote:
> Travis Boucher:
>> ldc on the other hand has a great structure which promotes using it as a 
>> backend for a different front end, however it doesn't (yet) generic code 
>> nearly as good as gcc.
> 
> Can you explain better what do you mean?
> 
> Bye,
> bearophile

llvm has been designed for use for code analyzers, compiler development, 
IDEs, etc.  The APIs are well documented and well thought out, as it its 
IR (which is an assembler-like language itself).  It is easy to use 
small parts of llvm due to its modular structure.  Although it's design 
promotes all sorta of optimization techniques, its still pretty young 
(compared to gcc) and just doesn't have all of the optimization stuff 
gcc has.

gcc has evolved over a long time, and contains alot of legacy cruft. 
It's IR changes on a (somewhat) regular basis, and its internals are a 
big hairy intertwined mess.  Trying to learn one small part of how GCC 
works often involves learning how alot of other unrelated things work. 
However, since it is so mature, many different optimization techniques 
have been developed, and continue to be developed as underlying hardware 
changes.  It also supports generating code for a huge number of targets.

When I say 'ldc' above, I really mean 'llvm' in general.



More information about the Digitalmars-d mailing list