qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 01/10] tcg: Split out swap_commutative as a subr


From: Aurelien Jarno
Subject: Re: [Qemu-devel] [PATCH 01/10] tcg: Split out swap_commutative as a subroutine
Date: Tue, 9 Oct 2012 17:31:39 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

On Tue, Oct 09, 2012 at 08:23:27AM -0700, Richard Henderson wrote:
> On 10/09/2012 08:13 AM, Aurelien Jarno wrote:
> >> > It also prefers
> >> > 
> >> >   add r, r, c
> >> > over
> >> >   add r, c, r
> >> > 
> >> > when both inputs are known constants.  This doesn't matter for true add, 
> >> > as
> >> > we will fully constant fold that.  But it matters for a follow-on patch 
> >> > using
> >> > this routine for add2 which may not be fully foldable.
> ...
> > Does this sum += and -= actually generates better code than the previous
> > one? It's not something obvious to read (fortunately there is the
> > comment for helping), so if it doesn't bring any optimization, it's
> > better to keep the previous form.
> 
> Yes.  See the comment within the log above.

I am not talking about the code generated by TCG, but rather by the code
generated by GCC. Does using sum += and sum -= brings a gain to compare
to the equivalent if function?

-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
address@hidden                 http://www.aurel32.net



reply via email to

[Prev in Thread] Current Thread [Next in Thread]