From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42257) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGnG5-0003JX-Pg for qemu-devel@nongnu.org; Tue, 03 Sep 2013 05:50:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VGnFz-000878-Kc for qemu-devel@nongnu.org; Tue, 03 Sep 2013 05:50:49 -0400 Received: from cantor2.suse.de ([195.135.220.15]:54967 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGnFz-000874-7B for qemu-devel@nongnu.org; Tue, 03 Sep 2013 05:50:43 -0400 Message-ID: <5225B0F0.1020404@suse.de> Date: Tue, 03 Sep 2013 11:50:40 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1378189680-11987-1-git-send-email-aurelien@aurel32.net> <1378189680-11987-2-git-send-email-aurelien@aurel32.net> In-Reply-To: <1378189680-11987-2-git-send-email-aurelien@aurel32.net> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 1/4] tcg/optimize: fix know-zero bits optimization List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Aurelien Jarno Cc: Paolo Bonzini , qemu-devel@nongnu.org, Richard Henderson 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 mor= e > optimized code. However the current implementation is basically useless > as the computed mask is not saved. >=20 > Fix this to make it really working. >=20 > Cc: Richard Henderson > Cc: Paolo Bonzini > Signed-off-by: Aurelien Jarno > --- > tcg/optimize.c | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) >=20 > 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; > } > =20 > - /* Simplify using known-zero bits */ > + /* Simplify using known-zero bits. Currently only ops with a s= ingle > + output argument is supported. */ "ops ... are"? Cheers, Andreas > mask =3D -1; > affected =3D -1; > switch (op) { > @@ -1144,6 +1145,11 @@ static TCGArg *tcg_constant_folding(TCGContext *= s, uint16_t *tcg_opc_ptr, > } else { > for (i =3D 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 fa= r). */ > + if (i =3D=3D 0) { > + temps[args[i]].mask =3D mask; > + } > } > } > for (i =3D 0; i < def->nb_args; i++) { >=20 --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg