[GSoC] 'Independency of D from the C Standard Library' progress and update thread

Johan Engelen j at j.nl
Thu Sep 5 23:57:39 UTC 2019

On Thursday, 5 September 2019 at 22:56:30 UTC, H. S. Teoh wrote:
> On Thu, Sep 05, 2019 at 09:50:04PM +0000, Stefanos Baziotis via 
> Digitalmars-d wrote: [...]
>> - For the first 2, let me thank again Manu and Johan helped 
>> who me
>>   realize them! Note also that we don't currently know of a 
>> way of
>>   informing LLVM or GCC about the semantics and thus get this
>>   optimization. The closest thing we have is LLVM  recognizing 
>> that a
>>   function does what e.g. memcpy() does by name. Which is a bad
>>   assumption to build upon.
> That's pretty scary that LLVM does that. It shakes my 
> confidence in LLVM a little. OTOH, the identifier "memcpy" is 
> pretty unique and practically universally understood to mean 
> C's implementation of it, so it's a reasonably safe assumption.

FYI, GCC does the same.

(the opposite too: converting a copying pattern into memcpy is an 
optimization performed by LLVM, GCC, and MSVC)


More information about the Digitalmars-d mailing list