From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38292) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvWY1-0004fe-8o for qemu-devel@nongnu.org; Thu, 21 May 2015 15:54:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YvWXx-0005Kb-6Y for qemu-devel@nongnu.org; Thu, 21 May 2015 15:54:29 -0400 Received: from mail-qk0-x22d.google.com ([2607:f8b0:400d:c09::22d]:34960) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvWXx-0005KU-2K for qemu-devel@nongnu.org; Thu, 21 May 2015 15:54:25 -0400 Received: by qkdn188 with SMTP id n188so59923994qkd.2 for ; Thu, 21 May 2015 12:54:24 -0700 (PDT) Sender: Richard Henderson Message-ID: <555E37ED.6080607@twiddle.net> Date: Thu, 21 May 2015 12:54:21 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1432236921-15267-1-git-send-email-aurelien@aurel32.net> In-Reply-To: <1432236921-15267-1-git-send-email-aurelien@aurel32.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2] tcg: fix dead computation for repeated input arguments List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Aurelien Jarno , qemu-devel@nongnu.org On 05/21/2015 12:35 PM, Aurelien Jarno wrote: > When the same temp is used twice or more as an input argument to a TCG > instruction, the dead computation code doesn't recognize the second use > as a dead temp. This is because the temp is marked as live in the same > loop where dead inputs are checked. > > The fix is to split the loop in two parts. This avoid emitting a move > and using a register for the movcond instruction when used as "move if > true" on x86-64. This might bring more improvements on RISC TCG targets > which don't have outputs aliased to inputs. > > Cc: Richard Henderson > Signed-off-by: Aurelien Jarno > --- > tcg/tcg.c | 14 +++++++++++--- > 1 file changed, 11 insertions(+), 3 deletions(-) Reviewed-by: Richard Henderson r~