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
- From: Andy Walker <ja_walker at earthlink dot net>
- To: Chris Lattner <sabre at nondot dot org>
- Cc: gcc at gcc dot gnu dot org
- Date: Sat, 28 Dec 2002 22:31:10 -0600
- Subject: Re: An unusual Performance approach using Synthetic registers
- References: <Pine.LNX.4.44.0212270255330.14577-100000@nondot.org>
Thank you for your kind comments. Also, thank you very much for the
reference to the Lal George paper.
On Friday 27 December 2002 03:03 am, Chris Lattner wrote:
<snip>
> You may win a suprising amount strictly because of the register
> renaming hardware found on modern x86 processors, which would eliminate
> the L1 reference.
I had not considered this.
<snip>
> On the other hand, I think this approach is not the right one to take if
> improving optimizer effectiveness is the goal.
My intuitin says this can be a fertile area for investigation, for these
reasons: Algorithms for register use optimization are very good. My
experience with numerical analysis and evaluation of algorithms, in graduate
school, leads me to believe that color-graphing leads to a result that is
either optimal or near-optimal.
Algorithms for memory use optimization are not nearly so well developed.
In one sense, this approach co-opts the optimization algorithms for registers
and uses them on small amounts of memory.
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.
<snip>
> You will probably find that the number of "virtual" registers varies
> widely across different incarnations of the architecture, implying that
> the -march options should change the number of virtual registers. Maybe
> keeping this in mind when you design the code will help down the line. :)
I expect the benefit of Synthetic registers to vary with the complexity of a
function. For itty-bitty subroutines, they will be a detriment, not a
benefit. For longer, complicated, routines, there will be more benefit. I
do not hold out my coding skills as an example of the best, but my keyboard
does not really get warmed up until after I have added a couple of hundred
lines to a routine.
On machines like the intel 80386 that do not use cache, I expect Synthetic
registers to have very limited benefits.
> This will certainly be an interesting project, please keep the list
> informed with what you find. :)
Certainly.
> -Chris