From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com [68.232.129.153]) by sourceware.org (Postfix) with ESMTPS id 423DA3850438 for ; Thu, 17 Jun 2021 21:58:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 423DA3850438 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com IronPort-SDR: rmhEWs2NO2bMvC0pnOEpkeF3HmS4R8JV0jwrkxk+DucKBh9hV9dcv4ChABdW96eFNHL68Rv402 YRiNPfInPexU/GHTwCuwCydxGuA4jZ15AzXMNILj6thHc1Dtb2to096XE42BJY1qvQLRsb5wqT Z4kpMohmVHg7TMHspSAr/YNKf8T+OolvA4gYNEpgLdO4F5qePep3OgbU6XnqVCiCu2r/4wDch/ XwZCXka4dbcnTICY+dBzads+vo+P7JzDPw5Zmq50NCUKm5r1oZSCOCGIrF58us1KgTQ4nAAZno D4A= X-IronPort-AV: E=Sophos;i="5.83,281,1616486400"; d="scan'208";a="64954142" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa1.mentor.iphmx.com with ESMTP; 17 Jun 2021 13:58:04 -0800 IronPort-SDR: v8L0AdsFcclWDt6gM4wtPqVb9dMBSSJN+RbyjX6UsT2ynVewYjCCodTtiAzKuv/5Etq9dF3DFv T63psMwwPTM6YAxAMuRd1ayGag2zIK8XwCg7Zm/6f0bD0aIaxw3O9WdIEsM6Hu+Y24XQVCdcG/ lgTa1+87A+v+l5i6SUQ6RQkeGNR17ABN4qsflqFPj9qmyenIDKAIk6LtwHp8oDWD9cWrtFpAqR uB++MMQwwqy7qANIdNLPDVZ7CxJeMUf1g6QA5FyS4kZ2yTi+h9FjXz7LbJb/vRVa0EOVFh7M4M hK8= Subject: Re: [Patch] Add 'default' to -foffload=; document that flag [PR67300] To: Jakub Jelinek , Tobias Burnus CC: Richard Biener , gcc-patches , Thomas Schwinge References: <1587c151-b99f-2f44-3044-7b01c296b9ad@codesourcery.com> <20210617122737.GE7746@tucnak> <20210617175054.GI7746@tucnak> <07d9e298-55d0-0e80-84f5-5d5d75c9e341@codesourcery.com> <20210617194010.GJ7746@tucnak> From: Sandra Loosemore Message-ID: <7e4ad7a0-e601-b97f-9caa-9f10befbe84e@codesourcery.com> Date: Thu, 17 Jun 2021 15:57:58 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20210617194010.GJ7746@tucnak> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-ClientProxiedBy: svr-orw-mbx-04.mgc.mentorg.com (147.34.90.204) To svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, NICE_REPLY_A, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jun 2021 21:58:06 -0000 On 6/17/21 1:40 PM, Jakub Jelinek wrote: > On Thu, Jun 17, 2021 at 09:28:00PM +0200, Tobias Burnus wrote: >> I am not sure whether I fully agree with this or not. However: >> >> Let's propose something radical, which probably won't break any real-world >> code, avoids the need to add a new -foffload= keyword and is >> also intuitive to the user: >> >> * -foffload==-option >> >> Suggestion: This no longer affects the list of enabled targets. As by default >> all targets are enabled, this one will (kept) be(en) enabled (but might >> silently fail if the target lto1 is not installed). >> >> * -foffload=disable and -foffload= >> >> This is the only way to modify the list of supported offload devices to those >> specified. By adding a triplet explicitly, it will give an error via lto1. >> >> That will solve all issues, possibly except for >> -foffload=-lm -foffload=nxpt-none=-latomic -foffload=amdgcn-amdhsa >> some might find it surprising that nvptx offloading will be disabled, >> but others might find it natural. > > Could we introduce a different option which wouldn't imply enabling that > target: > -foffload-options==option > and make > -foffload==option > imply (expand in the driver) > -foffload-options==option -foffload= > ? > That would be mostly backwards compatible, but would allow users to specify options > separately from the enabled target list. > The in the above cases couldn't include disable or > default, but the -foffload= case could, and disable > (either in the list or separately) would simply disable all targets (even > those enabled earlier), while default would reset the list to the default > (basically cancel all previous non-options -foffload= options). > And the -foffload-options= would accumulate in the order given on the > command line. I don't feel qualified to comment on the details of the behavior, but separating the options and making them more orthogonal to one another would certainly make things easier to document. :-) One other thing I'd like to see in the docs is how to ask GCC what offload targets it is configured to support by default. This could be put in a paragraph that also includes the language about how you need to have the compilers for those offload targets installed too. -Sandra