[Sdcc-user] z80 binary sizes increasing by 25%

2016-07-30 Thread alvin albrecht

Sometime after #9676 and up to and including #9682,  I am seeing an increase in 
z80 binary sizes of 25% in some compiles.  It seems to be connected to increase 
spill to the stack and higher use of index registers in accessing stack 
variables.  I will try to look closer to nail down what it is but I am 
wondering if anyone else is seeing this.


I can give a link to before and after list files showing asm generated by #9676 
vs #9692 for a particular case of a binary increasing from 39k to 51k.

https://drive.google.com/file/d/0B6XhJJ33xpOWLTJRTkgxRzNXQ2s/view?usp=sharing

--
___
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user


Re: [Sdcc-user] z80 binary sizes increasing by 25%

2016-07-30 Thread Erik Petrich



On Sat, 30 Jul 2016, alvin albrecht wrote:




Sometime after #9676 and up to and including #9682,  I am seeing an increase
in z80 binary sizes of 25% in some compiles.  It seems to be connected to
increase spill to the stack and higher use of index registers in accessing
stack variables.  I will try to look closer to nail down what it is but I am
wondering if anyone else is seeing this.


I can give a link to before and after list files showing asm generated by
#9676 vs #9692 for a particular case of a binary increasing from 39k to 51k.

https://drive.google.com/file/d/0B6XhJJ33xpOWLTJRTkgxRzNXQ2s/view?usp=shari
ng


Yes, I can reproduce this. It appears to be revision #9682 (the patch 
associated with bug #2467) where the spill location use increases.


  Erik
--
___
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user


Re: [Sdcc-user] z80 binary sizes increasing by 25%

2016-07-30 Thread Philipp Klaus Krause
On 30.07.2016 10:02, Erik Petrich wrote:
> 
> 
> On Sat, 30 Jul 2016, alvin albrecht wrote:
> 
>>
>>
>> Sometime after #9676 and up to and including #9682,  I am seeing an
>> increase
>> in z80 binary sizes of 25% in some compiles.  It seems to be connected to
>> increase spill to the stack and higher use of index registers in
>> accessing
>> stack variables.  I will try to look closer to nail down what it is
>> but I am
>> wondering if anyone else is seeing this.
>>
>>
>> I can give a link to before and after list files showing asm generated by
>> #9676 vs #9692 for a particular case of a binary increasing from 39k
>> to 51k.
>>
>> https://drive.google.com/file/d/0B6XhJJ33xpOWLTJRTkgxRzNXQ2s/view?usp=shari
>>
>> ng
> 
> Yes, I can reproduce this. It appears to be revision #9682 (the patch
> associated with bug #2467) where the spill location use increases.
> 
>   Erik

Do we have a resonably small, self-contained C code example to reproduce
this?

Philipp




signature.asc
Description: OpenPGP digital signature
--
___
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user


Re: [Sdcc-user] z80 binary sizes increasing by 25%

2016-07-30 Thread Erik Petrich


On Sat, 30 Jul 2016, Philipp Klaus Krause wrote:

> On 30.07.2016 10:02, Erik Petrich wrote:
>>
>>
>> On Sat, 30 Jul 2016, alvin albrecht wrote:
>>
>>>
>>>
>>> Sometime after #9676 and up to and including #9682,  I am seeing an
>>> increase
>>> in z80 binary sizes of 25% in some compiles.  It seems to be connected to
>>> increase spill to the stack and higher use of index registers in
>>> accessing
>>> stack variables.  I will try to look closer to nail down what it is
>>> but I am
>>> wondering if anyone else is seeing this.
>>>
>>>
>>> I can give a link to before and after list files showing asm generated by
>>> #9676 vs #9692 for a particular case of a binary increasing from 39k
>>> to 51k.
>>>
>>> https://drive.google.com/file/d/0B6XhJJ33xpOWLTJRTkgxRzNXQ2s/view?usp=shari
>>>
>>> ng
>>
>> Yes, I can reproduce this. It appears to be revision #9682 (the patch
>> associated with bug #2467) where the spill location use increases.
>>
>>   Erik
>
> Do we have a resonably small, self-contained C code example to reproduce
> this?
>
> Philipp

This is what I was looking at (adapted from near the beginning of Alvin's 
example):

   float RND0(void)
   {
 return 0;
   }

   float RND(float n)
   {
 return (n == 0.0) ? RND0() : RND0()*n+1.0;
   }

The code for RND0() is just trivial filler and nothing unexpected happens 
there, but RND() suddenly uses a sloc instead of registers in revision 
#9682.

   Erik


--
___
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user