From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36688) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKiYM-0003m0-Pz for qemu-devel@nongnu.org; Thu, 30 Jul 2015 03:46:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZKiYK-0008AF-6w for qemu-devel@nongnu.org; Thu, 30 Jul 2015 03:46:58 -0400 Received: from hall.aurel32.net ([2001:bc8:30d7:100::1]:35376) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKiYK-0008A0-1g for qemu-devel@nongnu.org; Thu, 30 Jul 2015 03:46:56 -0400 Date: Thu, 30 Jul 2015 09:46:52 +0200 From: Aurelien Jarno Message-ID: <20150730074652.GS11361@aurel32.net> References: <1437755447-10537-1-git-send-email-aurelien@aurel32.net> <1437755447-10537-5-git-send-email-aurelien@aurel32.net> <87k2tjlz7a.fsf@linaro.org> <20150729162757.GB1655@aurel32.net> <87io92n19z.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <87io92n19z.fsf@linaro.org> Subject: Re: [Qemu-devel] [PATCH for-2.5 04/10] tcg/optimize: allow constant to have copies List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alex =?iso-8859-15?Q?Benn=E9e?= Cc: qemu-devel@nongnu.org, Richard Henderson On 2015-07-29 21:42, Alex Benn=E9e wrote: >=20 > Aurelien Jarno writes: >=20 > > On 2015-07-29 17:12, Alex Benn=E9e wrote: > >>=20 > >> Aurelien Jarno writes: > >>=20 > >> > Now that copies and constants are tracked separately, we can allow > >> > constant to have copies, deferring the choice to use a register or a > >> > constant to the register allocation pass. This prevent this kind of > >> > regular constant reloading: > >> > > >> > -OUT: [size=3D338] > >> > +OUT: [size=3D298] > >> > mov -0x4(%r14),%ebp > >> > test %ebp,%ebp > >> > jne 0x7ffbe9cb0ed6 > >> > mov $0x40002219f8,%rbp > >> > mov %rbp,(%r14) > >> > - mov $0x40002219f8,%rbp > >> > mov $0x4000221a20,%rbx > >> > mov %rbp,(%rbx) > >> > mov $0x4000000000,%rbp > >> > mov %rbp,(%r14) > > >> > --- a/tcg/optimize.c > >> > +++ b/tcg/optimize.c > >> > @@ -237,11 +237,6 @@ static void tcg_opt_gen_mov(TCGContext *s, TCGO= p *op, TCGArg *args, > >> > return; > >> > } > >> > =20 > >> > - if (temp_is_const(src)) { > >> > - tcg_opt_gen_movi(s, op, args, dst, temps[src].val); > >> > - return; > >> > - } > >> > - > >>=20 > >> That looks suspicious, surely we only want to drop the move if we > >> already have the const somewhere else? > > > > That's actually the while point of this patchset, to avoid converting > > mov into moving for constant values and thus loosing the link between > > temps. >=20 > I get that, I guess I didn't follow the previous loading of the constant > value. Maybe showing the ops in the commit message will make it clearer. Ok, I'll do that in v3. --=20 Aurelien Jarno GPG: 4096R/1DDD8C9B aurelien@aurel32.net http://www.aurel32.net