From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 51746 invoked by alias); 29 Sep 2015 11:29:47 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 49066 invoked by uid 89); 29 Sep 2015 11:29:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: fencepost.gnu.org Received: from fencepost.gnu.org (HELO fencepost.gnu.org) (208.118.235.10) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 29 Sep 2015 11:29:44 +0000 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35573) by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1Zgt6M-0001QB-2h for gcc-patches@gnu.org; Tue, 29 Sep 2015 07:29:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zgt6K-0006wJ-U0 for gcc-patches@gnu.org; Tue, 29 Sep 2015 07:29:41 -0400 Received: from mail-yk0-x22a.google.com ([2607:f8b0:4002:c07::22a]:35242) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zgt6K-0006wA-Px for gcc-patches@gnu.org; Tue, 29 Sep 2015 07:29:40 -0400 Received: by ykdz138 with SMTP id z138so3253976ykd.2 for ; Tue, 29 Sep 2015 04:29:40 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.129.51.88 with SMTP id z85mr21432483ywz.148.1443526180394; Tue, 29 Sep 2015 04:29:40 -0700 (PDT) Received: by 10.37.93.136 with HTTP; Tue, 29 Sep 2015 04:29:40 -0700 (PDT) In-Reply-To: <560A74BF.8080509@mentor.com> References: <56094F9A.1040500@mentor.com> <56095A0A.40102@redhat.com> <560A24E7.8060908@mentor.com> <560A74BF.8080509@mentor.com> Date: Tue, 29 Sep 2015 11:42:00 -0000 Message-ID: Subject: Re: [patch, committed] Dump function attributes From: Richard Biener To: Tom de Vries Cc: Bernd Schmidt , "gcc-patches@gnu.org" Content-Type: text/plain; charset=UTF-8 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4002:c07::22a X-IsSubscribed: yes X-SW-Source: 2015-09/txt/msg02188.txt.bz2 On Tue, Sep 29, 2015 at 1:23 PM, Tom de Vries wrote: > On 29/09/15 12:36, Richard Biener wrote: >> >> On Tue, Sep 29, 2015 at 7:43 AM, Tom de Vries >> wrote: >>> >>> [ was: Re: [RFC] Dump function attributes ] >>> >>> On 28/09/15 17:17, Bernd Schmidt wrote: >>>> >>>> >>>> On 09/28/2015 04:32 PM, Tom de Vries wrote: >>>>> >>>>> >>>>> patch below prints the function attributes in the dump file. >>>> >>>> >>>> >>>>> foo () >>>>> [ noclone , noinline ] >>>>> { >>>>> ... >>>>> >>>>> Good idea? >>>>> >>>>> If so, do we want one attribute per line? >>>> >>>> >>>> >>>> Only for really long ones I'd think. Patch is ok for now. >>>> >>>> >>> >>> Reposting patch with ChangeLog entry added. >>> >>> Bootstrapped and reg-tested on x86_64. >>> >>> Committed to trunk. >> >> >> Hmpf. I always like to make the dump-files as much copy&past-able to >> testcases >> as possible. > > > Hmm, interesting. Not something I use, but I can imagine it's useful. > >> So why did you invent a new syntax for attributes instead of using >> the existing __attribute__(("noclone", "noinline")) (in this case)? > > > My main concerns were: > - being able to see in dump files what the actual attributes of a > function are (rather than having to figure it out in a debug session). > - being able to write testcases that can test for the presence of those > attributes in dump files > >> Did you verify >> how attributes with arguments get printed? > > > F.i. an oacc offload function compiled by the host compiler is annotated as > follows: > > before pass_oacc_transform (in the gomp-4_0-branch): > ... > [ oacc function 32, , , omp target entrypoint ] > ... > > after pass_oacc_transform: > .... > [ oacc function 1, 1, 1, omp target entrypoint ] > . Hmm, ok. So without some extra dump_attribute_list wrapping __attribute_(( ... )) around the above doesn't make it more amenable for cut&pasting. Richard. > > Thanks, > - Tom