From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10173 invoked by alias); 25 Jun 2014 14:22:00 -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 10161 invoked by uid 89); 25 Jun 2014 14:21:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mail-qc0-f171.google.com Received: from mail-qc0-f171.google.com (HELO mail-qc0-f171.google.com) (209.85.216.171) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 25 Jun 2014 14:21:57 +0000 Received: by mail-qc0-f171.google.com with SMTP id w7so1764289qcr.16 for ; Wed, 25 Jun 2014 07:21:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=StDwgxVANlFm5T3ViIeip2/KkTd8LO98X90tPkQOIKw=; b=H30ebqFGeUix6b/E5AnWmQuJakKneXw0w2eQL0NLQ6XY5mtew3sU3+r2/Vwh+Wv9OJ ibgeUSFePdWsWS41TcIv6VthgfoouYf1weI2DXgAkhkuY8nnkYA1kAiwCMh/6vHCOclD nQ4lUItjjYiqFmQ4m6yjH2OB09y6cnWfwsdEvnsd0liuJvIzSUZnJrmkPn20CNZ8b3vq cGjs+Owtgyw0bls92LS8lW1Vowt9sbPOShZ1us75xyadnI8yg/wcTbMKxfmvdP6W9Mfr jeJXVRYOQpuFs5k0TcCtItgcGzZPIwMpB9Yvuo0vBy1hxPHeB/aPR0H6+QqNkmnTvN3N teZA== X-Gm-Message-State: ALoCoQmyWUgaSzP0iboM1xubE9ZARNagnKpmgOWfsIElsigOmiwIXiE7pkp8mjwrgzHLU8CQAVVo MIME-Version: 1.0 X-Received: by 10.224.168.13 with SMTP id s13mr11399279qay.14.1403706115828; Wed, 25 Jun 2014 07:21:55 -0700 (PDT) Received: by 10.229.208.67 with HTTP; Wed, 25 Jun 2014 07:21:55 -0700 (PDT) In-Reply-To: References: Date: Wed, 25 Jun 2014 14:22:00 -0000 Message-ID: Subject: Re: [PATCH] Add missing -fdump-* options From: Teresa Johnson To: Xinliang David Li Cc: Richard Biener , "gcc-patches@gcc.gnu.org" Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-06/txt/msg02019.txt.bz2 On Tue, May 13, 2014 at 8:19 AM, Xinliang David Li wrote: > On Tue, May 13, 2014 at 1:39 AM, Richard Biener > wrote: >> On Fri, May 9, 2014 at 5:54 PM, Teresa Johnson wrote: >>> I discovered that the support for the documented -fdump-* options >>> "optimized", "missed", "note" and "optall" was missing. Added that and >>> fixed a minor typo in the documentation. >>> >>> Bootstrapped and tested on x86-64-unknown-linux-gnu. Ok for trunk? >> >> I'm not sure they were intented for user-consumption. ISTR they >> are just an implementation detail exposed by -fopt-info-X (which is >> where they are documented). >> >> The typo fix is ok, also adding a comment before the dump flags >> definition to the above fact. >> >> David, do I remember correctly? > > I remember we talked about content filtering dump flags. Things like > > -fdump-xxx-ir <-- dump IR only > -fdump-xxx-transformation <-- optimization note > -fdump-xxx-debug <-- other debug traces > > Other than that, now I think 'details' and 'all' seem redundant. > 'verbose' flag/modifier can achieve the same effect depending on the > context. > > -fdump-xxx-ir-verbose <-- dump IR, and turn on IR modifiers such as > vops, lineno, etc > -fdump-xxx-transforamtion-verbose <-- dump transformations + missed > optimizations + notes > -fdump-xxx-debug-verbose <-- turn on detailed trace. The above proposal seems fine to me as a longer-term direction, but also seems somewhat orthogonal to the issue my patch is trying to solve in the short term, namely inconsistent documentation and behavior: 1) "optimized", "missed", "note" and "optall" are documented as being sub-options for -fdump-tree-* in doc/invoke.texi, but not implemented. 2) "optimized", "missed", "note" and "optall" are however enabled via -fdump-tree-all Could we at least fix these issues in the short term, as it doesn't affect the documented behavior (but rather adds the documented behavior)? Thanks, Teresa > > thanks, > > David > > >> >> Thanks, >> Richard. >> >>> Thanks, >>> Teresa >>> >>> 2014-05-09 Teresa Johnson >>> >>> * doc/invoke.texi: Fix typo. >>> * dumpfile.c: Add support for documented -fdump-* options >>> optimized/missed/note/optall. >>> >>> Index: doc/invoke.texi >>> =================================================================== >>> --- doc/invoke.texi (revision 210157) >>> +++ doc/invoke.texi (working copy) >>> @@ -6278,7 +6278,7 @@ passes). >>> @item missed >>> Enable showing missed optimization information (only available in certain >>> passes). >>> -@item notes >>> +@item note >>> Enable other detailed optimization information (only available in >>> certain passes). >>> @item =@var{filename} >>> Index: dumpfile.c >>> =================================================================== >>> --- dumpfile.c (revision 210157) >>> +++ dumpfile.c (working copy) >>> @@ -107,6 +107,10 @@ static const struct dump_option_value_info dump_op >>> {"nouid", TDF_NOUID}, >>> {"enumerate_locals", TDF_ENUMERATE_LOCALS}, >>> {"scev", TDF_SCEV}, >>> + {"optimized", MSG_OPTIMIZED_LOCATIONS}, >>> + {"missed", MSG_MISSED_OPTIMIZATION}, >>> + {"note", MSG_NOTE}, >>> + {"optall", MSG_ALL}, >>> {"all", ~(TDF_RAW | TDF_SLIM | TDF_LINENO | TDF_TREE | TDF_RTL | TDF_IPA >>> | TDF_STMTADDR | TDF_GRAPH | TDF_DIAGNOSTIC | TDF_VERBOSE >>> | TDF_RHS_ONLY | TDF_NOUID | TDF_ENUMERATE_LOCALS | TDF_SCEV)}, >>> >>> >>> -- >>> Teresa Johnson | Software Engineer | tejohnson@google.com | 408-460-2413 -- Teresa Johnson | Software Engineer | tejohnson@google.com | 408-460-2413