Message ID | mpt34xk9gza.fsf@arm.com |
---|---|
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp2260158vqu; Sun, 5 Nov 2023 10:45:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IFFiZfrTEP3qmxnEpKE8jCi2fjCzUVmIRygb25iVJr0lOJQSKBQt8Z78xjsqPbCIBAi9CbP X-Received: by 2002:a05:620a:284b:b0:772:63d9:6e69 with SMTP id h11-20020a05620a284b00b0077263d96e69mr11184404qkp.35.1699209954713; Sun, 05 Nov 2023 10:45:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1699209954; cv=pass; d=google.com; s=arc-20160816; b=n3H/LZF9g5mxbj9tGlI934TKimBRQeO8zz0oHUiyxh0Z2qZR1uJnrXJKC0uoLaBOe8 ZJM4AbuWXxzY86d26mdN1PZbwb1T310CSigoRhhXvJmuxXipR3aldnWCth7X6p/BCuuV yrpQr4aI+bp/z3lgl870kxYvORp2sXRFajAJTvQaIXDzREMCwdSOvayM3lu4fny0CXPL wJYDw9Zne3lH/uYludmBGJdpuXCSAAsaTaUKLcFEMXCZ9I6kQ6lFYWXOsx25hXBtliAi ++ek6+JpkrPYJyl/LmgQMFWeWap5otujhVrkgIPumjKVcY/xzrRlPVTaYtkuJB1FLYvE AoiA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version:user-agent :message-id:date:cc:subject:mail-followup-to:to:from:arc-filter :dmarc-filter:delivered-to; bh=IGipb2zX2LWsaQEbbef8oVMUMKUXvFO4KEiGjnTUrhk=; fh=+zKahnQ9dI9rCMQA/vTUSn1PPyLwgfSULGOjxoIZkos=; b=d3LLMvBff6LJmNWwPlPEGyM+R4rszKu/vvS9ab5Wo7VOm6KjEnRsap89O1SyXsfpEe 5sD6Rf5UXRdKlQDPkJq7u7zl1PdmNjMDnnLjv3mlK8sJxVivld8Ohtgb+TQG6x9EQ34f kJ+H/ee5DAAMVDwuCli/K0SCa00LsdP+TsscxTb2E2MbRPkeolIkHWcInfhjF1ygO/mE s72dVO5fO3VQrfwKjCPzn3/qlsQ62z7zr8l7z5Hgt7bVZJw6O/tnHQsLIQ/FIBvfuVHm odBEcLfnL2KuyIbWLMiZcJUbPaC2tYY285ml7coMP4tAnbnUZ8WyEjdy2Q6pb6FqRtmz m4vQ== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id 5-20020a05620a040500b0076daeaded07si4376707qkp.74.2023.11.05.10.45.54 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Nov 2023 10:45:54 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7AE7E385AE41 for <ouuuleilei@gmail.com>; Sun, 5 Nov 2023 18:45:54 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 066143858CDB for <gcc-patches@gcc.gnu.org>; Sun, 5 Nov 2023 18:45:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 066143858CDB Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 066143858CDB Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699209932; cv=none; b=CtWMTscj9koQqvbxrv1wR8UN9unEam5/x/g4PqCmT/mxx9MksClV9BDFEkDN9oomOjqUNXzoXm6QpViE+wLbcIwTxPiPE//TFtrMjqqEiwmqQMKPq1Ac1M/WwxsCWaBO/iGhr9L0mVEFL29SRMjLPhRR9e8cT6VhSxSJq810c8A= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699209932; c=relaxed/simple; bh=e8lglSt8tKBb/QESGTYRg4YZoj3xArdmzKRegSr+P04=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=V7EUXOjIsXxMZR7b+pBvtqAi+4SQpsNd3t7AJtpeBgU6Gjv3cWWmf+s3fV1ZNrUol4BkNOst8d0X0y7bq7khzZ9ks2+Wo3WxnImkr9j+iWYfdzL67X7Ka+OkCV0DVyJnWana3xrDmt5SAsQOG65MVprFZQNEvEqPq9EeQA3DqKY= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 880CFC15; Sun, 5 Nov 2023 10:46:14 -0800 (PST) Received: from localhost (e121540-lin.manchester.arm.com [10.32.110.72]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 40EFC3F703; Sun, 5 Nov 2023 10:45:30 -0800 (PST) From: Richard Sandiford <richard.sandiford@arm.com> To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, jlaw@ventanamicro.com, richard.sandiford@arm.com Subject: [PATCH 00/12] Tweaks and extensions to the mode-switching pass cc: jlaw@ventanamicro.com Date: Sun, 05 Nov 2023 18:45:29 +0000 Message-ID: <mpt34xk9gza.fsf@arm.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-17.4 required=5.0 tests=BAYES_00, KAM_DMARC_NONE, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781750777181669548 X-GMAIL-MSGID: 1781750777181669548 |
Series |
Tweaks and extensions to the mode-switching pass
|
|
Message
Richard Sandiford
Nov. 5, 2023, 6:45 p.m. UTC
This series of patches extends the mode-switching pass so that it can be used for AArch64's SME. I wondered about including a detailed description of how the SME mode changes work, but it'd probably be a distraction. The system is quite complex and target-specific, and hopefully the details aren't necessary to understand the motivation. One of the main requirements for one of the mode-switched "entities" is that the current mode must always be known at compile time. It would be too cumbersome to work out the current mode at runtime and make a dynamic choice about what to do. The entity therefore wants the usual LCM placement where possible, but would rather have redundant mode transitions than transitions from unknown modes. In many cases, the modified pass seems to generate optimal or near-optimal mode-switching code, even with these additional requirements. Tests are included with the SME work. Bootstrapped & regression-tested on aarch64-linux-gnu and x86_64-linux-gnu, although only the latter is useful since AArch64 doesn't yet use the pass. Also tested by building crosses for epiphany-elf, riscv64-elf and sh-linux-gnu, to pick one triplet per other target that uses mode switching. OK to install? Thanks, Richard Richard Sandiford (12): mode-switching: Tweak the macro/hook documentation mode-switching: Add note problem mode-switching: Avoid quadractic list operation mode-switching: Fix the mode passed to the emit hook mode-switching: Simplify recording of transparency mode-switching: Tweak entry/exit handling mode-switching: Allow targets to set the mode for EH handlers mode-switching: Pass set of live registers to the needed hook mode-switching: Pass the set of live registers to the after hook mode-switching: Use 1-based edge aux fields mode-switching: Add a target-configurable confluence operator mode-switching: Add a backprop hook gcc/config/epiphany/epiphany-protos.h | 7 +- gcc/config/epiphany/epiphany.cc | 7 +- gcc/config/epiphany/mode-switch-use.cc | 2 +- gcc/config/i386/i386.cc | 4 +- gcc/config/riscv/riscv.cc | 4 +- gcc/config/sh/sh.cc | 9 +- gcc/doc/tm.texi | 126 ++++-- gcc/doc/tm.texi.in | 32 +- gcc/mode-switching.cc | 582 +++++++++++++++++++++---- gcc/target.def | 103 ++++- 10 files changed, 714 insertions(+), 162 deletions(-)