From patchwork Thu Jun 29 09:11:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 697682 Delivered-To: patch@linaro.org Received: by 2002:adf:e885:0:0:0:0:0 with SMTP id d5csp4783194wrm; Thu, 29 Jun 2023 02:11:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6zveaUdP5ibF56fZZqZQXybfDjuTcbb6a5KIhasAWkEsb1PrcnzeeFAfO8lzsVM1dCMexf X-Received: by 2002:a05:622a:120a:b0:3f3:91bd:a46d with SMTP id y10-20020a05622a120a00b003f391bda46dmr46598903qtx.8.1688029890111; Thu, 29 Jun 2023 02:11:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688029890; cv=none; d=google.com; s=arc-20160816; b=TV1eY7H04zVmMH3Bt1y1RnnN0M5Dwj+94Wh9zkmLBu5p5e3tADkbzGQkvYIKCyW/rl VvaegDYQycm1SI1l6G0BQZar1qu/9UbHPmw4LU5Pzy8oCcfxYYw/ZMsLvKA62X1BS98j rg6Rq2p6TAVe/2qeLajqNm17z7SWG2ymY2ypiR23lFNEnNgNemXAATBbcxeq8ftDHxm1 iqF+a//mbgywKV/KNrfCoiONROhzcflK6BP+UY9iPiyX5DbopDWOqmolBMjScYDn4p/r mdl+K1cK17uI6Kuo7MNUwYcaOQlWQpJNdxndj/qw+0k4uZo6Px6MbFp77uvh3KcWwaYF 0ZrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=PBnJV9HPW19aC/M2ORbO//nRzVHbhASHV5/MMu3GCMQ=; fh=fz3DJMUXEzejNv0JWYQ+xa02BmrDN+/I7HIv5ot61VY=; b=fwDE8hucfh+jE1dwwIsLawBQoxG/CJ3zoqMW5ol3dLl3aPhD85Yv7UYKgXMtpmWc2s TIfjs4BaSWfdAkbIAbO2qMB5KZ/Ecm8k8BgOzSuoFuLVZZIR5bly0+zKsDCuXaWpohxg 7i2LLdTGtVtngCsUUaAd9xgRXG9Lrn5tq1BUdM+MNhOVCmQDbLpq+dM9g26M172LAeDb /BKKrgFHGyyz9yE4RpWeG/1S482BRqBw490tbCsxuaxaeVe3RI8gfDF6u4Cl7TXgsJq4 7Ax8Voc6edJLMvuP/lBdVue9r1Jyov7wh1N1HzTHrBaL/aXVoN8y5gOODIoEWzbJCaG+ TnBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QgncVg1x; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id p22-20020a05622a00d600b00402d96cc841si3090003qtw.219.2023.06.29.02.11.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 29 Jun 2023 02:11:30 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QgncVg1x; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qEngJ-0006Wh-QD; Thu, 29 Jun 2023 05:11:15 -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 1qEngI-0006WF-CV for qemu-devel@nongnu.org; Thu, 29 Jun 2023 05:11:14 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qEngG-0001k2-PK for qemu-devel@nongnu.org; Thu, 29 Jun 2023 05:11:14 -0400 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-313e1c27476so328366f8f.1 for ; Thu, 29 Jun 2023 02:11:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688029871; x=1690621871; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=PBnJV9HPW19aC/M2ORbO//nRzVHbhASHV5/MMu3GCMQ=; b=QgncVg1xWYzzTJD4EsBc1faR1m6h2kG74YK8C8qmy0faCKVB13m0aztOf6DA91skPl 2O6jUiqVMLy3KNnnDKA8Ufc89Xx8Zgr9vl7/ePtRk2VX0kij8qnrhJl5y4g8/4lyRrO/ 68OdUdRaLhx6GrRbb3daojmMYKC9heGRo+fEhWb73KcGsm48QAumD9btX6xyWEw8J5z4 vcsr34G/sTFE4tyUMdY9DPIVY7tAW0eHXCpETEnr4kcccHDNIkFc9D4NGvaa/WJKTMTI Sb25Z7Vrlwg2VUW9K3/Hg53Re9AukP5dSqHxYGeptLPZgHi3wmeKtqO1/zLfJeNVwZib 0etg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688029871; x=1690621871; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=PBnJV9HPW19aC/M2ORbO//nRzVHbhASHV5/MMu3GCMQ=; b=aaa3vaef+F6T+NiPHA+KkL2/XY57bSKT2AhpBEnGq7NqaCoiHv3jZ4KApNStf1e0Cw nJuoTKk7JLSzJCIQTdfqWhCZF6V6+DoyPsiQ8JaJicucxEhAwTVdTRZFSP6eGAWwMtuv BBQZaEomOioaC1Tyx8d/WtBO2hTv/FigYg8j0uxmczFvqI/xK0dAoGf18n3+KZ4GyuTS Kp7ZHPoORpX0wrI+r68eOEBdPFWFXO2NuT7mjY1EQ4/cB3giKTOtnDNeR+lWwwvprKlj /SPdnprvPlD/EzRrIodGtznPKGxNmYBctKD4xy+X9R1iy1NA76Uw6WLFN2jR+axUCI5s /Lew== X-Gm-Message-State: AC+VfDxhVmwLFp8Rb2TumM9CGGJcdu2RlUU6z/E5pABLDRwoZn8t63E8 8LxftUMRsQDE9Zb7Pj6QsJOKWxGe3SzC4OGc4gg= X-Received: by 2002:adf:f206:0:b0:314:77a:c2a6 with SMTP id p6-20020adff206000000b00314077ac2a6mr4068135wro.25.1688029870971; Thu, 29 Jun 2023 02:11:10 -0700 (PDT) Received: from m1x-phil.lan ([176.176.166.242]) by smtp.gmail.com with ESMTPSA id i7-20020adfdec7000000b00313dfe954ecsm15285319wrn.11.2023.06.29.02.11.09 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 29 Jun 2023 02:11:10 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= Subject: [RFC PATCH] tcg: Reduce tcg_assert_listed_vecop() scope Date: Thu, 29 Jun 2023 11:11:07 +0200 Message-Id: <20230629091107.74384-1-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=philmd@linaro.org; helo=mail-wr1-x434.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org tcg_assert_listed_vecop() is only used in tcg-op-vec.c. Signed-off-by: Philippe Mathieu-Daudé --- RFC: Maybe we plan to use it in tcg-op-gvec.c? --- include/tcg/tcg.h | 6 ------ tcg/tcg-op-vec.c | 6 +++--- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h index 95541e9474..0875971719 100644 --- a/include/tcg/tcg.h +++ b/include/tcg/tcg.h @@ -1135,12 +1135,6 @@ uint64_t dup_const(unsigned vece, uint64_t c); : (qemu_build_not_reached_always(), 0)) \ : dup_const(VECE, C)) -#ifdef CONFIG_DEBUG_TCG -void tcg_assert_listed_vecop(TCGOpcode); -#else -static inline void tcg_assert_listed_vecop(TCGOpcode op) { } -#endif - static inline const TCGOpcode *tcg_swap_vecop_list(const TCGOpcode *n) { #ifdef CONFIG_DEBUG_TCG diff --git a/tcg/tcg-op-vec.c b/tcg/tcg-op-vec.c index 64bc8a2156..ad8ee08a7e 100644 --- a/tcg/tcg-op-vec.c +++ b/tcg/tcg-op-vec.c @@ -42,9 +42,9 @@ * tcg_ctx->vec_opt_opc is non-NULL, the tcg_gen_*_vec expanders * will validate that their opcode is present in the list. */ -#ifdef CONFIG_DEBUG_TCG -void tcg_assert_listed_vecop(TCGOpcode op) +static void tcg_assert_listed_vecop(TCGOpcode op) { +#ifdef CONFIG_DEBUG_TCG const TCGOpcode *p = tcg_ctx->vecop_list; if (p) { for (; *p; ++p) { @@ -54,8 +54,8 @@ void tcg_assert_listed_vecop(TCGOpcode op) } g_assert_not_reached(); } -} #endif +} bool tcg_can_emit_vecop_list(const TCGOpcode *list, TCGType type, unsigned vece)