public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Michael Matz <matz@suse.de>
To: Denis Chertykov <denisc@overta.ru>
Cc: gcc@gcc.gnu.org
Subject: Re: [new-ra] Development status?
Date: Wed, 21 Jan 2004 14:11:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.58.0401211447540.3429@wotan.suse.de> (raw)
In-Reply-To: <8yk21qi8.fsf@localhost.localdomain>

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.

      reply	other threads:[~2004-01-21 13:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-18  3:13 Giovanni Bajo
2004-01-19  9:58 ` Michael Matz
2004-01-20 16:35   ` Denis Chertykov
2004-01-20 16:48     ` Michael Matz
2004-01-20 17:26       ` Denis Chertykov
2004-01-21 14:11         ` Michael Matz [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.58.0401211447540.3429@wotan.suse.de \
    --to=matz@suse.de \
    --cc=denisc@overta.ru \
    --cc=gcc@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).