Received: from eggs.gnu.org ([208.118.235.92]:43559) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THKLU-0003ME-EQ for qemu-devel@nongnu.org; Thu, 27 Sep 2012 16:06:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1THKLP-00018k-Vo for qemu-devel@nongnu.org; Thu, 27 Sep 2012 16:06:04 -0400 Received: from hall.aurel32.net ([88.191.126.93]:58815) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THKLP-00018U-Q5 for qemu-devel@nongnu.org; Thu, 27 Sep 2012 16:05:59 -0400 Date: Thu, 27 Sep 2012 22:05:57 +0200 From: Aurelien Jarno Message-ID: <20120927200557.GJ20151@ohm.aurel32.net> References: <1348766113-18373-1-git-send-email-aurelien@aurel32.net> <1348766113-18373-5-git-send-email-aurelien@aurel32.net> <50649D4A.5050004@twiddle.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <50649D4A.5050004@twiddle.net> Subject: Re: [Qemu-devel] [PATCH 04/13] tcg: sync output arguments on liveness request List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: qemu-devel@nongnu.org On Thu, Sep 27, 2012 at 11:39:06AM -0700, Richard Henderson wrote: > On 09/27/2012 10:15 AM, Aurelien Jarno wrote: > > Synchronize an output argument when requested by the liveness analysis. > > This is needed so that the temp can be declared dead later. > > > > For that, add a new op_sync_args table in which each bit tells if the > > corresponding output argument needs to be synchronized with the memory. > > Pass it to the tcg_reg_alloc_* functions, and honor this bit. We need to > > synchronize the argument before marking it as dead, and we have to make > > sure all the infos about the temp are correctly filled. > > > > At the same time change some types from unsigned int to uint16_t when > > passing op_dead_args. > > > > Signed-off-by: Aurelien Jarno > > If I understand the patch correctly, this patch alone is no change, > since no sync_args bits are ever set. They are set later in this series, this is a preparatory work. > Which means that > > > + if (NEED_SYNC_ARG(i)) { > > + tcg_reg_sync(s, reg); > > + } > > + if (IS_DEAD_ARG(i)) { > > + temp_dead(s, args[i]); > > + } > > Might ought to be better written as > > if (IS_DEAD_ARG(i)) { > ... > } else if (NEED_SYNC_ARG(i)) { > ... > } > > as temp_dead implies sync from patches 2 and 3. This pattern is also No temp_dead doesn't imply sync. temp_dead is only marking the temp as dead, it doesn' save it. > replicated 3-4 times. Subroutine? > Replicated in this patch, but only 2 are left at the end. -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net