This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Number of registers on x86
- To: <dewar at gnat dot com>
- Subject: Re: Number of registers on x86
- From: Daniel Berlin <dberlin at redhat dot com>
- Date: Mon, 29 Jan 2001 23:59:32 -0500 (EST)
- cc: <tm2 at best dot com>, <gcc at gcc dot gnu dot org>
On Mon, 29 Jan 2001 dewar@gnat.com wrote:
> <<Register renaming only makes the processor more tolerant to
> suboptimal instruction scheduling. It doesn't give the compiler
> any more registers to use per se.
> >>
>
> Of course, but the question is how to stop the register allocator
> THINKING there is a conflict when there isn't, and thus using
> more registers than it should.
>
> Take your example
>
> mov (%esi),eax
> movl eax,(%edi)
> movl 4(%esi),eax
> mov.l eax,4(%edi)
>
> A register allocator not realizing that the two eax's are different here
> may try to use two registers.
>
> The suggested technique, which is to pretend there are 40 registers,
> and then when you have a schedule with 40 registers, collapse it
> with knowledge of how the renaming works, is an interesting approach,
> which might work better than ignoring renaming completely.
Right. There is little research in the area, except to say that hardware
register renaming isn't anywhere near as efficient as doing it in the
compiler (I noticed this just scanning web pages).
It was just a thought.
--Dan