From nobody Fri Dec 19 20:11:57 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1543384069882505.21106002614465; Tue, 27 Nov 2018 21:47:49 -0800 (PST) Received: from localhost ([::1]:46071 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRshM-0003JF-Nm for importer@patchew.org; Wed, 28 Nov 2018 00:47:44 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47985) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRsYl-000415-RZ for qemu-devel@nongnu.org; Wed, 28 Nov 2018 00:38:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gRsYi-0004N5-T8 for qemu-devel@nongnu.org; Wed, 28 Nov 2018 00:38:51 -0500 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]:34803) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gRsYi-0004MH-N2 for qemu-devel@nongnu.org; Wed, 28 Nov 2018 00:38:48 -0500 Received: by mail-pl1-x643.google.com with SMTP id f12-v6so16824726plo.1 for ; Tue, 27 Nov 2018 21:38:48 -0800 (PST) Received: from cloudburst.twiddle.net (97-113-170-180.tukw.qwest.net. [97.113.170.180]) by smtp.gmail.com with ESMTPSA id 19sm8569336pfs.108.2018.11.27.21.38.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 27 Nov 2018 21:38:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=l5Q1tbJR9WcMsBqUTZQX9ofdmMJFwTlSDLTXSU4uz0U=; b=gGrebFdUGIeqKB+0INeGeoxsV5xwHFuYasUKX3bg1caBu+KA51O8ki8wUonqKMyeFS 6uD5zq8VGCIFunAarKAlM7/JfNhPE/n3n3huFR6XH1weu2+/eMxQmB8guJxm2t9LLQKS yMq8U05rzo29gxV73zQ83R5XWyuidj1vmeZz8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=l5Q1tbJR9WcMsBqUTZQX9ofdmMJFwTlSDLTXSU4uz0U=; b=d3+ivxTVWBo0qWhKiLs+0jDP+Uw88pHQEx6LYeQ0Ddqtk1HmhNtS+wkvqWeAOYmhaw LYOpfv+p1zE262qCF6TL38UAzirzR+CSV70xzX1CsAIpWDFZ1DDflWP0ibTi5MeJ/4GP cHwhqrMBf34BWVfMJA0X+n8S0Z4G4H1KFx3nTs6cU6ChROOUgXESneyRCF5TKE2tZa2/ UA0vqjEaPgnniBhK/BsFx3OhzBLy6x355swBdmPRHdGDcdvI4+ydIoG4l1aOWx3MOZPG RMQ0XCpxg0060iMS3sh6lb//vRgupLESfe7z+WPhmwmuN5C+5lEgr+eUoOEZw6Y9sVJJ PWzg== X-Gm-Message-State: AA+aEWZprC8SJ0bpVFcHKM/Qw3IWokfVLB9DVkqp2eW7bMftvEeQAcIt xvjYYudqda7lokE4HDh2eSIREqQlle4= X-Google-Smtp-Source: AFSGD/V2BpXzQ6akNxzXw5b+skTe73w4RWnkh237qe/mQcqKmCudLqJ9JgNLCQq8FU0T5hUX0VeBVQ== X-Received: by 2002:a17:902:f082:: with SMTP id go2mr35602521plb.115.1543383527408; Tue, 27 Nov 2018 21:38:47 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 27 Nov 2018 21:38:31 -0800 Message-Id: <20181128053834.10861-10-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20181128053834.10861-1-richard.henderson@linaro.org> References: <20181128053834.10861-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::643 Subject: [Qemu-devel] [PATCH 09/12] tcg: Rename and adjust liveness_pass_1 helpers X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: cota@braap.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" No need for a "tcg_" prefix for a static function; we already have another "la_" prefix for indicating liveness analysis. Pass in nb_globals and nb_temps, as we will already have them in registers for other loops within the parent function. Signed-off-by: Richard Henderson --- tcg/tcg.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index 82f9a66d31..27814df882 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -2389,10 +2389,8 @@ static void reachable_code_pass(TCGContext *s) =20 /* liveness analysis: end of function: all temps are dead, and globals should be in memory. */ -static void tcg_la_func_end(TCGContext *s) +static void la_func_end(TCGContext *s, int ng, int nt) { - int ng =3D s->nb_globals; - int nt =3D s->nb_temps; int i; =20 for (i =3D 0; i < ng; ++i) { @@ -2405,10 +2403,8 @@ static void tcg_la_func_end(TCGContext *s) =20 /* liveness analysis: end of basic block: all temps are dead, globals and local temps should be in memory. */ -static void tcg_la_bb_end(TCGContext *s) +static void la_bb_end(TCGContext *s, int ng, int nt) { - int ng =3D s->nb_globals; - int nt =3D s->nb_temps; int i; =20 for (i =3D 0; i < ng; ++i) { @@ -2427,9 +2423,10 @@ static void tcg_la_bb_end(TCGContext *s) static void liveness_pass_1(TCGContext *s) { int nb_globals =3D s->nb_globals; + int nb_temps =3D s->nb_temps; TCGOp *op, *op_prev; =20 - tcg_la_func_end(s); + la_func_end(s, nb_globals, nb_temps); =20 QTAILQ_FOREACH_REVERSE_SAFE(op, &s->ops, TCGOpHead, link, op_prev) { int i, nb_iargs, nb_oargs; @@ -2624,7 +2621,7 @@ static void liveness_pass_1(TCGContext *s) =20 /* if end of basic block, update */ if (def->flags & TCG_OPF_BB_END) { - tcg_la_bb_end(s); + la_bb_end(s, nb_globals, nb_temps); } else if (def->flags & TCG_OPF_SIDE_EFFECTS) { /* globals should be synced to memory */ for (i =3D 0; i < nb_globals; i++) { --=20 2.17.2