How hard would it be to create a new backend in D?

rempas rempas at tutanota.com
Sat Aug 6 04:33:41 UTC 2022


On Friday, 5 August 2022 at 21:54:52 UTC, IGotD- wrote:
>
> Why would you want to create a new backend when you have LLVM 
> and GCC? Scrap the DMD backend. The only claimed benefit is 
> that it is fast which isn't much compared to the amount of time 
> spent on maintenance.
>
Because LDC (llvm) is terribly slow (and GDC is worse in my 
system)! I have a dream
to create a cross platform tool-chain and package/project manager 
(no, DUB will
not do) to create a new ecosystem where everyone will compile 
everything from
source with the many benefits this adds! But with a compile that 
is so slow, there
is no way that anyone (including me) will want to compile 
everything from source.
So my goal is simply not achievable with the current compilers. 
Mir is about 4-5 times
faster than `GCC -O2` while having about 83%-85% of its runtime 
performance (on
average). Still it's not TCC level but still, much much better!


> It's not the 90s anymore where you only had a Intel Pentium 
> target. Now you have many Intel optimizations options, ARM 
> (many models there as well), RISC V, PowerPC etc. and more are 
> coming.
>
I don't understand what you're trying to say with this one. Do 
you mean that LLVM
has support for a lot of CPU ISAs so it's a good backend? If yes, 
then mir has support
for a couple of them as well.

> Let's focus on the language because CPU support is out of scope 
> for the D project.
>
Again, not sure what you mean with that...


More information about the Digitalmars-d mailing list