This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: An unusual Performance approach using Synthetic registers
On Sunday 29 December 2002 07:32 am, Daniel Egger wrote:
> Am Son, 2002-12-29 um 05.31 schrieb Andy Walker:
> > Color-graphing works better, the more registers there are available for
> > use. Six registers is sub-optimal. Sixteen registers is a good start.
> > Thirty-two plus five gives thirty-seven, enough for the algorithm to
> > excel.
>
> However if you have a look at register rich architectures like PPC
> you'll see that the generated code rarely exceeds a number of 16 used
> registers, most of them being used for parameters and return values.
> I believe this is because the compiler is quite good about figuring
> out register/time dependencies and reusing the available registers as
> soon as the content is dead. Further much code doesn't keep stuff in
> variables but writes it to allocated storage preventing any sensible
> use of registers.
>
> There's really only very few specialized enough code that profits from
> many registers which you're opting to simulate. 16 virtual registers are
> probably more than enough and also fit nicely in modern processors'
> cachelines (16 x 32bit = 64 byte).
Interesting. I will keep this in mind. No need to waste a lot of memory on
unused Synthetic registers.
I selected 32 because it was 2**5th, and greater than 16. When doing
application programming in assembler, I found 16 general purpose registers
not to be enough.
Thank you for your comments.
Andy