public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Nathan Sidwell <nathan@acm.org>
To: "Martin Liška" <mliska@suse.cz>,
	"Richard Biener" <richard.guenther@gmail.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>, Martin Sebor <msebor@gmail.com>
Subject: Re: [RFC] Do we want hierarchical options & encapsulation in a class
Date: Mon, 15 May 2017 11:46:00 -0000	[thread overview]
Message-ID: <63638573-4c8d-8bea-f575-2c9025588a49@acm.org> (raw)
In-Reply-To: <2ab5f23c-b221-eca9-9dd7-2fba69cfc2cc@suse.cz>

Martin,
thanks for the write up.

On 05/15/2017 05:39 AM, Martin Liška wrote:
> Thanks Martin for feedback! After I spent quite some time with fiddling with > the options, I'm not convinced we should convert options to more 
hierarchical> structure. There's description:
> 1) -fopt-info is used to dump optimization options. One can pick both verbosity
> (note, optimization, all) and an optimization (ipa, inline, vec,...). Thus said
> it's probably not a candidate for hierarchical options?

I've never used this option, so have no comment (too lazy to figure out 
if it told me anything I didn't already see in a dump I was groveling over).

> 2) -fdump-pass_name-... as mentioned by Nathan is combination of verbosity
> (graph, note, verbose, details) and specific type of options (VOPS, RHS_ONLY, UID,..).
> 
> There's a complete list and suggestion how we can move it to more hierarchical ordering:
> 
> #define TDF_ADDRESS
> #define TDF_SLIM
> #define TDF_RAW
> #define TDF_DETAILS
> #define TDF_STATS
> #define TDF_BLOCKS
> #define TDF_VOPS
> #define TDF_LINENO
> #define TDF_UID
#define TDF_LANG is now a thing too. it should be DI_kind too
> #define TDF_TREE - remove & replace with DI_kind
> #define TDF_RTL - remove & replace with DI_kind
> #define TDF_IPA - remove & replace with DI_kind
> #define TDF_STMTADDR - merge with TDF_ADDRESS
> #define TDF_GRAPH
> #define TDF_MEMSYMS
> #define TDF_DIAGNOSTIC - merge with TDF_DETAILS
> #define TDF_VERBOSE - merge with TDF_DETAILS
> #define TDF_RHS_ONLY
> #define TDF_ASMNAME
> #define TDF_EH
> #define TDF_NOUID
> #define TDF_ALIAS
> #define TDF_ENUMERATE_LOCALS
> #define TDF_CSELIB
> #define TDF_SCEV
> #define TDF_COMMENT - remove and dump ';; ' unconditionally
> #define TDF_GIMPLE

Looks a good start.

1) The TDF_UID and TDF_NOUID options seem to be inverses of each other. 
Can't we just ditch the latter?

2) We might want to distinguish between enabling dump information that 
is useful to us gcc developers (TDF_DETAILS, say), and that that would 
be useful to end users trying to figure out why some random loop isn't 
being optimized in (say TDF_DIAGNOSTIC).  But if we can't define a 
sensible way of distinguishing then I'm all for not making the distinction.

> and more hierarchical ordering can be:
> 
> #define TDF_ADDRESS
> #define TDF_SLIM
> #define TDF_RAW
> #define TDF_DETAILS
> #define TDF_STATS
> #define TDF_BLOCKS
> #define TDF_LINENO
> #define TDF_UID
> #define TDF_GRAPH
> #define TDF_ASMNAME
> #define TDF_NOUID
> #define TDF_ENUMERATE_LOCALS

It'd be nice to name TDF_ENUMERATE_LOCALS without the second _ to avoid 
confusion with the hierarchy you discuss below?  (perhaps TDF_LOCALS?)

I like the idea of naming flags specific to a particular kind of dump 
with the name of that kind of dump.  We do have a mismatch between 
DI_TREE and TDF_GIMPLE though -- is there something sensible we could do 
there?

> #define TDF_GIMPLE
> #define TDF_GIMPLE_FE - GIMPLE front-end

How might this differ from a new  -fdump-lang-original?  I.e.
(1) why is it a dump-modifier flag, rather than a dump in its own right
(2) if we do need it, name it TDF_GIMPLE_LANG

> #define TDF_GIMPLE_VOPS
> #define TDF_GIMPLE_EH
> #define TDF_GIMPLE_ALIAS
> #define TDF_GIMPLE_SCEV
> #define TDF_GIMPLE_MEMSYMS
> #define TDF_GIMPLE_RHS_ONLY
> 
> #define TDF_RTL

How does this differ from the current TDF_RTL meaning?  Is it implying 
'TDF_RTL_ALL'? (same question about TDF_GIMPLE).

> #define TDF_RTL_CSELIB

nathan
-- 
Nathan Sidwell

  parent reply	other threads:[~2017-05-15 11:33 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-03  8:14 [RFC][PATCH] Introduce -fdump*-folding Martin Liška
2017-05-03  8:20 ` Andrew Pinski
2017-05-03 10:16 ` Richard Biener
2017-05-04  9:23   ` Martin Liška
2017-05-04 10:41     ` Richard Biener
2017-05-04 12:06       ` Martin Liška
2017-05-05 10:44         ` [PATCH 1/N] Introduce dump_flags_t type and use it instead of int type Martin Liška
2017-05-05 11:50           ` Richard Biener
2017-05-06 15:04             ` Trevor Saunders
2017-05-12 13:01               ` [PATCH v2 01/N] Add default value for last argument of dump functions Martin Liška
2017-05-16 13:49                 ` Richard Biener
2017-05-12 13:04               ` [PATCH v2 2/N] Introduce dump_flags_t type and use it instead of int, type Martin Liška
2017-05-16 13:50                 ` Richard Biener
2017-05-16 14:56                   ` Martin Liška
2017-05-17  7:55                     ` Richard Biener
2017-05-17  9:06                       ` Martin Liška
2017-05-18 13:37                         ` Thomas Schwinge
2017-05-18 14:26                           ` Martin Liška
2017-05-12 13:30               ` [PATCH v2 3/N] Transform TDF_{lang,tree,ipa,rtl} to dump_kind enum Martin Liška
2017-05-16 14:17                 ` Richard Biener
2017-05-17 12:22                 ` Richard Biener
2017-05-18 12:37                   ` Martin Liška
2017-05-25  5:29                 ` Martin Sebor
2017-05-25  9:56                   ` Martin Liška
2017-05-25 10:58                     ` Nathan Sidwell
2017-05-26 13:00                     ` Richard Biener
2017-05-26 13:54                       ` Martin Liška
2017-05-30 11:46                         ` Richard Biener
2017-05-16 13:55               ` [PATCH v2 04/N] Simplify usage of some TDF_* flags Martin Liška
2017-05-17 12:37                 ` Richard Biener
2017-05-18 12:58                   ` Martin Liška
2017-05-24 21:23                     ` Martin Liška
2017-05-26 11:46                       ` Richard Biener
2017-05-24 11:04               ` [PATCH v2 05/N] Add -fdump*-folding suboption Martin Liška
2017-05-24 13:53                 ` Richard Biener
2017-05-05 10:56         ` [PATCH 2/N] Add dump_flags_type<E> for handling of suboptions Martin Liška
2017-05-09 12:05           ` Martin Liška
2017-05-12 17:47           ` Martin Sebor
2017-05-15  6:52             ` Martin Sebor
2017-05-15  9:47           ` [RFC] Do we want hierarchical options & encapsulation in a class Martin Liška
2017-05-15 11:26             ` Nathan Sidwell
2017-05-15 12:24               ` Martin Liška
2017-05-15 11:46             ` Nathan Sidwell [this message]
2017-05-15 12:05               ` Martin Liška
2017-05-15 12:43                 ` Nathan Sidwell
2017-05-15 13:50                   ` Martin Liška
2017-05-15 14:13                     ` Nathan Sidwell
2017-05-15 14:24                       ` Martin Liška
2017-05-16 13:44                         ` Richard Biener
2017-05-05 11:57         ` [RFC][PATCH] Introduce -fdump*-folding Richard Biener
2017-05-09 12:03           ` Martin Liška
2017-05-09 12:19             ` Richard Biener
2017-05-09 12:52               ` Martin Liška
2017-05-09 13:01                 ` Richard Biener

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=63638573-4c8d-8bea-f575-2c9025588a49@acm.org \
    --to=nathan@acm.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=mliska@suse.cz \
    --cc=msebor@gmail.com \
    --cc=richard.guenther@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).