[dmd-internals] building dmd with the microsoft compiler
Walter Bright
walter at digitalmars.com
Sun Nov 13 14:51:11 PST 2011
On 11/13/2011 10:55 AM, Rainer Schuetze wrote:
> On 13.11.2011 19:33, Walter Bright wrote:
>>
>>
>> On 11/13/2011 8:13 AM, Rainer Schuetze wrote:
>>>
>>>
>>> I have patched the compiler to use handcrafted implementations and it now
>>> passes the dmd test suite.
>>>
>>> Quite a bit to my surprise, the compiler is also almost twice as fast on my
>>> projects as the dmc compiled dmd! The test suite runs a bit slower though
>>> (5% to 10%).
>>
>> Hmm, very curious. I wonder what the speed changes are due to.
>>
> I just noticed today that the backend files are compiled without optimizations
> in win32.mak. Is this on purpose? I didn't see noticeable improvements in
> compilation speed when enabling "-o", though.
I just never got around to fixing that.
>
>>>
>>> Is there interest in adding the patches to the dmd source? I would like to
>>> do some cleanup before creating a pull request.
>>
>> Sure.
>>
>>>
>>> The major changes are with respect to the 80-bit floats, because this also
>>> leaks into the backend. Mostly, it's replacing "long double" with my
>>> implementation "long_double". I've seen "d-gcc-real.h" being used if IN_GCC
>>> is defined, but the defined type real_t is only referred to partially. I
>>> wonder whether this is still in use (by LDC/GDC?) and whether it ever passed
>>> the test suites?
>>
>> I don't know the status of IN_GCC. I wouldn't use it for the VC build.
>
> I didn't use it. But if it is still in use, among other things it enables
> another implementation of 80-bit floats which might not be compatible with my
> changes, so it might annoy LDC/GDC developers quite a bit.
>
>>
>>>
>>> The C99 printf functions are overloaded by inserting an include file on the
>>> command line, I would prefer if these would go into port.c/h, but these
>>> would need to be included by the backend aswell then.
>>
>> They should go in port, or perhaps we should just dispense with using the C99
>> formats.
>
> I will try to put it in port. %a on 80-bit floats needs to be implemented anyway.
>
We need %a, but the other C99 formats can be eliminated by casting to (unsigned
long long) and using a ull format.
More information about the dmd-internals
mailing list