From nobody Tue Nov 26 07:38:42 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=1709745629; cv=none; d=zohomail.com; s=zohoarc; b=NGMko+v+p/tKAPocydds7T1z4lcOLPRYVaFxM2Bt/G/kINC5ujFBSqEHRzN36NkEPQNbKU0nyRADBsu89MmMWvCV3FT6LgIjH3UC4wIEXcZvWBe6cRiTfTfAmJYRTnmLxQWqBDiZ1GLvTCPcuxCU7q0rWDpQj74k3Mt0TOYaNx4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1709745629; h=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=YwLKcYyBUrTfgU9Q05AlBj7kHxMamTETutA7Jy8XZMs=; b=mdPcIIoJfj17bLovG+vUs/IdQHZeatCK9R50pIDPyQ7puZCsE8ctB+Ee+iTKaVFpF4aCretaS2diJQuknRJiaPYvK8+ZXcYztBmJOL4LDeAwZyyZ0lqyyiZBfd0E++OyUqnwvnzv/kFNs6rzDVVbRAIkVL9eEhLnsIyPoZLhLL4= 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 1709745629072878.1708195950557; Wed, 6 Mar 2024 09:20:29 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rhuwF-0008DY-0L; Wed, 06 Mar 2024 12:20:19 -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 1rhuwC-0008Cr-6Y for qemu-devel@nongnu.org; Wed, 06 Mar 2024 12:20:16 -0500 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rhuvx-0000ra-IM for qemu-devel@nongnu.org; Wed, 06 Mar 2024 12:20:15 -0500 Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-1dd10ae77d8so30490835ad.0 for ; Wed, 06 Mar 2024 09:20:01 -0800 (PST) Received: from grind.dc1.ventanamicro.com ([177.94.15.159]) by smtp.gmail.com with ESMTPSA id p17-20020a170902c71100b001dbb6fef41fsm12869712plp.257.2024.03.06.09.19.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 09:19:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1709745600; x=1710350400; 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=YwLKcYyBUrTfgU9Q05AlBj7kHxMamTETutA7Jy8XZMs=; b=cRjQuX9beT5KqgOpAVh0N5jWgHhsxXXMYXXHC+RIWlie8Nu8JhJYMNU5xHy0u3QP4v H+9p2zIb5V4TXShsA94S0/mCfw/IzFM/RAO6T2mYfCu5h/lgCxh8DXDklv9fzwyeKIYV 93aIejdZIJDgQmFxZ0LA39oj/ZSUHgNF5RPIjIX9qThoj6p4ZL7uz4Go3yzJKex82jcI q3AppIuwqGhe6yHyQnwP7SuahN62lsN4lLl1JGQcY7MnEj4FwtFvXu6ZQB96FZQVeP9e GT4F8E/r70LhMjw3vXVy1L2wE0bmar6MW+ezFRROhaMUS8tZ8u89vnm8bLc9vt8OLyQq YlFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709745600; x=1710350400; 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=YwLKcYyBUrTfgU9Q05AlBj7kHxMamTETutA7Jy8XZMs=; b=XViRxbZfvtJewG/EGhB/PkbM8EXyBJ3GYWyeDsUoHh0qRxXez5OoFpgTa0Lr9K8oKB m0WibyQPa6cocdapGu7VoSHTf4uVo4BB4p3of7oWYGJ4Jx/XhSCDoQDT550sE1ybIDA+ 8Wft7imeFAFkaJSHoGvt6KxcKqKmtqa/H0gzv6BC6bsOO2pf5aMD4cpUSdw6A5juohbP DJhbdbtxdS6OrFzkWuJK6yj2TJM6t5kbec2AAr/30ZAgFYXBS48sHBSp5flX5XXMXng0 0Dyx9Hkc+ay1UEzrJlPEGuFiD0zgU8YWtOE/TE8Yo/JcncUX3DAu4JS2491+fkJlz21k Pimg== X-Gm-Message-State: AOJu0YwTjAFjKXt/ceejJYtoSFE4zvtnOl3FrdZyIIxvOQFFwKtOwW6S x1iLq8hYYO01JgsuSgbeCxf4eeAhFjUdhl3LBpai57LBZwqTHJtiuhvIrpyXrf4LKRKAXdqcsol E X-Google-Smtp-Source: AGHT+IHV/Hjmj0R6VZhgfYrjja9uEVGsAbzbU+TMuxKyruUoEMhspSB2HSLZvGBLb6cDvMyET00Fwg== X-Received: by 2002:a17:902:f80d:b0:1dc:20f2:77bb with SMTP id ix13-20020a170902f80d00b001dc20f277bbmr4870983plb.29.1709745599727; Wed, 06 Mar 2024 09:19:59 -0800 (PST) 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, Daniel Henrique Barboza , Richard Henderson Subject: [PATCH v7 7/9] trans_rvv.c.inc: remove redundant mark_vs_dirty() calls Date: Wed, 6 Mar 2024 14:19:30 -0300 Message-ID: <20240306171932.549549-8-dbarboza@ventanamicro.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240306171932.549549-1-dbarboza@ventanamicro.com> References: <20240306171932.549549-1-dbarboza@ventanamicro.com> MIME-Version: 1.0 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::629; envelope-from=dbarboza@ventanamicro.com; helo=mail-pl1-x629.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, 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: 1709745630655100003 Content-Type: text/plain; charset="utf-8" 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 279740f147..5018bb5a62 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; @@ -3545,12 +3541,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