From patchwork Thu Oct 21 21:05:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 516076 Delivered-To: patch@linaro.org Received: by 2002:ac0:bf50:0:0:0:0:0 with SMTP id o16csp332392imj; Thu, 21 Oct 2021 14:15:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQhluBBaDHTXpB7UgxQKvnG2tiuJOyogmnw2O+dFsbzGsRFQB8NypBZUVOz5WUUsn3wHwv X-Received: by 2002:a05:6808:171b:: with SMTP id bc27mr6758784oib.21.1634850954338; Thu, 21 Oct 2021 14:15:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634850954; cv=none; d=google.com; s=arc-20160816; b=RljTu5021PqZdK7mRf1I6sehXjtSRwDqPB69tUCO9EWlbpV1P5bmsTq0LTUxNMxKpZ QFe7fDZ820/Zsc8HNcPeAnKyNW/B1Rz/KIzetYtYNFO3VHnHB9nRRk7i0uAw2B/NcwwX C9pVNbHv5yV3bR0iIM7EcQzK4zYGL1nxgHxyv9Hds+RMbCq1kuwPki0/G/DqP+SIN3z7 oHMTFPFVVQibQULN0WzZ9r5ALWHhrtyRgoX7tKd4j8QOaP2m+fj3zsENLjE4b3+lNCc/ 8hoD4HWDiLmDN716GvYNUf12vKA1iqnCEiIonkM1kZz9j/0TmmW+8Bhat8lTO2Z1TKhP /5Kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=pb59zgt3BJOK/6jo6ZxRJgBUW76Zvxuzd+Eqm9jcKsI=; b=AtBtS3gRiRxv4YlXW+Go/9AWBudcQzzXWy0ruCMp3rk1TONVsHLIyS4h1tcDKHcGz8 eBw3Y9eNAtz1eKQWvH1rpzOytPNy0Px2CQdppaRmuvYkzvOJZLJUa7jhYE9Nb8qa176x bQKtkr6+yG87nGhblrlJn5gA232pJkTtsxCxxdPAwGBNeX4FncXQsd9kmt4yzuRsgb8f gRGk8b7MRGuw2sErnY19+fqTa//pcnx0M1YNErEooFtGfcrZBFPzktJueD45Lbj/hkH4 wEgDfvAsKma4IX38dUCcL7HwKPv1FQeZeCT69fyh8MOeo2veIlbZLq8EiGtIYUSNQuQ4 vPhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=fm0Px4Xk; 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=fail (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 a5si10816107oiw.263.2021.10.21.14.15.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 21 Oct 2021 14:15:54 -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=fail header.i=@linaro.org header.s=google header.b=fm0Px4Xk; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:34604 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdfPl-0002f7-MP for patch@linaro.org; Thu, 21 Oct 2021 17:15:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48376) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdfGA-0007PE-E4 for qemu-devel@nongnu.org; Thu, 21 Oct 2021 17:05:58 -0400 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]:46650) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mdfG4-0004GJ-7B for qemu-devel@nongnu.org; Thu, 21 Oct 2021 17:05:57 -0400 Received: by mail-pl1-x629.google.com with SMTP id i1so1254816plr.13 for ; Thu, 21 Oct 2021 14:05:51 -0700 (PDT) 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 :mime-version:content-transfer-encoding; bh=pb59zgt3BJOK/6jo6ZxRJgBUW76Zvxuzd+Eqm9jcKsI=; b=fm0Px4XkrXQk6B4sFKKTz4skTlouOcr1uSGgktYlPE9XF40XFGrI+R7+eyC4+TSZCP KdEMkTD/0tKmQZQts48Zt0CDfkH8Egix0+bRjVN6Txgpb9xCl9FzpKv6LmeeF+Jyn3tv 5Lyg22oNe8f9lwaZ6zouEB0XpUnwH343nJa27DGRvw3Keec4UXY2pLXvkXKMT+KqFS8Y f+PoCuLHb3/doIhbH2hzwGsV+9lH7obsvS5mcRhIjtaBaL/bC2QrT/J9f3ASGUGMGJ54 AJ4xtWDQgfFLwAXbynXD18PrUB/OV9fDUah1aehvFK6n7pNYRzrwL+4lnUQrwlgCsGi8 C9cA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pb59zgt3BJOK/6jo6ZxRJgBUW76Zvxuzd+Eqm9jcKsI=; b=rUi/5CrmMg8V7iTmnXCMMr4/mih7nwFelJS5PWKtzXvSupwgJeOOBAOkT+sHXmBekH JzUIXKbkoxTWhizDhUsRl34yux3MltElmWixfC7CEt3eHR9L+bCs+kPzRxQe12iLXKBY ajne05mlqrP3e1mFI2/mmzHO95+XEW4mKObyfxcRwQ5qPry9XXimmze9Fg74x+e1kz8F 1Cv/h9E2AuOIqeM1JdInEo5JZ2m0G7tKQE3LVPaxK9GKpuZB/jX7yC2W/6L/DN9QOyBj F+PWr7Qpr8VNf3/81RKnEBqnaX4fvHXgDOrrZN+4vETyumD5nXaCeWdndYT+90xoUfbN jRnA== X-Gm-Message-State: AOAM533aUidO7q9dCseHpxP8axXM7b/m2DYq7YFdQWuR3YRyGqyuqiUC Fy7URP0jngoFfUxcGX3hRlDCNhKiCbl0WA== X-Received: by 2002:a17:902:6ac7:b0:140:14d5:cfb6 with SMTP id i7-20020a1709026ac700b0014014d5cfb6mr628725plt.58.1634850350202; Thu, 21 Oct 2021 14:05:50 -0700 (PDT) Received: from localhost.localdomain ([71.212.134.125]) by smtp.gmail.com with ESMTPSA id g7sm5981670pgp.17.2021.10.21.14.05.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Oct 2021 14:05:49 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 13/48] tcg/optimize: Use a boolean to avoid a mass of continues Date: Thu, 21 Oct 2021 14:05:04 -0700 Message-Id: <20211021210539.825582-14-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211021210539.825582-1-richard.henderson@linaro.org> References: <20211021210539.825582-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::629; envelope-from=richard.henderson@linaro.org; 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: luis.pires@eldorado.org.br, alex.bennee@linaro.org, =?utf-8?q?Philippe?= =?utf-8?q?_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Reviewed-by: Luis Pires Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/optimize.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) -- 2.25.1 Reviewed-by: Alex Bennée diff --git a/tcg/optimize.c b/tcg/optimize.c index 368457f4a2..699476e2f1 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -713,6 +713,7 @@ void tcg_optimize(TCGContext *s) uint64_t z_mask, partmask, affected, tmp; TCGOpcode opc = op->opc; const TCGOpDef *def; + bool done = false; /* Calls are special. */ if (opc == INDEX_op_call) { @@ -1212,8 +1213,8 @@ void tcg_optimize(TCGContext *s) allocator where needed and possible. Also detect copies. */ switch (opc) { CASE_OP_32_64_VEC(mov): - tcg_opt_gen_mov(&ctx, op, op->args[0], op->args[1]); - continue; + done = tcg_opt_gen_mov(&ctx, op, op->args[0], op->args[1]); + break; case INDEX_op_dup_vec: if (arg_is_const(op->args[1])) { @@ -1602,7 +1603,9 @@ void tcg_optimize(TCGContext *s) break; } - finish_folding(&ctx, op); + if (!done) { + finish_folding(&ctx, op); + } /* Eliminate duplicate and redundant fence instructions. */ if (ctx.prev_mb) {