From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34889) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLDCQ-00035c-Kg for qemu-devel@nongnu.org; Wed, 05 Mar 2014 09:53:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WLDCI-0006qF-8W for qemu-devel@nongnu.org; Wed, 05 Mar 2014 09:53:34 -0500 Received: from mail-qc0-x234.google.com ([2607:f8b0:400d:c01::234]:44048) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLDCI-0006q3-4u for qemu-devel@nongnu.org; Wed, 05 Mar 2014 09:53:26 -0500 Received: by mail-qc0-f180.google.com with SMTP id x3so1197345qcv.39 for ; Wed, 05 Mar 2014 06:53:25 -0800 (PST) Sender: Richard Henderson Message-ID: <53173A61.6080200@twiddle.net> Date: Wed, 05 Mar 2014 06:53:21 -0800 From: Richard Henderson MIME-Version: 1.0 References: <1393952650-16802-1-git-send-email-rth@twiddle.net> <1393952650-16802-7-git-send-email-rth@twiddle.net> <87a9d4deqa.fsf@linaro.org> In-Reply-To: <87a9d4deqa.fsf@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH 06/10] tcg-aarch64: Hoist common argument loadsin tcg_out_opp List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?QWxleCBCZW5uw6ll?= Cc: Peter Maydell , qemu-devel@nongnu.org, Claudio Fontana On 03/05/2014 04:14 AM, Alex Bennée wrote: >> > + /* Hoist the loads of the most common arguments. */ >> > + TCGArg a0 = args[0]; >> > + TCGArg a1 = args[1]; >> > + TCGArg a2 = args[2]; >> > + int c2 = const_args[2]; >> > + > The code certainly looks a lot cleaner but I'm not sure what this gains > us. Surely the compiler should have done all this for us? The compiler will only hoist stuff that's used on all following paths, not stuff that's used on most following paths. It also gains us variables in which we can manipulate the arguments before we pass them off. E.g. sign-extending 32-bit constants before entering the 64-bit path. r~