This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [new-ra] Development status?
Hi,
On Tue, 20 Jan 2004, Denis Chertykov wrote:
> > > I was interested in comparision of results given by pre-reload based
> > > web_class and regclass based web_class.
> >
> > They at least shouldn't be worse, I think, are they?
>
> The results are *equal* !!! (for x86)
> Exclude a few difficult cases.
Hmm, but theoretically regclass can do much better than pre-reload (at the
expense for sometimes emitting some reloads later). The situation which
it handles better for instance is this:
There are register classes A, B and AB (union of A and B). Now suppose
there is and insns i1 (with two ops) and i2 (one op) having
such constraints:
i1 op0 "a,b" op1 "b,a"
i2 op0 "a"
and in the insn stream we have this:
i1(p0, p1)
i2(p1)
(p0 and p1 are pseudos, i.e. p0 is operand 0 of i1, and p1 is operand 1 of
i1 and operand 0 of i2).
Now pre-reload looks at each insn individually and selects one certain
alternative of it (the cheapest for some definition of cheap). Without
other means it would select alternative 0 for insn i1. Ergo p0 gets class
A and p1 class B.
Now i2 requires p1 to be class A, ergo we need some fixup code. Had
pre-reload selected the second alternative from the beginning it wouldn't
be needed. Sometimes there are even cases where selection of an
alternative should be deferred to even later.
regclass does better in this example. It would determine that the cost of
class A for p1 is less than class B.
> After you got the patch and seeing on results I would discuss the
> problem of register classes in new-ra. Is this OK ?
Yes.
Ciao,
Michael.