From nobody Tue Nov 26 06:54:15 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 ARC-Seal: i=1; a=rsa-sha256; t=1710165650; cv=none; d=zohomail.com; s=zohoarc; b=kjNaYJ8CA4pkKo0gt+tEDEZpUtiLs45bgak+Cu1vHe3SZmEAmvlT46ofAolcUtDv7iHm7slgBoVRnvkv+wHw/MSNSbBm21VCPMwAh4IuaKZHF6XXtt3J2DBBrWh8kr5485S0kjhnRLTzYnL6jQLEhpi717aQCCoE8cG1G5+IAUs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1710165650; 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=M1pgxbL4ext+eLfj8GE9V3VngjTMGW2LA/FcQ0QZgQg=; b=PpYn0O7AzDOs7wwP4mhySut/N6rzsX8PoTm5tmi1ha5hvoEqIYmDUM3xB5qgmaPTchY5XlOYtlNNRo58y9/YkkVzEO6Prik0Pt9FrTLA1dEmSZDrZmqBzHHho0cRtCYVmMKDrQchPmBnmUGn/GiDnKgnmhYNiBdJKk0/iFZoH/g= 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1710165650636518.924024014064; Mon, 11 Mar 2024 07:00:50 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rjgBb-0005FY-Vf; Mon, 11 Mar 2024 09:59:28 -0400 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 1rjgBY-0005Cw-MH for qemu-devel@nongnu.org; Mon, 11 Mar 2024 09:59:25 -0400 Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rjgBX-0003fP-5V for qemu-devel@nongnu.org; Mon, 11 Mar 2024 09:59:24 -0400 Received: by mail-pg1-x532.google.com with SMTP id 41be03b00d2f7-5e4f79007ffso1637454a12.2 for ; Mon, 11 Mar 2024 06:59:22 -0700 (PDT) Received: from grind.. ([177.94.15.159]) by smtp.gmail.com with ESMTPSA id nm3-20020a17090b19c300b0029c12fa64b9sm1324920pjb.4.2024.03.11.06.59.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 06:59:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1710165561; x=1710770361; 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=M1pgxbL4ext+eLfj8GE9V3VngjTMGW2LA/FcQ0QZgQg=; b=gkb6oqd/sz129hj/+aGAQVVazaIJTsJsUvcVIrgDw+2ZQNxl7VO7q93081ia4IDCwm VbopaVLwchd6WPss/G8RArZCAzZbNenHcHqze4o5XQLny/87+MEgQJx6KETb56HChZA/ M6zZ8wIB+R85IaKnRdJLS8xsxvT0oGZz8l7HF8gLAmEhtWFW3WZQcZL4y6nwUtKtq+Ke y6NyKEOL2jEit4yuIyQvkpjZR/KHPdOAiUZTCcPVuxgrr1nvyCvotbow1O50cbLtrbxX EJO64jBBGUDfetYlGb1PvgIh8p76Nse9m08gZN81DyUQKzirNlS34Bx37kehmo/9mO/K MfDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710165561; x=1710770361; 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=M1pgxbL4ext+eLfj8GE9V3VngjTMGW2LA/FcQ0QZgQg=; b=ZMDOf1jlWpQqzLB7Rqh47QdSlSqMbg6H7iCSd7JSKr51NYGeGcVdBEbuETEIvjwLyM ueUJQbAqy6tiff/NP6/hzyqPqDpV4nGCTavGqd7exACGoA4EI9TTtXsGCpH163UFAFJQ Nnbev5AkTk93hq6sb+7n/YH1+5JyF2E5vMF4rrWruXzTxbFnHlVrhuIvKbXVKVhSKNp0 H3mlEqrlNmirvkoa9tVE5L5KoIVjJChXTwV6qAK2eq17ywAw5nZNZrgeLTlAqqArfZkv 1a7SrsYnAFxFVjYj7hx/gqQN2AnifRWYfaQ9jFlNRCDjx8sztmQJoh+oKJIVMf12T8vG 1vug== X-Gm-Message-State: AOJu0YwDLhUj1WNuy/OEMeV4LHCxNzYtup5aFc7ESPUoRZtDpaOah5Ea /AiNP1Esx0oRSP92Vhdn359tVu/Egb8PxT8jOKwmRPvw8vg3zqvNKb0ZL1+lIeftSYiPQZdl07W B X-Google-Smtp-Source: AGHT+IHBBcv+5sQ1SWjKA6FHNq9VnvR1huuFwmW+rlo6uzUmjiJtXFQDjmm3ziVmwWax5tRtei9lcg== X-Received: by 2002:a17:90b:4c41:b0:29b:f981:1363 with SMTP id np1-20020a17090b4c4100b0029bf9811363mr2690831pjb.5.1710165561111; Mon, 11 Mar 2024 06:59:21 -0700 (PDT) From: Daniel Henrique Barboza To: qemu-devel@nongnu.org Cc: qemu-riscv@nongnu.org, alistair.francis@wdc.com, bmeng@tinylab.org, liwei1518@gmail.com, zhiwei_liu@linux.alibaba.com, palmer@rivosinc.com, richard.henderson@linaro.org, philmd@linaro.org, Daniel Henrique Barboza Subject: [PATCH v11 5/7] trans_rvv.c.inc: remove redundant mark_vs_dirty() calls Date: Mon, 11 Mar 2024 10:58:53 -0300 Message-ID: <20240311135855.225578-6-dbarboza@ventanamicro.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240311135855.225578-1-dbarboza@ventanamicro.com> References: <20240311135855.225578-1-dbarboza@ventanamicro.com> 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::532; envelope-from=dbarboza@ventanamicro.com; helo=mail-pg1-x532.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=unavailable 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 @ventanamicro.com) X-ZM-MESSAGEID: 1710165651146100001 trans_vmv_v_i , trans_vfmv_v_f and the trans_##NAME macro from GEN_VMV_WHOLE_TRANS() are calling mark_vs_dirty() in both branches of their 'ifs'. conditionals. Call it just once in the end like other functions are doing. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/riscv/insn_trans/trans_rvv.c.inc | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/target/riscv/insn_trans/trans_rvv.c.inc b/target/riscv/insn_tr= ans/trans_rvv.c.inc index 4c1a064cf6..b0f19dcd85 100644 --- a/target/riscv/insn_trans/trans_rvv.c.inc +++ b/target/riscv/insn_trans/trans_rvv.c.inc @@ -2065,7 +2065,6 @@ static bool trans_vmv_v_i(DisasContext *s, arg_vmv_v_= i *a) if (s->vl_eq_vlmax && !(s->vta && s->lmul < 0)) { tcg_gen_gvec_dup_imm(s->sew, vreg_ofs(s, a->rd), MAXSZ(s), MAXSZ(s), simm); - mark_vs_dirty(s); } else { TCGv_i32 desc; TCGv_i64 s1; @@ -2083,9 +2082,8 @@ static bool trans_vmv_v_i(DisasContext *s, arg_vmv_v_= i *a) s->cfg_ptr->vlenb, data)); tcg_gen_addi_ptr(dest, tcg_env, vreg_ofs(s, a->rd)); fns[s->sew](dest, s1, tcg_env, desc); - - mark_vs_dirty(s); } + mark_vs_dirty(s); return true; } return false; @@ -2612,7 +2610,6 @@ static bool trans_vfmv_v_f(DisasContext *s, arg_vfmv_= v_f *a) =20 tcg_gen_gvec_dup_i64(s->sew, vreg_ofs(s, a->rd), MAXSZ(s), MAXSZ(s), t1); - mark_vs_dirty(s); } else { TCGv_ptr dest; TCGv_i32 desc; @@ -2635,9 +2632,8 @@ static bool trans_vfmv_v_f(DisasContext *s, arg_vfmv_= v_f *a) tcg_gen_addi_ptr(dest, tcg_env, vreg_ofs(s, a->rd)); =20 fns[s->sew - 1](dest, t1, tcg_env, desc); - - mark_vs_dirty(s); } + mark_vs_dirty(s); return true; } return false; @@ -3560,12 +3556,11 @@ static bool trans_##NAME(DisasContext *s, arg_##NAM= E * a) \ if (s->vstart_eq_zero) { \ tcg_gen_gvec_mov(s->sew, vreg_ofs(s, a->rd), \ vreg_ofs(s, a->rs2), maxsz, maxsz); \ - mark_vs_dirty(s); \ } else { \ tcg_gen_gvec_2_ptr(vreg_ofs(s, a->rd), vreg_ofs(s, a->rs2), \ tcg_env, maxsz, maxsz, 0, gen_helper_vmvr_v= ); \ - mark_vs_dirty(s); \ } \ + mark_vs_dirty(s); \ return true; \ } \ return false; \ --=20 2.43.2