Re: x86 register allocation

Sander Vesik <>
28 Mar 1999 17:04:59 -0500

          From comp.compilers

Related articles
x86 register allocation (1999-03-23)
Re: x86 register allocation (1999-03-28)
Re: x86 register allocation (Robert Sherry) (1999-03-28)
x86 register allocation (Matt Postiff) (1999-03-28)
Re: x86 register allocation (1999-03-28)
Re: x86 register allocation (Sander Vesik) (1999-03-28)
Re: x86 register allocation (Charles E. Bortle, Jr.) (1999-03-28)
| List of all articles for this month |

From: Sander Vesik <>
Newsgroups: comp.compilers
Date: 28 Mar 1999 17:04:59 -0500
Organization: ERA/EKI FO
References: 99-03-080
Keywords: 386, registers

In comp.compilers wrote:
> Can anyone give me a pointer to help me with x86 register allocation?

A distinct possibility in the case of "hyperoptimised" processors with
a small number of registers would probably be to treat the real
processor as the microcode for a "virtual" processor with a different
number of registers.

So instead of allocating for the 8 registers (and maybe scheduling
instructions on the top of that for the processor resources) not
allocate for a fictional set of say 32 registers that are allocated in
a separate "scratchpad" area of RAM.

The real register allocation would then be just a two level wrap-up
optimisation on top of that, with the first pass selecting a set of
the fake registers (equal in number to the rename registers in the
specific processor?) and the second pass as a scheduling pass on top

After all, adress calculation is often a separate unit in modern x86s,
as are there things like memory write forwarding, memory renaming, etc.
that would remove some of cost added with copy ins and outs of the
scratchpad ram.

well, mostly just an idea.

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.