Am 21.03.2018 um 22:31 schrieb Erlo Haugen:
>>
>> Today, I looked into the mcs51 --model-large --stack-auto Dhrystone code
>> size situation in the SDCC 3.6.0 - SDCC 3.7.0 timeframe. Code size data
>> for Dhrystone can be seen in the attached graph, the black arrows mark
>> the releases.
>>
>> As can be seen, about 63% of the code size increase from 3.6.0 to 3.7.0
>> came from a single commit.
>>
>> That commit enabled support for a standard-compliant bool for mcs51.
>> Previously, the mcs51 used __bit for bool (which meant that arrays of
>> bool were not supported, nor pointers to bool not bool in struct/union).
>>
>> I hope we can partially undo that regression by optimizing the handling
>> of bool in the mcs51 backend a bit.
>>
>> Philipp
>>
> Or maybe allow for choosing between the standard compliant way and the
> __bit way by means if a flag or compiler directive.
> I do realize that linking modules with different implementation of bool
> is bound to be problematic or even fail, but I'm not sure if that will
> be a problem in real life.
> 
> BR
> Erlo

That could already be done by the user via a preprocessor define.

And we want the optimizations for bool anyway, so those using the
standard-compliant bool get better code as well (other backends that had
the standard-compliant bool for longer than mcs51 already have some
bool-related optimizations and generate better code).

Philipp

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to