From nobody Wed Nov 27 11:44:32 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1699325630; cv=none; d=zohomail.com; s=zohoarc; b=hNPpEJ/1B/4wcEFHgCXkMPLGMus6eoPxMRWBerkeBANZn4wnp53xhPs38a/yra8xVBmg1HL5j2e4rCWEFCh4RjTc07B1Zd6vc7iYXhBSzE9HmF9FZEU9GFsauhGajZ0iS2hLHeYB7iBKpToRuxs51jxSdB0xBf8gpsoNwtauw1w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699325630; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=F9d35huw1p7Cu08U8Degtbo7sfMGmI1/7YRi8G8catM=; b=Pc1s7haMu9oiCRc+ukJJej3PSVJeY5vvv95yvqMokfqZ5ONmyzyQ3fWDVJlpieRcDUg48WAaVpktpszusOAe2MNrzMHf0t89T6a2smujme6dqaNAkdfGR+8zDf7r+uNBIcJYz+G+tPCqKj0wMvuhiN/TywaZGLvPxSpYvK0EZG4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1699325630051957.2139048022689; Mon, 6 Nov 2023 18:53:50 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0C9O-0008Q4-Tb; Mon, 06 Nov 2023 21:49:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r0C9M-0008Oi-6h for qemu-devel@nongnu.org; Mon, 06 Nov 2023 21:49:08 -0500 Received: from mail-yb1-xb2b.google.com ([2607:f8b0:4864:20::b2b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r0C9K-0005vh-Iw for qemu-devel@nongnu.org; Mon, 06 Nov 2023 21:49:07 -0500 Received: by mail-yb1-xb2b.google.com with SMTP id 3f1490d57ef6-d9beb863816so5338570276.1 for ; Mon, 06 Nov 2023 18:49:06 -0800 (PST) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id fn11-20020a056a002fcb00b006bff7c36fb3sm6367478pfb.95.2023.11.06.18.49.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 18:49:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699325345; x=1699930145; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=F9d35huw1p7Cu08U8Degtbo7sfMGmI1/7YRi8G8catM=; b=ikxXuZB3Aw53PIkjED8CrYNcfD5YG71A30a9w4Kr6RgTZjtA6NoSO8x13lYADataqF 4Tl/dTCPptpgd+RJdB+dPLmmn54+xr1IAdd5uNSZ7a4eWNrcoeElfZR3Bh5rch4zkg1c byAjT+n/Fnm22z0uf5HRMpJ6B0DM9TgtUGNk6zumk7dQRrITqvbaH4M2dJ+hxdSh3Eoi F1AOqKwyjW/P2f4PPivF5J89109atHM0dxEcNtEV1KEpX7keLVxQy4lZTU8AVmuViYL4 Ln5pR7WYLZwCJ38SjHrr7UxHs8Vjy744ZbiSDuT7Y0iimQrEVCxaQ6+gO6uMO/l82MdW rWsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699325345; x=1699930145; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=F9d35huw1p7Cu08U8Degtbo7sfMGmI1/7YRi8G8catM=; b=SKGEaukiZaMxJZr0C/fpWywgZ61PH9s6LaFpslFPLlaNX0ziNRwh64sW9s7ZO02QMb SJL7zAmiiNLu2P82gYw+Vqw5z3rBqZSnWNQDVYYWNNwnvCHO/0LEfhXguuRfhRNbDuex vj4XDAHyhJ7lLgmb2AMVXYz0GzXJTku7mlJSDG1FH7dgzAkb77kb1OhOUmP6vwHggqiP AcH4HeQxBzAr/GrqeJKEmVIfHdmOi0Etq0h8jwMBGJfE9+7hFYYUvXoA8zStMC5BscaX EzDvSyjWSaQrHH5Wik2D9I0mpnJxFWzU6HKhT6opFSoOZv17BXT4L2dnUkqZ0pEdTKq6 cMGg== X-Gm-Message-State: AOJu0YyZbLLce6na1sEkosUvIkU9Na10MSTo6jHD7x4ujZQoNFA1R3Rc f27nLDGC2926XQ9ndQJPAOWzNBgd8AtbO1g+p4c= X-Google-Smtp-Source: AGHT+IHH4ncyd/8DQjQ2lnytMPI/3S91uC1HQy+Zi39mRJsz7CLcEkTglg/0+mfJBYGvLoCYCJJCoQ== X-Received: by 2002:a5b:706:0:b0:da0:c49a:5103 with SMTP id g6-20020a5b0706000000b00da0c49a5103mr30263644ybq.47.1699325345301; Mon, 06 Nov 2023 18:49:05 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Song Gao , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 27/35] tcg/optimize: Pipe OptContext into reset_ts Date: Mon, 6 Nov 2023 18:48:34 -0800 Message-Id: <20231107024842.7650-28-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231107024842.7650-1-richard.henderson@linaro.org> References: <20231107024842.7650-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::b2b; envelope-from=richard.henderson@linaro.org; helo=mail-yb1-xb2b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1699325630989100001 Will be needed in the next patch. Reviewed-by: Song Gao Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- tcg/optimize.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 6b072d4cdb..cbb095b241 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -123,7 +123,7 @@ static inline bool ts_is_copy(TCGTemp *ts) } =20 /* Reset TEMP's state, possibly removing the temp for the list of copies. = */ -static void reset_ts(TCGTemp *ts) +static void reset_ts(OptContext *ctx, TCGTemp *ts) { TempOptInfo *ti =3D ts_info(ts); TempOptInfo *pi =3D ts_info(ti->prev_copy); @@ -138,9 +138,9 @@ static void reset_ts(TCGTemp *ts) ti->s_mask =3D 0; } =20 -static void reset_temp(TCGArg arg) +static void reset_temp(OptContext *ctx, TCGArg arg) { - reset_ts(arg_temp(arg)); + reset_ts(ctx, arg_temp(arg)); } =20 /* Initialize and activate a temporary. */ @@ -239,7 +239,7 @@ static bool tcg_opt_gen_mov(OptContext *ctx, TCGOp *op,= TCGArg dst, TCGArg src) return true; } =20 - reset_ts(dst_ts); + reset_ts(ctx, dst_ts); di =3D ts_info(dst_ts); si =3D ts_info(src_ts); =20 @@ -702,7 +702,7 @@ static void finish_folding(OptContext *ctx, TCGOp *op) nb_oargs =3D def->nb_oargs; for (i =3D 0; i < nb_oargs; i++) { TCGTemp *ts =3D arg_temp(op->args[i]); - reset_ts(ts); + reset_ts(ctx, ts); /* * Save the corresponding known-zero/sign bits mask for the * first output argument (only one supported so far). @@ -1215,14 +1215,14 @@ static bool fold_call(OptContext *ctx, TCGOp *op) =20 for (i =3D 0; i < nb_globals; i++) { if (test_bit(i, ctx->temps_used.l)) { - reset_ts(&ctx->tcg->temps[i]); + reset_ts(ctx, &ctx->tcg->temps[i]); } } } =20 /* Reset temp data for outputs. */ for (i =3D 0; i < nb_oargs; i++) { - reset_temp(op->args[i]); + reset_temp(ctx, op->args[i]); } =20 /* Stop optimizing MB across calls. */ --=20 2.34.1