From: "Andreas Färber" <afaerber@suse.de>
To: Aurelien Jarno <aurelien@aurel32.net>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
qemu-devel@nongnu.org, Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH 1/4] tcg/optimize: fix know-zero bits optimization
Date: Tue, 03 Sep 2013 11:50:40 +0200 [thread overview]
Message-ID: <5225B0F0.1020404@suse.de> (raw)
In-Reply-To: <1378189680-11987-2-git-send-email-aurelien@aurel32.net>
FWIW $subject has a typo. While at it...
Am 03.09.2013 08:27, schrieb Aurelien Jarno:
> Known-zero bits optimization is a great idea that helps to generate more
> optimized code. However the current implementation is basically useless
> as the computed mask is not saved.
>
> Fix this to make it really working.
>
> Cc: Richard Henderson <rth@twiddle.net>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> ---
> tcg/optimize.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/tcg/optimize.c b/tcg/optimize.c
> index b29bf25..41f2906 100644
> --- a/tcg/optimize.c
> +++ b/tcg/optimize.c
> @@ -695,7 +695,8 @@ static TCGArg *tcg_constant_folding(TCGContext *s, uint16_t *tcg_opc_ptr,
> break;
> }
>
> - /* Simplify using known-zero bits */
> + /* Simplify using known-zero bits. Currently only ops with a single
> + output argument is supported. */
"ops ... are"?
Cheers,
Andreas
> mask = -1;
> affected = -1;
> switch (op) {
> @@ -1144,6 +1145,11 @@ static TCGArg *tcg_constant_folding(TCGContext *s, uint16_t *tcg_opc_ptr,
> } else {
> for (i = 0; i < def->nb_oargs; i++) {
> reset_temp(args[i]);
> + /* Save the corresponding known-zero bits mask for the
> + first output argument (only one supported so far). */
> + if (i == 0) {
> + temps[args[i]].mask = mask;
> + }
> }
> }
> for (i = 0; i < def->nb_args; i++) {
>
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
next prev parent reply other threads:[~2013-09-03 9:50 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 [this message]
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
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=5225B0F0.1020404@suse.de \
--to=afaerber@suse.de \
--cc=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).