This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: An unusual Performance approach using Synthetic registers


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]