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


On Sat, 28 Dec 2002, Andy Walker wrote:
> Thank you for your kind comments.  Also, thank you very much for the
> reference to the Lal George paper.

No problem, glad to help :)

> > 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.

I understand exactly what you're saying and why you think it will work.
However, the true problem is that GCC performs most of its scalar
optimizations on the RTL representation, which operates on values in
physical registers.  For an machine with few physical registers, such as
X86, many scalar values are spilled to the stack, impeding optimization.

The fix for this particular problem, IMHO, is not to increase the number
of registers, for this is only a bandaid.  Instead, optimizations should
be performed on a representation which is not limited by the number of
registers in the target: in GCC this would be the tree representation, or
hopefully soon the GENERIC and GIMPLE representations.  The idea here is
that you perform optimizations on a representation exposing an infinite
virtual register set, so scalar stay scalars, and optimizations are
effective despite the number of physical registers in the target.

-Chris

-- 
http://llvm.cs.uiuc.edu/
http://www.nondot.org/~sabre/Projects/


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