Message ID | 20231107024842.7650-31-richard.henderson@linaro.org |
---|---|
State | Accepted |
Commit | 3eaadaeb4ee9cc6a1267882b3e31c893cd99bb9e |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:adf:fd90:0:b0:32d:baff:b0ca with SMTP id d16csp1415946wrr; Mon, 6 Nov 2023 18:55:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IHUNYOfPuZ00v9zclgp+TgNL0Wfmmu0/7L1WT+kBQ60hLEXAJu8SIm7Dz64oNtWgK86HT5w X-Received: by 2002:ac8:5a91:0:b0:403:b645:86fa with SMTP id c17-20020ac85a91000000b00403b64586famr38612318qtc.24.1699325706662; Mon, 06 Nov 2023 18:55:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699325706; cv=none; d=google.com; s=arc-20160816; b=maO9UcjEQ8qibKmRyeuQfiNAVlxuHt4vka2K2F8ARUxzGwUJ7uIMzetzNNsjFEr1yG w4Aip9iMnALFP77Qa1zeHd43rZCgr0zIdjDNjufTkQE/fq93btgxnHxVj8AfZYiTH8Wn bbDl6aX7whnL0fJfNTe0aiVps87XPvTKg/Qbnzb5vNiLlNyXxuvmMuxNidcKRYNl/G6K cS0DB3/oJLFJuEAHFI+JWDJEMtuHnlNPZeXDOuCJrQMh330M45qKcuHvHpNMUaLvVo8B pwKzXbbF+7gz61u7mRH5wJqRSqBApiMf5HlPWtVbj/AWf52uV0dsg/w0xkrRaqxEXU0O AjuQ== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=s0FKOVu2Ee6DzcvywhcOLuTknlnZxj3uQnWlPfBTRpM=; fh=KXT8skN7RFTc7N6YjUNlSMSjM9WXZW43UAg6bOEDSoc=; b=xKsIkHENnP7T8umPLtCp4quWgYaDkj7MeDnUfGuThDP8dlxQlHKCH0+C3471kPmhB4 sOjg7rNfCRCnYpCgG8yROQt9NEmQRb3/LeiMOGcqGgTwBexy882l8BfIsb91HF9Fzg3e TsfLI6SswahvVA9xYhJmxb7PnBPHNQu3jYcHsEVbBrl2NXWsDvHFIPWhX2FZD0rRIPGm zt+kIl/arfLfDkU8LKWE8oTY68ftjeruiBbJUZtcafcWWfnoErtKn9LPQNnKMsGQwxVS EtzGPeJobzUpKioj+BHqnGumzEEZOqH7l4M6zBBuktA2WcjJdFoujoypXsphLpZiJfzd 8mOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=F3qk9MDB; 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: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id j17-20020ac85f91000000b0041cb9401ca9si6621442qta.216.2023.11.06.18.55.06 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 06 Nov 2023 18:55:06 -0800 (PST) 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=F3qk9MDB; 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 <qemu-devel-bounces@nongnu.org>) id 1r0C9R-0008R4-8m; Mon, 06 Nov 2023 21:49:13 -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 <richard.henderson@linaro.org>) id 1r0C9O-0008Px-M4 for qemu-devel@nongnu.org; Mon, 06 Nov 2023 21:49:10 -0500 Received: from mail-pg1-x52b.google.com ([2607:f8b0:4864:20::52b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1r0C9N-0005wD-6S for qemu-devel@nongnu.org; Mon, 06 Nov 2023 21:49:10 -0500 Received: by mail-pg1-x52b.google.com with SMTP id 41be03b00d2f7-5aa481d53e5so3493134a12.1 for <qemu-devel@nongnu.org>; Mon, 06 Nov 2023 18:49:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699325348; x=1699930148; 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=s0FKOVu2Ee6DzcvywhcOLuTknlnZxj3uQnWlPfBTRpM=; b=F3qk9MDBWiSLhGogYwZbW8/9VAAYs6ZyNRzuqXuOxsqN+IKGfUST2rqiyp+jjNb5Hc MHzkXtPzHIhSD+LKsYFVDCRdHhDpTZxqNef3yDBtbpIbyOUVPinPhTOh1jTvfye3a41O gMU5QPjwoUC6BTwLvi5fe+b8uEuHdbTv9qNUgB0FkRaEuXgp+X7N1LXMBLYX8byCRfEH Jwp5lFhez+cy0FWaMLhIShrmXy7bh98a032zIRGH7TuW/wJFZVRkttjyorc6vRkX2mVJ cGdDLvTF3MyEjs3rqaV/X9xV/w7GaZ8+gdju3YPP/fVkPyjitae0I2TMLU7m6Yhxz89I RYUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699325348; x=1699930148; 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=s0FKOVu2Ee6DzcvywhcOLuTknlnZxj3uQnWlPfBTRpM=; b=WLymSZPwV5bPx/SguGFwCIddHsP/YAVzXoFYLxxJazpDmHsiHzKeKYz843+7sa0t39 rvMgcfvWKmU3K+RRq7A5jPWwlydFDeYfhYjQcQB5dvTAEUcWqlR7EOBjglv6nxPSr2PF LytdbtSdAFgoMKMosu/Cx1mNZjXmFXE8w14prqdDYs73yTS+0RlGu670yUWAGr5ROs/A OaHXIUxkJ1yipyrEkjbsE1wEG6JhVSaG0+C85k+LJNpQdPMXxzpMUFkYvQHQ9b1iQdfv 7ap5SBSht6hvlmR93JlA2Jh0NkQnjeq32un2goHc2UDVDe2o8ushoIQEjh9C5lzN74mf jKKg== X-Gm-Message-State: AOJu0YyXiU9isym6YFX5cSFJTCpXe/mzqJ4veHKEDfWm/wMSAhxTUK3e gLGU89nnQVUyBlYTtCWAThxObQjp7mzjM6dGCtE= X-Received: by 2002:a05:6a20:431c:b0:181:9b65:b4b5 with SMTP id h28-20020a056a20431c00b001819b65b4b5mr12031555pzk.3.1699325347936; Mon, 06 Nov 2023 18:49:07 -0800 (PST) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id fn11-20020a056a002fcb00b006bff7c36fb3sm6367478pfb.95.2023.11.06.18.49.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 18:49:07 -0800 (PST) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Cc: Song Gao <gaosong@loongson.cn> Subject: [PATCH 30/35] tcg: Eliminate duplicate env store operations Date: Mon, 6 Nov 2023 18:48:37 -0800 Message-Id: <20231107024842.7650-31-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-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::52b; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52b.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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
[01/35] accel/tcg: Move HMP info jit and info opcount code
|
expand
|
diff --git a/tcg/optimize.c b/tcg/optimize.c index b32ef0be0f..a4fe9ee9bb 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -2269,6 +2269,19 @@ static bool fold_tcg_st_memcopy(OptContext *ctx, TCGOp *op) src = arg_temp(op->args[0]); ofs = op->args[2]; type = ctx->type; + + /* + * Eliminate duplicate stores of a constant. + * This happens frequently when the target ISA zero-extends. + */ + if (ts_is_const(src)) { + TCGTemp *prev = find_mem_copy_for(ctx, type, ofs); + if (src == prev) { + tcg_op_remove(ctx->tcg, op); + return true; + } + } + last = ofs + tcg_type_size(type) - 1; remove_mem_copy_in(ctx, ofs, last); record_mem_copy(ctx, type, src, ofs, last);