Received: from eggs.gnu.org ([2001:4830:134:3::10]:58320) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bkbPr-00044I-1S for qemu-devel@nongnu.org; Thu, 15 Sep 2016 14:29:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bkbPk-00029A-VH for qemu-devel@nongnu.org; Thu, 15 Sep 2016 14:29:41 -0400 Received: from mail-yw0-f193.google.com ([209.85.161.193]:34731) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bkbPk-000296-QB for qemu-devel@nongnu.org; Thu, 15 Sep 2016 14:29:36 -0400 Received: by mail-yw0-f193.google.com with SMTP id t67so3044915ywg.1 for ; Thu, 15 Sep 2016 11:29:36 -0700 (PDT) Sender: Richard Henderson References: <1472935202-3342-1-git-send-email-rth@twiddle.net> <1472935202-3342-35-git-send-email-rth@twiddle.net> <87bmzpi5yn.fsf@linaro.org> <8760pxhx4k.fsf@linaro.org> From: Richard Henderson Message-ID: Date: Thu, 15 Sep 2016 11:28:33 -0700 MIME-Version: 1.0 In-Reply-To: <8760pxhx4k.fsf@linaro.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v3 34/34] target-alpha: Emulate LL/SC using cmpxchg helpers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?Q?Alex_Benn=c3=a9e?= Cc: qemu-devel@nongnu.org On 09/15/2016 10:48 AM, Alex Bennée wrote: > Ahh ok. The ARM code just allocates temps on demand including for its > zero register which I guess means multiple ones could be assigned. There > is also temp allocation logic to free them at the end of the block. > > I wonder if this is something that should be more of a feature of the > core TCG code because let's face it temp tracking is a pain. Yep, sparc and s390 have a similar bit of temp tracking. It would be nice for that to be generic. > Does the code generator suffer if temps aren't freed as soon as > possible? Is there a reason why we don't just do a general free all > temps at the end of the block? Freeing temps as quickly as possible means that we minimize the number of temps required, and the register allocator has a couple of O(N**2) places, for N == number of temps. r~