Druntime DMD/LDC/GDC architecture
John Colvin via Digitalmars-d
digitalmars-d at puremagic.com
Mon Jun 23 11:27:52 PDT 2014
On Monday, 23 June 2014 at 18:09:46 UTC, Ilya Yaroshenko wrote:
> Hello all!
>
> very simple code:
>
> ------------------
> double[] a, c;
> ...
> c[] += a[];
> ------------------
>
> The DMD version I can find in _arraySliceSliceAddass_d,
> https://github.com/D-Programming-Language/druntime/blob/master/src/rt/arraydouble.d
> .
>
> What about LDC and GDC?
> The _arraySliceSliceAddass_d is the same, no any version(LDC).
>
> When I compile code into assembler I found other code then in
> asm scope.
>
> So I suppose LDC has it's own architecture.
> Is it right?
>
> Where I can find it for understanding what optimization can be
> done by LLVM optimizer?
>
> Have GDC it's own architecture too?
>
> Best Regards,
> Ilya
If you look at the bottom of those _array functions you will find
a regular loop doing the cleanup for anything missed by the
inline asm. If I remember correctly, for gdc it is this loop
doing the whole operation as the asm is versioned out.
More information about the Digitalmars-d
mailing list