public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Xinliang David Li <davidxl@google.com>
To: Basile Starynkevitch <basile@starynkevitch.net>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: Dump before flag
Date: Wed, 01 Jun 2011 21:24:00 -0000	[thread overview]
Message-ID: <BANLkTikmNfvaUGopJ3OxQjHXYVx-_vyd5zgfo4DYLWWpKt_Dew@mail.gmail.com> (raw)
In-Reply-To: <20110601231202.224188ad.basile@starynkevitch.net>

On Wed, Jun 1, 2011 at 2:12 PM, Basile Starynkevitch
<basile@starynkevitch.net> wrote:
> On Wed, 1 Jun 2011 13:26:24 -0700
> Xinliang David Li <davidxl@google.com> wrote:
>
>> Hi, this is a simple patch that support dump_before flag. E.g,
>>
>> -fdump-tree-pre-before
>>
>> This is useful for diffing the the IR before and after a pass.
>
> Perhaps you forgot to actually attach the patch?

Right -- attached in a follow up email.
>
>> Gcc dumping needs more cleanups -- such as allowing IR only dump,
>> allowing IR dumping for a particular function etc. The exposure of
>> 'dumpfile' (instead of a dumping_level () function) makes those change
>> a little messy, but can be done.
>
> I don't understand what you mean by a dumping_level () function. What
> should that hypothetical function do? (I'm wrongly guessing it would
> return an integer, but IIRC dumpfile is a FILE*)

THere are two sources of dump:

1) IR dump performed by pass manager
2) pass specific debugging dump (the verbosity is controlled by -details flag).

2) is the part that is messy and needs cleanup. Every pass just checks
if dump_file is null or not and decide to dump the debugging info --
there is no easy way to turn it on and off. Ideally, individual pass
should call

  int debug_dump_level () -- dumps when it returns > 0.

With that in place, the dump flag -fdump-xxx-yyy-ir_only can be easily
implemented -- it only turns on pass manager dump, but lowers the
debug dump level to 0.

David


>
> Regards
>
> --
> Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
> email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
> 8, rue de la Faiencerie, 92340 Bourg La Reine, France
> *** opinions {are only mine, sont seulement les miennes} ***
>

  reply	other threads:[~2011-06-01 21:24 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-01 20:26 Xinliang David Li
2011-06-01 20:37 ` Richard Guenther
2011-06-01 20:38   ` Xinliang David Li
2011-06-01 21:12 ` Basile Starynkevitch
2011-06-01 21:24   ` Xinliang David Li [this message]
2011-06-06 11:12     ` Richard Guenther
2011-06-06 16:21       ` Xinliang David Li
2011-06-07  9:36         ` Richard Guenther
2011-06-07 16:23           ` Xinliang David Li
2011-06-07 16:43           ` Diego Novillo
2011-06-07 16:51             ` Xinliang David Li
2011-06-07 17:01               ` Diego Novillo
2011-06-07 17:07                 ` Xinliang David Li
2011-06-07 17:26                   ` Diego Novillo
2011-06-07 23:24           ` Xinliang David Li
2011-06-07 23:34             ` Xinliang David Li
2011-06-08  6:44               ` Xinliang David Li
2011-06-08  9:29             ` Richard Guenther
2011-06-08 16:52               ` Xinliang David Li
2011-06-08 17:14               ` Xinliang David Li
2011-06-08 23:15                 ` Xinliang David Li
2011-06-09  9:28                   ` Richard Guenther
2011-06-09 15:58                     ` Xinliang David Li
2011-06-10  9:04                       ` Richard Guenther
2011-06-10 16:54                         ` Xinliang David Li
2011-06-10 18:49                           ` Xinliang David Li
2011-06-14 14:19                             ` Richard Guenther
2011-06-14 16:02                               ` Xinliang David Li
2011-06-14 20:05                                 ` Xinliang David Li
2011-06-14 23:22                                   ` Xinliang David Li

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=BANLkTikmNfvaUGopJ3OxQjHXYVx-_vyd5zgfo4DYLWWpKt_Dew@mail.gmail.com \
    --to=davidxl@google.com \
    --cc=basile@starynkevitch.net \
    --cc=gcc-patches@gcc.gnu.org \
    /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).