qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Aurelien Jarno <aurelien@aurel32.net>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH 0/4] tcg/optimize: fixes and improvements
Date: Mon, 9 Sep 2013 19:04:31 +0200	[thread overview]
Message-ID: <20130909170431.GA23537@ohm.aurel32.net> (raw)
In-Reply-To: <52258DE2.80108@redhat.com>

On Tue, Sep 03, 2013 at 09:21:06AM +0200, Paolo Bonzini wrote:
> Il 03/09/2013 08:27, Aurelien Jarno ha scritto:
> > This patchset first fixes known-zero bits optimization so that it is
> > actually used, and does some further optimizations for 32-bit ops and
> > unsigned loads.
> > 
> > Aurelien Jarno (4):
> >   tcg/optimize: fix know-zero bits optimization
> >   tcg/optimize: fix known-zero bits for right shift ops
> >   tcg/optimize: improve known-zero bits for 32-bit ops
> >   tcg/optimize: add known-zero bits compute for load ops
> > 
> >  tcg/optimize.c |   48 +++++++++++++++++++++++++++++++++++++++++++-----
> >  1 file changed, 43 insertions(+), 5 deletions(-)
> > 
> 
> Commit message 1 is a bit misleading, because the optimization still
> works for quite a few cases involving constant and copy propagation.
> However, I had the same patch in my queue, so I can't deny that there is
> a problem. :)

I have just checked, and it does indeed work for a few cases involving
constants. That said, it doesn't change the resulting TCG code, as these
cases were already handled by some other optimizations.

That let me ask a question, about why the bit propagation has been added
in the middle of other optimizations, and not for example immediately
after swapping commutative ops or just before the constant folding.

> Two questions:
> 
> 1) should patch 2 be CCed to qemu-stable?

I considered it was not a problem given I thought the optimization was
basically disabled. I'll fix that in the new version.

> 2) should patches 1 and 2 be inverted to avoid triggering bugs?

Good idea.

Thanks for the review, I'll send an updated version.

-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net

  reply	other threads:[~2013-09-09 17:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-03  6:27 [Qemu-devel] [PATCH 0/4] tcg/optimize: fixes and improvements Aurelien Jarno
2013-09-03  6:27 ` [Qemu-devel] [PATCH 1/4] tcg/optimize: fix know-zero bits optimization Aurelien Jarno
2013-09-03  9:50   ` Andreas Färber
2013-09-03  6:27 ` [Qemu-devel] [PATCH 2/4] tcg/optimize: fix known-zero bits for right shift ops Aurelien Jarno
2013-09-03  6:27 ` [Qemu-devel] [PATCH 3/4] tcg/optimize: improve known-zero bits for 32-bit ops Aurelien Jarno
2013-09-03  6:28 ` [Qemu-devel] [PATCH 4/4] tcg/optimize: add known-zero bits compute for load ops Aurelien Jarno
2013-09-03  7:21 ` [Qemu-devel] [PATCH 0/4] tcg/optimize: fixes and improvements Paolo Bonzini
2013-09-09 17:04   ` Aurelien Jarno [this message]
2013-09-09 17:14     ` Paolo Bonzini
2013-09-03 15:55 ` Richard Henderson

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=20130909170431.GA23537@ohm.aurel32.net \
    --to=aurelien@aurel32.net \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /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 NNTP newsgroup(s).