From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25161 invoked by alias); 1 Jun 2011 19:46:37 -0000 Received: (qmail 25151 invoked by uid 22791); 1 Jun 2011 19:46:36 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (74.125.121.67) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 01 Jun 2011 19:46:15 +0000 Received: from wpaz5.hot.corp.google.com (wpaz5.hot.corp.google.com [172.24.198.69]) by smtp-out.google.com with ESMTP id p51JkDba025332 for ; Wed, 1 Jun 2011 12:46:14 -0700 Received: from yic13 (yic13.prod.google.com [10.243.65.141]) by wpaz5.hot.corp.google.com with ESMTP id p51JjhA8011388 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Wed, 1 Jun 2011 12:45:56 -0700 Received: by yic13 with SMTP id 13so90535yic.17 for ; Wed, 01 Jun 2011 12:45:56 -0700 (PDT) MIME-Version: 1.0 Received: by 10.151.79.10 with SMTP id g10mr7072430ybl.301.1306957555970; Wed, 01 Jun 2011 12:45:55 -0700 (PDT) Received: by 10.151.26.21 with HTTP; Wed, 1 Jun 2011 12:45:55 -0700 (PDT) In-Reply-To: References: Date: Wed, 01 Jun 2011 19:46:00 -0000 Message-ID: Subject: Re: -fdump-passes -fenable-xxx=func_name_list From: Xinliang David Li To: Richard Guenther Cc: GCC Patches Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true X-IsSubscribed: yes 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 X-SW-Source: 2011-06/txt/msg00091.txt.bz2 On Wed, Jun 1, 2011 at 12:29 PM, Richard Guenther wrote: > On Wed, Jun 1, 2011 at 6:16 PM, Xinliang David Li wr= ote: >> On Wed, Jun 1, 2011 at 1:51 AM, Richard Guenther >> wrote: >>> On Wed, Jun 1, 2011 at 1:34 AM, Xinliang David Li = wrote: >>>> The following patch implements the a new option that dumps gcc PASS >>>> configuration. The sample output is attached. =A0There is one >>>> limitation: some placeholder passes that are named with '*xxx' are >>>> note registered thus they are not listed. They are not important as >>>> they can not be turned on/off anyway. >>>> >>>> The patch also enhanced -fenable-xxx and -fdisable-xx to allow a list >>>> of function assembler names to be specified. >>>> >>>> Ok for trunk? >>> >>> Please split the patch. >>> >>> I'm not too happy how you dump the pass configuration. =A0Why not simpl= y, >>> at a _single_ place, walk the pass tree? =A0Instead of doing pieces of = it >>> at pass execution time when it's not already dumped - that really looks >>> gross. >> >> Yes, that was the original plan -- but it has problems >> 1) the dumper needs to know the root pass lists -- which can change >> frequently -- it can be a long term maintanance burden; >> 2) the centralized dumper needs to be done after option processing >> 3) not sure if gate functions have any side effects or have dependencies= on cfun >> >> The proposed solutions IMHO is not that intrusive -- just three hooks >> to do the dumping and tracking indentation. > > Well, if you have a CU that is empty or optimized to nothing at some point > you will not get a complete pass list. =A0I suppose optimize attributes m= ight > also confuse output. =A0Your solution might not be that intrusive > but it is still ugly. =A0I don't see 1) as an issue, for 2) you can just = call the > dumping from toplev_main before calling do_compile (), 3) gate functions > shouldn't have side-effects, but as they could gate on optimize_for_speed= () > your option summary output will be bogus anyway. > > So - what is the output intended for if it isn't reliable? This needs to be cleaned up at some point -- the gate function should behave the same for all functions and per-function decisions need to be pushed down to the executor body. I will try to rework the patch as you suggested to see if there are problems. David > > Richard. > >>> >>> The documentation should also link this option to the -fenable/disable >>> options as obviously the pass names in that dump are those to be >>> used for those flags (and not readily available anywhere else). >> >> Ok. >> >>> >>> I also think that it would be way more useful to note in the individual >>> dump files the functions (at the place they would usually appear) that >>> have the pass explicitly enabled/disabled. >> >> Ok -- for ipa passes or tree/rtl passes where all functions are >> explicitly disabled. >> >> Thanks, >> >> David >> >>> >>> Richard. >>> >>>> Thanks, >>>> >>>> David >>>> >>> >> >