From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id 6FCA7385D0F8 for ; Thu, 27 Oct 2022 20:40:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6FCA7385D0F8 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.95,218,1661846400"; d="scan'208";a="85558637" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa4.mentor.iphmx.com with ESMTP; 27 Oct 2022 12:40:16 -0800 IronPort-SDR: N8xC7PrIKuiEOqfFfFIUnA479nN9Nnux+++K7tt11LimSEv/ovaKh9p5d7Sf3Kyr1J5qxs3Ybl BhCl3dND5+oI1+lZTuF/Dm0qjI5avTia+GAIyOtUUTBGnjM5Zl0RYeUcSiAtCg/pxs8T7lqtH8 7X9tjpGlgJxiUYNipQ2AcZMTAFr4gNjsNVNsGUDHgQw4pqkQhsRaX1KbLJ+muV6v4r1fE28L3o qnrbwcP6aHJMQ8YYrj3K0i9a7vjqiqxg2m/cx8t4zhXdhLVnipijTvrS8H2IiRKS73iSt7DFsf jLo= Message-ID: <22d22939-2f6b-c14a-17fc-834547c05f96@codesourcery.com> Date: Thu, 27 Oct 2022 14:40:13 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH v3] Re: OpenMP: Generate SIMD clones for functions with "declare target" Content-Language: en-US To: Thomas Schwinge , Jakub Jelinek CC: Jan Hubicka , References: <0b64e323-63f9-e4b7-eb7f-83f3b5e3125b@codesourcery.com> <001679b1-814a-c1db-5611-c663f6931d11@codesourcery.com> <871qqtd1cy.fsf@dem-tschwing-1.ger.mentorg.com> From: Sandra Loosemore In-Reply-To: <871qqtd1cy.fsf@dem-tschwing-1.ger.mentorg.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: svr-orw-mbx-13.mgc.mentorg.com (147.34.90.213) To svr-orw-mbx-13.mgc.mentorg.com (147.34.90.213) 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=no 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 10/27/22 04:09, Thomas Schwinge wrote: > Hi! > > On 2022-10-26T20:27:19-0600, Sandra Loosemore wrote: >> One of my test cases examines the .s output to make sure that the clones >> are emitted as local symbols and not global. I have not been able to >> find the symbol linkage information in any of the dump files > > Hmm, also some of '-fdump-ipa-all-details' doesn't help here? Maybe I'm not looking at the right dump file, but all I see is names of functions in the dumps and nothing about symbol linkage/visibility, even with -details. > And/or, where you implement the logic to "make sure that the clones > are emitted as local symbols and not global", do emit some "tag" in the > dump file, and the scan for that? > > Random examples that I just remembered: > > 'gcc/omp-offload.cc:execute_oacc_loop_designation' handling of > 'OMP_CLAUSE_NOHOST', and how that's scanned (host-side) in test cases > such as 'libgomp/testsuite/libgomp.oacc-c-c++-common/routine-nohost-1.c', > 'libgomp/testsuite/libgomp.oacc-fortran/routine-nohost-1.f90'. > > 'gcc/config/nvptx/nvptx.cc:nvptx_find_sese' doing > 'fprintf (dump_file, "SESE regions:"); [...]', and that's scanned in: > > libgomp/testsuite/libgomp.oacc-c-c++-common/nvptx-sese-1.c-/* Match {N->N(.N)+} */ > libgomp/testsuite/libgomp.oacc-c-c++-common/nvptx-sese-1.c:/* { dg-final { scan-offload-rtl-dump "SESE regions:.* \[0-9\]+{\[0-9\]+->\[0-9\]+(\\.\[0-9\]+)+}" "mach" } } */ > > (You'd be doing this at the 'scan-offload-tree-dump[...]' level, I > suppose.) I guess customizing the dump output from the simdclone pass with the information I need is the easiest solution. I'm still concerned about getting adequate routine test coverage, though, when it's so specialized to a particular offload target. Thanks for the help! :-) -Sandra