ARM first & default LDC

Max Haughton maxhaton at gmail.com
Mon Dec 14 20:53:19 UTC 2020


On Monday, 14 December 2020 at 17:45:01 UTC, Iain Buclaw wrote:
> On Monday, 14 December 2020 at 10:48:43 UTC, IGotD- wrote:
>>
>> There is one thing that worries me. GCC and LLVM contains 
>> primitives for optimizations and help for certain features. 
>> These primitives are often complicated and takes time to 
>> duplicate in the DMD backend. The result is that D will not 
>> use the helpful primitives in LLVM and therefore skip certain 
>> features that would otherwise be simpler to implement.
>>
>
> I think your feelings are misguided, a primitive does not mean 
> it must be implemented in the compiler.  Take core.bitop.rol() 
> and ror() as one example, these are implemented as a function 
> in druntime for DMD and LDC, but are primitives to GDC 
> (LROTATE_EXPR and RROTATE_EXPR respectively).  Same also 
> applies to the entire core.checkedint module, or the 
> core.varargs module, both of which are treated as primitives 
> for GDC as well.
>
>> The DMD backend might be Walter's darling but what if he could 
>> move to LLVM, discover all the helpful primitives which 
>> perhaps increase the productivity and new ideas might emerge. 
>> It's a selling point.
>
> Moving main development to LDC will be the death of D.

The last point in particular should shut this idea down. 
Discussion of D is still somewhat infested by people mentioning 
Phobos and Tango, D2/D1 etc, moving compilers would be a bit mad.

Besides, having 3 compilers is healthy (Isn't GCC on the cusp of 
getting an up to date frontend, too?) for the language and it's 
users.

Even if everyone who really understands the current dmd backend 
got hit by a bus, I think it would still be worth having a simple 
dmd backend rather than canning it.



More information about the Digitalmars-d mailing list