From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd33.google.com (mail-io1-xd33.google.com [IPv6:2607:f8b0:4864:20::d33]) by sourceware.org (Postfix) with ESMTPS id 9A57F3858D33 for ; Tue, 7 Nov 2023 01:11:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9A57F3858D33 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9A57F3858D33 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::d33 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699319517; cv=none; b=OL17g4vtIHWiL5cE4gEF36kANfUoBgnspZ7LxACujTBPQxnb6lXa0N/msG2sXYbiLSzoH5eQ3H4STn90DuavgHUy/2JcuLyFvIxfQkopo7PXTDWhfTrAaiDxEtew14EoKVlae1460n7WWyuPbd4NSEIEl1BrCEumrI4KIv9JDyE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699319517; c=relaxed/simple; bh=Ihmo4tW9iO3QpSbeGwl9zU+adFIzzEvTc10yEy5fXqM=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=pXnNm3dzuRWCj9Vyv7o9gTjbDUMQh8nhmC9xzV9Mf6T1ZspItx79cxFthaUdwNGvcMAoXgeG72KZzweODU+UuOf5CHC+C9Ksd/eUmv8B+wEMY3H5vqlqkqGKV4vXzhtG+OWmn7YPqWlhpj5RupDYptMzU5bT7J4aRAFFTrjFbDc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-io1-xd33.google.com with SMTP id ca18e2360f4ac-7a66aa8ebb7so212024039f.3 for ; Mon, 06 Nov 2023 17:11:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699319514; x=1699924314; darn=gcc.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=id6HMZ19npP6GUlpfrYUkoydF7P9rQYcNyKL5ICP6H8=; b=blrVfQmyTA2+JdXzpcuYDEbY4ihg02WWGLcru7cZv+ZpuvCSrCO6120K6RGiHhv/Um ccKZkqiVKFQlNvERnG7XkUNpiWx8pIeBe8XYq6HyBIu58m/Y3ovEZcC4gYlO4Zg/ZN8Z U5wZ6WBjt1d/rRDh1g0p02WXVadC0OyJH3tdy5v6yVasCNJlhW6fRBYUqEWI/F2MTga9 BCSVF2GRtNsj9atcG/9lF1jNvQze0R8LSrgIQ4KV5ZB70w+XHbDxCRegMzOODOSzGOLq vvmHGXHrFSVxjv6fv6qeIxClaqid2FAVfPzwLjL4THEa1NNcD7gtPVCSiFcxLxLxQoZf sNxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699319514; x=1699924314; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=id6HMZ19npP6GUlpfrYUkoydF7P9rQYcNyKL5ICP6H8=; b=LBa6MajG03vuMpklkHgMzshwsBIyf6W84OFINvT+/ek3VuDQDkkKczv7mfzurOHn+v StVJlPBRhW2vNyrVcm47oafTjBPpSNkxdIH8mo8h08bBIzUcqXMYcxKmlzaknjJcbLDB Ls4GiF1Qygwd2PP/5MNSd9sutlfi+jzNLw+a861xJ3frJIvcf83hGMML9ADJHCwyLt8N 3FdLai3R8n499TBXahEU7x0wOmMjx5z/qYFkHRm2Ywmo6/YjR65lr9yPkmt/fy6xcUsH bYgII6UKQPShCgOl5o7ldXIm8ZHli2ggw3n8fl7a+E7uN3ijQN3slNey1EaxeLPG4g7z OhMA== X-Gm-Message-State: AOJu0YxKlVpNLAh9dLxvJOPkCJ2yNKE3LISnVe8AdTnLxwk0JDhKIJoU fFNL8H1K8hKIP/b+iVP+njOKTdkH5wVw/Q== X-Google-Smtp-Source: AGHT+IH+vIK3a0K0rN8l195pScFxz9fUyjB2dxuZ2M6cDwHKADeQlgN+8unh9E8M4XSWcasSUpTv3Q== X-Received: by 2002:a05:6602:2c94:b0:791:16ba:d764 with SMTP id i20-20020a0566022c9400b0079116bad764mr42770096iow.16.1699319514216; Mon, 06 Nov 2023 17:11:54 -0800 (PST) Received: from [172.31.0.109] ([136.36.130.248]) by smtp.gmail.com with ESMTPSA id l21-20020a02a895000000b0045b05457189sm2366447jam.92.2023.11.06.17.11.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 06 Nov 2023 17:11:53 -0800 (PST) Message-ID: <1926bc18-f0ae-4b00-b0dd-f7bea71051ec@gmail.com> Date: Mon, 6 Nov 2023 18:11:52 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 08/12] mode-switching: Pass set of live registers to the needed hook Content-Language: en-US To: gcc-patches@gcc.gnu.org, jlaw@ventanamicro.com, richard.sandiford@arm.com References: From: Jeff Law In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 11/5/23 11:48, Richard Sandiford wrote: > The emit hook already takes the set of live hard registers as input. > This patch passes it to the needed hook too. SME uses this to > optimise the mode choice based on whether state is live or dead. > > The main caller already had access to the required info, but the > special handling of return values did not. > > gcc/ > * target.def (mode_switching.needed): Add a regs_live parameter. > * doc/tm.texi: Regenerate. > * config/epiphany/epiphany-protos.h (epiphany_mode_needed): Update > accordingly. > * config/epiphany/epiphany.cc (epiphany_mode_needed): Likewise. > * config/epiphany/mode-switch-use.cc (insert_uses): Likewise. > * config/i386/i386.cc (ix86_mode_needed): Likewise. > * config/riscv/riscv.cc (riscv_mode_needed): Likewise. > * config/sh/sh.cc (sh_mode_needed): Likewise. > * mode-switching.cc (optimize_mode_switching): Likewise. > (create_pre_exit): Likewise, using the DF simulate functions > to calculate the required information. We should probably deprecate the epiphany port. It's been too flakey to test for years at this point. But anyway.... OK for the trunk. jeff