From: Richard Henderson <rth@twiddle.net>
To: Aurelien Jarno <aurelien@aurel32.net>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v1 4/5] tcg/optimize: fold constant test in tcg_opt_gen_mov
Date: Thu, 04 Jun 2015 14:07:37 -0700 [thread overview]
Message-ID: <5570BE19.7090000@twiddle.net> (raw)
In-Reply-To: <1433447607-31184-5-git-send-email-aurelien@aurel32.net>
On 06/04/2015 12:53 PM, Aurelien Jarno wrote:
> +
> static void tcg_opt_gen_mov(TCGContext *s, TCGOp *op, TCGArg *args,
> TCGArg dst, TCGArg src)
> {
> + if (temps[src].state == TCG_TEMP_CONST) {
> + tcg_opt_gen_movi(s, op, args, dst, temps[src].val);
> + return;
> + }
> +
> if (temps_are_copies(dst, src)) {
> tcg_op_remove(s, op);
> return;
I was going to comment re patch 3/5, but here's better, since it actually
tidies up all the places I would have pointed out.
I think you should check for copies first, and only then do the TEMP_CONST
check. That way we get to remove an op.
r~
next prev parent reply other threads:[~2015-06-04 21:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-04 19:53 [Qemu-devel] [PATCH v1 0/5] tcg/optimize: small cleanups Aurelien Jarno
2015-06-04 19:53 ` [Qemu-devel] [PATCH v1 1/5] tcg/optimize: remove opc argument from tcg_opt_gen_movi Aurelien Jarno
2015-06-04 19:53 ` [Qemu-devel] [PATCH v1 2/5] tcg/optimize: remove opc argument from tcg_opt_gen_mov Aurelien Jarno
2015-06-04 19:53 ` [Qemu-devel] [PATCH v1 3/5] tcg/optimize: fold temp copies test in tcg_opt_gen_mov Aurelien Jarno
2015-06-04 19:53 ` [Qemu-devel] [PATCH v1 4/5] tcg/optimize: fold constant " Aurelien Jarno
2015-06-04 21:07 ` Richard Henderson [this message]
2015-06-04 21:44 ` Aurelien Jarno
2015-06-04 22:06 ` Richard Henderson
2015-06-05 9:19 ` [Qemu-devel] [PATCH v2] " Aurelien Jarno
2015-06-04 19:53 ` [Qemu-devel] [PATCH v1 5/5] tcg/optimize: rename tcg_constant_folding Aurelien Jarno
2015-06-04 21:09 ` [Qemu-devel] [PATCH v1 0/5] tcg/optimize: small cleanups 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=5570BE19.7090000@twiddle.net \
--to=rth@twiddle.net \
--cc=aurelien@aurel32.net \
--cc=qemu-devel@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.