Message ID | 20211029043329.1518029-13-richard.henderson@linaro.org |
---|---|
State | Accepted |
Commit | 8774dded029c96130aacf6e6bb71b70cf271b8df |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:ad5:5208:0:0:0:0:0 with SMTP id p8csp399367iml; Thu, 28 Oct 2021 21:51:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyr4K8dpkMzNbV3R7v2RkE7dIJxTjES7fthpb1CrUweVaDVfKGD/rr5qPeuexPvfX1wgpbR X-Received: by 2002:a9d:20ea:: with SMTP id x97mr1141847ota.152.1635483113211; Thu, 28 Oct 2021 21:51:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635483113; cv=none; d=google.com; s=arc-20160816; b=Ja5wWpsZ3JIXmyCKdGNyLxwFQPCXVBCbFXCO6NYHS6Q9UopVNWEduYsPsEKkR62Xqe 3D9fSzwMoRSJuW27NdPBg5xb+056XNKxvKTIVJvd84rto3g59LPc4usz+6F9y+/4kL2W yQEFmylyeiLGfJoODgm7JOI68rPhASWYRdLQGVKClxDpI1WvA9sO6IZi+2Xm80hh7hWe dTGQaBPxhKxeEUooJJ1PnXRs27xh1TJMbQzSLAdc78CItCF3o4zPjbINSSFn/6+DpjgE cH3a0DcyFhzivu4CgnGJt+lSOE44ftDbiv4zS31zwth1w5xyw8DmqhXu/1btb998dqK/ CuxQ== 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=apxi4gdi/2+dlekZiDFnJhG83/VEpB6pYIdUYdxg0AQ=; b=XpHfn0srhWtOyu8VG+2awPaDzXdAmOZaPJNZWF8K3CpZuzWBQ287xJUvmuQQLfO6Lk wBDd0FsyW1e3OaPo/Eki2L8i5kFLz/9lXZpcO9aRVwILFvwQkVIKP/z7hhIYBPhJpl4g RlKkAy26Ix/6fEDswmRo/L2cEqMMbIsly8fYQVwZJTxqwv3kboW0dukj/uuRyOdf0Qu3 8ZD0/gqsA2vmodlSf443T1x+viqiYEOi0/xbbJ6KaK/2bswacADf83ptSNjBl1TvB2I0 81z9Dr8tLFQYJuAFjt0K8FtQE62zsnKjvjGEIsJR2rdLKIFTxXXc+ENwyTh9aFAd21Ne 4e4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ubkBkqY1; 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: <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 m25si5497773otk.278.2021.10.28.21.51.53 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Oct 2021 21:51:53 -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=ubkBkqY1; 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]:51102 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1mgJrs-0003mD-G2 for patch@linaro.org; Fri, 29 Oct 2021 00:51:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51124) 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 1mgJaK-0003oh-8p for qemu-devel@nongnu.org; Fri, 29 Oct 2021 00:33:44 -0400 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]:33615) 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 1mgJaI-0007up-CH for qemu-devel@nongnu.org; Fri, 29 Oct 2021 00:33:43 -0400 Received: by mail-pj1-x102d.google.com with SMTP id x1-20020a17090a530100b001a1efa4ebe6so6638970pjh.0 for <qemu-devel@nongnu.org>; Thu, 28 Oct 2021 21:33:41 -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=apxi4gdi/2+dlekZiDFnJhG83/VEpB6pYIdUYdxg0AQ=; b=ubkBkqY1TLhVgEsNpILT9YaPuDc68UYulNYaQ2nsFQnGnbiv1qDUKJMnDSPO/7iHDf ibASunAUMLdy4xSAsvW5y3Rw4V2fsX9Sjswhv9PY6QxbOozTErMotg6kFX5hgh+dx+zu jUVyhJoPHziCrb8DvVKztPeevqZxksEdVqTkmo2twMEpAHiivEzLiLGmr/aH6+L/it4q ok0/IALzebwvFajLv3/W2+lvyo+gK4AZhEwwVxB9APJwzw9SiWWwF0HQTS/wx1AC41yo eLdONVyZoKYKJattr5SaNuD0fWGFD2apXpLfrNsVy0PA7MmRcJJXcP8Y1iN3Fveq66VL D07A== 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=apxi4gdi/2+dlekZiDFnJhG83/VEpB6pYIdUYdxg0AQ=; b=ObTGj5kZmQevLZvS4qFUKtqNLqPA34J0jVLRmq5KINw4jjrd9JS5sk2ybS35Ehl3mI hYx4hiEoVc0gpxuxkz9e+xvlkTaVKB5GTuCltGweIR+Yqb7MKxuz3nHuRJXhxFTnFovI 8TkvSMy0p2D+PCIJLkR/MxwT81n2uXB4bH/cW/4ZHcT+uHyUURpmq/3RiGQsYd/HHfw1 UFpeIzHplqdm+BC/d4N998NYW7UDo7hF82iUNJzifS6NO6VXkNT8NtWEfDPmfQ0EJzeY iqmSlByEIQk5LhcZgCjV9lM03qTbHH7YU+A1TPf/k1djFq6tGr6gei5TdZCBozedABGy zGAw== X-Gm-Message-State: AOAM533+DyuGhxBXE7k7O0GJ6EsvfjtpdlmPNYVnnUwxVoHoc/BS9A2D vN089vM3ZTYqi0K+E4aDpXWtoBJK7jVC+g== X-Received: by 2002:a17:90a:c297:: with SMTP id f23mr1593398pjt.138.1635482020909; Thu, 28 Oct 2021 21:33:40 -0700 (PDT) Received: from localhost.localdomain (174-21-75-75.tukw.qwest.net. [174.21.75.75]) by smtp.gmail.com with ESMTPSA id i11sm4120257pgp.18.2021.10.28.21.33.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Oct 2021 21:33:40 -0700 (PDT) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Subject: [PULL v2 12/60] tcg/optimize: Split out copy_propagate Date: Thu, 28 Oct 2021 21:32:41 -0700 Message-Id: <20211029043329.1518029-13-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211029043329.1518029-1-richard.henderson@linaro.org> References: <20211029043329.1518029-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::102d; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102d.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: <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> Cc: Luis Pires <luis.pires@eldorado.org.br>, =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org>, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <f4bug@amsat.org> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patch=linaro.org@nongnu.org> |
Series |
tcg patch queue
|
expand
|
diff --git a/tcg/optimize.c b/tcg/optimize.c index 019c5aaf81..fad6f5de1f 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -611,6 +611,19 @@ static void init_arguments(OptContext *ctx, TCGOp *op, int nb_args) } } +static void copy_propagate(OptContext *ctx, TCGOp *op, + int nb_oargs, int nb_iargs) +{ + TCGContext *s = ctx->tcg; + + for (int i = nb_oargs; i < nb_oargs + nb_iargs; i++) { + TCGTemp *ts = arg_temp(op->args[i]); + if (ts && ts_is_copy(ts)) { + op->args[i] = temp_arg(find_better_copy(s, ts)); + } + } +} + /* Propagate constants and copies, fold constant expressions. */ void tcg_optimize(TCGContext *s) { @@ -646,14 +659,7 @@ void tcg_optimize(TCGContext *s) nb_iargs = def->nb_iargs; } init_arguments(&ctx, op, nb_oargs + nb_iargs); - - /* Do copy propagation */ - for (i = nb_oargs; i < nb_oargs + nb_iargs; i++) { - TCGTemp *ts = arg_temp(op->args[i]); - if (ts && ts_is_copy(ts)) { - op->args[i] = temp_arg(find_better_copy(s, ts)); - } - } + copy_propagate(&ctx, op, nb_oargs, nb_iargs); /* For commutative operations make constant second argument */ switch (opc) {