|x86 register allocation email@example.com (1999-03-23)|
|Re: x86 register allocation firstname.lastname@example.org (1999-03-28)|
|Re: x86 register allocation email@example.com (Robert Sherry) (1999-03-28)|
|x86 register allocation firstname.lastname@example.org (Matt Postiff) (1999-03-28)|
|Re: x86 register allocation email@example.com (1999-03-28)|
|Re: x86 register allocation firstname.lastname@example.org (Sander Vesik) (1999-03-28)|
|Re: x86 register allocation email@example.com (Charles E. Bortle, Jr.) (1999-03-28)|
|From:||firstname.lastname@example.org (Ben Combee)|
|Date:||28 Mar 1999 17:02:26 -0500|
> Can anyone give me a pointer to help me with x86 register
The approach we take in CodeWarrior/x86 is pretty simple:
1) Generate code, using virtual registers for most things, but
explicit register references when required by the instruction set.
2) Do lifetime analysis for all variables and temporaries. Treat an
explicit reference as a temporary live for one instruction and already
bound to a register.
3) Starting with that as your begin point, use a standard register
coloring algorithm, such as a weighted graph coloring.
I agree with John that this works better on the more orthogonal
386-based architecture. Weighting is very important -- you really
don't want something with a long lifetime getting put in a register
and forcing your loop variables out into memory.
Ben Combee <email@example.com> -- x86/Win32/NetWare CompilerWarrior
Return to the
Search the comp.compilers archives again.