public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Dump before flag
@ 2011-06-01 20:26 Xinliang David Li
  2011-06-01 20:37 ` Richard Guenther
  2011-06-01 21:12 ` Basile Starynkevitch
  0 siblings, 2 replies; 30+ messages in thread
From: Xinliang David Li @ 2011-06-01 20:26 UTC (permalink / raw)
  To: GCC Patches; +Cc: Richard Guenther

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.

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.

Ok for trunk?

Thanks,

David

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Dump before flag
  2011-06-01 20:26 Dump before flag 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
  1 sibling, 1 reply; 30+ messages in thread
From: Richard Guenther @ 2011-06-01 20:37 UTC (permalink / raw)
  To: Xinliang David Li; +Cc: GCC Patches

On Wed, Jun 1, 2011 at 10:26 PM, 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.
>
> 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.
>
> Ok for trunk?

-ENOPATCH

> Thanks,
>
> David
>

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Dump before flag
  2011-06-01 20:37 ` Richard Guenther
@ 2011-06-01 20:38   ` Xinliang David Li
  0 siblings, 0 replies; 30+ messages in thread
From: Xinliang David Li @ 2011-06-01 20:38 UTC (permalink / raw)
  To: Richard Guenther; +Cc: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 683 bytes --]

Sorry about it. Here it is.

David


On Wed, Jun 1, 2011 at 1:36 PM, Richard Guenther
<richard.guenther@gmail.com> wrote:
> On Wed, Jun 1, 2011 at 10:26 PM, 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.
>>
>> 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.
>>
>> Ok for trunk?
>
> -ENOPATCH
>
>> Thanks,
>>
>> David
>>
>

[-- Attachment #2: dump_before.p --]
[-- Type: text/x-pascal, Size: 1613 bytes --]

2011-06-01  David Li  <davidxl@google.com>

	* tree-dump.c: New dump flags.
	* tree-pass.h: New dump flags.
	* passes.c (execute_one_pass): Handle dump_before flag.

Index: tree-dump.c
===================================================================
--- tree-dump.c	(revision 174446)
+++ tree-dump.c	(working copy)
@@ -808,6 +808,7 @@ struct dump_option_value_info
    in tree.h */
 static const struct dump_option_value_info dump_options[] =
 {
+  {"before",  TDF_BEFORE},
   {"address", TDF_ADDRESS},
   {"asmname", TDF_ASMNAME},
   {"slim", TDF_SLIM},
Index: tree-pass.h
===================================================================
--- tree-pass.h	(revision 174446)
+++ tree-pass.h	(working copy)
@@ -83,6 +83,7 @@ enum tree_dump_index
 #define TDF_ALIAS	(1 << 21)	/* display alias information  */
 #define TDF_ENUMERATE_LOCALS (1 << 22)	/* Enumerate locals by uid.  */
 #define TDF_CSELIB	(1 << 23)	/* Dump cselib details.  */
+#define TDF_BEFORE	(1 << 24)	/* Dump IR before pass.  */
 
 
 /* In tree-dump.c */
Index: passes.c
===================================================================
--- passes.c	(revision 174446)
+++ passes.c	(working copy)
@@ -1563,6 +1563,13 @@ execute_one_pass (struct opt_pass *pass)
 
   initializing_dump = pass_init_dump_file (pass);
 
+  /* Override dump TODOs.  */
+  if (dump_file && (pass->todo_flags_finish & TODO_dump_func)
+      && (dump_flags & TDF_BEFORE))
+    {
+      pass->todo_flags_finish &= ~TODO_dump_func;
+      pass->todo_flags_start |= TODO_dump_func;
+    }
   /* Run pre-pass verification.  */
   execute_todo (pass->todo_flags_start);
 

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Dump before flag
  2011-06-01 20:26 Dump before flag Xinliang David Li
  2011-06-01 20:37 ` Richard Guenther
@ 2011-06-01 21:12 ` Basile Starynkevitch
  2011-06-01 21:24   ` Xinliang David Li
  1 sibling, 1 reply; 30+ messages in thread
From: Basile Starynkevitch @ 2011-06-01 21:12 UTC (permalink / raw)
  To: Xinliang David Li; +Cc: GCC Patches

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?

> 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*)

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} ***

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Dump before flag
  2011-06-01 21:12 ` Basile Starynkevitch
@ 2011-06-01 21:24   ` Xinliang David Li
  2011-06-06 11:12     ` Richard Guenther
  0 siblings, 1 reply; 30+ messages in thread
From: Xinliang David Li @ 2011-06-01 21:24 UTC (permalink / raw)
  To: Basile Starynkevitch; +Cc: GCC Patches

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} ***
>

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Dump before flag
  2011-06-01 21:24   ` Xinliang David Li
@ 2011-06-06 11:12     ` Richard Guenther
  2011-06-06 16:21       ` Xinliang David Li
  0 siblings, 1 reply; 30+ messages in thread
From: Richard Guenther @ 2011-06-06 11:12 UTC (permalink / raw)
  To: Xinliang David Li; +Cc: Basile Starynkevitch, GCC Patches

On Wed, Jun 1, 2011 at 11:23 PM, Xinliang David Li <davidxl@google.com> wrote:
> 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.

Well.  There is just no distinction in the current design between
the "pass manager managed dump" and the "pass managed dump".
Instead the pass requests the function to be dumped before/after
it is run via the TODO flags.

Your patch doesn't really improve this but adds to the confusion.

+  /* Override dump TODOs.  */
+  if (dump_file && (pass->todo_flags_finish & TODO_dump_func)
+      && (dump_flags & TDF_BEFORE))
+    {
+      pass->todo_flags_finish &= ~TODO_dump_func;
+      pass->todo_flags_start |= TODO_dump_func;
+    }

and certainly writing to pass is not ok.  And the TDF_BEFORE flag
looks misplaced as it controls TODOs, not dumping behavior.
Yes, it's a mess right now but the above looks like a hack ontop
of that mess (maybe because of it, but well ...).

At least I would have expected to also get the dump after the
pass, not only the one before it with this dump flag.

Now, why can't you look at the previous pass output for the
before-dump (as I do usually)?

Richard.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Dump before flag
  2011-06-06 11:12     ` Richard Guenther
@ 2011-06-06 16:21       ` Xinliang David Li
  2011-06-07  9:36         ` Richard Guenther
  0 siblings, 1 reply; 30+ messages in thread
From: Xinliang David Li @ 2011-06-06 16:21 UTC (permalink / raw)
  To: Richard Guenther; +Cc: Basile Starynkevitch, GCC Patches

>
> Your patch doesn't really improve this but adds to the confusion.
>
> +  /* Override dump TODOs.  */
> +  if (dump_file && (pass->todo_flags_finish & TODO_dump_func)
> +      && (dump_flags & TDF_BEFORE))
> +    {
> +      pass->todo_flags_finish &= ~TODO_dump_func;
> +      pass->todo_flags_start |= TODO_dump_func;
> +    }
>
> and certainly writing to pass is not ok.  And the TDF_BEFORE flag
> looks misplaced as it controls TODOs, not dumping behavior.
> Yes, it's a mess right now but the above looks like a hack ontop
> of that mess (maybe because of it, but well ...).
>

How about removing dumping TODO completely -- this can be done easily
-- I don't understand why pass wants extra control on the dumping if
user already asked for dumping -- it is annoying to see empty IR dump
for a pass when I want to see it.

> At least I would have expected to also get the dump after the
> pass, not only the one before it with this dump flag.
>
> Now, why can't you look at the previous pass output for the
> before-dump (as I do usually)?

For one thing, you need to either remember what is the previous pass,
or dump all passes which for large files can take very long time. Even
with all the dumps, you will need to eyeballing to find the previous
pass which may or may not have the IR dumped.

How about removing dump TODO?

Thanks,

David


>
> Richard.
>

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Dump before flag
  2011-06-06 16:21       ` Xinliang David Li
@ 2011-06-07  9:36         ` Richard Guenther
  2011-06-07 16:23           ` Xinliang David Li
                             ` (2 more replies)
  0 siblings, 3 replies; 30+ messages in thread
From: Richard Guenther @ 2011-06-07  9:36 UTC (permalink / raw)
  To: Xinliang David Li; +Cc: GCC Patches, Diego Novillo

On Mon, Jun 6, 2011 at 6:20 PM, Xinliang David Li <davidxl@google.com> wrote:
>>
>> Your patch doesn't really improve this but adds to the confusion.
>>
>> +  /* Override dump TODOs.  */
>> +  if (dump_file && (pass->todo_flags_finish & TODO_dump_func)
>> +      && (dump_flags & TDF_BEFORE))
>> +    {
>> +      pass->todo_flags_finish &= ~TODO_dump_func;
>> +      pass->todo_flags_start |= TODO_dump_func;
>> +    }
>>
>> and certainly writing to pass is not ok.  And the TDF_BEFORE flag
>> looks misplaced as it controls TODOs, not dumping behavior.
>> Yes, it's a mess right now but the above looks like a hack ontop
>> of that mess (maybe because of it, but well ...).
>>
>
> How about removing dumping TODO completely -- this can be done easily
> -- I don't understand why pass wants extra control on the dumping if
> user already asked for dumping -- it is annoying to see empty IR dump
> for a pass when I want to see it.
>
>> At least I would have expected to also get the dump after the
>> pass, not only the one before it with this dump flag.
>>
>> Now, why can't you look at the previous pass output for the
>> before-dump (as I do usually)?
>
> For one thing, you need to either remember what is the previous pass,
> or dump all passes which for large files can take very long time. Even
> with all the dumps, you will need to eyeballing to find the previous
> pass which may or may not have the IR dumped.
>
> How about removing dump TODO?

Yeah, I think this would go in the right direction.  Currently some passes
do not dump function bodies because they presumably do no IL
modification.  But this is certainly the minority (and some passes do not
dump bodies even though they are modifying the IL ...).

So I'd say we should by default dump function bodies.

Note that there are three useful dumping positions (maybe four),
before todo-start, after todo-start, before todo-finish and after todo-finish.
By default we'd want after todo-finish.  When we no longer dump via
a TODO then we could indeed use dump-flags to control this
(maybe -original for the body before todo-start).

What to others think?

Richard.

> Thanks,
>
> David
>
>
>>
>> Richard.
>>
>

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Dump before flag
  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 23:24           ` Xinliang David Li
  2 siblings, 0 replies; 30+ messages in thread
From: Xinliang David Li @ 2011-06-07 16:23 UTC (permalink / raw)
  To: Richard Guenther; +Cc: GCC Patches, Diego Novillo

On Tue, Jun 7, 2011 at 2:36 AM, Richard Guenther
<richard.guenther@gmail.com> wrote:
> On Mon, Jun 6, 2011 at 6:20 PM, Xinliang David Li <davidxl@google.com> wrote:
>>>
>>> Your patch doesn't really improve this but adds to the confusion.
>>>
>>> +  /* Override dump TODOs.  */
>>> +  if (dump_file && (pass->todo_flags_finish & TODO_dump_func)
>>> +      && (dump_flags & TDF_BEFORE))
>>> +    {
>>> +      pass->todo_flags_finish &= ~TODO_dump_func;
>>> +      pass->todo_flags_start |= TODO_dump_func;
>>> +    }
>>>
>>> and certainly writing to pass is not ok.  And the TDF_BEFORE flag
>>> looks misplaced as it controls TODOs, not dumping behavior.
>>> Yes, it's a mess right now but the above looks like a hack ontop
>>> of that mess (maybe because of it, but well ...).
>>>
>>
>> How about removing dumping TODO completely -- this can be done easily
>> -- I don't understand why pass wants extra control on the dumping if
>> user already asked for dumping -- it is annoying to see empty IR dump
>> for a pass when I want to see it.
>>
>>> At least I would have expected to also get the dump after the
>>> pass, not only the one before it with this dump flag.
>>>
>>> Now, why can't you look at the previous pass output for the
>>> before-dump (as I do usually)?
>>
>> For one thing, you need to either remember what is the previous pass,
>> or dump all passes which for large files can take very long time. Even
>> with all the dumps, you will need to eyeballing to find the previous
>> pass which may or may not have the IR dumped.
>>
>> How about removing dump TODO?
>
> Yeah, I think this would go in the right direction.  Currently some passes
> do not dump function bodies because they presumably do no IL
> modification.  But this is certainly the minority (and some passes do not
> dump bodies even though they are modifying the IL ...).
>
> So I'd say we should by default dump function bodies.
>
> Note that there are three useful dumping positions (maybe four),
> before todo-start, after todo-start, before todo-finish and after todo-finish.
> By default we'd want after todo-finish.  When we no longer dump via
> a TODO then we could indeed use dump-flags to control this
> (maybe -original for the body before todo-start).
>
> What to others think?

I think  that is a very good thing to have.

David


>
> Richard.
>
>> Thanks,
>>
>> David
>>
>>
>>>
>>> Richard.
>>>
>>
>

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Dump before flag
  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 23:24           ` Xinliang David Li
  2 siblings, 1 reply; 30+ messages in thread
From: Diego Novillo @ 2011-06-07 16:43 UTC (permalink / raw)
  To: Richard Guenther; +Cc: Xinliang David Li, GCC Patches

On Tue, Jun 7, 2011 at 02:36, Richard Guenther
<richard.guenther@gmail.com> wrote:

>> For one thing, you need to either remember what is the previous pass,
>> or dump all passes which for large files can take very long time. Even
>> with all the dumps, you will need to eyeballing to find the previous
>> pass which may or may not have the IR dumped.
>>
>> How about removing dump TODO?
>
> Yeah, I think this would go in the right direction.

Agreed.


Diego.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Dump before flag
  2011-06-07 16:43           ` Diego Novillo
@ 2011-06-07 16:51             ` Xinliang David Li
  2011-06-07 17:01               ` Diego Novillo
  0 siblings, 1 reply; 30+ messages in thread
From: Xinliang David Li @ 2011-06-07 16:51 UTC (permalink / raw)
  To: Diego Novillo; +Cc: Richard Guenther, GCC Patches

Any suggestions on the dump position specification string, before and
after is not enough. How about

start, before, after, and finish?

I.e.

-fdump-tree-pre-start --> dump IR before TODO_start of PRE pass
-fdump-tree-pre-before --> dump IR just before PRE after its TODO start finishes
-fdump-tree-pre-after --> dump IR just after PRE
-fdump-tree-pre-finish --> dump it after TODO_finish of PRE?

Thanks,

David


On Tue, Jun 7, 2011 at 9:43 AM, Diego Novillo <dnovillo@google.com> wrote:
> On Tue, Jun 7, 2011 at 02:36, Richard Guenther
> <richard.guenther@gmail.com> wrote:
>
>>> For one thing, you need to either remember what is the previous pass,
>>> or dump all passes which for large files can take very long time. Even
>>> with all the dumps, you will need to eyeballing to find the previous
>>> pass which may or may not have the IR dumped.
>>>
>>> How about removing dump TODO?
>>
>> Yeah, I think this would go in the right direction.
>
> Agreed.
>
>
> Diego.
>

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Dump before flag
  2011-06-07 16:51             ` Xinliang David Li
@ 2011-06-07 17:01               ` Diego Novillo
  2011-06-07 17:07                 ` Xinliang David Li
  0 siblings, 1 reply; 30+ messages in thread
From: Diego Novillo @ 2011-06-07 17:01 UTC (permalink / raw)
  To: Xinliang David Li; +Cc: Richard Guenther, GCC Patches

On Tue, Jun 7, 2011 at 09:51, Xinliang David Li <davidxl@google.com> wrote:
> Any suggestions on the dump position specification string, before and
> after is not enough. How about
>
> start, before, after, and finish?
>
> I.e.
>
> -fdump-tree-pre-start --> dump IR before TODO_start of PRE pass
> -fdump-tree-pre-before --> dump IR just before PRE after its TODO start finishes

What would be the difference between these two?  The TODO_start
actions don't affect the IL, in general.

> -fdump-tree-pre-after --> dump IR just after PRE
> -fdump-tree-pre-finish --> dump it after TODO_finish of PRE?

This would be to catch changes like cfg cleanup and SSA update
actions, right?  Sure.

I don't mind too much about the naming.  Anything that makes sense is
good with me.


Diego.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Dump before flag
  2011-06-07 17:01               ` Diego Novillo
@ 2011-06-07 17:07                 ` Xinliang David Li
  2011-06-07 17:26                   ` Diego Novillo
  0 siblings, 1 reply; 30+ messages in thread
From: Xinliang David Li @ 2011-06-07 17:07 UTC (permalink / raw)
  To: Diego Novillo; +Cc: Richard Guenther, GCC Patches

On Tue, Jun 7, 2011 at 10:01 AM, Diego Novillo <dnovillo@google.com> wrote:
> On Tue, Jun 7, 2011 at 09:51, Xinliang David Li <davidxl@google.com> wrote:
>> Any suggestions on the dump position specification string, before and
>> after is not enough. How about
>>
>> start, before, after, and finish?
>>
>> I.e.
>>
>> -fdump-tree-pre-start --> dump IR before TODO_start of PRE pass
>> -fdump-tree-pre-before --> dump IR just before PRE after its TODO start finishes
>
> What would be the difference between these two?  The TODO_start
> actions don't affect the IL, in general.

But by design, it can right?

David

>
>> -fdump-tree-pre-after --> dump IR just after PRE
>> -fdump-tree-pre-finish --> dump it after TODO_finish of PRE?
>
> This would be to catch changes like cfg cleanup and SSA update
> actions, right?  Sure.
>
> I don't mind too much about the naming.  Anything that makes sense is
> good with me.
>
>
> Diego.
>

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Dump before flag
  2011-06-07 17:07                 ` Xinliang David Li
@ 2011-06-07 17:26                   ` Diego Novillo
  0 siblings, 0 replies; 30+ messages in thread
From: Diego Novillo @ 2011-06-07 17:26 UTC (permalink / raw)
  To: Xinliang David Li; +Cc: Richard Guenther, GCC Patches

On Tue, Jun 7, 2011 at 10:06, Xinliang David Li <davidxl@google.com> wrote:
> On Tue, Jun 7, 2011 at 10:01 AM, Diego Novillo <dnovillo@google.com> wrote:
>> On Tue, Jun 7, 2011 at 09:51, Xinliang David Li <davidxl@google.com> wrote:
>>> Any suggestions on the dump position specification string, before and
>>> after is not enough. How about
>>>
>>> start, before, after, and finish?
>>>
>>> I.e.
>>>
>>> -fdump-tree-pre-start --> dump IR before TODO_start of PRE pass
>>> -fdump-tree-pre-before --> dump IR just before PRE after its TODO start finishes
>>
>> What would be the difference between these two?  The TODO_start
>> actions don't affect the IL, in general.
>
> But by design, it can right?

Hmm, now that I think of it, yes it can.  There are some TODOs that
may modify the IL.  For instance, in PRE we split or critical edges
before the pass starts (I think we still do, not sure).


Diego.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Dump before flag
  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 23:24           ` Xinliang David Li
  2011-06-07 23:34             ` Xinliang David Li
  2011-06-08  9:29             ` Richard Guenther
  2 siblings, 2 replies; 30+ messages in thread
From: Xinliang David Li @ 2011-06-07 23:24 UTC (permalink / raw)
  To: Richard Guenther; +Cc: GCC Patches, Diego Novillo

[-- Attachment #1: Type: text/plain, Size: 2879 bytes --]

The following is the patch that does the job. Most of the changes are
just  removing TODO_dump_func. The major change is in passes.c and
tree-pass.h.

-fdump-xxx-yyy-start       <-- dump before TODO_start
-fdump-xxx-yyy-before    <-- dump before main pass after TODO_pass
-fdump-xxx-yyy-after       <-- dump after main pass before TODO_finish
-fdump-xxx-yyy-finish      <-- dump after TODO_finish

The default is 'finish'.

Does it look ok?

Thanks,

David

On Tue, Jun 7, 2011 at 2:36 AM, Richard Guenther
<richard.guenther@gmail.com> wrote:
> On Mon, Jun 6, 2011 at 6:20 PM, Xinliang David Li <davidxl@google.com> wrote:
>>>
>>> Your patch doesn't really improve this but adds to the confusion.
>>>
>>> +  /* Override dump TODOs.  */
>>> +  if (dump_file && (pass->todo_flags_finish & TODO_dump_func)
>>> +      && (dump_flags & TDF_BEFORE))
>>> +    {
>>> +      pass->todo_flags_finish &= ~TODO_dump_func;
>>> +      pass->todo_flags_start |= TODO_dump_func;
>>> +    }
>>>
>>> and certainly writing to pass is not ok.  And the TDF_BEFORE flag
>>> looks misplaced as it controls TODOs, not dumping behavior.
>>> Yes, it's a mess right now but the above looks like a hack ontop
>>> of that mess (maybe because of it, but well ...).
>>>
>>
>> How about removing dumping TODO completely -- this can be done easily
>> -- I don't understand why pass wants extra control on the dumping if
>> user already asked for dumping -- it is annoying to see empty IR dump
>> for a pass when I want to see it.
>>
>>> At least I would have expected to also get the dump after the
>>> pass, not only the one before it with this dump flag.
>>>
>>> Now, why can't you look at the previous pass output for the
>>> before-dump (as I do usually)?
>>
>> For one thing, you need to either remember what is the previous pass,
>> or dump all passes which for large files can take very long time. Even
>> with all the dumps, you will need to eyeballing to find the previous
>> pass which may or may not have the IR dumped.
>>
>> How about removing dump TODO?
>
> Yeah, I think this would go in the right direction.  Currently some passes
> do not dump function bodies because they presumably do no IL
> modification.  But this is certainly the minority (and some passes do not
> dump bodies even though they are modifying the IL ...).
>
> So I'd say we should by default dump function bodies.
>
> Note that there are three useful dumping positions (maybe four),
> before todo-start, after todo-start, before todo-finish and after todo-finish.
> By default we'd want after todo-finish.  When we no longer dump via
> a TODO then we could indeed use dump-flags to control this
> (maybe -original for the body before todo-start).
>
> What to others think?
>
> Richard.
>
>> Thanks,
>>
>> David
>>
>>
>>>
>>> Richard.
>>>
>>
>

[-- Attachment #2: dump-control.p --]
[-- Type: text/x-pascal, Size: 75589 bytes --]

Index: tree-vrp.c
===================================================================
--- tree-vrp.c	(revision 174759)
+++ tree-vrp.c	(working copy)
@@ -7818,7 +7818,6 @@ struct gimple_opt_pass pass_vrp =
     | TODO_update_ssa
     | TODO_verify_ssa
     | TODO_verify_flow
-    | TODO_dump_func
     | TODO_ggc_collect			/* todo_flags_finish */
  }
 };
Index: regrename.c
===================================================================
--- regrename.c	(revision 174759)
+++ regrename.c	(working copy)
@@ -1453,7 +1453,6 @@ struct rtl_opt_pass pass_regrename =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
-
Index: fwprop.c
===================================================================
--- fwprop.c	(revision 174759)
+++ fwprop.c	(working copy)
@@ -1473,8 +1473,7 @@ struct rtl_opt_pass pass_rtl_fwprop =
   0,                                    /* todo_flags_start */
   TODO_df_finish
     | TODO_verify_flow
-    | TODO_verify_rtl_sharing
-    | TODO_dump_func                    /* todo_flags_finish */
+    | TODO_verify_rtl_sharing           /* todo_flags_finish */
  }
 };
 
@@ -1521,7 +1520,6 @@ struct rtl_opt_pass pass_rtl_fwprop_addr
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func                        /* todo_flags_finish */
+  TODO_df_finish | TODO_verify_rtl_sharing  /* todo_flags_finish */
  }
 };
Index: tree-into-ssa.c
===================================================================
--- tree-into-ssa.c	(revision 174759)
+++ tree-into-ssa.c	(working copy)
@@ -2413,8 +2413,7 @@ struct gimple_opt_pass pass_build_ssa =
   PROP_ssa,				/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func
-    | TODO_update_ssa_only_virtuals
+  TODO_update_ssa_only_virtuals
     | TODO_verify_ssa
     | TODO_remove_unused_locals		/* todo_flags_finish */
  }
Index: tree-dump.c
===================================================================
--- tree-dump.c	(revision 174759)
+++ tree-dump.c	(working copy)
@@ -822,6 +822,10 @@ static const struct dump_option_value_in
   {"eh", TDF_EH},
   {"alias", TDF_ALIAS},
   {"nouid", TDF_NOUID},
+  {"start", TDF_START},
+  {"before", TDF_BEFORE},
+  {"after", TDF_AFTER},
+  {"finish", TDF_FINISH},
   {"enumerate_locals", TDF_ENUMERATE_LOCALS},
   {"all", ~(TDF_RAW | TDF_SLIM | TDF_LINENO | TDF_TREE | TDF_RTL | TDF_IPA
 	    | TDF_STMTADDR | TDF_GRAPH | TDF_DIAGNOSTIC | TDF_VERBOSE
Index: tree-complex.c
===================================================================
--- tree-complex.c	(revision 174759)
+++ tree-complex.c	(working copy)
@@ -1623,8 +1623,7 @@ struct gimple_opt_pass pass_lower_comple
   PROP_gimple_lcx,			/* properties_provided */
   0,                       		/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func
-    | TODO_ggc_collect
+    TODO_ggc_collect
     | TODO_update_ssa
     | TODO_verify_stmts	 		/* todo_flags_finish */
  }
@@ -1654,8 +1653,7 @@ struct gimple_opt_pass pass_lower_comple
   PROP_gimple_lcx,			/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func
-    | TODO_ggc_collect
+  TODO_ggc_collect
     | TODO_update_ssa
     | TODO_verify_stmts	 		/* todo_flags_finish */
  }
Index: tracer.c
===================================================================
--- tracer.c	(revision 174759)
+++ tracer.c	(working copy)
@@ -393,8 +393,7 @@ struct gimple_opt_pass pass_tracer =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func
-    | TODO_update_ssa
+  TODO_update_ssa
     | TODO_verify_ssa                   /* todo_flags_finish */
  }
 };
Index: tree-loop-distribution.c
===================================================================
--- tree-loop-distribution.c	(revision 174759)
+++ tree-loop-distribution.c	(working copy)
@@ -1313,6 +1313,6 @@ struct gimple_opt_pass pass_loop_distrib
   0,				/* properties_provided */
   0,				/* properties_destroyed */
   0,				/* todo_flags_start */
-  TODO_dump_func                /* todo_flags_finish */
+  0                             /* todo_flags_finish */
  }
 };
Index: postreload-gcse.c
===================================================================
--- postreload-gcse.c	(revision 174759)
+++ postreload-gcse.c	(working copy)
@@ -1344,8 +1344,7 @@ struct rtl_opt_pass pass_gcse2 =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing
+  TODO_verify_rtl_sharing
   | TODO_verify_flow | TODO_ggc_collect /* todo_flags_finish */
  }
 };
-
Index: postreload.c
===================================================================
--- postreload.c	(revision 174759)
+++ postreload.c	(working copy)
@@ -2287,6 +2287,6 @@ struct rtl_opt_pass pass_postreload_cse 
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
Index: tree-ssa-loop-ch.c
===================================================================
--- tree-ssa-loop-ch.c	(revision 174759)
+++ tree-ssa-loop-ch.c	(working copy)
@@ -278,7 +278,6 @@ struct gimple_opt_pass pass_ch =
   0,					/* todo_flags_start */
   TODO_cleanup_cfg
     | TODO_verify_ssa
-    | TODO_verify_flow
-    | TODO_dump_func			/* todo_flags_finish */
+    | TODO_verify_flow			/* todo_flags_finish */
  }
 };
Index: tree-tailcall.c
===================================================================
--- tree-tailcall.c	(revision 174759)
+++ tree-tailcall.c	(working copy)
@@ -1092,7 +1092,7 @@ struct gimple_opt_pass pass_tail_recursi
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_ssa	/* todo_flags_finish */
+  TODO_verify_ssa	                /* todo_flags_finish */
  }
 };
 
@@ -1111,6 +1111,6 @@ struct gimple_opt_pass pass_tail_calls =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_ssa	/* todo_flags_finish */
+  TODO_verify_ssa	                /* todo_flags_finish */
  }
 };
Index: tree-pass.h
===================================================================
--- tree-pass.h	(revision 174759)
+++ tree-pass.h	(working copy)
@@ -83,6 +83,10 @@ enum tree_dump_index
 #define TDF_ALIAS	(1 << 21)	/* display alias information  */
 #define TDF_ENUMERATE_LOCALS (1 << 22)	/* Enumerate locals by uid.  */
 #define TDF_CSELIB	(1 << 23)	/* Dump cselib details.  */
+#define TDF_START       (1 << 24)	/* Dump before TODO_start.  */
+#define TDF_BEFORE      (1 << 25)	/* Dump before pass.  */
+#define TDF_AFTER       (1 << 26)	/* Dump after pass.  */
+#define TDF_FINISH      (1 << 27)	/* Dump after TODO_finish.  */
 
 
 /* In tree-dump.c */
@@ -243,7 +247,6 @@ struct dump_file_info
   (PROP_gimple_any | PROP_gimple_lcf | PROP_gimple_leh | PROP_gimple_lomp)
 
 /* To-do flags.  */
-#define TODO_dump_func			(1 << 0)
 #define TODO_ggc_collect		(1 << 1)
 #define TODO_verify_ssa			(1 << 2)
 #define TODO_verify_flow		(1 << 3)
Index: ipa-cp.c
===================================================================
--- ipa-cp.c	(revision 174759)
+++ ipa-cp.c	(working copy)
@@ -1570,7 +1570,7 @@ struct ipa_opt_pass_d pass_ipa_cp =
   0,				/* properties_provided */
   0,				/* properties_destroyed */
   0,				/* todo_flags_start */
-  TODO_dump_cgraph | TODO_dump_func |
+  TODO_dump_cgraph |
   TODO_remove_functions | TODO_ggc_collect /* todo_flags_finish */
  },
  ipcp_generate_summary,			/* generate_summary */
Index: final.c
===================================================================
--- final.c	(revision 174759)
+++ final.c	(working copy)
@@ -837,7 +837,7 @@ struct rtl_opt_pass pass_compute_alignme
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing
+  TODO_verify_rtl_sharing
   | TODO_ggc_collect                    /* todo_flags_finish */
  }
 };
@@ -4337,7 +4337,7 @@ struct rtl_opt_pass pass_shorten_branche
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
Index: tree-emutls.c
===================================================================
--- tree-emutls.c	(revision 174759)
+++ tree-emutls.c	(working copy)
@@ -783,7 +783,7 @@ ipa_lower_emutls (void)
   VEC_free (tree, heap, access_vars);
   free_varpool_node_set (tls_vars);
 
-  return TODO_dump_func | TODO_ggc_collect | TODO_verify_all;
+  return TODO_ggc_collect | TODO_verify_all;
 }
 
 /* If the target supports TLS natively, we need do nothing here.  */
Index: omp-low.c
===================================================================
--- omp-low.c	(revision 174759)
+++ omp-low.c	(working copy)
@@ -5553,7 +5553,7 @@ struct gimple_opt_pass pass_expand_omp =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0                      		/* todo_flags_finish */
  }
 };
 \f
@@ -6730,7 +6730,7 @@ struct gimple_opt_pass pass_lower_omp =
   PROP_gimple_lomp,			/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 \f
Index: tree-ssa-dse.c
===================================================================
--- tree-ssa-dse.c	(revision 174759)
+++ tree-ssa-dse.c	(working copy)
@@ -352,9 +352,7 @@ struct gimple_opt_pass pass_dse =
   0,				/* properties_provided */
   0,				/* properties_destroyed */
   0,				/* todo_flags_start */
-  TODO_dump_func
-    | TODO_ggc_collect
+  TODO_ggc_collect
     | TODO_verify_ssa		/* todo_flags_finish */
  }
 };
-
Index: tree-ssa-uncprop.c
===================================================================
--- tree-ssa-uncprop.c	(revision 174759)
+++ tree-ssa-uncprop.c	(working copy)
@@ -596,7 +596,6 @@ struct gimple_opt_pass pass_uncprop =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_ssa	/* todo_flags_finish */
+  TODO_verify_ssa	                /* todo_flags_finish */
  }
 };
-
Index: auto-inc-dec.c
===================================================================
--- auto-inc-dec.c	(revision 174759)
+++ auto-inc-dec.c	(working copy)
@@ -1523,7 +1523,6 @@ struct rtl_opt_pass pass_inc_dec =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_df_finish,                       /* todo_flags_finish */
  }
 };
Index: reorg.c
===================================================================
--- reorg.c	(revision 174759)
+++ reorg.c	(working copy)
@@ -4086,7 +4086,6 @@ struct rtl_opt_pass pass_delay_slots =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
 };
@@ -4121,7 +4120,6 @@ struct rtl_opt_pass pass_machine_reorg =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
 };
Index: tree-ssa-copyrename.c
===================================================================
--- tree-ssa-copyrename.c	(revision 174759)
+++ tree-ssa-copyrename.c	(working copy)
@@ -399,6 +399,6 @@ struct gimple_opt_pass pass_rename_ssa_c
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_ssa      /* todo_flags_finish */
+  TODO_verify_ssa                       /* todo_flags_finish */
  }
 };
Index: tree-ssa-ccp.c
===================================================================
--- tree-ssa-ccp.c	(revision 174759)
+++ tree-ssa-ccp.c	(working copy)
@@ -1953,7 +1953,7 @@ struct gimple_opt_pass pass_ccp =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_ssa
+  TODO_verify_ssa
   | TODO_verify_stmts | TODO_ggc_collect/* todo_flags_finish */
  }
 };
@@ -2256,8 +2256,7 @@ struct gimple_opt_pass pass_fold_builtin
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func
-    | TODO_verify_ssa
+  TODO_verify_ssa
     | TODO_update_ssa			/* todo_flags_finish */
  }
 };
Index: compare-elim.c
===================================================================
--- compare-elim.c	(revision 174759)
+++ compare-elim.c	(working copy)
@@ -636,7 +636,6 @@ struct rtl_opt_pass pass_compare_elim_af
   TODO_df_finish
   | TODO_df_verify
   | TODO_verify_rtl_sharing
-  | TODO_dump_func
   | TODO_ggc_collect			/* todo_flags_finish */
  }
 };
Index: mode-switching.c
===================================================================
--- mode-switching.c	(revision 174759)
+++ mode-switching.c	(working copy)
@@ -772,6 +772,6 @@ struct rtl_opt_pass pass_mode_switching 
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
Index: modulo-sched.c
===================================================================
--- modulo-sched.c	(revision 174759)
+++ modulo-sched.c	(working copy)
@@ -2969,12 +2969,10 @@ struct rtl_opt_pass pass_sms =
   0,                                    /* properties_required */
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
-  TODO_dump_func,                       /* todo_flags_start */
+  0,                                    /* todo_flags_start */
   TODO_df_finish
     | TODO_verify_flow
     | TODO_verify_rtl_sharing
-    | TODO_dump_func
     | TODO_ggc_collect                  /* todo_flags_finish */
  }
 };
-
Index: tree-call-cdce.c
===================================================================
--- tree-call-cdce.c	(revision 174759)
+++ tree-call-cdce.c	(working copy)
@@ -928,6 +928,6 @@ struct gimple_opt_pass pass_call_cdce =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_ssa      /* todo_flags_finish */
+  TODO_verify_ssa                       /* todo_flags_finish */
  }
 };
Index: cse.c
===================================================================
--- cse.c	(revision 174759)
+++ cse.c	(working copy)
@@ -7414,7 +7414,6 @@ struct rtl_opt_pass pass_cse =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_ggc_collect |
   TODO_verify_flow,                     /* todo_flags_finish */
  }
@@ -7477,7 +7476,6 @@ struct rtl_opt_pass pass_cse2 =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_ggc_collect |
   TODO_verify_flow                      /* todo_flags_finish */
  }
@@ -7538,7 +7536,6 @@ struct rtl_opt_pass pass_cse_after_globa
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_ggc_collect |
   TODO_verify_flow                      /* todo_flags_finish */
  }
Index: web.c
===================================================================
--- web.c	(revision 174759)
+++ web.c	(working copy)
@@ -433,8 +433,6 @@ struct rtl_opt_pass pass_web =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func                        /* todo_flags_finish */
+  TODO_df_finish | TODO_verify_rtl_sharing  /* todo_flags_finish */
  }
 };
-
Index: tree-stdarg.c
===================================================================
--- tree-stdarg.c	(revision 174759)
+++ tree-stdarg.c	(working copy)
@@ -963,6 +963,6 @@ struct gimple_opt_pass pass_stdarg =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0             			/* todo_flags_finish */
  }
 };
Index: lto-streamer-out.c
===================================================================
--- lto-streamer-out.c	(revision 174759)
+++ lto-streamer-out.c	(working copy)
@@ -2297,7 +2297,7 @@ struct ipa_opt_pass_d pass_ipa_lto_gimpl
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,            			/* todo_flags_start */
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  },
  NULL,		                        /* generate_summary */
  lto_output,           			/* write_summary */
Index: tree-ssa-math-opts.c
===================================================================
--- tree-ssa-math-opts.c	(revision 174759)
+++ tree-ssa-math-opts.c	(working copy)
@@ -645,7 +645,7 @@ struct gimple_opt_pass pass_cse_reciproc
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_update_ssa | TODO_verify_ssa
+  TODO_update_ssa | TODO_verify_ssa
     | TODO_verify_stmts                /* todo_flags_finish */
  }
 };
@@ -1424,7 +1424,7 @@ struct gimple_opt_pass pass_cse_sincos =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_update_ssa | TODO_verify_ssa
+  TODO_update_ssa | TODO_verify_ssa
     | TODO_verify_stmts                 /* todo_flags_finish */
  }
 };
@@ -1851,7 +1851,7 @@ execute_optimize_bswap (void)
   statistics_counter_event (cfun, "64-bit bswap implementations found",
 			    bswap_stats.found_64bit);
 
-  return (changed ? TODO_dump_func | TODO_update_ssa | TODO_verify_ssa
+  return (changed ? TODO_update_ssa | TODO_verify_ssa
 	  | TODO_verify_stmts : 0);
 }
 
@@ -2404,7 +2404,6 @@ struct gimple_opt_pass pass_optimize_wid
   0,					/* todo_flags_start */
   TODO_verify_ssa
   | TODO_verify_stmts
-  | TODO_dump_func
   | TODO_update_ssa                     /* todo_flags_finish */
  }
 };
Index: tree-ssa-dom.c
===================================================================
--- tree-ssa-dom.c	(revision 174759)
+++ tree-ssa-dom.c	(working copy)
@@ -816,8 +816,7 @@ struct gimple_opt_pass pass_dominator =
   TODO_cleanup_cfg
     | TODO_update_ssa
     | TODO_verify_ssa
-    | TODO_verify_flow
-    | TODO_dump_func			/* todo_flags_finish */
+    | TODO_verify_flow			/* todo_flags_finish */
  }
 };
 
@@ -2969,7 +2968,6 @@ struct gimple_opt_pass pass_phi_only_cpr
   0,		                        /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_cleanup_cfg
-    | TODO_dump_func
     | TODO_ggc_collect
     | TODO_verify_ssa
     | TODO_verify_stmts
Index: tree-nrv.c
===================================================================
--- tree-nrv.c	(revision 174759)
+++ tree-nrv.c	(working copy)
@@ -288,7 +288,7 @@ struct gimple_opt_pass pass_nrv =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_ggc_collect			/* todo_flags_finish */
+  TODO_ggc_collect			/* todo_flags_finish */
  }
 };
 
Index: loop-init.c
===================================================================
--- loop-init.c	(revision 174759)
+++ loop-init.c	(working copy)
@@ -158,7 +158,6 @@ struct rtl_opt_pass pass_loop2 =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
 };
@@ -192,7 +191,7 @@ struct rtl_opt_pass pass_rtl_loop_init =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing /* todo_flags_finish */
+  TODO_verify_rtl_sharing               /* todo_flags_finish */
  }
 };
 
@@ -228,8 +227,7 @@ struct rtl_opt_pass pass_rtl_loop_done =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_verify_flow
-    | TODO_verify_rtl_sharing
-    | TODO_dump_func                    /* todo_flags_finish */
+    | TODO_verify_rtl_sharing           /* todo_flags_finish */
  }
 };
 
@@ -265,8 +263,7 @@ struct rtl_opt_pass pass_rtl_move_loop_i
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_verify |
-  TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func                        /* todo_flags_finish */
+  TODO_df_finish | TODO_verify_rtl_sharing  /* todo_flags_finish */
  }
 };
 
@@ -301,7 +298,7 @@ struct rtl_opt_pass pass_rtl_unswitch =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing, /* todo_flags_finish */
+  TODO_verify_rtl_sharing,              /* todo_flags_finish */
  }
 };
 
@@ -349,7 +346,7 @@ struct rtl_opt_pass pass_rtl_unroll_and_
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing, /* todo_flags_finish */
+  TODO_verify_rtl_sharing,              /* todo_flags_finish */
  }
 };
 
@@ -390,7 +387,6 @@ struct rtl_opt_pass pass_rtl_doloop =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing /* todo_flags_finish */
+  TODO_verify_rtl_sharing               /* todo_flags_finish */
  }
 };
-
Index: gimple-low.c
===================================================================
--- gimple-low.c	(revision 174759)
+++ gimple-low.c	(working copy)
@@ -203,7 +203,7 @@ struct gimple_opt_pass pass_lower_cf =
   PROP_gimple_lcf,			/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0             			/* todo_flags_finish */
  }
 };
 
Index: ipa-inline.c
===================================================================
--- ipa-inline.c	(revision 174759)
+++ ipa-inline.c	(working copy)
@@ -1915,7 +1915,7 @@ struct gimple_opt_pass pass_early_inline
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func    			/* todo_flags_finish */
+  0                 			/* todo_flags_finish */
  }
 };
 
@@ -1949,7 +1949,7 @@ struct ipa_opt_pass_d pass_ipa_inline =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   TODO_remove_functions,		/* todo_flags_finish */
-  TODO_dump_cgraph | TODO_dump_func
+  TODO_dump_cgraph 
   | TODO_remove_functions | TODO_ggc_collect	/* todo_flags_finish */
  },
  inline_generate_summary,		/* generate_summary */
Index: tree-ssa-sink.c
===================================================================
--- tree-ssa-sink.c	(revision 174759)
+++ tree-ssa-sink.c	(working copy)
@@ -639,7 +639,6 @@ struct gimple_opt_pass pass_sink_code =
   TODO_update_ssa
     | TODO_verify_ssa
     | TODO_verify_flow
-    | TODO_dump_func
     | TODO_ggc_collect			/* todo_flags_finish */
  }
 };
Index: jump.c
===================================================================
--- jump.c	(revision 174759)
+++ jump.c	(working copy)
@@ -156,7 +156,7 @@ struct rtl_opt_pass pass_cleanup_barrier
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
Index: ifcvt.c
===================================================================
--- ifcvt.c	(revision 174759)
+++ ifcvt.c	(working copy)
@@ -4368,7 +4368,7 @@ struct rtl_opt_pass pass_rtl_ifcvt =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
@@ -4405,7 +4405,6 @@ struct rtl_opt_pass pass_if_after_combin
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
 };
@@ -4442,7 +4441,6 @@ struct rtl_opt_pass pass_if_after_reload
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
 };
Index: tree-ssa-loop.c
===================================================================
--- tree-ssa-loop.c	(revision 174759)
+++ tree-ssa-loop.c	(working copy)
@@ -60,7 +60,7 @@ struct gimple_opt_pass pass_tree_loop =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   TODO_ggc_collect,			/* todo_flags_start */
-  TODO_dump_func | TODO_verify_ssa | TODO_ggc_collect	/* todo_flags_finish */
+  TODO_verify_ssa | TODO_ggc_collect	/* todo_flags_finish */
  }
 };
 
@@ -95,7 +95,7 @@ struct gimple_opt_pass pass_tree_loop_in
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0             			/* todo_flags_finish */
  }
 };
 
@@ -131,7 +131,7 @@ struct gimple_opt_pass pass_lim =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0             			/* todo_flags_finish */
  }
 };
 
@@ -167,7 +167,7 @@ struct gimple_opt_pass pass_tree_unswitc
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_ggc_collect | TODO_dump_func 	/* todo_flags_finish */
+  TODO_ggc_collect                  	/* todo_flags_finish */
  }
 };
 
@@ -203,8 +203,7 @@ struct gimple_opt_pass pass_predcom =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func
-    | TODO_update_ssa_only_virtuals	/* todo_flags_finish */
+  TODO_update_ssa_only_virtuals 	/* todo_flags_finish */
  }
 };
 
@@ -240,7 +239,7 @@ struct gimple_opt_pass pass_vectorize =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_update_ssa
+  TODO_update_ssa
     | TODO_ggc_collect			/* todo_flags_finish */
  }
 };
@@ -308,7 +307,7 @@ struct gimple_opt_pass pass_graphite_tra
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0             			/* todo_flags_finish */
  }
 };
 
@@ -345,7 +344,7 @@ struct gimple_opt_pass pass_check_data_d
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func                	/* todo_flags_finish */
+  0                             	/* todo_flags_finish */
  }
 };
 
@@ -381,7 +380,7 @@ struct gimple_opt_pass pass_iv_canon =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0             			/* todo_flags_finish */
  }
 };
 
@@ -408,7 +407,7 @@ struct gimple_opt_pass pass_scev_cprop =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_cleanup_cfg
+  TODO_cleanup_cfg
     | TODO_update_ssa_only_virtuals
 					/* todo_flags_finish */
  }
@@ -480,8 +479,7 @@ struct gimple_opt_pass pass_complete_unr
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func
-    | TODO_ggc_collect			/* todo_flags_finish */
+  TODO_ggc_collect			/* todo_flags_finish */
  }
 };
 
@@ -528,7 +526,6 @@ struct gimple_opt_pass pass_complete_unr
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
   TODO_verify_flow
-    | TODO_dump_func
     | TODO_ggc_collect 			/* todo_flags_finish */
  }
 };
@@ -567,7 +564,7 @@ struct gimple_opt_pass pass_parallelize_
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0             			/* todo_flags_finish */
  }
 };
 
@@ -603,7 +600,7 @@ struct gimple_opt_pass pass_loop_prefetc
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0             			/* todo_flags_finish */
  }
 };
 
@@ -640,7 +637,7 @@ struct gimple_opt_pass pass_iv_optimize 
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_update_ssa | TODO_ggc_collect	/* todo_flags_finish */
+  TODO_update_ssa | TODO_ggc_collect	/* todo_flags_finish */
  }
 };
 
@@ -671,7 +668,6 @@ struct gimple_opt_pass pass_tree_loop_do
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
   TODO_cleanup_cfg
-    | TODO_verify_flow
-    | TODO_dump_func			/* todo_flags_finish */
+    | TODO_verify_flow			/* todo_flags_finish */
  }
 };
Index: recog.c
===================================================================
--- recog.c	(revision 174759)
+++ recog.c	(working copy)
@@ -3694,7 +3694,7 @@ struct rtl_opt_pass pass_peephole2 =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func                       /* todo_flags_finish */
+  0                                    /* todo_flags_finish */
  }
 };
 
@@ -3720,7 +3720,7 @@ struct rtl_opt_pass pass_split_all_insns
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
@@ -3750,7 +3750,7 @@ struct rtl_opt_pass pass_split_after_rel
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
@@ -3794,7 +3794,7 @@ struct rtl_opt_pass pass_split_before_re
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
@@ -3832,8 +3832,7 @@ struct rtl_opt_pass pass_split_before_sc
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_verify_flow |
-  TODO_dump_func                        /* todo_flags_finish */
+  TODO_verify_flow                      /* todo_flags_finish */
  }
 };
 
@@ -3864,6 +3863,6 @@ struct rtl_opt_pass pass_split_for_short
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing /* todo_flags_finish */
+  TODO_verify_rtl_sharing               /* todo_flags_finish */
  }
 };
Index: dse.c
===================================================================
--- dse.c	(revision 174759)
+++ dse.c	(working copy)
@@ -3853,7 +3853,6 @@ struct rtl_opt_pass pass_rtl_dse1 =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_df_finish | TODO_verify_rtl_sharing |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
@@ -3874,7 +3873,6 @@ struct rtl_opt_pass pass_rtl_dse2 =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_df_finish | TODO_verify_rtl_sharing |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
Index: tree-ssa-ifcombine.c
===================================================================
--- tree-ssa-ifcombine.c	(revision 174759)
+++ tree-ssa-ifcombine.c	(working copy)
@@ -663,8 +663,7 @@ struct gimple_opt_pass pass_tree_ifcombi
   0,				/* properties_provided */
   0,				/* properties_destroyed */
   0,				/* todo_flags_start */
-  TODO_dump_func
-  | TODO_ggc_collect
+  TODO_ggc_collect
   | TODO_update_ssa
   | TODO_verify_ssa		/* todo_flags_finish */
  }
Index: matrix-reorg.c
===================================================================
--- matrix-reorg.c	(revision 174759)
+++ matrix-reorg.c	(working copy)
@@ -2390,6 +2390,6 @@ struct simple_ipa_opt_pass pass_ipa_matr
   0,				/* properties_provided */
   0,				/* properties_destroyed */
   0,				/* todo_flags_start */
-  TODO_dump_cgraph | TODO_dump_func	/* todo_flags_finish */
+  TODO_dump_cgraph      	/* todo_flags_finish */
  }
 };
Index: tree-eh.c
===================================================================
--- tree-eh.c	(revision 174759)
+++ tree-eh.c	(working copy)
@@ -2052,7 +2052,7 @@ struct gimple_opt_pass pass_lower_eh =
   PROP_gimple_leh,			/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0             			/* todo_flags_finish */
  }
 };
 \f
@@ -2865,7 +2865,7 @@ struct gimple_opt_pass pass_refactor_eh 
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0             			/* todo_flags_finish */
  }
 };
 \f
@@ -3071,7 +3071,7 @@ struct gimple_opt_pass pass_lower_resx =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_flow	/* todo_flags_finish */
+  TODO_verify_flow	                /* todo_flags_finish */
  }
 };
 
@@ -3272,7 +3272,7 @@ struct gimple_opt_pass pass_lower_eh_dis
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_flow	/* todo_flags_finish */
+  TODO_verify_flow	                /* todo_flags_finish */
  }
 };
 \f
@@ -4015,7 +4015,7 @@ struct gimple_opt_pass pass_cleanup_eh =
    0,				/* properties_provided */
    0,				/* properties_destroyed */
    0,				/* todo_flags_start */
-   TODO_dump_func		/* todo_flags_finish */
+   0             		/* todo_flags_finish */
    }
 };
 \f
Index: regmove.c
===================================================================
--- regmove.c	(revision 174759)
+++ regmove.c	(working copy)
@@ -1382,7 +1382,6 @@ struct rtl_opt_pass pass_regmove =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
 };
Index: function.c
===================================================================
--- function.c	(revision 174759)
+++ function.c	(working copy)
@@ -1955,7 +1955,7 @@ struct rtl_opt_pass pass_instantiate_vir
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
@@ -5949,7 +5949,6 @@ struct rtl_opt_pass pass_thread_prologue
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   TODO_verify_flow,                     /* todo_flags_start */
-  TODO_dump_func |
   TODO_df_verify |
   TODO_df_finish | TODO_verify_rtl_sharing |
   TODO_ggc_collect                      /* todo_flags_finish */
@@ -6151,7 +6150,7 @@ struct rtl_opt_pass pass_match_asm_const
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func                       /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
Index: tree-vectorizer.c
===================================================================
--- tree-vectorizer.c	(revision 174759)
+++ tree-vectorizer.c	(working copy)
@@ -292,7 +292,6 @@ struct gimple_opt_pass pass_slp_vectoriz
   0,                                    /* todo_flags_start */
   TODO_ggc_collect
     | TODO_verify_ssa
-    | TODO_dump_func
     | TODO_update_ssa
     | TODO_verify_stmts                 /* todo_flags_finish */
  }
Index: ipa-split.c
===================================================================
--- ipa-split.c	(revision 174759)
+++ ipa-split.c	(working copy)
@@ -1432,7 +1432,7 @@ struct gimple_opt_pass pass_split_functi
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0             			/* todo_flags_finish */
  }
 };
 
@@ -1473,6 +1473,6 @@ struct gimple_opt_pass pass_feedback_spl
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0             			/* todo_flags_finish */
  }
 };
Index: gcse.c
===================================================================
--- gcse.c	(revision 174759)
+++ gcse.c	(working copy)
@@ -3772,7 +3772,6 @@ struct rtl_opt_pass pass_rtl_pre =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_verify_flow | TODO_ggc_collect   /* todo_flags_finish */
  }
 };
@@ -3793,10 +3792,8 @@ struct rtl_opt_pass pass_rtl_hoist =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_verify_flow | TODO_ggc_collect   /* todo_flags_finish */
  }
 };
 
 #include "gt-gcse.h"
-
Index: tree-if-conv.c
===================================================================
--- tree-if-conv.c	(revision 174759)
+++ tree-if-conv.c	(working copy)
@@ -1808,7 +1808,7 @@ struct gimple_opt_pass pass_if_conversio
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_stmts | TODO_verify_flow
+  TODO_verify_stmts | TODO_verify_flow
                                         /* todo_flags_finish */
  }
 };
Index: init-regs.c
===================================================================
--- init-regs.c	(revision 174759)
+++ init-regs.c	(working copy)
@@ -153,7 +153,6 @@ struct rtl_opt_pass pass_initialize_regs
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_df_finish                        /* todo_flags_finish */
  }
 };
Index: tree-ssa-phiopt.c
===================================================================
--- tree-ssa-phiopt.c	(revision 174759)
+++ tree-ssa-phiopt.c	(working copy)
@@ -1588,8 +1588,7 @@ struct gimple_opt_pass pass_phiopt =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func
-    | TODO_ggc_collect
+  TODO_ggc_collect
     | TODO_verify_ssa
     | TODO_verify_flow
     | TODO_verify_stmts	 		/* todo_flags_finish */
@@ -1617,8 +1616,7 @@ struct gimple_opt_pass pass_cselim =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func
-    | TODO_ggc_collect
+  TODO_ggc_collect
     | TODO_verify_ssa
     | TODO_verify_flow
     | TODO_verify_stmts	 		/* todo_flags_finish */
Index: implicit-zee.c
===================================================================
--- implicit-zee.c	(revision 174759)
+++ implicit-zee.c	(working copy)
@@ -988,7 +988,6 @@ struct rtl_opt_pass pass_implicit_zee =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_ggc_collect |
-  TODO_dump_func |
   TODO_verify_rtl_sharing,              /* todo_flags_finish */
  }
 };
Index: lower-subreg.c
===================================================================
--- lower-subreg.c	(revision 174759)
+++ lower-subreg.c	(working copy)
@@ -1370,7 +1370,6 @@ struct rtl_opt_pass pass_lower_subreg =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_ggc_collect |
   TODO_verify_flow                      /* todo_flags_finish */
  }
@@ -1392,7 +1391,6 @@ struct rtl_opt_pass pass_lower_subreg2 =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_ggc_collect |
   TODO_verify_flow                      /* todo_flags_finish */
  }
Index: bt-load.c
===================================================================
--- bt-load.c	(revision 174759)
+++ bt-load.c	(working copy)
@@ -1519,7 +1519,6 @@ struct rtl_opt_pass pass_branch_target_l
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_verify_rtl_sharing |
   TODO_ggc_collect,                     /* todo_flags_finish */
  }
@@ -1569,7 +1568,6 @@ struct rtl_opt_pass pass_branch_target_l
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_ggc_collect,                     /* todo_flags_finish */
  }
 };
Index: tree-dfa.c
===================================================================
--- tree-dfa.c	(revision 174759)
+++ tree-dfa.c	(working copy)
@@ -113,8 +113,8 @@ struct gimple_opt_pass pass_referenced_v
   PROP_gimple_leh | PROP_cfg,		/* properties_required */
   PROP_referenced_vars,			/* properties_provided */
   0,					/* properties_destroyed */
-  TODO_dump_func,			/* todo_flags_start */
-  TODO_dump_func                        /* todo_flags_finish */
+  0,                     		/* todo_flags_start */
+  0                                     /* todo_flags_finish */
  }
 };
 
@@ -1000,4 +1000,3 @@ stmt_references_abnormal_ssa_name (gimpl
 
   return false;
 }
-
Index: except.c
===================================================================
--- except.c	(revision 174759)
+++ except.c	(working copy)
@@ -1468,7 +1468,7 @@ struct rtl_opt_pass pass_rtl_eh =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 \f
@@ -1910,7 +1910,7 @@ struct rtl_opt_pass pass_set_nothrow_fun
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func,                       /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
@@ -2665,7 +2665,7 @@ struct rtl_opt_pass pass_convert_to_eh_r
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func,			/* todo_flags_finish */
+  0              			/* todo_flags_finish */
  }
 };
 \f
Index: emit-rtl.c
===================================================================
--- emit-rtl.c	(revision 174759)
+++ emit-rtl.c	(working copy)
@@ -2413,7 +2413,7 @@ struct rtl_opt_pass pass_unshare_all_rtl
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing /* todo_flags_finish */
+  TODO_verify_rtl_sharing               /* todo_flags_finish */
  }
 };
 
Index: store-motion.c
===================================================================
--- store-motion.c	(revision 174759)
+++ store-motion.c	(working copy)
@@ -1258,8 +1258,6 @@ struct rtl_opt_pass pass_rtl_store_motio
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_verify_flow | TODO_ggc_collect   /* todo_flags_finish */
  }
 };
-
Index: cfgexpand.c
===================================================================
--- cfgexpand.c	(revision 174759)
+++ cfgexpand.c	(working copy)
@@ -4269,7 +4269,6 @@ struct rtl_opt_pass pass_expand =
   PROP_ssa | PROP_trees,		/* properties_destroyed */
   TODO_verify_ssa | TODO_verify_flow
     | TODO_verify_stmts,		/* todo_flags_start */
-  TODO_dump_func
-  | TODO_ggc_collect			/* todo_flags_finish */
+  TODO_ggc_collect			/* todo_flags_finish */
  }
 };
Index: tree-cfgcleanup.c
===================================================================
--- tree-cfgcleanup.c	(revision 174759)
+++ tree-cfgcleanup.c	(working copy)
@@ -1054,7 +1054,7 @@ struct gimple_opt_pass pass_merge_phi =
   0,				/* properties_provided */
   0,				/* properties_destroyed */
   0,				/* todo_flags_start */
-  TODO_dump_func | TODO_ggc_collect	/* todo_flags_finish */
+  TODO_ggc_collect      	/* todo_flags_finish */
   | TODO_verify_ssa
  }
 };
Index: cfgcleanup.c
===================================================================
--- cfgcleanup.c	(revision 174759)
+++ cfgcleanup.c	(working copy)
@@ -2989,8 +2989,6 @@ struct rtl_opt_pass pass_jump2 =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   TODO_ggc_collect,                     /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing,/* todo_flags_finish */
+  TODO_verify_rtl_sharing,              /* todo_flags_finish */
  }
 };
-
-
Index: tree-ssa-pre.c
===================================================================
--- tree-ssa-pre.c	(revision 174759)
+++ tree-ssa-pre.c	(working copy)
@@ -4978,7 +4978,7 @@ struct gimple_opt_pass pass_pre =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   TODO_rebuild_alias,			/* todo_flags_start */
-  TODO_update_ssa_only_virtuals | TODO_dump_func | TODO_ggc_collect
+  TODO_update_ssa_only_virtuals  | TODO_ggc_collect
   | TODO_verify_ssa /* todo_flags_finish */
  }
 };
@@ -5013,6 +5013,6 @@ struct gimple_opt_pass pass_fre =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_ggc_collect | TODO_verify_ssa /* todo_flags_finish */
+  TODO_ggc_collect | TODO_verify_ssa /* todo_flags_finish */
  }
 };
Index: tree-sra.c
===================================================================
--- tree-sra.c	(revision 174759)
+++ tree-sra.c	(working copy)
@@ -3110,8 +3110,7 @@ struct gimple_opt_pass pass_sra_early =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func
-  | TODO_update_ssa
+  TODO_update_ssa
   | TODO_ggc_collect
   | TODO_verify_ssa			/* todo_flags_finish */
  }
@@ -3132,8 +3131,7 @@ struct gimple_opt_pass pass_sra =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   TODO_update_address_taken,		/* todo_flags_start */
-  TODO_dump_func
-  | TODO_update_ssa
+  TODO_update_ssa
   | TODO_ggc_collect
   | TODO_verify_ssa			/* todo_flags_finish */
  }
@@ -4600,8 +4598,6 @@ struct gimple_opt_pass pass_early_ipa_sr
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_dump_cgraph 	/* todo_flags_finish */
+  TODO_dump_cgraph              	/* todo_flags_finish */
  }
 };
-
-
Index: tree-mudflap.c
===================================================================
--- tree-mudflap.c	(revision 174759)
+++ tree-mudflap.c	(working copy)
@@ -1389,7 +1389,7 @@ struct gimple_opt_pass pass_mudflap_1 =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
@@ -1409,7 +1409,7 @@ struct gimple_opt_pass pass_mudflap_2 =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_verify_flow | TODO_verify_stmts
-  | TODO_dump_func | TODO_update_ssa    /* todo_flags_finish */
+  | TODO_update_ssa                     /* todo_flags_finish */
  }
 };
 
Index: tree-ssa-copy.c
===================================================================
--- tree-ssa-copy.c	(revision 174759)
+++ tree-ssa-copy.c	(working copy)
@@ -848,7 +848,6 @@ struct gimple_opt_pass pass_copy_prop =
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
   TODO_cleanup_cfg
-    | TODO_dump_func
     | TODO_ggc_collect
     | TODO_verify_ssa
     | TODO_update_ssa			/* todo_flags_finish */
Index: cfglayout.c
===================================================================
--- cfglayout.c	(revision 174759)
+++ cfglayout.c	(working copy)
@@ -378,7 +378,7 @@ struct rtl_opt_pass pass_into_cfg_layout
   PROP_cfglayout,                       /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func,                       /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
@@ -397,7 +397,7 @@ struct rtl_opt_pass pass_outof_cfg_layou
   0,                                    /* properties_provided */
   PROP_cfglayout,                       /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func,                       /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 \f
Index: tree-ssa-forwprop.c
===================================================================
--- tree-ssa-forwprop.c	(revision 174759)
+++ tree-ssa-forwprop.c	(working copy)
@@ -2420,10 +2420,8 @@ struct gimple_opt_pass pass_forwprop =
   0,				/* properties_provided */
   0,				/* properties_destroyed */
   0,				/* todo_flags_start */
-  TODO_dump_func
-  | TODO_ggc_collect
+  TODO_ggc_collect
   | TODO_update_ssa
   | TODO_verify_ssa		/* todo_flags_finish */
  }
 };
-
Index: tree-ssa-dce.c
===================================================================
--- tree-ssa-dce.c	(revision 174759)
+++ tree-ssa-dce.c	(working copy)
@@ -1527,7 +1527,7 @@ struct gimple_opt_pass pass_dce =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_ssa	/* todo_flags_finish */
+  TODO_verify_ssa	                /* todo_flags_finish */
  }
 };
 
@@ -1546,7 +1546,7 @@ struct gimple_opt_pass pass_dce_loop =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_ssa	/* todo_flags_finish */
+  TODO_verify_ssa	                /* todo_flags_finish */
  }
 };
 
@@ -1565,7 +1565,7 @@ struct gimple_opt_pass pass_cd_dce =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_ssa
+  TODO_verify_ssa
   | TODO_verify_flow			/* todo_flags_finish */
  }
 };
Index: ira.c
===================================================================
--- ira.c	(revision 174759)
+++ ira.c	(working copy)
@@ -3806,7 +3806,6 @@ struct rtl_opt_pass pass_ira =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
 };
Index: tree-ssa.c
===================================================================
--- tree-ssa.c	(revision 174759)
+++ tree-ssa.c	(working copy)
@@ -2277,7 +2277,6 @@ struct gimple_opt_pass pass_update_addre
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_update_address_taken
-  | TODO_dump_func			/* todo_flags_finish */
+  TODO_update_address_taken             /* todo_flags_finish */
  }
 };
Index: integrate.c
===================================================================
--- integrate.c	(revision 174759)
+++ integrate.c	(working copy)
@@ -325,7 +325,7 @@ struct rtl_opt_pass pass_initial_value_s
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
Index: tree-optimize.c
===================================================================
--- tree-optimize.c	(revision 174759)
+++ tree-optimize.c	(working copy)
@@ -208,8 +208,7 @@ struct gimple_opt_pass pass_cleanup_cfg_
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
-    | TODO_remove_unused_locals
+  TODO_remove_unused_locals             /* todo_flags_finish */
  }
 };
 
Index: tree-ssa-phiprop.c
===================================================================
--- tree-ssa-phiprop.c	(revision 174759)
+++ tree-ssa-phiprop.c	(working copy)
@@ -426,8 +426,7 @@ struct gimple_opt_pass pass_phiprop =
   0,				/* properties_provided */
   0,				/* properties_destroyed */
   0,				/* todo_flags_start */
-  TODO_dump_func
-  | TODO_ggc_collect
+  TODO_ggc_collect
   | TODO_update_ssa
   | TODO_verify_ssa		/* todo_flags_finish */
  }
Index: tree-object-size.c
===================================================================
--- tree-object-size.c	(revision 174759)
+++ tree-object-size.c	(working copy)
@@ -1282,6 +1282,6 @@ struct gimple_opt_pass pass_object_sizes
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_ssa	/* todo_flags_finish */
+  TODO_verify_ssa	                /* todo_flags_finish */
  }
 };
Index: combine.c
===================================================================
--- combine.c	(revision 174759)
+++ combine.c	(working copy)
@@ -13944,7 +13944,6 @@ struct rtl_opt_pass pass_combine =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_df_finish | TODO_verify_rtl_sharing |
   TODO_ggc_collect,                     /* todo_flags_finish */
  }
Index: bb-reorder.c
===================================================================
--- bb-reorder.c	(revision 174759)
+++ bb-reorder.c	(working copy)
@@ -2117,7 +2117,7 @@ struct rtl_opt_pass pass_duplicate_compu
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing,/* todo_flags_finish */
+  TODO_verify_rtl_sharing,/* todo_flags_finish */
  }
 };
 
@@ -2260,7 +2260,7 @@ struct rtl_opt_pass pass_reorder_blocks 
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing,/* todo_flags_finish */
+  TODO_verify_rtl_sharing,              /* todo_flags_finish */
  }
 };
 
@@ -2300,6 +2300,6 @@ struct rtl_opt_pass pass_partition_block
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing/* todo_flags_finish */
+  TODO_verify_rtl_sharing               /* todo_flags_finish */
  }
 };
Index: cprop.c
===================================================================
--- cprop.c	(revision 174759)
+++ cprop.c	(working copy)
@@ -1878,8 +1878,6 @@ struct rtl_opt_pass pass_rtl_cprop =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_verify_flow | TODO_ggc_collect   /* todo_flags_finish */
  }
 };
-
Index: var-tracking.c
===================================================================
--- var-tracking.c	(revision 174759)
+++ var-tracking.c	(working copy)
@@ -9131,6 +9131,6 @@ struct rtl_opt_pass pass_variable_tracki
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing/* todo_flags_finish */
+  TODO_verify_rtl_sharing               /* todo_flags_finish */
  }
 };
Index: tree-profile.c
===================================================================
--- tree-profile.c	(revision 174759)
+++ tree-profile.c	(working copy)
@@ -590,7 +590,7 @@ struct simple_ipa_opt_pass pass_ipa_tree
   0,                                   /* properties_provided */
   0,                                   /* properties_destroyed */
   0,                                   /* todo_flags_start */
-  TODO_dump_func                       /* todo_flags_finish */
+  0                                    /* todo_flags_finish */
  }
 };
 
Index: tree-vect-generic.c
===================================================================
--- tree-vect-generic.c	(revision 174759)
+++ tree-vect-generic.c	(working copy)
@@ -658,7 +658,7 @@ struct gimple_opt_pass pass_lower_vector
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_update_ssa	/* todo_flags_finish */
+  TODO_update_ssa	                /* todo_flags_finish */
     | TODO_verify_ssa
     | TODO_verify_stmts | TODO_verify_flow
  }
@@ -679,7 +679,7 @@ struct gimple_opt_pass pass_lower_vector
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_update_ssa	/* todo_flags_finish */
+  TODO_update_ssa	                /* todo_flags_finish */
     | TODO_verify_ssa
     | TODO_verify_stmts | TODO_verify_flow
  }
Index: reg-stack.c
===================================================================
--- reg-stack.c	(revision 174759)
+++ reg-stack.c	(working copy)
@@ -3352,7 +3352,6 @@ struct rtl_opt_pass pass_stack_regs_run 
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
 };
Index: sched-rgn.c
===================================================================
--- sched-rgn.c	(revision 174759)
+++ sched-rgn.c	(working copy)
@@ -3551,7 +3551,6 @@ struct rtl_opt_pass pass_sched =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_verify_flow |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
@@ -3573,7 +3572,6 @@ struct rtl_opt_pass pass_sched2 =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_verify_flow |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
Index: tree-ssa-structalias.c
===================================================================
--- tree-ssa-structalias.c	(revision 174759)
+++ tree-ssa-structalias.c	(working copy)
@@ -6634,7 +6634,7 @@ struct gimple_opt_pass pass_build_alias 
   0,			    /* properties_provided */
   0,                        /* properties_destroyed */
   0,                        /* todo_flags_start */
-  TODO_rebuild_alias | TODO_dump_func  /* todo_flags_finish */
+  TODO_rebuild_alias        /* todo_flags_finish */
  }
 };
 
@@ -6656,7 +6656,7 @@ struct gimple_opt_pass pass_build_ealias
   0,			    /* properties_provided */
   0,                        /* properties_destroyed */
   0,                        /* todo_flags_start */
-  TODO_rebuild_alias | TODO_dump_func  /* todo_flags_finish */
+  TODO_rebuild_alias        /* todo_flags_finish */
  }
 };
 
Index: tree-switch-conversion.c
===================================================================
--- tree-switch-conversion.c	(revision 174759)
+++ tree-switch-conversion.c	(working copy)
@@ -1028,7 +1028,7 @@ struct gimple_opt_pass pass_convert_swit
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_update_ssa | TODO_dump_func
+  TODO_update_ssa 
   | TODO_ggc_collect | TODO_verify_ssa  /* todo_flags_finish */
  }
 };
Index: tree-cfg.c
===================================================================
--- tree-cfg.c	(revision 174759)
+++ tree-cfg.c	(working copy)
@@ -261,8 +261,7 @@ struct gimple_opt_pass pass_build_cfg =
   PROP_cfg,				/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_verify_stmts | TODO_cleanup_cfg
-  | TODO_dump_func			/* todo_flags_finish */
+  TODO_verify_stmts | TODO_cleanup_cfg  /* todo_flags_finish */
  }
 };
 
@@ -7234,7 +7233,7 @@ struct gimple_opt_pass pass_split_crit_e
   PROP_no_crit_edges,            /* properties_provided */
   0,                             /* properties_destroyed */
   0,                             /* todo_flags_start */
-  TODO_dump_func | TODO_verify_flow  /* todo_flags_finish */
+  TODO_verify_flow               /* todo_flags_finish */
  }
 };
 
Index: passes.c
===================================================================
--- passes.c	(revision 174762)
+++ passes.c	(working copy)
@@ -1485,16 +1485,59 @@ do_per_function_toporder (void (*callbac
   nnodes = 0;
 }
 
+/* Helper function to dump function IR.  */
+
+static void
+do_function_ir_dump (void)
+{
+  if (dump_file && current_function_decl)
+    {
+      if (cfun->curr_properties & PROP_trees)
+        dump_function_to_file (current_function_decl, dump_file, dump_flags);
+      else
+	{
+	  if (dump_flags & TDF_SLIM)
+	    print_rtl_slim_with_bb (dump_file, get_insns (), dump_flags);
+	  else if ((cfun->curr_properties & PROP_cfg)
+		   && (dump_flags & TDF_BLOCKS))
+	    print_rtl_with_bb (dump_file, get_insns ());
+          else
+	    print_rtl (dump_file, get_insns ());
+
+	  if ((cfun->curr_properties & PROP_cfg)
+	      && graph_dump_format != no_graph
+	      && (dump_flags & TDF_GRAPH))
+	    print_rtl_graph_with_bb (dump_file_name, get_insns ());
+	}
+
+      /* Flush the file.  If verification fails, we won't be able to
+	 close the file before aborting.  */
+      fflush (dump_file);
+    }
+}
+
+struct todo_flags
+{
+  int flags;
+  bool do_ir_dump;
+  bool do_dump_after_todo;
+};
+
 /* Perform all TODO actions that ought to be done on each function.  */
 
 static void
 execute_function_todo (void *data)
 {
-  unsigned int flags = (size_t)data;
+  struct todo_flags *todo_flags_p = (struct todo_flags *)data;
+  unsigned int flags = todo_flags_p->flags;
+
   flags &= ~cfun->last_verified;
-  if (!flags)
+  if (!flags && !todo_flags_p->do_ir_dump)
     return;
 
+  if (todo_flags_p->do_ir_dump && !todo_flags_p->do_dump_after_todo)
+    do_function_ir_dump ();
+
   /* Always cleanup the CFG before trying to update SSA.  */
   if (flags & TODO_cleanup_cfg)
     {
@@ -1531,31 +1574,6 @@ execute_function_todo (void *data)
   if (flags & TODO_remove_unused_locals)
     remove_unused_locals ();
 
-  if ((flags & TODO_dump_func) && dump_file && current_function_decl)
-    {
-      if (cfun->curr_properties & PROP_trees)
-        dump_function_to_file (current_function_decl, dump_file, dump_flags);
-      else
-	{
-	  if (dump_flags & TDF_SLIM)
-	    print_rtl_slim_with_bb (dump_file, get_insns (), dump_flags);
-	  else if ((cfun->curr_properties & PROP_cfg)
-		   && (dump_flags & TDF_BLOCKS))
-	    print_rtl_with_bb (dump_file, get_insns ());
-          else
-	    print_rtl (dump_file, get_insns ());
-
-	  if ((cfun->curr_properties & PROP_cfg)
-	      && graph_dump_format != no_graph
-	      && (dump_flags & TDF_GRAPH))
-	    print_rtl_graph_with_bb (dump_file_name, get_insns ());
-	}
-
-      /* Flush the file.  If verification fails, we won't be able to
-	 close the file before aborting.  */
-      fflush (dump_file);
-    }
-
   if (flags & TODO_rebuild_frequencies)
     rebuild_frequencies ();
 
@@ -1580,13 +1598,18 @@ execute_function_todo (void *data)
     verify_rtl_sharing ();
 #endif
 
+  if (todo_flags_p->do_ir_dump && todo_flags_p->do_dump_after_todo)
+    do_function_ir_dump ();
+
   cfun->last_verified = flags & TODO_verify_all;
 }
 
 /* Perform all TODO actions.  */
 static void
-execute_todo (unsigned int flags)
+execute_todo (unsigned int flags, bool is_start_todo)
 {
+
+  struct todo_flags todo_flags;
 #if defined ENABLE_CHECKING
   if (cfun
       && need_ssa_update_p (cfun))
@@ -1600,7 +1623,20 @@ execute_todo (unsigned int flags)
 
   statistics_fini_pass ();
 
-  do_per_function (execute_function_todo, (void *)(size_t) flags);
+  todo_flags.flags = flags;
+  todo_flags.do_ir_dump =
+    ((is_start_todo && (dump_flags & (TDF_START | TDF_BEFORE)))
+     || (!is_start_todo && !(dump_flags & (TDF_START | TDF_BEFORE))));
+
+  /* TDF_START --> dump before TODO_START
+     TDF_AFTER --> dump before TODO_FINISH
+     others --> dump after TODO.  */
+  if (dump_flags & (TDF_START | TDF_AFTER))
+    todo_flags.do_dump_after_todo = false;
+  else
+    todo_flags.do_dump_after_todo = true;
+
+  do_per_function (execute_function_todo, &todo_flags);
 
   /* Always remove functions just as before inlining: IPA passes might be
      interested to see bodies of extern inline functions that are not inlined
@@ -1764,7 +1800,7 @@ execute_one_ipa_transform_pass (struct c
   pass_init_dump_file (pass);
 
   /* Run pre-pass verification.  */
-  execute_todo (ipa_pass->function_transform_todo_flags_start);
+  execute_todo (ipa_pass->function_transform_todo_flags_start, true);
 
   /* If a timevar is present, start it.  */
   if (pass->tv_id != TV_NONE)
@@ -1778,7 +1814,7 @@ execute_one_ipa_transform_pass (struct c
     timevar_pop (pass->tv_id);
 
   /* Run post-pass cleanup and verification.  */
-  execute_todo (todo_after);
+  execute_todo (todo_after, false);
   verify_interpass_invariants ();
 
   pass_fini_dump_file (pass);
@@ -1882,7 +1918,7 @@ execute_one_pass (struct opt_pass *pass)
   initializing_dump = pass_init_dump_file (pass);
 
   /* Run pre-pass verification.  */
-  execute_todo (pass->todo_flags_start);
+  execute_todo (pass->todo_flags_start, true);
 
 #ifdef ENABLE_CHECKING
   do_per_function (verify_curr_properties,
@@ -1919,7 +1955,7 @@ execute_one_pass (struct opt_pass *pass)
     }
 
   /* Run post-pass cleanup and verification.  */
-  execute_todo (todo_after | pass->todo_flags_finish);
+  execute_todo (todo_after | pass->todo_flags_finish, false);
   verify_interpass_invariants ();
   if (pass->type == IPA_PASS)
     {
Index: tree-ssa-reassoc.c
===================================================================
--- tree-ssa-reassoc.c	(revision 174759)
+++ tree-ssa-reassoc.c	(working copy)
@@ -2299,8 +2299,6 @@ struct gimple_opt_pass pass_reassoc =
   0,					/* todo_flags_start */
   TODO_verify_ssa
     | TODO_verify_flow
-    | TODO_dump_func
     | TODO_ggc_collect			/* todo_flags_finish */
  }
 };
-
Index: combine-stack-adj.c
===================================================================
--- combine-stack-adj.c	(revision 174759)
+++ combine-stack-adj.c	(working copy)
@@ -584,7 +584,6 @@ struct rtl_opt_pass pass_stack_adjustmen
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_ggc_collect,                     /* todo_flags_finish */
  }
 };
Index: dce.c
===================================================================
--- dce.c	(revision 174759)
+++ dce.c	(working copy)
@@ -785,7 +785,6 @@ struct rtl_opt_pass pass_ud_rtl_dce =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_df_finish | TODO_verify_rtl_sharing |
   TODO_ggc_collect                     /* todo_flags_finish */
  }
@@ -1137,7 +1136,6 @@ struct rtl_opt_pass pass_fast_rtl_dce =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_df_finish | TODO_verify_rtl_sharing |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
Index: tree-ssanames.c
===================================================================
--- tree-ssanames.c	(revision 174759)
+++ tree-ssanames.c	(working copy)
@@ -366,6 +366,6 @@ struct gimple_opt_pass pass_release_ssa_
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func 			/* todo_flags_finish */
+  0              			/* todo_flags_finish */
  }
 };
Index: regcprop.c
===================================================================
--- regcprop.c	(revision 174759)
+++ regcprop.c	(working copy)
@@ -1188,7 +1188,7 @@ struct rtl_opt_pass pass_cprop_hardreg =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_df_finish
+  TODO_df_finish
   | TODO_verify_rtl_sharing		/* todo_flags_finish */
  }
 };

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Dump before flag
  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
  1 sibling, 1 reply; 30+ messages in thread
From: Xinliang David Li @ 2011-06-07 23:34 UTC (permalink / raw)
  To: Richard Guenther; +Cc: GCC Patches, Diego Novillo

It might be also useful to implement the dumping behavior like this:
if any of the start/before/after/finish option is explicitly
specified, IR (and only IR) will be dumped into files suffixed with
.start/.before/.after/.finish. The debug dump will be dumped as usual
into the non suffixed file name. By default, the IR dump and debug
dump will be dumped into the same file which is the current behavior.

David


On Tue, Jun 7, 2011 at 4:08 PM, Xinliang David Li <davidxl@google.com> wrote:
> The following is the patch that does the job. Most of the changes are
> just  removing TODO_dump_func. The major change is in passes.c and
> tree-pass.h.
>
> -fdump-xxx-yyy-start       <-- dump before TODO_start
> -fdump-xxx-yyy-before    <-- dump before main pass after TODO_pass
> -fdump-xxx-yyy-after       <-- dump after main pass before TODO_finish
> -fdump-xxx-yyy-finish      <-- dump after TODO_finish
>
> The default is 'finish'.
>
> Does it look ok?
>
> Thanks,
>
> David
>
> On Tue, Jun 7, 2011 at 2:36 AM, Richard Guenther
> <richard.guenther@gmail.com> wrote:
>> On Mon, Jun 6, 2011 at 6:20 PM, Xinliang David Li <davidxl@google.com> wrote:
>>>>
>>>> Your patch doesn't really improve this but adds to the confusion.
>>>>
>>>> +  /* Override dump TODOs.  */
>>>> +  if (dump_file && (pass->todo_flags_finish & TODO_dump_func)
>>>> +      && (dump_flags & TDF_BEFORE))
>>>> +    {
>>>> +      pass->todo_flags_finish &= ~TODO_dump_func;
>>>> +      pass->todo_flags_start |= TODO_dump_func;
>>>> +    }
>>>>
>>>> and certainly writing to pass is not ok.  And the TDF_BEFORE flag
>>>> looks misplaced as it controls TODOs, not dumping behavior.
>>>> Yes, it's a mess right now but the above looks like a hack ontop
>>>> of that mess (maybe because of it, but well ...).
>>>>
>>>
>>> How about removing dumping TODO completely -- this can be done easily
>>> -- I don't understand why pass wants extra control on the dumping if
>>> user already asked for dumping -- it is annoying to see empty IR dump
>>> for a pass when I want to see it.
>>>
>>>> At least I would have expected to also get the dump after the
>>>> pass, not only the one before it with this dump flag.
>>>>
>>>> Now, why can't you look at the previous pass output for the
>>>> before-dump (as I do usually)?
>>>
>>> For one thing, you need to either remember what is the previous pass,
>>> or dump all passes which for large files can take very long time. Even
>>> with all the dumps, you will need to eyeballing to find the previous
>>> pass which may or may not have the IR dumped.
>>>
>>> How about removing dump TODO?
>>
>> Yeah, I think this would go in the right direction.  Currently some passes
>> do not dump function bodies because they presumably do no IL
>> modification.  But this is certainly the minority (and some passes do not
>> dump bodies even though they are modifying the IL ...).
>>
>> So I'd say we should by default dump function bodies.
>>
>> Note that there are three useful dumping positions (maybe four),
>> before todo-start, after todo-start, before todo-finish and after todo-finish.
>> By default we'd want after todo-finish.  When we no longer dump via
>> a TODO then we could indeed use dump-flags to control this
>> (maybe -original for the body before todo-start).
>>
>> What to others think?
>>
>> Richard.
>>
>>> Thanks,
>>>
>>> David
>>>
>>>
>>>>
>>>> Richard.
>>>>
>>>
>>
>

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Dump before flag
  2011-06-07 23:34             ` Xinliang David Li
@ 2011-06-08  6:44               ` Xinliang David Li
  0 siblings, 0 replies; 30+ messages in thread
From: Xinliang David Li @ 2011-06-08  6:44 UTC (permalink / raw)
  To: Richard Guenther; +Cc: GCC Patches, Diego Novillo

[-- Attachment #1: Type: text/plain, Size: 4281 bytes --]

The attached is the proposed patch to split dump files. Example:

gcc -O2 -fdump-tree-ccp1-before-after fre.c

Produces three files:

BEFORE ccp1 IR file: fre.c.023t.ccp1.before
AFTER ccp1 IR file: fre.c.023t.ccp1.after
debug dump file: fre.c.023t.ccp1 (also include the finish IR)

gcc -O2 -fdump-tree-ccp1-before-finish fre.c

produces:
BEFORE ccp1 IR file: fre.c.023t.ccp1.before
IR dump after ccp1 is finished (include post cleanups): fre.c.023t.ccp1.finish
debug (only debug) dump file: fre.c.023t.ccp1

gcc -O2 -fdump-tree-ccp1

behaves as before.


Please comment.

Thanks,

David

On Tue, Jun 7, 2011 at 4:16 PM, Xinliang David Li <davidxl@google.com> wrote:
> It might be also useful to implement the dumping behavior like this:
> if any of the start/before/after/finish option is explicitly
> specified, IR (and only IR) will be dumped into files suffixed with
> .start/.before/.after/.finish. The debug dump will be dumped as usual
> into the non suffixed file name. By default, the IR dump and debug
> dump will be dumped into the same file which is the current behavior.
>
> David
>
>
> On Tue, Jun 7, 2011 at 4:08 PM, Xinliang David Li <davidxl@google.com> wrote:
>> The following is the patch that does the job. Most of the changes are
>> just  removing TODO_dump_func. The major change is in passes.c and
>> tree-pass.h.
>>
>> -fdump-xxx-yyy-start       <-- dump before TODO_start
>> -fdump-xxx-yyy-before    <-- dump before main pass after TODO_pass
>> -fdump-xxx-yyy-after       <-- dump after main pass before TODO_finish
>> -fdump-xxx-yyy-finish      <-- dump after TODO_finish
>>
>> The default is 'finish'.
>>
>> Does it look ok?
>>
>> Thanks,
>>
>> David
>>
>> On Tue, Jun 7, 2011 at 2:36 AM, Richard Guenther
>> <richard.guenther@gmail.com> wrote:
>>> On Mon, Jun 6, 2011 at 6:20 PM, Xinliang David Li <davidxl@google.com> wrote:
>>>>>
>>>>> Your patch doesn't really improve this but adds to the confusion.
>>>>>
>>>>> +  /* Override dump TODOs.  */
>>>>> +  if (dump_file && (pass->todo_flags_finish & TODO_dump_func)
>>>>> +      && (dump_flags & TDF_BEFORE))
>>>>> +    {
>>>>> +      pass->todo_flags_finish &= ~TODO_dump_func;
>>>>> +      pass->todo_flags_start |= TODO_dump_func;
>>>>> +    }
>>>>>
>>>>> and certainly writing to pass is not ok.  And the TDF_BEFORE flag
>>>>> looks misplaced as it controls TODOs, not dumping behavior.
>>>>> Yes, it's a mess right now but the above looks like a hack ontop
>>>>> of that mess (maybe because of it, but well ...).
>>>>>
>>>>
>>>> How about removing dumping TODO completely -- this can be done easily
>>>> -- I don't understand why pass wants extra control on the dumping if
>>>> user already asked for dumping -- it is annoying to see empty IR dump
>>>> for a pass when I want to see it.
>>>>
>>>>> At least I would have expected to also get the dump after the
>>>>> pass, not only the one before it with this dump flag.
>>>>>
>>>>> Now, why can't you look at the previous pass output for the
>>>>> before-dump (as I do usually)?
>>>>
>>>> For one thing, you need to either remember what is the previous pass,
>>>> or dump all passes which for large files can take very long time. Even
>>>> with all the dumps, you will need to eyeballing to find the previous
>>>> pass which may or may not have the IR dumped.
>>>>
>>>> How about removing dump TODO?
>>>
>>> Yeah, I think this would go in the right direction.  Currently some passes
>>> do not dump function bodies because they presumably do no IL
>>> modification.  But this is certainly the minority (and some passes do not
>>> dump bodies even though they are modifying the IL ...).
>>>
>>> So I'd say we should by default dump function bodies.
>>>
>>> Note that there are three useful dumping positions (maybe four),
>>> before todo-start, after todo-start, before todo-finish and after todo-finish.
>>> By default we'd want after todo-finish.  When we no longer dump via
>>> a TODO then we could indeed use dump-flags to control this
>>> (maybe -original for the body before todo-start).
>>>
>>> What to others think?
>>>
>>> Richard.
>>>
>>>> Thanks,
>>>>
>>>> David
>>>>
>>>>
>>>>>
>>>>> Richard.
>>>>>
>>>>
>>>
>>
>

[-- Attachment #2: dump-control-2.p --]
[-- Type: text/x-pascal, Size: 78517 bytes --]

Index: tree-vrp.c
===================================================================
--- tree-vrp.c	(revision 174759)
+++ tree-vrp.c	(working copy)
@@ -7818,7 +7818,6 @@ struct gimple_opt_pass pass_vrp =
     | TODO_update_ssa
     | TODO_verify_ssa
     | TODO_verify_flow
-    | TODO_dump_func
     | TODO_ggc_collect			/* todo_flags_finish */
  }
 };
Index: regrename.c
===================================================================
--- regrename.c	(revision 174759)
+++ regrename.c	(working copy)
@@ -1453,7 +1453,6 @@ struct rtl_opt_pass pass_regrename =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
-
Index: fwprop.c
===================================================================
--- fwprop.c	(revision 174759)
+++ fwprop.c	(working copy)
@@ -1473,8 +1473,7 @@ struct rtl_opt_pass pass_rtl_fwprop =
   0,                                    /* todo_flags_start */
   TODO_df_finish
     | TODO_verify_flow
-    | TODO_verify_rtl_sharing
-    | TODO_dump_func                    /* todo_flags_finish */
+    | TODO_verify_rtl_sharing           /* todo_flags_finish */
  }
 };
 
@@ -1521,7 +1520,6 @@ struct rtl_opt_pass pass_rtl_fwprop_addr
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func                        /* todo_flags_finish */
+  TODO_df_finish | TODO_verify_rtl_sharing  /* todo_flags_finish */
  }
 };
Index: tree-into-ssa.c
===================================================================
--- tree-into-ssa.c	(revision 174759)
+++ tree-into-ssa.c	(working copy)
@@ -2413,8 +2413,7 @@ struct gimple_opt_pass pass_build_ssa =
   PROP_ssa,				/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func
-    | TODO_update_ssa_only_virtuals
+  TODO_update_ssa_only_virtuals
     | TODO_verify_ssa
     | TODO_remove_unused_locals		/* todo_flags_finish */
  }
Index: tree-dump.c
===================================================================
--- tree-dump.c	(revision 174759)
+++ tree-dump.c	(working copy)
@@ -822,6 +822,10 @@ static const struct dump_option_value_in
   {"eh", TDF_EH},
   {"alias", TDF_ALIAS},
   {"nouid", TDF_NOUID},
+  {"start", TDF_START},
+  {"before", TDF_BEFORE},
+  {"after", TDF_AFTER},
+  {"finish", TDF_FINISH},
   {"enumerate_locals", TDF_ENUMERATE_LOCALS},
   {"all", ~(TDF_RAW | TDF_SLIM | TDF_LINENO | TDF_TREE | TDF_RTL | TDF_IPA
 	    | TDF_STMTADDR | TDF_GRAPH | TDF_DIAGNOSTIC | TDF_VERBOSE
Index: tree-complex.c
===================================================================
--- tree-complex.c	(revision 174759)
+++ tree-complex.c	(working copy)
@@ -1623,8 +1623,7 @@ struct gimple_opt_pass pass_lower_comple
   PROP_gimple_lcx,			/* properties_provided */
   0,                       		/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func
-    | TODO_ggc_collect
+    TODO_ggc_collect
     | TODO_update_ssa
     | TODO_verify_stmts	 		/* todo_flags_finish */
  }
@@ -1654,8 +1653,7 @@ struct gimple_opt_pass pass_lower_comple
   PROP_gimple_lcx,			/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func
-    | TODO_ggc_collect
+  TODO_ggc_collect
     | TODO_update_ssa
     | TODO_verify_stmts	 		/* todo_flags_finish */
  }
Index: tracer.c
===================================================================
--- tracer.c	(revision 174759)
+++ tracer.c	(working copy)
@@ -393,8 +393,7 @@ struct gimple_opt_pass pass_tracer =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func
-    | TODO_update_ssa
+  TODO_update_ssa
     | TODO_verify_ssa                   /* todo_flags_finish */
  }
 };
Index: tree-loop-distribution.c
===================================================================
--- tree-loop-distribution.c	(revision 174759)
+++ tree-loop-distribution.c	(working copy)
@@ -1313,6 +1313,6 @@ struct gimple_opt_pass pass_loop_distrib
   0,				/* properties_provided */
   0,				/* properties_destroyed */
   0,				/* todo_flags_start */
-  TODO_dump_func                /* todo_flags_finish */
+  0                             /* todo_flags_finish */
  }
 };
Index: postreload-gcse.c
===================================================================
--- postreload-gcse.c	(revision 174759)
+++ postreload-gcse.c	(working copy)
@@ -1344,8 +1344,7 @@ struct rtl_opt_pass pass_gcse2 =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing
+  TODO_verify_rtl_sharing
   | TODO_verify_flow | TODO_ggc_collect /* todo_flags_finish */
  }
 };
-
Index: postreload.c
===================================================================
--- postreload.c	(revision 174759)
+++ postreload.c	(working copy)
@@ -2287,6 +2287,6 @@ struct rtl_opt_pass pass_postreload_cse 
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
Index: tree-ssa-loop-ch.c
===================================================================
--- tree-ssa-loop-ch.c	(revision 174759)
+++ tree-ssa-loop-ch.c	(working copy)
@@ -278,7 +278,6 @@ struct gimple_opt_pass pass_ch =
   0,					/* todo_flags_start */
   TODO_cleanup_cfg
     | TODO_verify_ssa
-    | TODO_verify_flow
-    | TODO_dump_func			/* todo_flags_finish */
+    | TODO_verify_flow			/* todo_flags_finish */
  }
 };
Index: tree-tailcall.c
===================================================================
--- tree-tailcall.c	(revision 174759)
+++ tree-tailcall.c	(working copy)
@@ -1092,7 +1092,7 @@ struct gimple_opt_pass pass_tail_recursi
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_ssa	/* todo_flags_finish */
+  TODO_verify_ssa	                /* todo_flags_finish */
  }
 };
 
@@ -1111,6 +1111,6 @@ struct gimple_opt_pass pass_tail_calls =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_ssa	/* todo_flags_finish */
+  TODO_verify_ssa	                /* todo_flags_finish */
  }
 };
Index: tree-pass.h
===================================================================
--- tree-pass.h	(revision 174759)
+++ tree-pass.h	(working copy)
@@ -83,6 +83,10 @@ enum tree_dump_index
 #define TDF_ALIAS	(1 << 21)	/* display alias information  */
 #define TDF_ENUMERATE_LOCALS (1 << 22)	/* Enumerate locals by uid.  */
 #define TDF_CSELIB	(1 << 23)	/* Dump cselib details.  */
+#define TDF_START       (1 << 24)	/* Dump before TODO_start.  */
+#define TDF_BEFORE      (1 << 25)	/* Dump before pass.  */
+#define TDF_AFTER       (1 << 26)	/* Dump after pass.  */
+#define TDF_FINISH      (1 << 27)	/* Dump after TODO_finish.  */
 
 
 /* In tree-dump.c */
@@ -243,7 +247,6 @@ struct dump_file_info
   (PROP_gimple_any | PROP_gimple_lcf | PROP_gimple_leh | PROP_gimple_lomp)
 
 /* To-do flags.  */
-#define TODO_dump_func			(1 << 0)
 #define TODO_ggc_collect		(1 << 1)
 #define TODO_verify_ssa			(1 << 2)
 #define TODO_verify_flow		(1 << 3)
Index: ipa-cp.c
===================================================================
--- ipa-cp.c	(revision 174759)
+++ ipa-cp.c	(working copy)
@@ -1570,7 +1570,7 @@ struct ipa_opt_pass_d pass_ipa_cp =
   0,				/* properties_provided */
   0,				/* properties_destroyed */
   0,				/* todo_flags_start */
-  TODO_dump_cgraph | TODO_dump_func |
+  TODO_dump_cgraph |
   TODO_remove_functions | TODO_ggc_collect /* todo_flags_finish */
  },
  ipcp_generate_summary,			/* generate_summary */
Index: final.c
===================================================================
--- final.c	(revision 174759)
+++ final.c	(working copy)
@@ -837,7 +837,7 @@ struct rtl_opt_pass pass_compute_alignme
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing
+  TODO_verify_rtl_sharing
   | TODO_ggc_collect                    /* todo_flags_finish */
  }
 };
@@ -4337,7 +4337,7 @@ struct rtl_opt_pass pass_shorten_branche
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
Index: tree-emutls.c
===================================================================
--- tree-emutls.c	(revision 174759)
+++ tree-emutls.c	(working copy)
@@ -783,7 +783,7 @@ ipa_lower_emutls (void)
   VEC_free (tree, heap, access_vars);
   free_varpool_node_set (tls_vars);
 
-  return TODO_dump_func | TODO_ggc_collect | TODO_verify_all;
+  return TODO_ggc_collect | TODO_verify_all;
 }
 
 /* If the target supports TLS natively, we need do nothing here.  */
Index: omp-low.c
===================================================================
--- omp-low.c	(revision 174759)
+++ omp-low.c	(working copy)
@@ -5553,7 +5553,7 @@ struct gimple_opt_pass pass_expand_omp =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0                      		/* todo_flags_finish */
  }
 };
 \f
@@ -6730,7 +6730,7 @@ struct gimple_opt_pass pass_lower_omp =
   PROP_gimple_lomp,			/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 \f
Index: tree-ssa-dse.c
===================================================================
--- tree-ssa-dse.c	(revision 174759)
+++ tree-ssa-dse.c	(working copy)
@@ -352,9 +352,7 @@ struct gimple_opt_pass pass_dse =
   0,				/* properties_provided */
   0,				/* properties_destroyed */
   0,				/* todo_flags_start */
-  TODO_dump_func
-    | TODO_ggc_collect
+  TODO_ggc_collect
     | TODO_verify_ssa		/* todo_flags_finish */
  }
 };
-
Index: tree-ssa-uncprop.c
===================================================================
--- tree-ssa-uncprop.c	(revision 174759)
+++ tree-ssa-uncprop.c	(working copy)
@@ -596,7 +596,6 @@ struct gimple_opt_pass pass_uncprop =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_ssa	/* todo_flags_finish */
+  TODO_verify_ssa	                /* todo_flags_finish */
  }
 };
-
Index: auto-inc-dec.c
===================================================================
--- auto-inc-dec.c	(revision 174759)
+++ auto-inc-dec.c	(working copy)
@@ -1523,7 +1523,6 @@ struct rtl_opt_pass pass_inc_dec =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_df_finish,                       /* todo_flags_finish */
  }
 };
Index: reorg.c
===================================================================
--- reorg.c	(revision 174759)
+++ reorg.c	(working copy)
@@ -4086,7 +4086,6 @@ struct rtl_opt_pass pass_delay_slots =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
 };
@@ -4121,7 +4120,6 @@ struct rtl_opt_pass pass_machine_reorg =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
 };
Index: tree-ssa-copyrename.c
===================================================================
--- tree-ssa-copyrename.c	(revision 174759)
+++ tree-ssa-copyrename.c	(working copy)
@@ -399,6 +399,6 @@ struct gimple_opt_pass pass_rename_ssa_c
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_ssa      /* todo_flags_finish */
+  TODO_verify_ssa                       /* todo_flags_finish */
  }
 };
Index: tree-ssa-ccp.c
===================================================================
--- tree-ssa-ccp.c	(revision 174759)
+++ tree-ssa-ccp.c	(working copy)
@@ -1953,7 +1953,7 @@ struct gimple_opt_pass pass_ccp =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_ssa
+  TODO_verify_ssa
   | TODO_verify_stmts | TODO_ggc_collect/* todo_flags_finish */
  }
 };
@@ -2256,8 +2256,7 @@ struct gimple_opt_pass pass_fold_builtin
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func
-    | TODO_verify_ssa
+  TODO_verify_ssa
     | TODO_update_ssa			/* todo_flags_finish */
  }
 };
Index: compare-elim.c
===================================================================
--- compare-elim.c	(revision 174759)
+++ compare-elim.c	(working copy)
@@ -636,7 +636,6 @@ struct rtl_opt_pass pass_compare_elim_af
   TODO_df_finish
   | TODO_df_verify
   | TODO_verify_rtl_sharing
-  | TODO_dump_func
   | TODO_ggc_collect			/* todo_flags_finish */
  }
 };
Index: mode-switching.c
===================================================================
--- mode-switching.c	(revision 174759)
+++ mode-switching.c	(working copy)
@@ -772,6 +772,6 @@ struct rtl_opt_pass pass_mode_switching 
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
Index: modulo-sched.c
===================================================================
--- modulo-sched.c	(revision 174759)
+++ modulo-sched.c	(working copy)
@@ -2969,12 +2969,10 @@ struct rtl_opt_pass pass_sms =
   0,                                    /* properties_required */
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
-  TODO_dump_func,                       /* todo_flags_start */
+  0,                                    /* todo_flags_start */
   TODO_df_finish
     | TODO_verify_flow
     | TODO_verify_rtl_sharing
-    | TODO_dump_func
     | TODO_ggc_collect                  /* todo_flags_finish */
  }
 };
-
Index: tree-call-cdce.c
===================================================================
--- tree-call-cdce.c	(revision 174759)
+++ tree-call-cdce.c	(working copy)
@@ -928,6 +928,6 @@ struct gimple_opt_pass pass_call_cdce =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_ssa      /* todo_flags_finish */
+  TODO_verify_ssa                       /* todo_flags_finish */
  }
 };
Index: cse.c
===================================================================
--- cse.c	(revision 174759)
+++ cse.c	(working copy)
@@ -7414,7 +7414,6 @@ struct rtl_opt_pass pass_cse =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_ggc_collect |
   TODO_verify_flow,                     /* todo_flags_finish */
  }
@@ -7477,7 +7476,6 @@ struct rtl_opt_pass pass_cse2 =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_ggc_collect |
   TODO_verify_flow                      /* todo_flags_finish */
  }
@@ -7538,7 +7536,6 @@ struct rtl_opt_pass pass_cse_after_globa
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_ggc_collect |
   TODO_verify_flow                      /* todo_flags_finish */
  }
Index: web.c
===================================================================
--- web.c	(revision 174759)
+++ web.c	(working copy)
@@ -433,8 +433,6 @@ struct rtl_opt_pass pass_web =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func                        /* todo_flags_finish */
+  TODO_df_finish | TODO_verify_rtl_sharing  /* todo_flags_finish */
  }
 };
-
Index: tree-stdarg.c
===================================================================
--- tree-stdarg.c	(revision 174759)
+++ tree-stdarg.c	(working copy)
@@ -963,6 +963,6 @@ struct gimple_opt_pass pass_stdarg =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0             			/* todo_flags_finish */
  }
 };
Index: lto-streamer-out.c
===================================================================
--- lto-streamer-out.c	(revision 174759)
+++ lto-streamer-out.c	(working copy)
@@ -2297,7 +2297,7 @@ struct ipa_opt_pass_d pass_ipa_lto_gimpl
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,            			/* todo_flags_start */
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  },
  NULL,		                        /* generate_summary */
  lto_output,           			/* write_summary */
Index: tree-ssa-math-opts.c
===================================================================
--- tree-ssa-math-opts.c	(revision 174759)
+++ tree-ssa-math-opts.c	(working copy)
@@ -645,7 +645,7 @@ struct gimple_opt_pass pass_cse_reciproc
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_update_ssa | TODO_verify_ssa
+  TODO_update_ssa | TODO_verify_ssa
     | TODO_verify_stmts                /* todo_flags_finish */
  }
 };
@@ -1424,7 +1424,7 @@ struct gimple_opt_pass pass_cse_sincos =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_update_ssa | TODO_verify_ssa
+  TODO_update_ssa | TODO_verify_ssa
     | TODO_verify_stmts                 /* todo_flags_finish */
  }
 };
@@ -1851,7 +1851,7 @@ execute_optimize_bswap (void)
   statistics_counter_event (cfun, "64-bit bswap implementations found",
 			    bswap_stats.found_64bit);
 
-  return (changed ? TODO_dump_func | TODO_update_ssa | TODO_verify_ssa
+  return (changed ? TODO_update_ssa | TODO_verify_ssa
 	  | TODO_verify_stmts : 0);
 }
 
@@ -2404,7 +2404,6 @@ struct gimple_opt_pass pass_optimize_wid
   0,					/* todo_flags_start */
   TODO_verify_ssa
   | TODO_verify_stmts
-  | TODO_dump_func
   | TODO_update_ssa                     /* todo_flags_finish */
  }
 };
Index: tree-ssa-dom.c
===================================================================
--- tree-ssa-dom.c	(revision 174759)
+++ tree-ssa-dom.c	(working copy)
@@ -816,8 +816,7 @@ struct gimple_opt_pass pass_dominator =
   TODO_cleanup_cfg
     | TODO_update_ssa
     | TODO_verify_ssa
-    | TODO_verify_flow
-    | TODO_dump_func			/* todo_flags_finish */
+    | TODO_verify_flow			/* todo_flags_finish */
  }
 };
 
@@ -2969,7 +2968,6 @@ struct gimple_opt_pass pass_phi_only_cpr
   0,		                        /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_cleanup_cfg
-    | TODO_dump_func
     | TODO_ggc_collect
     | TODO_verify_ssa
     | TODO_verify_stmts
Index: tree-nrv.c
===================================================================
--- tree-nrv.c	(revision 174759)
+++ tree-nrv.c	(working copy)
@@ -288,7 +288,7 @@ struct gimple_opt_pass pass_nrv =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_ggc_collect			/* todo_flags_finish */
+  TODO_ggc_collect			/* todo_flags_finish */
  }
 };
 
Index: loop-init.c
===================================================================
--- loop-init.c	(revision 174759)
+++ loop-init.c	(working copy)
@@ -158,7 +158,6 @@ struct rtl_opt_pass pass_loop2 =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
 };
@@ -192,7 +191,7 @@ struct rtl_opt_pass pass_rtl_loop_init =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing /* todo_flags_finish */
+  TODO_verify_rtl_sharing               /* todo_flags_finish */
  }
 };
 
@@ -228,8 +227,7 @@ struct rtl_opt_pass pass_rtl_loop_done =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_verify_flow
-    | TODO_verify_rtl_sharing
-    | TODO_dump_func                    /* todo_flags_finish */
+    | TODO_verify_rtl_sharing           /* todo_flags_finish */
  }
 };
 
@@ -265,8 +263,7 @@ struct rtl_opt_pass pass_rtl_move_loop_i
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_verify |
-  TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func                        /* todo_flags_finish */
+  TODO_df_finish | TODO_verify_rtl_sharing  /* todo_flags_finish */
  }
 };
 
@@ -301,7 +298,7 @@ struct rtl_opt_pass pass_rtl_unswitch =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing, /* todo_flags_finish */
+  TODO_verify_rtl_sharing,              /* todo_flags_finish */
  }
 };
 
@@ -349,7 +346,7 @@ struct rtl_opt_pass pass_rtl_unroll_and_
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing, /* todo_flags_finish */
+  TODO_verify_rtl_sharing,              /* todo_flags_finish */
  }
 };
 
@@ -390,7 +387,6 @@ struct rtl_opt_pass pass_rtl_doloop =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing /* todo_flags_finish */
+  TODO_verify_rtl_sharing               /* todo_flags_finish */
  }
 };
-
Index: gimple-low.c
===================================================================
--- gimple-low.c	(revision 174759)
+++ gimple-low.c	(working copy)
@@ -203,7 +203,7 @@ struct gimple_opt_pass pass_lower_cf =
   PROP_gimple_lcf,			/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0             			/* todo_flags_finish */
  }
 };
 
Index: ipa-inline.c
===================================================================
--- ipa-inline.c	(revision 174759)
+++ ipa-inline.c	(working copy)
@@ -1915,7 +1915,7 @@ struct gimple_opt_pass pass_early_inline
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func    			/* todo_flags_finish */
+  0                 			/* todo_flags_finish */
  }
 };
 
@@ -1949,7 +1949,7 @@ struct ipa_opt_pass_d pass_ipa_inline =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   TODO_remove_functions,		/* todo_flags_finish */
-  TODO_dump_cgraph | TODO_dump_func
+  TODO_dump_cgraph 
   | TODO_remove_functions | TODO_ggc_collect	/* todo_flags_finish */
  },
  inline_generate_summary,		/* generate_summary */
Index: tree-ssa-sink.c
===================================================================
--- tree-ssa-sink.c	(revision 174759)
+++ tree-ssa-sink.c	(working copy)
@@ -639,7 +639,6 @@ struct gimple_opt_pass pass_sink_code =
   TODO_update_ssa
     | TODO_verify_ssa
     | TODO_verify_flow
-    | TODO_dump_func
     | TODO_ggc_collect			/* todo_flags_finish */
  }
 };
Index: jump.c
===================================================================
--- jump.c	(revision 174759)
+++ jump.c	(working copy)
@@ -156,7 +156,7 @@ struct rtl_opt_pass pass_cleanup_barrier
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
Index: ifcvt.c
===================================================================
--- ifcvt.c	(revision 174759)
+++ ifcvt.c	(working copy)
@@ -4368,7 +4368,7 @@ struct rtl_opt_pass pass_rtl_ifcvt =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
@@ -4405,7 +4405,6 @@ struct rtl_opt_pass pass_if_after_combin
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
 };
@@ -4442,7 +4441,6 @@ struct rtl_opt_pass pass_if_after_reload
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
 };
Index: tree-ssa-loop.c
===================================================================
--- tree-ssa-loop.c	(revision 174759)
+++ tree-ssa-loop.c	(working copy)
@@ -60,7 +60,7 @@ struct gimple_opt_pass pass_tree_loop =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   TODO_ggc_collect,			/* todo_flags_start */
-  TODO_dump_func | TODO_verify_ssa | TODO_ggc_collect	/* todo_flags_finish */
+  TODO_verify_ssa | TODO_ggc_collect	/* todo_flags_finish */
  }
 };
 
@@ -95,7 +95,7 @@ struct gimple_opt_pass pass_tree_loop_in
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0             			/* todo_flags_finish */
  }
 };
 
@@ -131,7 +131,7 @@ struct gimple_opt_pass pass_lim =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0             			/* todo_flags_finish */
  }
 };
 
@@ -167,7 +167,7 @@ struct gimple_opt_pass pass_tree_unswitc
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_ggc_collect | TODO_dump_func 	/* todo_flags_finish */
+  TODO_ggc_collect                  	/* todo_flags_finish */
  }
 };
 
@@ -203,8 +203,7 @@ struct gimple_opt_pass pass_predcom =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func
-    | TODO_update_ssa_only_virtuals	/* todo_flags_finish */
+  TODO_update_ssa_only_virtuals 	/* todo_flags_finish */
  }
 };
 
@@ -240,7 +239,7 @@ struct gimple_opt_pass pass_vectorize =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_update_ssa
+  TODO_update_ssa
     | TODO_ggc_collect			/* todo_flags_finish */
  }
 };
@@ -308,7 +307,7 @@ struct gimple_opt_pass pass_graphite_tra
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0             			/* todo_flags_finish */
  }
 };
 
@@ -345,7 +344,7 @@ struct gimple_opt_pass pass_check_data_d
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func                	/* todo_flags_finish */
+  0                             	/* todo_flags_finish */
  }
 };
 
@@ -381,7 +380,7 @@ struct gimple_opt_pass pass_iv_canon =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0             			/* todo_flags_finish */
  }
 };
 
@@ -408,7 +407,7 @@ struct gimple_opt_pass pass_scev_cprop =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_cleanup_cfg
+  TODO_cleanup_cfg
     | TODO_update_ssa_only_virtuals
 					/* todo_flags_finish */
  }
@@ -480,8 +479,7 @@ struct gimple_opt_pass pass_complete_unr
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func
-    | TODO_ggc_collect			/* todo_flags_finish */
+  TODO_ggc_collect			/* todo_flags_finish */
  }
 };
 
@@ -528,7 +526,6 @@ struct gimple_opt_pass pass_complete_unr
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
   TODO_verify_flow
-    | TODO_dump_func
     | TODO_ggc_collect 			/* todo_flags_finish */
  }
 };
@@ -567,7 +564,7 @@ struct gimple_opt_pass pass_parallelize_
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0             			/* todo_flags_finish */
  }
 };
 
@@ -603,7 +600,7 @@ struct gimple_opt_pass pass_loop_prefetc
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0             			/* todo_flags_finish */
  }
 };
 
@@ -640,7 +637,7 @@ struct gimple_opt_pass pass_iv_optimize 
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_update_ssa | TODO_ggc_collect	/* todo_flags_finish */
+  TODO_update_ssa | TODO_ggc_collect	/* todo_flags_finish */
  }
 };
 
@@ -671,7 +668,6 @@ struct gimple_opt_pass pass_tree_loop_do
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
   TODO_cleanup_cfg
-    | TODO_verify_flow
-    | TODO_dump_func			/* todo_flags_finish */
+    | TODO_verify_flow			/* todo_flags_finish */
  }
 };
Index: recog.c
===================================================================
--- recog.c	(revision 174759)
+++ recog.c	(working copy)
@@ -3694,7 +3694,7 @@ struct rtl_opt_pass pass_peephole2 =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func                       /* todo_flags_finish */
+  0                                    /* todo_flags_finish */
  }
 };
 
@@ -3720,7 +3720,7 @@ struct rtl_opt_pass pass_split_all_insns
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
@@ -3750,7 +3750,7 @@ struct rtl_opt_pass pass_split_after_rel
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
@@ -3794,7 +3794,7 @@ struct rtl_opt_pass pass_split_before_re
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
@@ -3832,8 +3832,7 @@ struct rtl_opt_pass pass_split_before_sc
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_verify_flow |
-  TODO_dump_func                        /* todo_flags_finish */
+  TODO_verify_flow                      /* todo_flags_finish */
  }
 };
 
@@ -3864,6 +3863,6 @@ struct rtl_opt_pass pass_split_for_short
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing /* todo_flags_finish */
+  TODO_verify_rtl_sharing               /* todo_flags_finish */
  }
 };
Index: dse.c
===================================================================
--- dse.c	(revision 174759)
+++ dse.c	(working copy)
@@ -3853,7 +3853,6 @@ struct rtl_opt_pass pass_rtl_dse1 =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_df_finish | TODO_verify_rtl_sharing |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
@@ -3874,7 +3873,6 @@ struct rtl_opt_pass pass_rtl_dse2 =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_df_finish | TODO_verify_rtl_sharing |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
Index: tree-ssa-ifcombine.c
===================================================================
--- tree-ssa-ifcombine.c	(revision 174759)
+++ tree-ssa-ifcombine.c	(working copy)
@@ -663,8 +663,7 @@ struct gimple_opt_pass pass_tree_ifcombi
   0,				/* properties_provided */
   0,				/* properties_destroyed */
   0,				/* todo_flags_start */
-  TODO_dump_func
-  | TODO_ggc_collect
+  TODO_ggc_collect
   | TODO_update_ssa
   | TODO_verify_ssa		/* todo_flags_finish */
  }
Index: matrix-reorg.c
===================================================================
--- matrix-reorg.c	(revision 174759)
+++ matrix-reorg.c	(working copy)
@@ -2390,6 +2390,6 @@ struct simple_ipa_opt_pass pass_ipa_matr
   0,				/* properties_provided */
   0,				/* properties_destroyed */
   0,				/* todo_flags_start */
-  TODO_dump_cgraph | TODO_dump_func	/* todo_flags_finish */
+  TODO_dump_cgraph      	/* todo_flags_finish */
  }
 };
Index: tree-eh.c
===================================================================
--- tree-eh.c	(revision 174759)
+++ tree-eh.c	(working copy)
@@ -2052,7 +2052,7 @@ struct gimple_opt_pass pass_lower_eh =
   PROP_gimple_leh,			/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0             			/* todo_flags_finish */
  }
 };
 \f
@@ -2865,7 +2865,7 @@ struct gimple_opt_pass pass_refactor_eh 
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0             			/* todo_flags_finish */
  }
 };
 \f
@@ -3071,7 +3071,7 @@ struct gimple_opt_pass pass_lower_resx =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_flow	/* todo_flags_finish */
+  TODO_verify_flow	                /* todo_flags_finish */
  }
 };
 
@@ -3272,7 +3272,7 @@ struct gimple_opt_pass pass_lower_eh_dis
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_flow	/* todo_flags_finish */
+  TODO_verify_flow	                /* todo_flags_finish */
  }
 };
 \f
@@ -4015,7 +4015,7 @@ struct gimple_opt_pass pass_cleanup_eh =
    0,				/* properties_provided */
    0,				/* properties_destroyed */
    0,				/* todo_flags_start */
-   TODO_dump_func		/* todo_flags_finish */
+   0             		/* todo_flags_finish */
    }
 };
 \f
Index: regmove.c
===================================================================
--- regmove.c	(revision 174759)
+++ regmove.c	(working copy)
@@ -1382,7 +1382,6 @@ struct rtl_opt_pass pass_regmove =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
 };
Index: function.c
===================================================================
--- function.c	(revision 174759)
+++ function.c	(working copy)
@@ -1955,7 +1955,7 @@ struct rtl_opt_pass pass_instantiate_vir
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
@@ -5949,7 +5949,6 @@ struct rtl_opt_pass pass_thread_prologue
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   TODO_verify_flow,                     /* todo_flags_start */
-  TODO_dump_func |
   TODO_df_verify |
   TODO_df_finish | TODO_verify_rtl_sharing |
   TODO_ggc_collect                      /* todo_flags_finish */
@@ -6151,7 +6150,7 @@ struct rtl_opt_pass pass_match_asm_const
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func                       /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
Index: tree-vectorizer.c
===================================================================
--- tree-vectorizer.c	(revision 174759)
+++ tree-vectorizer.c	(working copy)
@@ -292,7 +292,6 @@ struct gimple_opt_pass pass_slp_vectoriz
   0,                                    /* todo_flags_start */
   TODO_ggc_collect
     | TODO_verify_ssa
-    | TODO_dump_func
     | TODO_update_ssa
     | TODO_verify_stmts                 /* todo_flags_finish */
  }
Index: ipa-split.c
===================================================================
--- ipa-split.c	(revision 174759)
+++ ipa-split.c	(working copy)
@@ -1432,7 +1432,7 @@ struct gimple_opt_pass pass_split_functi
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0             			/* todo_flags_finish */
  }
 };
 
@@ -1473,6 +1473,6 @@ struct gimple_opt_pass pass_feedback_spl
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0             			/* todo_flags_finish */
  }
 };
Index: gcse.c
===================================================================
--- gcse.c	(revision 174759)
+++ gcse.c	(working copy)
@@ -3772,7 +3772,6 @@ struct rtl_opt_pass pass_rtl_pre =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_verify_flow | TODO_ggc_collect   /* todo_flags_finish */
  }
 };
@@ -3793,10 +3792,8 @@ struct rtl_opt_pass pass_rtl_hoist =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_verify_flow | TODO_ggc_collect   /* todo_flags_finish */
  }
 };
 
 #include "gt-gcse.h"
-
Index: tree-if-conv.c
===================================================================
--- tree-if-conv.c	(revision 174759)
+++ tree-if-conv.c	(working copy)
@@ -1808,7 +1808,7 @@ struct gimple_opt_pass pass_if_conversio
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_stmts | TODO_verify_flow
+  TODO_verify_stmts | TODO_verify_flow
                                         /* todo_flags_finish */
  }
 };
Index: init-regs.c
===================================================================
--- init-regs.c	(revision 174759)
+++ init-regs.c	(working copy)
@@ -153,7 +153,6 @@ struct rtl_opt_pass pass_initialize_regs
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_df_finish                        /* todo_flags_finish */
  }
 };
Index: tree-ssa-phiopt.c
===================================================================
--- tree-ssa-phiopt.c	(revision 174759)
+++ tree-ssa-phiopt.c	(working copy)
@@ -1588,8 +1588,7 @@ struct gimple_opt_pass pass_phiopt =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func
-    | TODO_ggc_collect
+  TODO_ggc_collect
     | TODO_verify_ssa
     | TODO_verify_flow
     | TODO_verify_stmts	 		/* todo_flags_finish */
@@ -1617,8 +1616,7 @@ struct gimple_opt_pass pass_cselim =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func
-    | TODO_ggc_collect
+  TODO_ggc_collect
     | TODO_verify_ssa
     | TODO_verify_flow
     | TODO_verify_stmts	 		/* todo_flags_finish */
Index: implicit-zee.c
===================================================================
--- implicit-zee.c	(revision 174759)
+++ implicit-zee.c	(working copy)
@@ -988,7 +988,6 @@ struct rtl_opt_pass pass_implicit_zee =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_ggc_collect |
-  TODO_dump_func |
   TODO_verify_rtl_sharing,              /* todo_flags_finish */
  }
 };
Index: lower-subreg.c
===================================================================
--- lower-subreg.c	(revision 174759)
+++ lower-subreg.c	(working copy)
@@ -1370,7 +1370,6 @@ struct rtl_opt_pass pass_lower_subreg =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_ggc_collect |
   TODO_verify_flow                      /* todo_flags_finish */
  }
@@ -1392,7 +1391,6 @@ struct rtl_opt_pass pass_lower_subreg2 =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_ggc_collect |
   TODO_verify_flow                      /* todo_flags_finish */
  }
Index: bt-load.c
===================================================================
--- bt-load.c	(revision 174759)
+++ bt-load.c	(working copy)
@@ -1519,7 +1519,6 @@ struct rtl_opt_pass pass_branch_target_l
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_verify_rtl_sharing |
   TODO_ggc_collect,                     /* todo_flags_finish */
  }
@@ -1569,7 +1568,6 @@ struct rtl_opt_pass pass_branch_target_l
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_ggc_collect,                     /* todo_flags_finish */
  }
 };
Index: tree-dfa.c
===================================================================
--- tree-dfa.c	(revision 174759)
+++ tree-dfa.c	(working copy)
@@ -113,8 +113,8 @@ struct gimple_opt_pass pass_referenced_v
   PROP_gimple_leh | PROP_cfg,		/* properties_required */
   PROP_referenced_vars,			/* properties_provided */
   0,					/* properties_destroyed */
-  TODO_dump_func,			/* todo_flags_start */
-  TODO_dump_func                        /* todo_flags_finish */
+  0,                     		/* todo_flags_start */
+  0                                     /* todo_flags_finish */
  }
 };
 
@@ -1000,4 +1000,3 @@ stmt_references_abnormal_ssa_name (gimpl
 
   return false;
 }
-
Index: except.c
===================================================================
--- except.c	(revision 174759)
+++ except.c	(working copy)
@@ -1468,7 +1468,7 @@ struct rtl_opt_pass pass_rtl_eh =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 \f
@@ -1910,7 +1910,7 @@ struct rtl_opt_pass pass_set_nothrow_fun
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func,                       /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
@@ -2665,7 +2665,7 @@ struct rtl_opt_pass pass_convert_to_eh_r
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func,			/* todo_flags_finish */
+  0              			/* todo_flags_finish */
  }
 };
 \f
Index: emit-rtl.c
===================================================================
--- emit-rtl.c	(revision 174759)
+++ emit-rtl.c	(working copy)
@@ -2413,7 +2413,7 @@ struct rtl_opt_pass pass_unshare_all_rtl
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing /* todo_flags_finish */
+  TODO_verify_rtl_sharing               /* todo_flags_finish */
  }
 };
 
Index: store-motion.c
===================================================================
--- store-motion.c	(revision 174759)
+++ store-motion.c	(working copy)
@@ -1258,8 +1258,6 @@ struct rtl_opt_pass pass_rtl_store_motio
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_verify_flow | TODO_ggc_collect   /* todo_flags_finish */
  }
 };
-
Index: cfgexpand.c
===================================================================
--- cfgexpand.c	(revision 174759)
+++ cfgexpand.c	(working copy)
@@ -4269,7 +4269,6 @@ struct rtl_opt_pass pass_expand =
   PROP_ssa | PROP_trees,		/* properties_destroyed */
   TODO_verify_ssa | TODO_verify_flow
     | TODO_verify_stmts,		/* todo_flags_start */
-  TODO_dump_func
-  | TODO_ggc_collect			/* todo_flags_finish */
+  TODO_ggc_collect			/* todo_flags_finish */
  }
 };
Index: tree-cfgcleanup.c
===================================================================
--- tree-cfgcleanup.c	(revision 174759)
+++ tree-cfgcleanup.c	(working copy)
@@ -1054,7 +1054,7 @@ struct gimple_opt_pass pass_merge_phi =
   0,				/* properties_provided */
   0,				/* properties_destroyed */
   0,				/* todo_flags_start */
-  TODO_dump_func | TODO_ggc_collect	/* todo_flags_finish */
+  TODO_ggc_collect      	/* todo_flags_finish */
   | TODO_verify_ssa
  }
 };
Index: cfgcleanup.c
===================================================================
--- cfgcleanup.c	(revision 174759)
+++ cfgcleanup.c	(working copy)
@@ -2989,8 +2989,6 @@ struct rtl_opt_pass pass_jump2 =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   TODO_ggc_collect,                     /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing,/* todo_flags_finish */
+  TODO_verify_rtl_sharing,              /* todo_flags_finish */
  }
 };
-
-
Index: tree-ssa-pre.c
===================================================================
--- tree-ssa-pre.c	(revision 174759)
+++ tree-ssa-pre.c	(working copy)
@@ -4978,7 +4978,7 @@ struct gimple_opt_pass pass_pre =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   TODO_rebuild_alias,			/* todo_flags_start */
-  TODO_update_ssa_only_virtuals | TODO_dump_func | TODO_ggc_collect
+  TODO_update_ssa_only_virtuals  | TODO_ggc_collect
   | TODO_verify_ssa /* todo_flags_finish */
  }
 };
@@ -5013,6 +5013,6 @@ struct gimple_opt_pass pass_fre =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_ggc_collect | TODO_verify_ssa /* todo_flags_finish */
+  TODO_ggc_collect | TODO_verify_ssa /* todo_flags_finish */
  }
 };
Index: tree-sra.c
===================================================================
--- tree-sra.c	(revision 174759)
+++ tree-sra.c	(working copy)
@@ -3110,8 +3110,7 @@ struct gimple_opt_pass pass_sra_early =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func
-  | TODO_update_ssa
+  TODO_update_ssa
   | TODO_ggc_collect
   | TODO_verify_ssa			/* todo_flags_finish */
  }
@@ -3132,8 +3131,7 @@ struct gimple_opt_pass pass_sra =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   TODO_update_address_taken,		/* todo_flags_start */
-  TODO_dump_func
-  | TODO_update_ssa
+  TODO_update_ssa
   | TODO_ggc_collect
   | TODO_verify_ssa			/* todo_flags_finish */
  }
@@ -4600,8 +4598,6 @@ struct gimple_opt_pass pass_early_ipa_sr
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_dump_cgraph 	/* todo_flags_finish */
+  TODO_dump_cgraph              	/* todo_flags_finish */
  }
 };
-
-
Index: tree-mudflap.c
===================================================================
--- tree-mudflap.c	(revision 174759)
+++ tree-mudflap.c	(working copy)
@@ -1389,7 +1389,7 @@ struct gimple_opt_pass pass_mudflap_1 =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
@@ -1409,7 +1409,7 @@ struct gimple_opt_pass pass_mudflap_2 =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_verify_flow | TODO_verify_stmts
-  | TODO_dump_func | TODO_update_ssa    /* todo_flags_finish */
+  | TODO_update_ssa                     /* todo_flags_finish */
  }
 };
 
Index: tree-ssa-copy.c
===================================================================
--- tree-ssa-copy.c	(revision 174759)
+++ tree-ssa-copy.c	(working copy)
@@ -848,7 +848,6 @@ struct gimple_opt_pass pass_copy_prop =
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
   TODO_cleanup_cfg
-    | TODO_dump_func
     | TODO_ggc_collect
     | TODO_verify_ssa
     | TODO_update_ssa			/* todo_flags_finish */
Index: cfglayout.c
===================================================================
--- cfglayout.c	(revision 174759)
+++ cfglayout.c	(working copy)
@@ -378,7 +378,7 @@ struct rtl_opt_pass pass_into_cfg_layout
   PROP_cfglayout,                       /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func,                       /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
@@ -397,7 +397,7 @@ struct rtl_opt_pass pass_outof_cfg_layou
   0,                                    /* properties_provided */
   PROP_cfglayout,                       /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func,                       /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 \f
Index: tree-ssa-forwprop.c
===================================================================
--- tree-ssa-forwprop.c	(revision 174759)
+++ tree-ssa-forwprop.c	(working copy)
@@ -2420,10 +2420,8 @@ struct gimple_opt_pass pass_forwprop =
   0,				/* properties_provided */
   0,				/* properties_destroyed */
   0,				/* todo_flags_start */
-  TODO_dump_func
-  | TODO_ggc_collect
+  TODO_ggc_collect
   | TODO_update_ssa
   | TODO_verify_ssa		/* todo_flags_finish */
  }
 };
-
Index: tree-ssa-dce.c
===================================================================
--- tree-ssa-dce.c	(revision 174759)
+++ tree-ssa-dce.c	(working copy)
@@ -1527,7 +1527,7 @@ struct gimple_opt_pass pass_dce =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_ssa	/* todo_flags_finish */
+  TODO_verify_ssa	                /* todo_flags_finish */
  }
 };
 
@@ -1546,7 +1546,7 @@ struct gimple_opt_pass pass_dce_loop =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_ssa	/* todo_flags_finish */
+  TODO_verify_ssa	                /* todo_flags_finish */
  }
 };
 
@@ -1565,7 +1565,7 @@ struct gimple_opt_pass pass_cd_dce =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_ssa
+  TODO_verify_ssa
   | TODO_verify_flow			/* todo_flags_finish */
  }
 };
Index: ira.c
===================================================================
--- ira.c	(revision 174759)
+++ ira.c	(working copy)
@@ -3806,7 +3806,6 @@ struct rtl_opt_pass pass_ira =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
 };
Index: tree-ssa.c
===================================================================
--- tree-ssa.c	(revision 174759)
+++ tree-ssa.c	(working copy)
@@ -2277,7 +2277,6 @@ struct gimple_opt_pass pass_update_addre
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_update_address_taken
-  | TODO_dump_func			/* todo_flags_finish */
+  TODO_update_address_taken             /* todo_flags_finish */
  }
 };
Index: integrate.c
===================================================================
--- integrate.c	(revision 174759)
+++ integrate.c	(working copy)
@@ -325,7 +325,7 @@ struct rtl_opt_pass pass_initial_value_s
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
Index: tree-optimize.c
===================================================================
--- tree-optimize.c	(revision 174759)
+++ tree-optimize.c	(working copy)
@@ -208,8 +208,7 @@ struct gimple_opt_pass pass_cleanup_cfg_
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
-    | TODO_remove_unused_locals
+  TODO_remove_unused_locals             /* todo_flags_finish */
  }
 };
 
Index: tree-ssa-phiprop.c
===================================================================
--- tree-ssa-phiprop.c	(revision 174759)
+++ tree-ssa-phiprop.c	(working copy)
@@ -426,8 +426,7 @@ struct gimple_opt_pass pass_phiprop =
   0,				/* properties_provided */
   0,				/* properties_destroyed */
   0,				/* todo_flags_start */
-  TODO_dump_func
-  | TODO_ggc_collect
+  TODO_ggc_collect
   | TODO_update_ssa
   | TODO_verify_ssa		/* todo_flags_finish */
  }
Index: tree-object-size.c
===================================================================
--- tree-object-size.c	(revision 174759)
+++ tree-object-size.c	(working copy)
@@ -1282,6 +1282,6 @@ struct gimple_opt_pass pass_object_sizes
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_ssa	/* todo_flags_finish */
+  TODO_verify_ssa	                /* todo_flags_finish */
  }
 };
Index: combine.c
===================================================================
--- combine.c	(revision 174759)
+++ combine.c	(working copy)
@@ -13944,7 +13944,6 @@ struct rtl_opt_pass pass_combine =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_df_finish | TODO_verify_rtl_sharing |
   TODO_ggc_collect,                     /* todo_flags_finish */
  }
Index: bb-reorder.c
===================================================================
--- bb-reorder.c	(revision 174759)
+++ bb-reorder.c	(working copy)
@@ -2117,7 +2117,7 @@ struct rtl_opt_pass pass_duplicate_compu
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing,/* todo_flags_finish */
+  TODO_verify_rtl_sharing,/* todo_flags_finish */
  }
 };
 
@@ -2260,7 +2260,7 @@ struct rtl_opt_pass pass_reorder_blocks 
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing,/* todo_flags_finish */
+  TODO_verify_rtl_sharing,              /* todo_flags_finish */
  }
 };
 
@@ -2300,6 +2300,6 @@ struct rtl_opt_pass pass_partition_block
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing/* todo_flags_finish */
+  TODO_verify_rtl_sharing               /* todo_flags_finish */
  }
 };
Index: cprop.c
===================================================================
--- cprop.c	(revision 174759)
+++ cprop.c	(working copy)
@@ -1878,8 +1878,6 @@ struct rtl_opt_pass pass_rtl_cprop =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_verify_flow | TODO_ggc_collect   /* todo_flags_finish */
  }
 };
-
Index: var-tracking.c
===================================================================
--- var-tracking.c	(revision 174759)
+++ var-tracking.c	(working copy)
@@ -9131,6 +9131,6 @@ struct rtl_opt_pass pass_variable_tracki
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing/* todo_flags_finish */
+  TODO_verify_rtl_sharing               /* todo_flags_finish */
  }
 };
Index: tree-profile.c
===================================================================
--- tree-profile.c	(revision 174759)
+++ tree-profile.c	(working copy)
@@ -590,7 +590,7 @@ struct simple_ipa_opt_pass pass_ipa_tree
   0,                                   /* properties_provided */
   0,                                   /* properties_destroyed */
   0,                                   /* todo_flags_start */
-  TODO_dump_func                       /* todo_flags_finish */
+  0                                    /* todo_flags_finish */
  }
 };
 
Index: tree-vect-generic.c
===================================================================
--- tree-vect-generic.c	(revision 174759)
+++ tree-vect-generic.c	(working copy)
@@ -658,7 +658,7 @@ struct gimple_opt_pass pass_lower_vector
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_update_ssa	/* todo_flags_finish */
+  TODO_update_ssa	                /* todo_flags_finish */
     | TODO_verify_ssa
     | TODO_verify_stmts | TODO_verify_flow
  }
@@ -679,7 +679,7 @@ struct gimple_opt_pass pass_lower_vector
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_update_ssa	/* todo_flags_finish */
+  TODO_update_ssa	                /* todo_flags_finish */
     | TODO_verify_ssa
     | TODO_verify_stmts | TODO_verify_flow
  }
Index: reg-stack.c
===================================================================
--- reg-stack.c	(revision 174759)
+++ reg-stack.c	(working copy)
@@ -3352,7 +3352,6 @@ struct rtl_opt_pass pass_stack_regs_run 
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
 };
Index: sched-rgn.c
===================================================================
--- sched-rgn.c	(revision 174759)
+++ sched-rgn.c	(working copy)
@@ -3551,7 +3551,6 @@ struct rtl_opt_pass pass_sched =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_verify_flow |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
@@ -3573,7 +3572,6 @@ struct rtl_opt_pass pass_sched2 =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_verify_flow |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
Index: tree-ssa-structalias.c
===================================================================
--- tree-ssa-structalias.c	(revision 174759)
+++ tree-ssa-structalias.c	(working copy)
@@ -6634,7 +6634,7 @@ struct gimple_opt_pass pass_build_alias 
   0,			    /* properties_provided */
   0,                        /* properties_destroyed */
   0,                        /* todo_flags_start */
-  TODO_rebuild_alias | TODO_dump_func  /* todo_flags_finish */
+  TODO_rebuild_alias        /* todo_flags_finish */
  }
 };
 
@@ -6656,7 +6656,7 @@ struct gimple_opt_pass pass_build_ealias
   0,			    /* properties_provided */
   0,                        /* properties_destroyed */
   0,                        /* todo_flags_start */
-  TODO_rebuild_alias | TODO_dump_func  /* todo_flags_finish */
+  TODO_rebuild_alias        /* todo_flags_finish */
  }
 };
 
Index: tree-switch-conversion.c
===================================================================
--- tree-switch-conversion.c	(revision 174759)
+++ tree-switch-conversion.c	(working copy)
@@ -1028,7 +1028,7 @@ struct gimple_opt_pass pass_convert_swit
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_update_ssa | TODO_dump_func
+  TODO_update_ssa 
   | TODO_ggc_collect | TODO_verify_ssa  /* todo_flags_finish */
  }
 };
Index: tree-cfg.c
===================================================================
--- tree-cfg.c	(revision 174759)
+++ tree-cfg.c	(working copy)
@@ -261,8 +261,7 @@ struct gimple_opt_pass pass_build_cfg =
   PROP_cfg,				/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_verify_stmts | TODO_cleanup_cfg
-  | TODO_dump_func			/* todo_flags_finish */
+  TODO_verify_stmts | TODO_cleanup_cfg  /* todo_flags_finish */
  }
 };
 
@@ -7234,7 +7233,7 @@ struct gimple_opt_pass pass_split_crit_e
   PROP_no_crit_edges,            /* properties_provided */
   0,                             /* properties_destroyed */
   0,                             /* todo_flags_start */
-  TODO_dump_func | TODO_verify_flow  /* todo_flags_finish */
+  TODO_verify_flow               /* todo_flags_finish */
  }
 };
 
Index: passes.c
===================================================================
--- passes.c	(revision 174762)
+++ passes.c	(working copy)
@@ -128,6 +128,8 @@ int dump_flags;
 bool in_gimple_form;
 bool first_pass_instance;
 
+static FILE *dump_file_start, *dump_file_before, *dump_file_after, *dump_file_finish;
+
 
 /* This is called from various places for FUNCTION_DECL, VAR_DECL,
    and TYPE_DECL nodes.
@@ -1485,16 +1487,81 @@ do_per_function_toporder (void (*callbac
   nnodes = 0;
 }
 
+
+static FILE *
+get_ir_dump_file (bool is_start_todo, bool before_todo)
+{
+  if (is_start_todo && before_todo)
+    return dump_file_start;
+
+  if (is_start_todo && !before_todo)
+    return dump_file_before;
+
+  if (!is_start_todo && before_todo)
+    return dump_file_after;
+
+  if (!is_start_todo && !before_todo)
+    return dump_file_finish;
+
+  return dump_file;
+}
+
+/* Helper function to dump function IR.  */
+
+static void
+do_function_ir_dump (bool is_start_todo, bool before_todo)
+{
+  FILE *df = get_ir_dump_file (is_start_todo, before_todo);
+
+  if (df && current_function_decl)
+    {
+      if (cfun->curr_properties & PROP_trees)
+        dump_function_to_file (current_function_decl, df, dump_flags);
+      else
+	{
+	  if (dump_flags & TDF_SLIM)
+	    print_rtl_slim_with_bb (df, get_insns (), dump_flags);
+	  else if ((cfun->curr_properties & PROP_cfg)
+		   && (dump_flags & TDF_BLOCKS))
+	    print_rtl_with_bb (df, get_insns ());
+          else
+	    print_rtl (df, get_insns ());
+
+	  if ((cfun->curr_properties & PROP_cfg)
+	      && graph_dump_format != no_graph
+	      && (dump_flags & TDF_GRAPH))
+	    print_rtl_graph_with_bb (dump_file_name, get_insns ());
+	}
+
+      /* Flush the file.  If verification fails, we won't be able to
+	 close the file before aborting.  */
+      fflush (df);
+    }
+}
+
+struct todo_flags
+{
+  int flags;
+  bool is_start_todo;
+};
+
 /* Perform all TODO actions that ought to be done on each function.  */
 
 static void
 execute_function_todo (void *data)
 {
-  unsigned int flags = (size_t)data;
+  struct todo_flags *todo_flags_p = (struct todo_flags *)data;
+  unsigned int flags = todo_flags_p->flags;
+
   flags &= ~cfun->last_verified;
-  if (!flags)
+  if (!flags && !dump_file)
     return;
 
+  if (dump_file
+      && ((todo_flags_p->is_start_todo && (dump_flags & TDF_START))
+      || (!todo_flags_p->is_start_todo && (dump_flags & TDF_AFTER))))
+    do_function_ir_dump (todo_flags_p->is_start_todo, true);
+
   /* Always cleanup the CFG before trying to update SSA.  */
   if (flags & TODO_cleanup_cfg)
     {
@@ -1531,31 +1598,6 @@ execute_function_todo (void *data)
   if (flags & TODO_remove_unused_locals)
     remove_unused_locals ();
 
-  if ((flags & TODO_dump_func) && dump_file && current_function_decl)
-    {
-      if (cfun->curr_properties & PROP_trees)
-        dump_function_to_file (current_function_decl, dump_file, dump_flags);
-      else
-	{
-	  if (dump_flags & TDF_SLIM)
-	    print_rtl_slim_with_bb (dump_file, get_insns (), dump_flags);
-	  else if ((cfun->curr_properties & PROP_cfg)
-		   && (dump_flags & TDF_BLOCKS))
-	    print_rtl_with_bb (dump_file, get_insns ());
-          else
-	    print_rtl (dump_file, get_insns ());
-
-	  if ((cfun->curr_properties & PROP_cfg)
-	      && graph_dump_format != no_graph
-	      && (dump_flags & TDF_GRAPH))
-	    print_rtl_graph_with_bb (dump_file_name, get_insns ());
-	}
-
-      /* Flush the file.  If verification fails, we won't be able to
-	 close the file before aborting.  */
-      fflush (dump_file);
-    }
-
   if (flags & TODO_rebuild_frequencies)
     rebuild_frequencies ();
 
@@ -1580,13 +1622,20 @@ execute_function_todo (void *data)
     verify_rtl_sharing ();
 #endif
 
+  if (dump_file
+      && ((todo_flags_p->is_start_todo && (dump_flags & TDF_BEFORE))
+          || (!todo_flags_p->is_start_todo)))
+    do_function_ir_dump (todo_flags_p->is_start_todo, false);
+
   cfun->last_verified = flags & TODO_verify_all;
 }
 
 /* Perform all TODO actions.  */
 static void
-execute_todo (unsigned int flags)
+execute_todo (unsigned int flags, bool is_start_todo)
 {
+  struct todo_flags todo_flags;
+
 #if defined ENABLE_CHECKING
   if (cfun
       && need_ssa_update_p (cfun))
@@ -1600,7 +1649,10 @@ execute_todo (unsigned int flags)
 
   statistics_fini_pass ();
 
-  do_per_function (execute_function_todo, (void *)(size_t) flags);
+  todo_flags.flags = flags;
+  todo_flags.is_start_todo = is_start_todo;
+
+  do_per_function (execute_function_todo, &todo_flags);
 
   /* Always remove functions just as before inlining: IPA passes might be
      interested to see bodies of extern inline functions that are not inlined
@@ -1661,6 +1713,44 @@ verify_curr_properties (void *data)
 }
 #endif
 
+static FILE *
+init_ir_dump_file (int where_flag, const char *suffix, const char *mode)
+{
+  if (dump_flags & where_flag)
+    {
+      char *dump_name = concat (dump_file_name, suffix, NULL);
+      FILE *stream = fopen (dump_name, mode);
+      if (!stream)
+        error ("could not open dump file %qs: %m", dump_name);
+      free (dump_name);
+      if (current_function_decl)
+        dump_function_header (stream, current_function_decl, dump_flags);
+      return stream;
+    }
+  else
+    return dump_file;
+}
+
+/* Helper function to set up file descriptors for IR dumps.  */
+
+static void
+pass_init_ir_dump_files (struct opt_pass *pass)
+{
+  struct dump_file_info *dfi;
+  const char *mode;
+
+  if (!dump_file)
+    return;
+
+  dfi = get_dump_file_info (pass->static_pass_number);
+  mode = dfi->state < 0 ? "w" : "a";
+
+  dump_file_start = init_ir_dump_file (TDF_START, ".start", mode);
+  dump_file_before = init_ir_dump_file (TDF_BEFORE, ".before", mode);
+  dump_file_after = init_ir_dump_file (TDF_AFTER, ".after", mode);
+  dump_file_finish = init_ir_dump_file (TDF_FINISH, ".finish", mode);
+}
+
 /* Initialize pass dump file.  */
 /* This is non-static so that the plugins can use it.  */
 
@@ -1675,12 +1765,32 @@ pass_init_dump_file (struct opt_pass *pa
       dump_file = dump_begin (pass->static_pass_number, &dump_flags);
       if (dump_file && current_function_decl)
         dump_function_header (dump_file, current_function_decl, dump_flags);
+
+      if (dump_file)
+        pass_init_ir_dump_files (pass);
       return initializing_dump;
     }
   else
     return false;
 }
 
+static void
+close_ir_dump_file (void)
+{
+  if (dump_file_start != dump_file)
+    fclose (dump_file_start);
+  dump_file_start = NULL;
+  if (dump_file_before != dump_file)
+    fclose (dump_file_before);
+  dump_file_before = NULL;
+  if (dump_file_after != dump_file)
+    fclose (dump_file_after);
+  dump_file_after = NULL;
+  if (dump_file_finish != dump_file)
+    fclose (dump_file_finish);
+  dump_file_finish = NULL;
+}
+
 /* Flush PASS dump file.  */
 /* This is non-static so that plugins can use it.  */
 
@@ -1688,6 +1798,7 @@ void
 pass_fini_dump_file (struct opt_pass *pass)
 {
   /* Flush and close dump file.  */
+  close_ir_dump_file ();
   if (dump_file_name)
     {
       free (CONST_CAST (char *, dump_file_name));
@@ -1764,7 +1875,7 @@ execute_one_ipa_transform_pass (struct c
   pass_init_dump_file (pass);
 
   /* Run pre-pass verification.  */
-  execute_todo (ipa_pass->function_transform_todo_flags_start);
+  execute_todo (ipa_pass->function_transform_todo_flags_start, true);
 
   /* If a timevar is present, start it.  */
   if (pass->tv_id != TV_NONE)
@@ -1778,7 +1889,7 @@ execute_one_ipa_transform_pass (struct c
     timevar_pop (pass->tv_id);
 
   /* Run post-pass cleanup and verification.  */
-  execute_todo (todo_after);
+  execute_todo (todo_after, false);
   verify_interpass_invariants ();
 
   pass_fini_dump_file (pass);
@@ -1882,7 +1993,7 @@ execute_one_pass (struct opt_pass *pass)
   initializing_dump = pass_init_dump_file (pass);
 
   /* Run pre-pass verification.  */
-  execute_todo (pass->todo_flags_start);
+  execute_todo (pass->todo_flags_start, true);
 
 #ifdef ENABLE_CHECKING
   do_per_function (verify_curr_properties,
@@ -1919,7 +2030,7 @@ execute_one_pass (struct opt_pass *pass)
     }
 
   /* Run post-pass cleanup and verification.  */
-  execute_todo (todo_after | pass->todo_flags_finish);
+  execute_todo (todo_after | pass->todo_flags_finish, false);
   verify_interpass_invariants ();
   if (pass->type == IPA_PASS)
     {
Index: tree-ssa-reassoc.c
===================================================================
--- tree-ssa-reassoc.c	(revision 174759)
+++ tree-ssa-reassoc.c	(working copy)
@@ -2299,8 +2299,6 @@ struct gimple_opt_pass pass_reassoc =
   0,					/* todo_flags_start */
   TODO_verify_ssa
     | TODO_verify_flow
-    | TODO_dump_func
     | TODO_ggc_collect			/* todo_flags_finish */
  }
 };
-
Index: combine-stack-adj.c
===================================================================
--- combine-stack-adj.c	(revision 174759)
+++ combine-stack-adj.c	(working copy)
@@ -584,7 +584,6 @@ struct rtl_opt_pass pass_stack_adjustmen
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_ggc_collect,                     /* todo_flags_finish */
  }
 };
Index: dce.c
===================================================================
--- dce.c	(revision 174759)
+++ dce.c	(working copy)
@@ -785,7 +785,6 @@ struct rtl_opt_pass pass_ud_rtl_dce =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_df_finish | TODO_verify_rtl_sharing |
   TODO_ggc_collect                     /* todo_flags_finish */
  }
@@ -1137,7 +1136,6 @@ struct rtl_opt_pass pass_fast_rtl_dce =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_df_finish | TODO_verify_rtl_sharing |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
Index: tree-ssanames.c
===================================================================
--- tree-ssanames.c	(revision 174759)
+++ tree-ssanames.c	(working copy)
@@ -366,6 +366,6 @@ struct gimple_opt_pass pass_release_ssa_
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func 			/* todo_flags_finish */
+  0              			/* todo_flags_finish */
  }
 };
Index: regcprop.c
===================================================================
--- regcprop.c	(revision 174759)
+++ regcprop.c	(working copy)
@@ -1188,7 +1188,7 @@ struct rtl_opt_pass pass_cprop_hardreg =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_df_finish
+  TODO_df_finish
   | TODO_verify_rtl_sharing		/* todo_flags_finish */
  }
 };

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Dump before flag
  2011-06-07 23:24           ` Xinliang David Li
  2011-06-07 23:34             ` 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
  1 sibling, 2 replies; 30+ messages in thread
From: Richard Guenther @ 2011-06-08  9:29 UTC (permalink / raw)
  To: Xinliang David Li; +Cc: GCC Patches, Diego Novillo

On Wed, Jun 8, 2011 at 1:08 AM, Xinliang David Li <davidxl@google.com> wrote:
> The following is the patch that does the job. Most of the changes are
> just  removing TODO_dump_func. The major change is in passes.c and
> tree-pass.h.
>
> -fdump-xxx-yyy-start       <-- dump before TODO_start
> -fdump-xxx-yyy-before    <-- dump before main pass after TODO_pass
> -fdump-xxx-yyy-after       <-- dump after main pass before TODO_finish
> -fdump-xxx-yyy-finish      <-- dump after TODO_finish

Can we bikeshed a bit more about these names?  "start" and "before"
have no semantical difference to me ... as the dump before TODO_start
of a pass and the dump after TODO_finish of the previous pass are
identical (hopefully ;)), maybe merge those into a -between flag?
If you'd specify it for a single pass then you'd get both -start and -finish
(using your naming scheme).  Splitting that dump(s) to different files
then might make sense (not sure about the name to use).

Note that I find it extremely useful to have dumping done in
chronological order - splitting some of it to different files destroys
this, especially a dump after TODO_start or before TODO_finish
should appear in the same file (or we could also start splitting
individual TODO_ output into sub-dump-files).  I guess what would
be nice instread would be a fancy dump-file viewer that could
show diffs, hide things like SCEV output, etc.

I suppose a patch that removes the dump TODO and unconditionally
dumps at the current point would be a good preparation for this
enhancing patch.

Richard.

> The default is 'finish'.
>
> Does it look ok?
>
> Thanks,
>
> David
>
> On Tue, Jun 7, 2011 at 2:36 AM, Richard Guenther
> <richard.guenther@gmail.com> wrote:
>> On Mon, Jun 6, 2011 at 6:20 PM, Xinliang David Li <davidxl@google.com> wrote:
>>>>
>>>> Your patch doesn't really improve this but adds to the confusion.
>>>>
>>>> +  /* Override dump TODOs.  */
>>>> +  if (dump_file && (pass->todo_flags_finish & TODO_dump_func)
>>>> +      && (dump_flags & TDF_BEFORE))
>>>> +    {
>>>> +      pass->todo_flags_finish &= ~TODO_dump_func;
>>>> +      pass->todo_flags_start |= TODO_dump_func;
>>>> +    }
>>>>
>>>> and certainly writing to pass is not ok.  And the TDF_BEFORE flag
>>>> looks misplaced as it controls TODOs, not dumping behavior.
>>>> Yes, it's a mess right now but the above looks like a hack ontop
>>>> of that mess (maybe because of it, but well ...).
>>>>
>>>
>>> How about removing dumping TODO completely -- this can be done easily
>>> -- I don't understand why pass wants extra control on the dumping if
>>> user already asked for dumping -- it is annoying to see empty IR dump
>>> for a pass when I want to see it.
>>>
>>>> At least I would have expected to also get the dump after the
>>>> pass, not only the one before it with this dump flag.
>>>>
>>>> Now, why can't you look at the previous pass output for the
>>>> before-dump (as I do usually)?
>>>
>>> For one thing, you need to either remember what is the previous pass,
>>> or dump all passes which for large files can take very long time. Even
>>> with all the dumps, you will need to eyeballing to find the previous
>>> pass which may or may not have the IR dumped.
>>>
>>> How about removing dump TODO?
>>
>> Yeah, I think this would go in the right direction.  Currently some passes
>> do not dump function bodies because they presumably do no IL
>> modification.  But this is certainly the minority (and some passes do not
>> dump bodies even though they are modifying the IL ...).
>>
>> So I'd say we should by default dump function bodies.
>>
>> Note that there are three useful dumping positions (maybe four),
>> before todo-start, after todo-start, before todo-finish and after todo-finish.
>> By default we'd want after todo-finish.  When we no longer dump via
>> a TODO then we could indeed use dump-flags to control this
>> (maybe -original for the body before todo-start).
>>
>> What to others think?
>>
>> Richard.
>>
>>> Thanks,
>>>
>>> David
>>>
>>>
>>>>
>>>> Richard.
>>>>
>>>
>>
>

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Dump before flag
  2011-06-08  9:29             ` Richard Guenther
@ 2011-06-08 16:52               ` Xinliang David Li
  2011-06-08 17:14               ` Xinliang David Li
  1 sibling, 0 replies; 30+ messages in thread
From: Xinliang David Li @ 2011-06-08 16:52 UTC (permalink / raw)
  To: Richard Guenther; +Cc: GCC Patches, Diego Novillo

On Wed, Jun 8, 2011 at 2:06 AM, Richard Guenther
<richard.guenther@gmail.com> wrote:
> On Wed, Jun 8, 2011 at 1:08 AM, Xinliang David Li <davidxl@google.com> wrote:
>> The following is the patch that does the job. Most of the changes are
>> just  removing TODO_dump_func. The major change is in passes.c and
>> tree-pass.h.
>>
>> -fdump-xxx-yyy-start       <-- dump before TODO_start
>> -fdump-xxx-yyy-before    <-- dump before main pass after TODO_pass
>> -fdump-xxx-yyy-after       <-- dump after main pass before TODO_finish
>> -fdump-xxx-yyy-finish      <-- dump after TODO_finish
>
> Can we bikeshed a bit more about these names?

Yes.

>"start" and "before"
> have no semantical difference to me ... as the dump before TODO_start
> of a pass and the dump after TODO_finish of the previous pass are
> identical (hopefully ;)), maybe merge those into a -between flag?

But the key usefulness here is pass isolation -- you don't need to
know the phase ordering -- the 'before' and 'after' are relative to
the pass that is specified.

> If you'd specify it for a single pass then you'd get both -start and -finish
> (using your naming scheme).  Splitting that dump(s) to different files
> then might make sense (not sure about the name to use).
>

The only downside is it loses fine grain control --- e.g, split IR
emission for the any one of the dumping points (before start todo,
before pass, after pass, after finish todo) into a separate file when
that point is specified. The content of the default dumping remains
unchanged  unless the 'finish' point is specified explicitly. In
short, the patch I had has minimal impact on default behavior, just
adding the capability to extract clean IR into different files for
diffing purpose.


> Note that I find it extremely useful to have dumping done in
> chronological order - splitting some of it to different files destroys
> this, especially a dump after TODO_start or before TODO_finish
> should appear in the same file (or we could also start splitting
> individual TODO_ output into sub-dump-files).  I guess what would
> be nice instread would be a fancy dump-file viewer that could
> show diffs, hide things like SCEV output, etc.

I don't quite understand this comment.  The processing order of
functions are kept in the split files.The main purpose of splitting is
to ease diffing for any transformation -- and our current dump can be
really hard to parse :)

>
> I suppose a patch that removes the dump TODO and unconditionally
> dumps at the current point would be a good preparation for this
> enhancing patch.

Yes -- that can be done.

Thanks,

David

>
> Richard.
>
>> The default is 'finish'.
>>
>> Does it look ok?
>>
>> Thanks,
>>
>> David
>>
>> On Tue, Jun 7, 2011 at 2:36 AM, Richard Guenther
>> <richard.guenther@gmail.com> wrote:
>>> On Mon, Jun 6, 2011 at 6:20 PM, Xinliang David Li <davidxl@google.com> wrote:
>>>>>
>>>>> Your patch doesn't really improve this but adds to the confusion.
>>>>>
>>>>> +  /* Override dump TODOs.  */
>>>>> +  if (dump_file && (pass->todo_flags_finish & TODO_dump_func)
>>>>> +      && (dump_flags & TDF_BEFORE))
>>>>> +    {
>>>>> +      pass->todo_flags_finish &= ~TODO_dump_func;
>>>>> +      pass->todo_flags_start |= TODO_dump_func;
>>>>> +    }
>>>>>
>>>>> and certainly writing to pass is not ok.  And the TDF_BEFORE flag
>>>>> looks misplaced as it controls TODOs, not dumping behavior.
>>>>> Yes, it's a mess right now but the above looks like a hack ontop
>>>>> of that mess (maybe because of it, but well ...).
>>>>>
>>>>
>>>> How about removing dumping TODO completely -- this can be done easily
>>>> -- I don't understand why pass wants extra control on the dumping if
>>>> user already asked for dumping -- it is annoying to see empty IR dump
>>>> for a pass when I want to see it.
>>>>
>>>>> At least I would have expected to also get the dump after the
>>>>> pass, not only the one before it with this dump flag.
>>>>>
>>>>> Now, why can't you look at the previous pass output for the
>>>>> before-dump (as I do usually)?
>>>>
>>>> For one thing, you need to either remember what is the previous pass,
>>>> or dump all passes which for large files can take very long time. Even
>>>> with all the dumps, you will need to eyeballing to find the previous
>>>> pass which may or may not have the IR dumped.
>>>>
>>>> How about removing dump TODO?
>>>
>>> Yeah, I think this would go in the right direction.  Currently some passes
>>> do not dump function bodies because they presumably do no IL
>>> modification.  But this is certainly the minority (and some passes do not
>>> dump bodies even though they are modifying the IL ...).
>>>
>>> So I'd say we should by default dump function bodies.
>>>
>>> Note that there are three useful dumping positions (maybe four),
>>> before todo-start, after todo-start, before todo-finish and after todo-finish.
>>> By default we'd want after todo-finish.  When we no longer dump via
>>> a TODO then we could indeed use dump-flags to control this
>>> (maybe -original for the body before todo-start).
>>>
>>> What to others think?
>>>
>>> Richard.
>>>
>>>> Thanks,
>>>>
>>>> David
>>>>
>>>>
>>>>>
>>>>> Richard.
>>>>>
>>>>
>>>
>>
>

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Dump before flag
  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
  1 sibling, 1 reply; 30+ messages in thread
From: Xinliang David Li @ 2011-06-08 17:14 UTC (permalink / raw)
  To: Richard Guenther; +Cc: GCC Patches, Diego Novillo

On Wed, Jun 8, 2011 at 2:06 AM, Richard Guenther
<richard.guenther@gmail.com> wrote:
> On Wed, Jun 8, 2011 at 1:08 AM, Xinliang David Li <davidxl@google.com> wrote:
>> The following is the patch that does the job. Most of the changes are
>> just  removing TODO_dump_func. The major change is in passes.c and
>> tree-pass.h.
>>
>> -fdump-xxx-yyy-start       <-- dump before TODO_start
>> -fdump-xxx-yyy-before    <-- dump before main pass after TODO_pass
>> -fdump-xxx-yyy-after       <-- dump after main pass before TODO_finish
>> -fdump-xxx-yyy-finish      <-- dump after TODO_finish
>
> Can we bikeshed a bit more about these names?

These names may be less confusing:

before_preparation
before
after
after_cleanup

David

> "start" and "before"
> have no semantical difference to me ... as the dump before TODO_start
> of a pass and the dump after TODO_finish of the previous pass are
> identical (hopefully ;)), maybe merge those into a -between flag?
> If you'd specify it for a single pass then you'd get both -start and -finish
> (using your naming scheme).  Splitting that dump(s) to different files
> then might make sense (not sure about the name to use).
>
> Note that I find it extremely useful to have dumping done in
> chronological order - splitting some of it to different files destroys
> this, especially a dump after TODO_start or before TODO_finish
> should appear in the same file (or we could also start splitting
> individual TODO_ output into sub-dump-files).  I guess what would
> be nice instread would be a fancy dump-file viewer that could
> show diffs, hide things like SCEV output, etc.
>
> I suppose a patch that removes the dump TODO and unconditionally
> dumps at the current point would be a good preparation for this
> enhancing patch.
>
> Richard.
>
>> The default is 'finish'.
>>
>> Does it look ok?
>>
>> Thanks,
>>
>> David
>>
>> On Tue, Jun 7, 2011 at 2:36 AM, Richard Guenther
>> <richard.guenther@gmail.com> wrote:
>>> On Mon, Jun 6, 2011 at 6:20 PM, Xinliang David Li <davidxl@google.com> wrote:
>>>>>
>>>>> Your patch doesn't really improve this but adds to the confusion.
>>>>>
>>>>> +  /* Override dump TODOs.  */
>>>>> +  if (dump_file && (pass->todo_flags_finish & TODO_dump_func)
>>>>> +      && (dump_flags & TDF_BEFORE))
>>>>> +    {
>>>>> +      pass->todo_flags_finish &= ~TODO_dump_func;
>>>>> +      pass->todo_flags_start |= TODO_dump_func;
>>>>> +    }
>>>>>
>>>>> and certainly writing to pass is not ok.  And the TDF_BEFORE flag
>>>>> looks misplaced as it controls TODOs, not dumping behavior.
>>>>> Yes, it's a mess right now but the above looks like a hack ontop
>>>>> of that mess (maybe because of it, but well ...).
>>>>>
>>>>
>>>> How about removing dumping TODO completely -- this can be done easily
>>>> -- I don't understand why pass wants extra control on the dumping if
>>>> user already asked for dumping -- it is annoying to see empty IR dump
>>>> for a pass when I want to see it.
>>>>
>>>>> At least I would have expected to also get the dump after the
>>>>> pass, not only the one before it with this dump flag.
>>>>>
>>>>> Now, why can't you look at the previous pass output for the
>>>>> before-dump (as I do usually)?
>>>>
>>>> For one thing, you need to either remember what is the previous pass,
>>>> or dump all passes which for large files can take very long time. Even
>>>> with all the dumps, you will need to eyeballing to find the previous
>>>> pass which may or may not have the IR dumped.
>>>>
>>>> How about removing dump TODO?
>>>
>>> Yeah, I think this would go in the right direction.  Currently some passes
>>> do not dump function bodies because they presumably do no IL
>>> modification.  But this is certainly the minority (and some passes do not
>>> dump bodies even though they are modifying the IL ...).
>>>
>>> So I'd say we should by default dump function bodies.
>>>
>>> Note that there are three useful dumping positions (maybe four),
>>> before todo-start, after todo-start, before todo-finish and after todo-finish.
>>> By default we'd want after todo-finish.  When we no longer dump via
>>> a TODO then we could indeed use dump-flags to control this
>>> (maybe -original for the body before todo-start).
>>>
>>> What to others think?
>>>
>>> Richard.
>>>
>>>> Thanks,
>>>>
>>>> David
>>>>
>>>>
>>>>>
>>>>> Richard.
>>>>>
>>>>
>>>
>>
>

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Dump before flag
  2011-06-08 17:14               ` Xinliang David Li
@ 2011-06-08 23:15                 ` Xinliang David Li
  2011-06-09  9:28                   ` Richard Guenther
  0 siblings, 1 reply; 30+ messages in thread
From: Xinliang David Li @ 2011-06-08 23:15 UTC (permalink / raw)
  To: Richard Guenther; +Cc: GCC Patches, Diego Novillo

this is the patch that just removes the TODO_dump flag and forces it
to dump. The original code cfun->last_verified = flags &
TODO_verify_all looks weird -- depending on TODO_dump is set or not,
the behavior of the update is different (when no other todo flags is
set).

Ok for trunk?

David

On Wed, Jun 8, 2011 at 9:52 AM, Xinliang David Li <davidxl@google.com> wrote:
> On Wed, Jun 8, 2011 at 2:06 AM, Richard Guenther
> <richard.guenther@gmail.com> wrote:
>> On Wed, Jun 8, 2011 at 1:08 AM, Xinliang David Li <davidxl@google.com> wrote:
>>> The following is the patch that does the job. Most of the changes are
>>> just  removing TODO_dump_func. The major change is in passes.c and
>>> tree-pass.h.
>>>
>>> -fdump-xxx-yyy-start       <-- dump before TODO_start
>>> -fdump-xxx-yyy-before    <-- dump before main pass after TODO_pass
>>> -fdump-xxx-yyy-after       <-- dump after main pass before TODO_finish
>>> -fdump-xxx-yyy-finish      <-- dump after TODO_finish
>>
>> Can we bikeshed a bit more about these names?
>
> These names may be less confusing:
>
> before_preparation
> before
> after
> after_cleanup
>
> David
>
>> "start" and "before"
>> have no semantical difference to me ... as the dump before TODO_start
>> of a pass and the dump after TODO_finish of the previous pass are
>> identical (hopefully ;)), maybe merge those into a -between flag?
>> If you'd specify it for a single pass then you'd get both -start and -finish
>> (using your naming scheme).  Splitting that dump(s) to different files
>> then might make sense (not sure about the name to use).
>>
>> Note that I find it extremely useful to have dumping done in
>> chronological order - splitting some of it to different files destroys
>> this, especially a dump after TODO_start or before TODO_finish
>> should appear in the same file (or we could also start splitting
>> individual TODO_ output into sub-dump-files).  I guess what would
>> be nice instread would be a fancy dump-file viewer that could
>> show diffs, hide things like SCEV output, etc.
>>
>> I suppose a patch that removes the dump TODO and unconditionally
>> dumps at the current point would be a good preparation for this
>> enhancing patch.
>>
>> Richard.
>>
>>> The default is 'finish'.
>>>
>>> Does it look ok?
>>>
>>> Thanks,
>>>
>>> David
>>>
>>> On Tue, Jun 7, 2011 at 2:36 AM, Richard Guenther
>>> <richard.guenther@gmail.com> wrote:
>>>> On Mon, Jun 6, 2011 at 6:20 PM, Xinliang David Li <davidxl@google.com> wrote:
>>>>>>
>>>>>> Your patch doesn't really improve this but adds to the confusion.
>>>>>>
>>>>>> +  /* Override dump TODOs.  */
>>>>>> +  if (dump_file && (pass->todo_flags_finish & TODO_dump_func)
>>>>>> +      && (dump_flags & TDF_BEFORE))
>>>>>> +    {
>>>>>> +      pass->todo_flags_finish &= ~TODO_dump_func;
>>>>>> +      pass->todo_flags_start |= TODO_dump_func;
>>>>>> +    }
>>>>>>
>>>>>> and certainly writing to pass is not ok.  And the TDF_BEFORE flag
>>>>>> looks misplaced as it controls TODOs, not dumping behavior.
>>>>>> Yes, it's a mess right now but the above looks like a hack ontop
>>>>>> of that mess (maybe because of it, but well ...).
>>>>>>
>>>>>
>>>>> How about removing dumping TODO completely -- this can be done easily
>>>>> -- I don't understand why pass wants extra control on the dumping if
>>>>> user already asked for dumping -- it is annoying to see empty IR dump
>>>>> for a pass when I want to see it.
>>>>>
>>>>>> At least I would have expected to also get the dump after the
>>>>>> pass, not only the one before it with this dump flag.
>>>>>>
>>>>>> Now, why can't you look at the previous pass output for the
>>>>>> before-dump (as I do usually)?
>>>>>
>>>>> For one thing, you need to either remember what is the previous pass,
>>>>> or dump all passes which for large files can take very long time. Even
>>>>> with all the dumps, you will need to eyeballing to find the previous
>>>>> pass which may or may not have the IR dumped.
>>>>>
>>>>> How about removing dump TODO?
>>>>
>>>> Yeah, I think this would go in the right direction.  Currently some passes
>>>> do not dump function bodies because they presumably do no IL
>>>> modification.  But this is certainly the minority (and some passes do not
>>>> dump bodies even though they are modifying the IL ...).
>>>>
>>>> So I'd say we should by default dump function bodies.
>>>>
>>>> Note that there are three useful dumping positions (maybe four),
>>>> before todo-start, after todo-start, before todo-finish and after todo-finish.
>>>> By default we'd want after todo-finish.  When we no longer dump via
>>>> a TODO then we could indeed use dump-flags to control this
>>>> (maybe -original for the body before todo-start).
>>>>
>>>> What to others think?
>>>>
>>>> Richard.
>>>>
>>>>> Thanks,
>>>>>
>>>>> David
>>>>>
>>>>>
>>>>>>
>>>>>> Richard.
>>>>>>
>>>>>
>>>>
>>>
>>
>

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Dump before flag
  2011-06-08 23:15                 ` Xinliang David Li
@ 2011-06-09  9:28                   ` Richard Guenther
  2011-06-09 15:58                     ` Xinliang David Li
  0 siblings, 1 reply; 30+ messages in thread
From: Richard Guenther @ 2011-06-09  9:28 UTC (permalink / raw)
  To: Xinliang David Li; +Cc: GCC Patches, Diego Novillo

On Thu, Jun 9, 2011 at 12:31 AM, Xinliang David Li <davidxl@google.com> wrote:
> this is the patch that just removes the TODO_dump flag and forces it
> to dump. The original code cfun->last_verified = flags &
> TODO_verify_all looks weird -- depending on TODO_dump is set or not,
> the behavior of the update is different (when no other todo flags is
> set).
>
> Ok for trunk?

-ENOPATCH.

Richard.

> David
>
> On Wed, Jun 8, 2011 at 9:52 AM, Xinliang David Li <davidxl@google.com> wrote:
>> On Wed, Jun 8, 2011 at 2:06 AM, Richard Guenther
>> <richard.guenther@gmail.com> wrote:
>>> On Wed, Jun 8, 2011 at 1:08 AM, Xinliang David Li <davidxl@google.com> wrote:
>>>> The following is the patch that does the job. Most of the changes are
>>>> just  removing TODO_dump_func. The major change is in passes.c and
>>>> tree-pass.h.
>>>>
>>>> -fdump-xxx-yyy-start       <-- dump before TODO_start
>>>> -fdump-xxx-yyy-before    <-- dump before main pass after TODO_pass
>>>> -fdump-xxx-yyy-after       <-- dump after main pass before TODO_finish
>>>> -fdump-xxx-yyy-finish      <-- dump after TODO_finish
>>>
>>> Can we bikeshed a bit more about these names?
>>
>> These names may be less confusing:
>>
>> before_preparation
>> before
>> after
>> after_cleanup
>>
>> David
>>
>>> "start" and "before"
>>> have no semantical difference to me ... as the dump before TODO_start
>>> of a pass and the dump after TODO_finish of the previous pass are
>>> identical (hopefully ;)), maybe merge those into a -between flag?
>>> If you'd specify it for a single pass then you'd get both -start and -finish
>>> (using your naming scheme).  Splitting that dump(s) to different files
>>> then might make sense (not sure about the name to use).
>>>
>>> Note that I find it extremely useful to have dumping done in
>>> chronological order - splitting some of it to different files destroys
>>> this, especially a dump after TODO_start or before TODO_finish
>>> should appear in the same file (or we could also start splitting
>>> individual TODO_ output into sub-dump-files).  I guess what would
>>> be nice instread would be a fancy dump-file viewer that could
>>> show diffs, hide things like SCEV output, etc.
>>>
>>> I suppose a patch that removes the dump TODO and unconditionally
>>> dumps at the current point would be a good preparation for this
>>> enhancing patch.
>>>
>>> Richard.
>>>
>>>> The default is 'finish'.
>>>>
>>>> Does it look ok?
>>>>
>>>> Thanks,
>>>>
>>>> David
>>>>
>>>> On Tue, Jun 7, 2011 at 2:36 AM, Richard Guenther
>>>> <richard.guenther@gmail.com> wrote:
>>>>> On Mon, Jun 6, 2011 at 6:20 PM, Xinliang David Li <davidxl@google.com> wrote:
>>>>>>>
>>>>>>> Your patch doesn't really improve this but adds to the confusion.
>>>>>>>
>>>>>>> +  /* Override dump TODOs.  */
>>>>>>> +  if (dump_file && (pass->todo_flags_finish & TODO_dump_func)
>>>>>>> +      && (dump_flags & TDF_BEFORE))
>>>>>>> +    {
>>>>>>> +      pass->todo_flags_finish &= ~TODO_dump_func;
>>>>>>> +      pass->todo_flags_start |= TODO_dump_func;
>>>>>>> +    }
>>>>>>>
>>>>>>> and certainly writing to pass is not ok.  And the TDF_BEFORE flag
>>>>>>> looks misplaced as it controls TODOs, not dumping behavior.
>>>>>>> Yes, it's a mess right now but the above looks like a hack ontop
>>>>>>> of that mess (maybe because of it, but well ...).
>>>>>>>
>>>>>>
>>>>>> How about removing dumping TODO completely -- this can be done easily
>>>>>> -- I don't understand why pass wants extra control on the dumping if
>>>>>> user already asked for dumping -- it is annoying to see empty IR dump
>>>>>> for a pass when I want to see it.
>>>>>>
>>>>>>> At least I would have expected to also get the dump after the
>>>>>>> pass, not only the one before it with this dump flag.
>>>>>>>
>>>>>>> Now, why can't you look at the previous pass output for the
>>>>>>> before-dump (as I do usually)?
>>>>>>
>>>>>> For one thing, you need to either remember what is the previous pass,
>>>>>> or dump all passes which for large files can take very long time. Even
>>>>>> with all the dumps, you will need to eyeballing to find the previous
>>>>>> pass which may or may not have the IR dumped.
>>>>>>
>>>>>> How about removing dump TODO?
>>>>>
>>>>> Yeah, I think this would go in the right direction.  Currently some passes
>>>>> do not dump function bodies because they presumably do no IL
>>>>> modification.  But this is certainly the minority (and some passes do not
>>>>> dump bodies even though they are modifying the IL ...).
>>>>>
>>>>> So I'd say we should by default dump function bodies.
>>>>>
>>>>> Note that there are three useful dumping positions (maybe four),
>>>>> before todo-start, after todo-start, before todo-finish and after todo-finish.
>>>>> By default we'd want after todo-finish.  When we no longer dump via
>>>>> a TODO then we could indeed use dump-flags to control this
>>>>> (maybe -original for the body before todo-start).
>>>>>
>>>>> What to others think?
>>>>>
>>>>> Richard.
>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> David
>>>>>>
>>>>>>
>>>>>>>
>>>>>>> Richard.
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Dump before flag
  2011-06-09  9:28                   ` Richard Guenther
@ 2011-06-09 15:58                     ` Xinliang David Li
  2011-06-10  9:04                       ` Richard Guenther
  0 siblings, 1 reply; 30+ messages in thread
From: Xinliang David Li @ 2011-06-09 15:58 UTC (permalink / raw)
  To: Richard Guenther; +Cc: GCC Patches, Diego Novillo

[-- Attachment #1: Type: text/plain, Size: 5492 bytes --]

See attached.

Thanks,

David

On Thu, Jun 9, 2011 at 2:02 AM, Richard Guenther
<richard.guenther@gmail.com> wrote:
> On Thu, Jun 9, 2011 at 12:31 AM, Xinliang David Li <davidxl@google.com> wrote:
>> this is the patch that just removes the TODO_dump flag and forces it
>> to dump. The original code cfun->last_verified = flags &
>> TODO_verify_all looks weird -- depending on TODO_dump is set or not,
>> the behavior of the update is different (when no other todo flags is
>> set).
>>
>> Ok for trunk?
>
> -ENOPATCH.
>
> Richard.
>
>> David
>>
>> On Wed, Jun 8, 2011 at 9:52 AM, Xinliang David Li <davidxl@google.com> wrote:
>>> On Wed, Jun 8, 2011 at 2:06 AM, Richard Guenther
>>> <richard.guenther@gmail.com> wrote:
>>>> On Wed, Jun 8, 2011 at 1:08 AM, Xinliang David Li <davidxl@google.com> wrote:
>>>>> The following is the patch that does the job. Most of the changes are
>>>>> just  removing TODO_dump_func. The major change is in passes.c and
>>>>> tree-pass.h.
>>>>>
>>>>> -fdump-xxx-yyy-start       <-- dump before TODO_start
>>>>> -fdump-xxx-yyy-before    <-- dump before main pass after TODO_pass
>>>>> -fdump-xxx-yyy-after       <-- dump after main pass before TODO_finish
>>>>> -fdump-xxx-yyy-finish      <-- dump after TODO_finish
>>>>
>>>> Can we bikeshed a bit more about these names?
>>>
>>> These names may be less confusing:
>>>
>>> before_preparation
>>> before
>>> after
>>> after_cleanup
>>>
>>> David
>>>
>>>> "start" and "before"
>>>> have no semantical difference to me ... as the dump before TODO_start
>>>> of a pass and the dump after TODO_finish of the previous pass are
>>>> identical (hopefully ;)), maybe merge those into a -between flag?
>>>> If you'd specify it for a single pass then you'd get both -start and -finish
>>>> (using your naming scheme).  Splitting that dump(s) to different files
>>>> then might make sense (not sure about the name to use).
>>>>
>>>> Note that I find it extremely useful to have dumping done in
>>>> chronological order - splitting some of it to different files destroys
>>>> this, especially a dump after TODO_start or before TODO_finish
>>>> should appear in the same file (or we could also start splitting
>>>> individual TODO_ output into sub-dump-files).  I guess what would
>>>> be nice instread would be a fancy dump-file viewer that could
>>>> show diffs, hide things like SCEV output, etc.
>>>>
>>>> I suppose a patch that removes the dump TODO and unconditionally
>>>> dumps at the current point would be a good preparation for this
>>>> enhancing patch.
>>>>
>>>> Richard.
>>>>
>>>>> The default is 'finish'.
>>>>>
>>>>> Does it look ok?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> David
>>>>>
>>>>> On Tue, Jun 7, 2011 at 2:36 AM, Richard Guenther
>>>>> <richard.guenther@gmail.com> wrote:
>>>>>> On Mon, Jun 6, 2011 at 6:20 PM, Xinliang David Li <davidxl@google.com> wrote:
>>>>>>>>
>>>>>>>> Your patch doesn't really improve this but adds to the confusion.
>>>>>>>>
>>>>>>>> +  /* Override dump TODOs.  */
>>>>>>>> +  if (dump_file && (pass->todo_flags_finish & TODO_dump_func)
>>>>>>>> +      && (dump_flags & TDF_BEFORE))
>>>>>>>> +    {
>>>>>>>> +      pass->todo_flags_finish &= ~TODO_dump_func;
>>>>>>>> +      pass->todo_flags_start |= TODO_dump_func;
>>>>>>>> +    }
>>>>>>>>
>>>>>>>> and certainly writing to pass is not ok.  And the TDF_BEFORE flag
>>>>>>>> looks misplaced as it controls TODOs, not dumping behavior.
>>>>>>>> Yes, it's a mess right now but the above looks like a hack ontop
>>>>>>>> of that mess (maybe because of it, but well ...).
>>>>>>>>
>>>>>>>
>>>>>>> How about removing dumping TODO completely -- this can be done easily
>>>>>>> -- I don't understand why pass wants extra control on the dumping if
>>>>>>> user already asked for dumping -- it is annoying to see empty IR dump
>>>>>>> for a pass when I want to see it.
>>>>>>>
>>>>>>>> At least I would have expected to also get the dump after the
>>>>>>>> pass, not only the one before it with this dump flag.
>>>>>>>>
>>>>>>>> Now, why can't you look at the previous pass output for the
>>>>>>>> before-dump (as I do usually)?
>>>>>>>
>>>>>>> For one thing, you need to either remember what is the previous pass,
>>>>>>> or dump all passes which for large files can take very long time. Even
>>>>>>> with all the dumps, you will need to eyeballing to find the previous
>>>>>>> pass which may or may not have the IR dumped.
>>>>>>>
>>>>>>> How about removing dump TODO?
>>>>>>
>>>>>> Yeah, I think this would go in the right direction.  Currently some passes
>>>>>> do not dump function bodies because they presumably do no IL
>>>>>> modification.  But this is certainly the minority (and some passes do not
>>>>>> dump bodies even though they are modifying the IL ...).
>>>>>>
>>>>>> So I'd say we should by default dump function bodies.
>>>>>>
>>>>>> Note that there are three useful dumping positions (maybe four),
>>>>>> before todo-start, after todo-start, before todo-finish and after todo-finish.
>>>>>> By default we'd want after todo-finish.  When we no longer dump via
>>>>>> a TODO then we could indeed use dump-flags to control this
>>>>>> (maybe -original for the body before todo-start).
>>>>>>
>>>>>> What to others think?
>>>>>>
>>>>>> Richard.
>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>> David
>>>>>>>
>>>>>>>
>>>>>>>>
>>>>>>>> Richard.
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

[-- Attachment #2: TODO_dump_removal.p --]
[-- Type: text/x-pascal, Size: 71923 bytes --]

Index: tree-vrp.c
===================================================================
--- tree-vrp.c	(revision 174759)
+++ tree-vrp.c	(working copy)
@@ -7818,7 +7818,6 @@ struct gimple_opt_pass pass_vrp =
     | TODO_update_ssa
     | TODO_verify_ssa
     | TODO_verify_flow
-    | TODO_dump_func
     | TODO_ggc_collect			/* todo_flags_finish */
  }
 };
Index: regrename.c
===================================================================
--- regrename.c	(revision 174759)
+++ regrename.c	(working copy)
@@ -1453,7 +1453,6 @@ struct rtl_opt_pass pass_regrename =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
-
Index: fwprop.c
===================================================================
--- fwprop.c	(revision 174759)
+++ fwprop.c	(working copy)
@@ -1473,8 +1473,7 @@ struct rtl_opt_pass pass_rtl_fwprop =
   0,                                    /* todo_flags_start */
   TODO_df_finish
     | TODO_verify_flow
-    | TODO_verify_rtl_sharing
-    | TODO_dump_func                    /* todo_flags_finish */
+    | TODO_verify_rtl_sharing           /* todo_flags_finish */
  }
 };
 
@@ -1521,7 +1520,6 @@ struct rtl_opt_pass pass_rtl_fwprop_addr
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func                        /* todo_flags_finish */
+  TODO_df_finish | TODO_verify_rtl_sharing  /* todo_flags_finish */
  }
 };
Index: tree-into-ssa.c
===================================================================
--- tree-into-ssa.c	(revision 174759)
+++ tree-into-ssa.c	(working copy)
@@ -2413,8 +2413,7 @@ struct gimple_opt_pass pass_build_ssa =
   PROP_ssa,				/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func
-    | TODO_update_ssa_only_virtuals
+  TODO_update_ssa_only_virtuals
     | TODO_verify_ssa
     | TODO_remove_unused_locals		/* todo_flags_finish */
  }
Index: tree-complex.c
===================================================================
--- tree-complex.c	(revision 174759)
+++ tree-complex.c	(working copy)
@@ -1623,8 +1623,7 @@ struct gimple_opt_pass pass_lower_comple
   PROP_gimple_lcx,			/* properties_provided */
   0,                       		/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func
-    | TODO_ggc_collect
+    TODO_ggc_collect
     | TODO_update_ssa
     | TODO_verify_stmts	 		/* todo_flags_finish */
  }
@@ -1654,8 +1653,7 @@ struct gimple_opt_pass pass_lower_comple
   PROP_gimple_lcx,			/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func
-    | TODO_ggc_collect
+  TODO_ggc_collect
     | TODO_update_ssa
     | TODO_verify_stmts	 		/* todo_flags_finish */
  }
Index: tracer.c
===================================================================
--- tracer.c	(revision 174759)
+++ tracer.c	(working copy)
@@ -393,8 +393,7 @@ struct gimple_opt_pass pass_tracer =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func
-    | TODO_update_ssa
+  TODO_update_ssa
     | TODO_verify_ssa                   /* todo_flags_finish */
  }
 };
Index: tree-loop-distribution.c
===================================================================
--- tree-loop-distribution.c	(revision 174759)
+++ tree-loop-distribution.c	(working copy)
@@ -1313,6 +1313,6 @@ struct gimple_opt_pass pass_loop_distrib
   0,				/* properties_provided */
   0,				/* properties_destroyed */
   0,				/* todo_flags_start */
-  TODO_dump_func                /* todo_flags_finish */
+  0                             /* todo_flags_finish */
  }
 };
Index: postreload-gcse.c
===================================================================
--- postreload-gcse.c	(revision 174759)
+++ postreload-gcse.c	(working copy)
@@ -1344,8 +1344,7 @@ struct rtl_opt_pass pass_gcse2 =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing
+  TODO_verify_rtl_sharing
   | TODO_verify_flow | TODO_ggc_collect /* todo_flags_finish */
  }
 };
-
Index: postreload.c
===================================================================
--- postreload.c	(revision 174759)
+++ postreload.c	(working copy)
@@ -2287,6 +2287,6 @@ struct rtl_opt_pass pass_postreload_cse 
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
Index: tree-tailcall.c
===================================================================
--- tree-tailcall.c	(revision 174759)
+++ tree-tailcall.c	(working copy)
@@ -1092,7 +1092,7 @@ struct gimple_opt_pass pass_tail_recursi
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_ssa	/* todo_flags_finish */
+  TODO_verify_ssa	                /* todo_flags_finish */
  }
 };
 
@@ -1111,6 +1111,6 @@ struct gimple_opt_pass pass_tail_calls =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_ssa	/* todo_flags_finish */
+  TODO_verify_ssa	                /* todo_flags_finish */
  }
 };
Index: tree-ssa-loop-ch.c
===================================================================
--- tree-ssa-loop-ch.c	(revision 174759)
+++ tree-ssa-loop-ch.c	(working copy)
@@ -278,7 +278,6 @@ struct gimple_opt_pass pass_ch =
   0,					/* todo_flags_start */
   TODO_cleanup_cfg
     | TODO_verify_ssa
-    | TODO_verify_flow
-    | TODO_dump_func			/* todo_flags_finish */
+    | TODO_verify_flow			/* todo_flags_finish */
  }
 };
Index: ipa-cp.c
===================================================================
--- ipa-cp.c	(revision 174759)
+++ ipa-cp.c	(working copy)
@@ -1570,7 +1570,7 @@ struct ipa_opt_pass_d pass_ipa_cp =
   0,				/* properties_provided */
   0,				/* properties_destroyed */
   0,				/* todo_flags_start */
-  TODO_dump_cgraph | TODO_dump_func |
+  TODO_dump_cgraph |
   TODO_remove_functions | TODO_ggc_collect /* todo_flags_finish */
  },
  ipcp_generate_summary,			/* generate_summary */
Index: final.c
===================================================================
--- final.c	(revision 174759)
+++ final.c	(working copy)
@@ -837,7 +837,7 @@ struct rtl_opt_pass pass_compute_alignme
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing
+  TODO_verify_rtl_sharing
   | TODO_ggc_collect                    /* todo_flags_finish */
  }
 };
@@ -4337,7 +4337,7 @@ struct rtl_opt_pass pass_shorten_branche
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
Index: tree-emutls.c
===================================================================
--- tree-emutls.c	(revision 174759)
+++ tree-emutls.c	(working copy)
@@ -783,7 +783,7 @@ ipa_lower_emutls (void)
   VEC_free (tree, heap, access_vars);
   free_varpool_node_set (tls_vars);
 
-  return TODO_dump_func | TODO_ggc_collect | TODO_verify_all;
+  return TODO_ggc_collect | TODO_verify_all;
 }
 
 /* If the target supports TLS natively, we need do nothing here.  */
Index: omp-low.c
===================================================================
--- omp-low.c	(revision 174759)
+++ omp-low.c	(working copy)
@@ -5553,7 +5553,7 @@ struct gimple_opt_pass pass_expand_omp =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0                      		/* todo_flags_finish */
  }
 };
 \f
@@ -6730,7 +6730,7 @@ struct gimple_opt_pass pass_lower_omp =
   PROP_gimple_lomp,			/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 \f
Index: tree-ssa-dse.c
===================================================================
--- tree-ssa-dse.c	(revision 174759)
+++ tree-ssa-dse.c	(working copy)
@@ -352,9 +352,7 @@ struct gimple_opt_pass pass_dse =
   0,				/* properties_provided */
   0,				/* properties_destroyed */
   0,				/* todo_flags_start */
-  TODO_dump_func
-    | TODO_ggc_collect
+  TODO_ggc_collect
     | TODO_verify_ssa		/* todo_flags_finish */
  }
 };
-
Index: tree-ssa-uncprop.c
===================================================================
--- tree-ssa-uncprop.c	(revision 174759)
+++ tree-ssa-uncprop.c	(working copy)
@@ -596,7 +596,6 @@ struct gimple_opt_pass pass_uncprop =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_ssa	/* todo_flags_finish */
+  TODO_verify_ssa	                /* todo_flags_finish */
  }
 };
-
Index: auto-inc-dec.c
===================================================================
--- auto-inc-dec.c	(revision 174759)
+++ auto-inc-dec.c	(working copy)
@@ -1523,7 +1523,6 @@ struct rtl_opt_pass pass_inc_dec =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_df_finish,                       /* todo_flags_finish */
  }
 };
Index: reorg.c
===================================================================
--- reorg.c	(revision 174759)
+++ reorg.c	(working copy)
@@ -4086,7 +4086,6 @@ struct rtl_opt_pass pass_delay_slots =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
 };
@@ -4121,7 +4120,6 @@ struct rtl_opt_pass pass_machine_reorg =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
 };
Index: tree-ssa-copyrename.c
===================================================================
--- tree-ssa-copyrename.c	(revision 174759)
+++ tree-ssa-copyrename.c	(working copy)
@@ -399,6 +399,6 @@ struct gimple_opt_pass pass_rename_ssa_c
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_ssa      /* todo_flags_finish */
+  TODO_verify_ssa                       /* todo_flags_finish */
  }
 };
Index: tree-ssa-ccp.c
===================================================================
--- tree-ssa-ccp.c	(revision 174759)
+++ tree-ssa-ccp.c	(working copy)
@@ -1953,7 +1953,7 @@ struct gimple_opt_pass pass_ccp =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_ssa
+  TODO_verify_ssa
   | TODO_verify_stmts | TODO_ggc_collect/* todo_flags_finish */
  }
 };
@@ -2256,8 +2256,7 @@ struct gimple_opt_pass pass_fold_builtin
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func
-    | TODO_verify_ssa
+  TODO_verify_ssa
     | TODO_update_ssa			/* todo_flags_finish */
  }
 };
Index: compare-elim.c
===================================================================
--- compare-elim.c	(revision 174759)
+++ compare-elim.c	(working copy)
@@ -636,7 +636,6 @@ struct rtl_opt_pass pass_compare_elim_af
   TODO_df_finish
   | TODO_df_verify
   | TODO_verify_rtl_sharing
-  | TODO_dump_func
   | TODO_ggc_collect			/* todo_flags_finish */
  }
 };
Index: mode-switching.c
===================================================================
--- mode-switching.c	(revision 174759)
+++ mode-switching.c	(working copy)
@@ -772,6 +772,6 @@ struct rtl_opt_pass pass_mode_switching 
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
Index: modulo-sched.c
===================================================================
--- modulo-sched.c	(revision 174759)
+++ modulo-sched.c	(working copy)
@@ -2969,12 +2969,10 @@ struct rtl_opt_pass pass_sms =
   0,                                    /* properties_required */
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
-  TODO_dump_func,                       /* todo_flags_start */
+  0,                                    /* todo_flags_start */
   TODO_df_finish
     | TODO_verify_flow
     | TODO_verify_rtl_sharing
-    | TODO_dump_func
     | TODO_ggc_collect                  /* todo_flags_finish */
  }
 };
-
Index: tree-call-cdce.c
===================================================================
--- tree-call-cdce.c	(revision 174759)
+++ tree-call-cdce.c	(working copy)
@@ -928,6 +928,6 @@ struct gimple_opt_pass pass_call_cdce =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_ssa      /* todo_flags_finish */
+  TODO_verify_ssa                       /* todo_flags_finish */
  }
 };
Index: cse.c
===================================================================
--- cse.c	(revision 174759)
+++ cse.c	(working copy)
@@ -7414,7 +7414,6 @@ struct rtl_opt_pass pass_cse =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_ggc_collect |
   TODO_verify_flow,                     /* todo_flags_finish */
  }
@@ -7477,7 +7476,6 @@ struct rtl_opt_pass pass_cse2 =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_ggc_collect |
   TODO_verify_flow                      /* todo_flags_finish */
  }
@@ -7538,7 +7536,6 @@ struct rtl_opt_pass pass_cse_after_globa
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_ggc_collect |
   TODO_verify_flow                      /* todo_flags_finish */
  }
Index: web.c
===================================================================
--- web.c	(revision 174759)
+++ web.c	(working copy)
@@ -433,8 +433,6 @@ struct rtl_opt_pass pass_web =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func                        /* todo_flags_finish */
+  TODO_df_finish | TODO_verify_rtl_sharing  /* todo_flags_finish */
  }
 };
-
Index: tree-stdarg.c
===================================================================
--- tree-stdarg.c	(revision 174759)
+++ tree-stdarg.c	(working copy)
@@ -963,6 +963,6 @@ struct gimple_opt_pass pass_stdarg =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0             			/* todo_flags_finish */
  }
 };
Index: lto-streamer-out.c
===================================================================
--- lto-streamer-out.c	(revision 174759)
+++ lto-streamer-out.c	(working copy)
@@ -2297,7 +2297,7 @@ struct ipa_opt_pass_d pass_ipa_lto_gimpl
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,            			/* todo_flags_start */
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  },
  NULL,		                        /* generate_summary */
  lto_output,           			/* write_summary */
Index: tree-ssa-math-opts.c
===================================================================
--- tree-ssa-math-opts.c	(revision 174759)
+++ tree-ssa-math-opts.c	(working copy)
@@ -645,7 +645,7 @@ struct gimple_opt_pass pass_cse_reciproc
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_update_ssa | TODO_verify_ssa
+  TODO_update_ssa | TODO_verify_ssa
     | TODO_verify_stmts                /* todo_flags_finish */
  }
 };
@@ -1424,7 +1424,7 @@ struct gimple_opt_pass pass_cse_sincos =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_update_ssa | TODO_verify_ssa
+  TODO_update_ssa | TODO_verify_ssa
     | TODO_verify_stmts                 /* todo_flags_finish */
  }
 };
@@ -1851,7 +1851,7 @@ execute_optimize_bswap (void)
   statistics_counter_event (cfun, "64-bit bswap implementations found",
 			    bswap_stats.found_64bit);
 
-  return (changed ? TODO_dump_func | TODO_update_ssa | TODO_verify_ssa
+  return (changed ? TODO_update_ssa | TODO_verify_ssa
 	  | TODO_verify_stmts : 0);
 }
 
@@ -2404,7 +2404,6 @@ struct gimple_opt_pass pass_optimize_wid
   0,					/* todo_flags_start */
   TODO_verify_ssa
   | TODO_verify_stmts
-  | TODO_dump_func
   | TODO_update_ssa                     /* todo_flags_finish */
  }
 };
Index: tree-ssa-dom.c
===================================================================
--- tree-ssa-dom.c	(revision 174759)
+++ tree-ssa-dom.c	(working copy)
@@ -816,8 +816,7 @@ struct gimple_opt_pass pass_dominator =
   TODO_cleanup_cfg
     | TODO_update_ssa
     | TODO_verify_ssa
-    | TODO_verify_flow
-    | TODO_dump_func			/* todo_flags_finish */
+    | TODO_verify_flow			/* todo_flags_finish */
  }
 };
 
@@ -2969,7 +2968,6 @@ struct gimple_opt_pass pass_phi_only_cpr
   0,		                        /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_cleanup_cfg
-    | TODO_dump_func
     | TODO_ggc_collect
     | TODO_verify_ssa
     | TODO_verify_stmts
Index: tree-nrv.c
===================================================================
--- tree-nrv.c	(revision 174759)
+++ tree-nrv.c	(working copy)
@@ -288,7 +288,7 @@ struct gimple_opt_pass pass_nrv =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_ggc_collect			/* todo_flags_finish */
+  TODO_ggc_collect			/* todo_flags_finish */
  }
 };
 
Index: loop-init.c
===================================================================
--- loop-init.c	(revision 174759)
+++ loop-init.c	(working copy)
@@ -158,7 +158,6 @@ struct rtl_opt_pass pass_loop2 =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
 };
@@ -192,7 +191,7 @@ struct rtl_opt_pass pass_rtl_loop_init =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing /* todo_flags_finish */
+  TODO_verify_rtl_sharing               /* todo_flags_finish */
  }
 };
 
@@ -228,8 +227,7 @@ struct rtl_opt_pass pass_rtl_loop_done =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_verify_flow
-    | TODO_verify_rtl_sharing
-    | TODO_dump_func                    /* todo_flags_finish */
+    | TODO_verify_rtl_sharing           /* todo_flags_finish */
  }
 };
 
@@ -265,8 +263,7 @@ struct rtl_opt_pass pass_rtl_move_loop_i
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_verify |
-  TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func                        /* todo_flags_finish */
+  TODO_df_finish | TODO_verify_rtl_sharing  /* todo_flags_finish */
  }
 };
 
@@ -301,7 +298,7 @@ struct rtl_opt_pass pass_rtl_unswitch =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing, /* todo_flags_finish */
+  TODO_verify_rtl_sharing,              /* todo_flags_finish */
  }
 };
 
@@ -349,7 +346,7 @@ struct rtl_opt_pass pass_rtl_unroll_and_
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing, /* todo_flags_finish */
+  TODO_verify_rtl_sharing,              /* todo_flags_finish */
  }
 };
 
@@ -390,7 +387,6 @@ struct rtl_opt_pass pass_rtl_doloop =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing /* todo_flags_finish */
+  TODO_verify_rtl_sharing               /* todo_flags_finish */
  }
 };
-
Index: gimple-low.c
===================================================================
--- gimple-low.c	(revision 174759)
+++ gimple-low.c	(working copy)
@@ -203,7 +203,7 @@ struct gimple_opt_pass pass_lower_cf =
   PROP_gimple_lcf,			/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0             			/* todo_flags_finish */
  }
 };
 
Index: tree-ssa-sink.c
===================================================================
--- tree-ssa-sink.c	(revision 174759)
+++ tree-ssa-sink.c	(working copy)
@@ -639,7 +639,6 @@ struct gimple_opt_pass pass_sink_code =
   TODO_update_ssa
     | TODO_verify_ssa
     | TODO_verify_flow
-    | TODO_dump_func
     | TODO_ggc_collect			/* todo_flags_finish */
  }
 };
Index: ipa-inline.c
===================================================================
--- ipa-inline.c	(revision 174759)
+++ ipa-inline.c	(working copy)
@@ -1915,7 +1915,7 @@ struct gimple_opt_pass pass_early_inline
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func    			/* todo_flags_finish */
+  0                 			/* todo_flags_finish */
  }
 };
 
@@ -1949,7 +1949,7 @@ struct ipa_opt_pass_d pass_ipa_inline =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   TODO_remove_functions,		/* todo_flags_finish */
-  TODO_dump_cgraph | TODO_dump_func
+  TODO_dump_cgraph 
   | TODO_remove_functions | TODO_ggc_collect	/* todo_flags_finish */
  },
  inline_generate_summary,		/* generate_summary */
Index: ifcvt.c
===================================================================
--- ifcvt.c	(revision 174759)
+++ ifcvt.c	(working copy)
@@ -4368,7 +4368,7 @@ struct rtl_opt_pass pass_rtl_ifcvt =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
@@ -4405,7 +4405,6 @@ struct rtl_opt_pass pass_if_after_combin
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
 };
@@ -4442,7 +4441,6 @@ struct rtl_opt_pass pass_if_after_reload
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
 };
Index: jump.c
===================================================================
--- jump.c	(revision 174759)
+++ jump.c	(working copy)
@@ -156,7 +156,7 @@ struct rtl_opt_pass pass_cleanup_barrier
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
Index: tree-ssa-loop.c
===================================================================
--- tree-ssa-loop.c	(revision 174759)
+++ tree-ssa-loop.c	(working copy)
@@ -60,7 +60,7 @@ struct gimple_opt_pass pass_tree_loop =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   TODO_ggc_collect,			/* todo_flags_start */
-  TODO_dump_func | TODO_verify_ssa | TODO_ggc_collect	/* todo_flags_finish */
+  TODO_verify_ssa | TODO_ggc_collect	/* todo_flags_finish */
  }
 };
 
@@ -95,7 +95,7 @@ struct gimple_opt_pass pass_tree_loop_in
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0             			/* todo_flags_finish */
  }
 };
 
@@ -131,7 +131,7 @@ struct gimple_opt_pass pass_lim =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0             			/* todo_flags_finish */
  }
 };
 
@@ -167,7 +167,7 @@ struct gimple_opt_pass pass_tree_unswitc
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_ggc_collect | TODO_dump_func 	/* todo_flags_finish */
+  TODO_ggc_collect                  	/* todo_flags_finish */
  }
 };
 
@@ -203,8 +203,7 @@ struct gimple_opt_pass pass_predcom =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func
-    | TODO_update_ssa_only_virtuals	/* todo_flags_finish */
+  TODO_update_ssa_only_virtuals 	/* todo_flags_finish */
  }
 };
 
@@ -240,7 +239,7 @@ struct gimple_opt_pass pass_vectorize =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_update_ssa
+  TODO_update_ssa
     | TODO_ggc_collect			/* todo_flags_finish */
  }
 };
@@ -308,7 +307,7 @@ struct gimple_opt_pass pass_graphite_tra
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0             			/* todo_flags_finish */
  }
 };
 
@@ -345,7 +344,7 @@ struct gimple_opt_pass pass_check_data_d
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func                	/* todo_flags_finish */
+  0                             	/* todo_flags_finish */
  }
 };
 
@@ -381,7 +380,7 @@ struct gimple_opt_pass pass_iv_canon =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0             			/* todo_flags_finish */
  }
 };
 
@@ -408,7 +407,7 @@ struct gimple_opt_pass pass_scev_cprop =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_cleanup_cfg
+  TODO_cleanup_cfg
     | TODO_update_ssa_only_virtuals
 					/* todo_flags_finish */
  }
@@ -480,8 +479,7 @@ struct gimple_opt_pass pass_complete_unr
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func
-    | TODO_ggc_collect			/* todo_flags_finish */
+  TODO_ggc_collect			/* todo_flags_finish */
  }
 };
 
@@ -528,7 +526,6 @@ struct gimple_opt_pass pass_complete_unr
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
   TODO_verify_flow
-    | TODO_dump_func
     | TODO_ggc_collect 			/* todo_flags_finish */
  }
 };
@@ -567,7 +564,7 @@ struct gimple_opt_pass pass_parallelize_
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0             			/* todo_flags_finish */
  }
 };
 
@@ -603,7 +600,7 @@ struct gimple_opt_pass pass_loop_prefetc
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0             			/* todo_flags_finish */
  }
 };
 
@@ -640,7 +637,7 @@ struct gimple_opt_pass pass_iv_optimize 
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_update_ssa | TODO_ggc_collect	/* todo_flags_finish */
+  TODO_update_ssa | TODO_ggc_collect	/* todo_flags_finish */
  }
 };
 
@@ -671,7 +668,6 @@ struct gimple_opt_pass pass_tree_loop_do
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
   TODO_cleanup_cfg
-    | TODO_verify_flow
-    | TODO_dump_func			/* todo_flags_finish */
+    | TODO_verify_flow			/* todo_flags_finish */
  }
 };
Index: recog.c
===================================================================
--- recog.c	(revision 174759)
+++ recog.c	(working copy)
@@ -3694,7 +3694,7 @@ struct rtl_opt_pass pass_peephole2 =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func                       /* todo_flags_finish */
+  0                                    /* todo_flags_finish */
  }
 };
 
@@ -3720,7 +3720,7 @@ struct rtl_opt_pass pass_split_all_insns
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
@@ -3750,7 +3750,7 @@ struct rtl_opt_pass pass_split_after_rel
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
@@ -3794,7 +3794,7 @@ struct rtl_opt_pass pass_split_before_re
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
@@ -3832,8 +3832,7 @@ struct rtl_opt_pass pass_split_before_sc
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_verify_flow |
-  TODO_dump_func                        /* todo_flags_finish */
+  TODO_verify_flow                      /* todo_flags_finish */
  }
 };
 
@@ -3864,6 +3863,6 @@ struct rtl_opt_pass pass_split_for_short
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing /* todo_flags_finish */
+  TODO_verify_rtl_sharing               /* todo_flags_finish */
  }
 };
Index: dse.c
===================================================================
--- dse.c	(revision 174759)
+++ dse.c	(working copy)
@@ -3853,7 +3853,6 @@ struct rtl_opt_pass pass_rtl_dse1 =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_df_finish | TODO_verify_rtl_sharing |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
@@ -3874,7 +3873,6 @@ struct rtl_opt_pass pass_rtl_dse2 =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_df_finish | TODO_verify_rtl_sharing |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
Index: tree-ssa-ifcombine.c
===================================================================
--- tree-ssa-ifcombine.c	(revision 174759)
+++ tree-ssa-ifcombine.c	(working copy)
@@ -663,8 +663,7 @@ struct gimple_opt_pass pass_tree_ifcombi
   0,				/* properties_provided */
   0,				/* properties_destroyed */
   0,				/* todo_flags_start */
-  TODO_dump_func
-  | TODO_ggc_collect
+  TODO_ggc_collect
   | TODO_update_ssa
   | TODO_verify_ssa		/* todo_flags_finish */
  }
Index: matrix-reorg.c
===================================================================
--- matrix-reorg.c	(revision 174759)
+++ matrix-reorg.c	(working copy)
@@ -2390,6 +2390,6 @@ struct simple_ipa_opt_pass pass_ipa_matr
   0,				/* properties_provided */
   0,				/* properties_destroyed */
   0,				/* todo_flags_start */
-  TODO_dump_cgraph | TODO_dump_func	/* todo_flags_finish */
+  TODO_dump_cgraph      	/* todo_flags_finish */
  }
 };
Index: tree-eh.c
===================================================================
--- tree-eh.c	(revision 174759)
+++ tree-eh.c	(working copy)
@@ -2052,7 +2052,7 @@ struct gimple_opt_pass pass_lower_eh =
   PROP_gimple_leh,			/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0             			/* todo_flags_finish */
  }
 };
 \f
@@ -2865,7 +2865,7 @@ struct gimple_opt_pass pass_refactor_eh 
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0             			/* todo_flags_finish */
  }
 };
 \f
@@ -3071,7 +3071,7 @@ struct gimple_opt_pass pass_lower_resx =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_flow	/* todo_flags_finish */
+  TODO_verify_flow	                /* todo_flags_finish */
  }
 };
 
@@ -3272,7 +3272,7 @@ struct gimple_opt_pass pass_lower_eh_dis
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_flow	/* todo_flags_finish */
+  TODO_verify_flow	                /* todo_flags_finish */
  }
 };
 \f
@@ -4015,7 +4015,7 @@ struct gimple_opt_pass pass_cleanup_eh =
    0,				/* properties_provided */
    0,				/* properties_destroyed */
    0,				/* todo_flags_start */
-   TODO_dump_func		/* todo_flags_finish */
+   0             		/* todo_flags_finish */
    }
 };
 \f
Index: regmove.c
===================================================================
--- regmove.c	(revision 174759)
+++ regmove.c	(working copy)
@@ -1382,7 +1382,6 @@ struct rtl_opt_pass pass_regmove =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
 };
Index: function.c
===================================================================
--- function.c	(revision 174759)
+++ function.c	(working copy)
@@ -1955,7 +1955,7 @@ struct rtl_opt_pass pass_instantiate_vir
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
@@ -5949,7 +5949,6 @@ struct rtl_opt_pass pass_thread_prologue
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   TODO_verify_flow,                     /* todo_flags_start */
-  TODO_dump_func |
   TODO_df_verify |
   TODO_df_finish | TODO_verify_rtl_sharing |
   TODO_ggc_collect                      /* todo_flags_finish */
@@ -6151,7 +6150,7 @@ struct rtl_opt_pass pass_match_asm_const
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func                       /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
Index: tree-vectorizer.c
===================================================================
--- tree-vectorizer.c	(revision 174759)
+++ tree-vectorizer.c	(working copy)
@@ -292,7 +292,6 @@ struct gimple_opt_pass pass_slp_vectoriz
   0,                                    /* todo_flags_start */
   TODO_ggc_collect
     | TODO_verify_ssa
-    | TODO_dump_func
     | TODO_update_ssa
     | TODO_verify_stmts                 /* todo_flags_finish */
  }
Index: ipa-split.c
===================================================================
--- ipa-split.c	(revision 174759)
+++ ipa-split.c	(working copy)
@@ -1432,7 +1432,7 @@ struct gimple_opt_pass pass_split_functi
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0             			/* todo_flags_finish */
  }
 };
 
@@ -1473,6 +1473,6 @@ struct gimple_opt_pass pass_feedback_spl
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0             			/* todo_flags_finish */
  }
 };
Index: gcse.c
===================================================================
--- gcse.c	(revision 174759)
+++ gcse.c	(working copy)
@@ -3772,7 +3772,6 @@ struct rtl_opt_pass pass_rtl_pre =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_verify_flow | TODO_ggc_collect   /* todo_flags_finish */
  }
 };
@@ -3793,10 +3792,8 @@ struct rtl_opt_pass pass_rtl_hoist =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_verify_flow | TODO_ggc_collect   /* todo_flags_finish */
  }
 };
 
 #include "gt-gcse.h"
-
Index: tree-if-conv.c
===================================================================
--- tree-if-conv.c	(revision 174759)
+++ tree-if-conv.c	(working copy)
@@ -1808,7 +1808,7 @@ struct gimple_opt_pass pass_if_conversio
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_stmts | TODO_verify_flow
+  TODO_verify_stmts | TODO_verify_flow
                                         /* todo_flags_finish */
  }
 };
Index: init-regs.c
===================================================================
--- init-regs.c	(revision 174759)
+++ init-regs.c	(working copy)
@@ -153,7 +153,6 @@ struct rtl_opt_pass pass_initialize_regs
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_df_finish                        /* todo_flags_finish */
  }
 };
Index: tree-ssa-phiopt.c
===================================================================
--- tree-ssa-phiopt.c	(revision 174759)
+++ tree-ssa-phiopt.c	(working copy)
@@ -1588,8 +1588,7 @@ struct gimple_opt_pass pass_phiopt =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func
-    | TODO_ggc_collect
+  TODO_ggc_collect
     | TODO_verify_ssa
     | TODO_verify_flow
     | TODO_verify_stmts	 		/* todo_flags_finish */
@@ -1617,8 +1616,7 @@ struct gimple_opt_pass pass_cselim =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func
-    | TODO_ggc_collect
+  TODO_ggc_collect
     | TODO_verify_ssa
     | TODO_verify_flow
     | TODO_verify_stmts	 		/* todo_flags_finish */
Index: implicit-zee.c
===================================================================
--- implicit-zee.c	(revision 174759)
+++ implicit-zee.c	(working copy)
@@ -988,7 +988,6 @@ struct rtl_opt_pass pass_implicit_zee =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_ggc_collect |
-  TODO_dump_func |
   TODO_verify_rtl_sharing,              /* todo_flags_finish */
  }
 };
Index: lower-subreg.c
===================================================================
--- lower-subreg.c	(revision 174759)
+++ lower-subreg.c	(working copy)
@@ -1370,7 +1370,6 @@ struct rtl_opt_pass pass_lower_subreg =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_ggc_collect |
   TODO_verify_flow                      /* todo_flags_finish */
  }
@@ -1392,7 +1391,6 @@ struct rtl_opt_pass pass_lower_subreg2 =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_ggc_collect |
   TODO_verify_flow                      /* todo_flags_finish */
  }
Index: bt-load.c
===================================================================
--- bt-load.c	(revision 174759)
+++ bt-load.c	(working copy)
@@ -1519,7 +1519,6 @@ struct rtl_opt_pass pass_branch_target_l
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_verify_rtl_sharing |
   TODO_ggc_collect,                     /* todo_flags_finish */
  }
@@ -1569,7 +1568,6 @@ struct rtl_opt_pass pass_branch_target_l
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_ggc_collect,                     /* todo_flags_finish */
  }
 };
Index: tree-dfa.c
===================================================================
--- tree-dfa.c	(revision 174759)
+++ tree-dfa.c	(working copy)
@@ -113,8 +113,8 @@ struct gimple_opt_pass pass_referenced_v
   PROP_gimple_leh | PROP_cfg,		/* properties_required */
   PROP_referenced_vars,			/* properties_provided */
   0,					/* properties_destroyed */
-  TODO_dump_func,			/* todo_flags_start */
-  TODO_dump_func                        /* todo_flags_finish */
+  0,                     		/* todo_flags_start */
+  0                                     /* todo_flags_finish */
  }
 };
 
@@ -1000,4 +1000,3 @@ stmt_references_abnormal_ssa_name (gimpl
 
   return false;
 }
-
Index: except.c
===================================================================
--- except.c	(revision 174759)
+++ except.c	(working copy)
@@ -1468,7 +1468,7 @@ struct rtl_opt_pass pass_rtl_eh =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 \f
@@ -1910,7 +1910,7 @@ struct rtl_opt_pass pass_set_nothrow_fun
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func,                       /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
@@ -2665,7 +2665,7 @@ struct rtl_opt_pass pass_convert_to_eh_r
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func,			/* todo_flags_finish */
+  0              			/* todo_flags_finish */
  }
 };
 \f
Index: emit-rtl.c
===================================================================
--- emit-rtl.c	(revision 174759)
+++ emit-rtl.c	(working copy)
@@ -2413,7 +2413,7 @@ struct rtl_opt_pass pass_unshare_all_rtl
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing /* todo_flags_finish */
+  TODO_verify_rtl_sharing               /* todo_flags_finish */
  }
 };
 
Index: cfgexpand.c
===================================================================
--- cfgexpand.c	(revision 174759)
+++ cfgexpand.c	(working copy)
@@ -4269,7 +4269,6 @@ struct rtl_opt_pass pass_expand =
   PROP_ssa | PROP_trees,		/* properties_destroyed */
   TODO_verify_ssa | TODO_verify_flow
     | TODO_verify_stmts,		/* todo_flags_start */
-  TODO_dump_func
-  | TODO_ggc_collect			/* todo_flags_finish */
+  TODO_ggc_collect			/* todo_flags_finish */
  }
 };
Index: store-motion.c
===================================================================
--- store-motion.c	(revision 174759)
+++ store-motion.c	(working copy)
@@ -1258,8 +1258,6 @@ struct rtl_opt_pass pass_rtl_store_motio
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_verify_flow | TODO_ggc_collect   /* todo_flags_finish */
  }
 };
-
Index: tree-cfgcleanup.c
===================================================================
--- tree-cfgcleanup.c	(revision 174759)
+++ tree-cfgcleanup.c	(working copy)
@@ -1054,7 +1054,7 @@ struct gimple_opt_pass pass_merge_phi =
   0,				/* properties_provided */
   0,				/* properties_destroyed */
   0,				/* todo_flags_start */
-  TODO_dump_func | TODO_ggc_collect	/* todo_flags_finish */
+  TODO_ggc_collect      	/* todo_flags_finish */
   | TODO_verify_ssa
  }
 };
Index: tree-ssa-pre.c
===================================================================
--- tree-ssa-pre.c	(revision 174759)
+++ tree-ssa-pre.c	(working copy)
@@ -4978,7 +4978,7 @@ struct gimple_opt_pass pass_pre =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   TODO_rebuild_alias,			/* todo_flags_start */
-  TODO_update_ssa_only_virtuals | TODO_dump_func | TODO_ggc_collect
+  TODO_update_ssa_only_virtuals  | TODO_ggc_collect
   | TODO_verify_ssa /* todo_flags_finish */
  }
 };
@@ -5013,6 +5013,6 @@ struct gimple_opt_pass pass_fre =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_ggc_collect | TODO_verify_ssa /* todo_flags_finish */
+  TODO_ggc_collect | TODO_verify_ssa /* todo_flags_finish */
  }
 };
Index: cfgcleanup.c
===================================================================
--- cfgcleanup.c	(revision 174759)
+++ cfgcleanup.c	(working copy)
@@ -2989,8 +2989,6 @@ struct rtl_opt_pass pass_jump2 =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   TODO_ggc_collect,                     /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing,/* todo_flags_finish */
+  TODO_verify_rtl_sharing,              /* todo_flags_finish */
  }
 };
-
-
Index: tree-sra.c
===================================================================
--- tree-sra.c	(revision 174759)
+++ tree-sra.c	(working copy)
@@ -3110,8 +3110,7 @@ struct gimple_opt_pass pass_sra_early =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func
-  | TODO_update_ssa
+  TODO_update_ssa
   | TODO_ggc_collect
   | TODO_verify_ssa			/* todo_flags_finish */
  }
@@ -3132,8 +3131,7 @@ struct gimple_opt_pass pass_sra =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   TODO_update_address_taken,		/* todo_flags_start */
-  TODO_dump_func
-  | TODO_update_ssa
+  TODO_update_ssa
   | TODO_ggc_collect
   | TODO_verify_ssa			/* todo_flags_finish */
  }
@@ -4600,8 +4598,6 @@ struct gimple_opt_pass pass_early_ipa_sr
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_dump_cgraph 	/* todo_flags_finish */
+  TODO_dump_cgraph              	/* todo_flags_finish */
  }
 };
-
-
Index: tree-mudflap.c
===================================================================
--- tree-mudflap.c	(revision 174759)
+++ tree-mudflap.c	(working copy)
@@ -1389,7 +1389,7 @@ struct gimple_opt_pass pass_mudflap_1 =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
@@ -1409,7 +1409,7 @@ struct gimple_opt_pass pass_mudflap_2 =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_verify_flow | TODO_verify_stmts
-  | TODO_dump_func | TODO_update_ssa    /* todo_flags_finish */
+  | TODO_update_ssa                     /* todo_flags_finish */
  }
 };
 
Index: tree-ssa-copy.c
===================================================================
--- tree-ssa-copy.c	(revision 174759)
+++ tree-ssa-copy.c	(working copy)
@@ -848,7 +848,6 @@ struct gimple_opt_pass pass_copy_prop =
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
   TODO_cleanup_cfg
-    | TODO_dump_func
     | TODO_ggc_collect
     | TODO_verify_ssa
     | TODO_update_ssa			/* todo_flags_finish */
Index: cfglayout.c
===================================================================
--- cfglayout.c	(revision 174759)
+++ cfglayout.c	(working copy)
@@ -378,7 +378,7 @@ struct rtl_opt_pass pass_into_cfg_layout
   PROP_cfglayout,                       /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func,                       /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
@@ -397,7 +397,7 @@ struct rtl_opt_pass pass_outof_cfg_layou
   0,                                    /* properties_provided */
   PROP_cfglayout,                       /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func,                       /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 \f
Index: tree-ssa-forwprop.c
===================================================================
--- tree-ssa-forwprop.c	(revision 174759)
+++ tree-ssa-forwprop.c	(working copy)
@@ -2420,10 +2420,8 @@ struct gimple_opt_pass pass_forwprop =
   0,				/* properties_provided */
   0,				/* properties_destroyed */
   0,				/* todo_flags_start */
-  TODO_dump_func
-  | TODO_ggc_collect
+  TODO_ggc_collect
   | TODO_update_ssa
   | TODO_verify_ssa		/* todo_flags_finish */
  }
 };
-
Index: tree-ssa-dce.c
===================================================================
--- tree-ssa-dce.c	(revision 174759)
+++ tree-ssa-dce.c	(working copy)
@@ -1527,7 +1527,7 @@ struct gimple_opt_pass pass_dce =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_ssa	/* todo_flags_finish */
+  TODO_verify_ssa	                /* todo_flags_finish */
  }
 };
 
@@ -1546,7 +1546,7 @@ struct gimple_opt_pass pass_dce_loop =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_ssa	/* todo_flags_finish */
+  TODO_verify_ssa	                /* todo_flags_finish */
  }
 };
 
@@ -1565,7 +1565,7 @@ struct gimple_opt_pass pass_cd_dce =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_ssa
+  TODO_verify_ssa
   | TODO_verify_flow			/* todo_flags_finish */
  }
 };
Index: ira.c
===================================================================
--- ira.c	(revision 174759)
+++ ira.c	(working copy)
@@ -3806,7 +3806,6 @@ struct rtl_opt_pass pass_ira =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
 };
Index: tree-ssa.c
===================================================================
--- tree-ssa.c	(revision 174759)
+++ tree-ssa.c	(working copy)
@@ -2277,7 +2277,6 @@ struct gimple_opt_pass pass_update_addre
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_update_address_taken
-  | TODO_dump_func			/* todo_flags_finish */
+  TODO_update_address_taken             /* todo_flags_finish */
  }
 };
Index: integrate.c
===================================================================
--- integrate.c	(revision 174759)
+++ integrate.c	(working copy)
@@ -325,7 +325,7 @@ struct rtl_opt_pass pass_initial_value_s
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
Index: tree-optimize.c
===================================================================
--- tree-optimize.c	(revision 174759)
+++ tree-optimize.c	(working copy)
@@ -208,8 +208,7 @@ struct gimple_opt_pass pass_cleanup_cfg_
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
-    | TODO_remove_unused_locals
+  TODO_remove_unused_locals             /* todo_flags_finish */
  }
 };
 
Index: tree-ssa-phiprop.c
===================================================================
--- tree-ssa-phiprop.c	(revision 174759)
+++ tree-ssa-phiprop.c	(working copy)
@@ -426,8 +426,7 @@ struct gimple_opt_pass pass_phiprop =
   0,				/* properties_provided */
   0,				/* properties_destroyed */
   0,				/* todo_flags_start */
-  TODO_dump_func
-  | TODO_ggc_collect
+  TODO_ggc_collect
   | TODO_update_ssa
   | TODO_verify_ssa		/* todo_flags_finish */
  }
Index: tree-object-size.c
===================================================================
--- tree-object-size.c	(revision 174759)
+++ tree-object-size.c	(working copy)
@@ -1282,6 +1282,6 @@ struct gimple_opt_pass pass_object_sizes
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_ssa	/* todo_flags_finish */
+  TODO_verify_ssa	                /* todo_flags_finish */
  }
 };
Index: combine.c
===================================================================
--- combine.c	(revision 174759)
+++ combine.c	(working copy)
@@ -13944,7 +13944,6 @@ struct rtl_opt_pass pass_combine =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_df_finish | TODO_verify_rtl_sharing |
   TODO_ggc_collect,                     /* todo_flags_finish */
  }
Index: bb-reorder.c
===================================================================
--- bb-reorder.c	(revision 174759)
+++ bb-reorder.c	(working copy)
@@ -2117,7 +2117,7 @@ struct rtl_opt_pass pass_duplicate_compu
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing,/* todo_flags_finish */
+  TODO_verify_rtl_sharing,/* todo_flags_finish */
  }
 };
 
@@ -2260,7 +2260,7 @@ struct rtl_opt_pass pass_reorder_blocks 
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing,/* todo_flags_finish */
+  TODO_verify_rtl_sharing,              /* todo_flags_finish */
  }
 };
 
@@ -2300,6 +2300,6 @@ struct rtl_opt_pass pass_partition_block
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing/* todo_flags_finish */
+  TODO_verify_rtl_sharing               /* todo_flags_finish */
  }
 };
Index: cprop.c
===================================================================
--- cprop.c	(revision 174759)
+++ cprop.c	(working copy)
@@ -1878,8 +1878,6 @@ struct rtl_opt_pass pass_rtl_cprop =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_verify_flow | TODO_ggc_collect   /* todo_flags_finish */
  }
 };
-
Index: var-tracking.c
===================================================================
--- var-tracking.c	(revision 174759)
+++ var-tracking.c	(working copy)
@@ -9131,6 +9131,6 @@ struct rtl_opt_pass pass_variable_tracki
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing/* todo_flags_finish */
+  TODO_verify_rtl_sharing               /* todo_flags_finish */
  }
 };
Index: tree-profile.c
===================================================================
--- tree-profile.c	(revision 174759)
+++ tree-profile.c	(working copy)
@@ -590,7 +590,7 @@ struct simple_ipa_opt_pass pass_ipa_tree
   0,                                   /* properties_provided */
   0,                                   /* properties_destroyed */
   0,                                   /* todo_flags_start */
-  TODO_dump_func                       /* todo_flags_finish */
+  0                                    /* todo_flags_finish */
  }
 };
 
Index: tree-vect-generic.c
===================================================================
--- tree-vect-generic.c	(revision 174759)
+++ tree-vect-generic.c	(working copy)
@@ -658,7 +658,7 @@ struct gimple_opt_pass pass_lower_vector
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_update_ssa	/* todo_flags_finish */
+  TODO_update_ssa	                /* todo_flags_finish */
     | TODO_verify_ssa
     | TODO_verify_stmts | TODO_verify_flow
  }
@@ -679,7 +679,7 @@ struct gimple_opt_pass pass_lower_vector
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_update_ssa	/* todo_flags_finish */
+  TODO_update_ssa	                /* todo_flags_finish */
     | TODO_verify_ssa
     | TODO_verify_stmts | TODO_verify_flow
  }
Index: reg-stack.c
===================================================================
--- reg-stack.c	(revision 174759)
+++ reg-stack.c	(working copy)
@@ -3352,7 +3352,6 @@ struct rtl_opt_pass pass_stack_regs_run 
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
 };
Index: sched-rgn.c
===================================================================
--- sched-rgn.c	(revision 174759)
+++ sched-rgn.c	(working copy)
@@ -3551,7 +3551,6 @@ struct rtl_opt_pass pass_sched =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_verify_flow |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
@@ -3573,7 +3572,6 @@ struct rtl_opt_pass pass_sched2 =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_verify_flow |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
Index: tree-ssa-structalias.c
===================================================================
--- tree-ssa-structalias.c	(revision 174759)
+++ tree-ssa-structalias.c	(working copy)
@@ -6634,7 +6634,7 @@ struct gimple_opt_pass pass_build_alias 
   0,			    /* properties_provided */
   0,                        /* properties_destroyed */
   0,                        /* todo_flags_start */
-  TODO_rebuild_alias | TODO_dump_func  /* todo_flags_finish */
+  TODO_rebuild_alias        /* todo_flags_finish */
  }
 };
 
@@ -6656,7 +6656,7 @@ struct gimple_opt_pass pass_build_ealias
   0,			    /* properties_provided */
   0,                        /* properties_destroyed */
   0,                        /* todo_flags_start */
-  TODO_rebuild_alias | TODO_dump_func  /* todo_flags_finish */
+  TODO_rebuild_alias        /* todo_flags_finish */
  }
 };
 
Index: tree-switch-conversion.c
===================================================================
--- tree-switch-conversion.c	(revision 174759)
+++ tree-switch-conversion.c	(working copy)
@@ -1028,7 +1028,7 @@ struct gimple_opt_pass pass_convert_swit
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_update_ssa | TODO_dump_func
+  TODO_update_ssa 
   | TODO_ggc_collect | TODO_verify_ssa  /* todo_flags_finish */
  }
 };
Index: tree-cfg.c
===================================================================
--- tree-cfg.c	(revision 174759)
+++ tree-cfg.c	(working copy)
@@ -261,8 +261,7 @@ struct gimple_opt_pass pass_build_cfg =
   PROP_cfg,				/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_verify_stmts | TODO_cleanup_cfg
-  | TODO_dump_func			/* todo_flags_finish */
+  TODO_verify_stmts | TODO_cleanup_cfg  /* todo_flags_finish */
  }
 };
 
@@ -7234,7 +7233,7 @@ struct gimple_opt_pass pass_split_crit_e
   PROP_no_crit_edges,            /* properties_provided */
   0,                             /* properties_destroyed */
   0,                             /* todo_flags_start */
-  TODO_dump_func | TODO_verify_flow  /* todo_flags_finish */
+  TODO_verify_flow               /* todo_flags_finish */
  }
 };
 
Index: passes.c
===================================================================
--- passes.c	(revision 174762)
+++ passes.c	(working copy)
@@ -1485,14 +1485,21 @@ do_per_function_toporder (void (*callbac
   nnodes = 0;
 }
 
+struct todo_flags
+{
+  unsigned int flags;
+  bool is_start_todo;
+};
+
 /* Perform all TODO actions that ought to be done on each function.  */
 
 static void
 execute_function_todo (void *data)
 {
-  unsigned int flags = (size_t)data;
+  struct todo_flags *todo_flags_p = (struct todo_flags *)data;
+  unsigned int flags = todo_flags_p->flags;
   flags &= ~cfun->last_verified;
-  if (!flags)
+  if (!flags && !dump_file)
     return;
 
   /* Always cleanup the CFG before trying to update SSA.  */
@@ -1531,7 +1538,8 @@ execute_function_todo (void *data)
   if (flags & TODO_remove_unused_locals)
     remove_unused_locals ();
 
-  if ((flags & TODO_dump_func) && dump_file && current_function_decl)
+  if (!todo_flags_p->is_start_todo
+      && dump_file && current_function_decl)
     {
       if (cfun->curr_properties & PROP_trees)
         dump_function_to_file (current_function_decl, dump_file, dump_flags);
@@ -1580,13 +1588,16 @@ execute_function_todo (void *data)
     verify_rtl_sharing ();
 #endif
 
-  cfun->last_verified = flags & TODO_verify_all;
+  if (flags)
+    cfun->last_verified = flags & TODO_verify_all;
 }
 
 /* Perform all TODO actions.  */
 static void
-execute_todo (unsigned int flags)
+execute_todo (unsigned int flags, bool is_start_todo)
 {
+  struct todo_flags todo_flags;
+
 #if defined ENABLE_CHECKING
   if (cfun
       && need_ssa_update_p (cfun))
@@ -1600,7 +1611,9 @@ execute_todo (unsigned int flags)
 
   statistics_fini_pass ();
 
-  do_per_function (execute_function_todo, (void *)(size_t) flags);
+  todo_flags.flags = flags;
+  todo_flags.is_start_todo = is_start_todo;
+  do_per_function (execute_function_todo,  &todo_flags);
 
   /* Always remove functions just as before inlining: IPA passes might be
      interested to see bodies of extern inline functions that are not inlined
@@ -1764,7 +1777,7 @@ execute_one_ipa_transform_pass (struct c
   pass_init_dump_file (pass);
 
   /* Run pre-pass verification.  */
-  execute_todo (ipa_pass->function_transform_todo_flags_start);
+  execute_todo (ipa_pass->function_transform_todo_flags_start, true);
 
   /* If a timevar is present, start it.  */
   if (pass->tv_id != TV_NONE)
@@ -1778,7 +1791,7 @@ execute_one_ipa_transform_pass (struct c
     timevar_pop (pass->tv_id);
 
   /* Run post-pass cleanup and verification.  */
-  execute_todo (todo_after);
+  execute_todo (todo_after, false);
   verify_interpass_invariants ();
 
   pass_fini_dump_file (pass);
@@ -1882,7 +1895,7 @@ execute_one_pass (struct opt_pass *pass)
   initializing_dump = pass_init_dump_file (pass);
 
   /* Run pre-pass verification.  */
-  execute_todo (pass->todo_flags_start);
+  execute_todo (pass->todo_flags_start, true);
 
 #ifdef ENABLE_CHECKING
   do_per_function (verify_curr_properties,
@@ -1919,7 +1932,7 @@ execute_one_pass (struct opt_pass *pass)
     }
 
   /* Run post-pass cleanup and verification.  */
-  execute_todo (todo_after | pass->todo_flags_finish);
+  execute_todo (todo_after | pass->todo_flags_finish, false);
   verify_interpass_invariants ();
   if (pass->type == IPA_PASS)
     {
Index: tree-ssa-reassoc.c
===================================================================
--- tree-ssa-reassoc.c	(revision 174759)
+++ tree-ssa-reassoc.c	(working copy)
@@ -2299,8 +2299,6 @@ struct gimple_opt_pass pass_reassoc =
   0,					/* todo_flags_start */
   TODO_verify_ssa
     | TODO_verify_flow
-    | TODO_dump_func
     | TODO_ggc_collect			/* todo_flags_finish */
  }
 };
-
Index: combine-stack-adj.c
===================================================================
--- combine-stack-adj.c	(revision 174759)
+++ combine-stack-adj.c	(working copy)
@@ -584,7 +584,6 @@ struct rtl_opt_pass pass_stack_adjustmen
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_ggc_collect,                     /* todo_flags_finish */
  }
 };
Index: dce.c
===================================================================
--- dce.c	(revision 174759)
+++ dce.c	(working copy)
@@ -785,7 +785,6 @@ struct rtl_opt_pass pass_ud_rtl_dce =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_df_finish | TODO_verify_rtl_sharing |
   TODO_ggc_collect                     /* todo_flags_finish */
  }
@@ -1137,7 +1136,6 @@ struct rtl_opt_pass pass_fast_rtl_dce =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_df_finish | TODO_verify_rtl_sharing |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
Index: tree-ssanames.c
===================================================================
--- tree-ssanames.c	(revision 174759)
+++ tree-ssanames.c	(working copy)
@@ -366,6 +366,6 @@ struct gimple_opt_pass pass_release_ssa_
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func 			/* todo_flags_finish */
+  0              			/* todo_flags_finish */
  }
 };
Index: regcprop.c
===================================================================
--- regcprop.c	(revision 174759)
+++ regcprop.c	(working copy)
@@ -1188,7 +1188,7 @@ struct rtl_opt_pass pass_cprop_hardreg =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_df_finish
+  TODO_df_finish
   | TODO_verify_rtl_sharing		/* todo_flags_finish */
  }
 };

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Dump before flag
  2011-06-09 15:58                     ` Xinliang David Li
@ 2011-06-10  9:04                       ` Richard Guenther
  2011-06-10 16:54                         ` Xinliang David Li
  0 siblings, 1 reply; 30+ messages in thread
From: Richard Guenther @ 2011-06-10  9:04 UTC (permalink / raw)
  To: Xinliang David Li; +Cc: GCC Patches, Diego Novillo

On Thu, Jun 9, 2011 at 5:47 PM, Xinliang David Li <davidxl@google.com> wrote:
> See attached.

Hmm.  I don't like how you still wire dumping in the TODO routines.
Doesn't it work to just dump the body from pass_fini_dump_file ()?
Or if that doesn't sound clean from (a subset of) places where it
is called? (we might want to exclude the ipa read/write/summary
stages)

Richard.

> Thanks,
>
> David
>
> On Thu, Jun 9, 2011 at 2:02 AM, Richard Guenther
> <richard.guenther@gmail.com> wrote:
>> On Thu, Jun 9, 2011 at 12:31 AM, Xinliang David Li <davidxl@google.com> wrote:
>>> this is the patch that just removes the TODO_dump flag and forces it
>>> to dump. The original code cfun->last_verified = flags &
>>> TODO_verify_all looks weird -- depending on TODO_dump is set or not,
>>> the behavior of the update is different (when no other todo flags is
>>> set).
>>>
>>> Ok for trunk?
>>
>> -ENOPATCH.
>>
>> Richard.
>>
>>> David
>>>
>>> On Wed, Jun 8, 2011 at 9:52 AM, Xinliang David Li <davidxl@google.com> wrote:
>>>> On Wed, Jun 8, 2011 at 2:06 AM, Richard Guenther
>>>> <richard.guenther@gmail.com> wrote:
>>>>> On Wed, Jun 8, 2011 at 1:08 AM, Xinliang David Li <davidxl@google.com> wrote:
>>>>>> The following is the patch that does the job. Most of the changes are
>>>>>> just  removing TODO_dump_func. The major change is in passes.c and
>>>>>> tree-pass.h.
>>>>>>
>>>>>> -fdump-xxx-yyy-start       <-- dump before TODO_start
>>>>>> -fdump-xxx-yyy-before    <-- dump before main pass after TODO_pass
>>>>>> -fdump-xxx-yyy-after       <-- dump after main pass before TODO_finish
>>>>>> -fdump-xxx-yyy-finish      <-- dump after TODO_finish
>>>>>
>>>>> Can we bikeshed a bit more about these names?
>>>>
>>>> These names may be less confusing:
>>>>
>>>> before_preparation
>>>> before
>>>> after
>>>> after_cleanup
>>>>
>>>> David
>>>>
>>>>> "start" and "before"
>>>>> have no semantical difference to me ... as the dump before TODO_start
>>>>> of a pass and the dump after TODO_finish of the previous pass are
>>>>> identical (hopefully ;)), maybe merge those into a -between flag?
>>>>> If you'd specify it for a single pass then you'd get both -start and -finish
>>>>> (using your naming scheme).  Splitting that dump(s) to different files
>>>>> then might make sense (not sure about the name to use).
>>>>>
>>>>> Note that I find it extremely useful to have dumping done in
>>>>> chronological order - splitting some of it to different files destroys
>>>>> this, especially a dump after TODO_start or before TODO_finish
>>>>> should appear in the same file (or we could also start splitting
>>>>> individual TODO_ output into sub-dump-files).  I guess what would
>>>>> be nice instread would be a fancy dump-file viewer that could
>>>>> show diffs, hide things like SCEV output, etc.
>>>>>
>>>>> I suppose a patch that removes the dump TODO and unconditionally
>>>>> dumps at the current point would be a good preparation for this
>>>>> enhancing patch.
>>>>>
>>>>> Richard.
>>>>>
>>>>>> The default is 'finish'.
>>>>>>
>>>>>> Does it look ok?
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> David
>>>>>>
>>>>>> On Tue, Jun 7, 2011 at 2:36 AM, Richard Guenther
>>>>>> <richard.guenther@gmail.com> wrote:
>>>>>>> On Mon, Jun 6, 2011 at 6:20 PM, Xinliang David Li <davidxl@google.com> wrote:
>>>>>>>>>
>>>>>>>>> Your patch doesn't really improve this but adds to the confusion.
>>>>>>>>>
>>>>>>>>> +  /* Override dump TODOs.  */
>>>>>>>>> +  if (dump_file && (pass->todo_flags_finish & TODO_dump_func)
>>>>>>>>> +      && (dump_flags & TDF_BEFORE))
>>>>>>>>> +    {
>>>>>>>>> +      pass->todo_flags_finish &= ~TODO_dump_func;
>>>>>>>>> +      pass->todo_flags_start |= TODO_dump_func;
>>>>>>>>> +    }
>>>>>>>>>
>>>>>>>>> and certainly writing to pass is not ok.  And the TDF_BEFORE flag
>>>>>>>>> looks misplaced as it controls TODOs, not dumping behavior.
>>>>>>>>> Yes, it's a mess right now but the above looks like a hack ontop
>>>>>>>>> of that mess (maybe because of it, but well ...).
>>>>>>>>>
>>>>>>>>
>>>>>>>> How about removing dumping TODO completely -- this can be done easily
>>>>>>>> -- I don't understand why pass wants extra control on the dumping if
>>>>>>>> user already asked for dumping -- it is annoying to see empty IR dump
>>>>>>>> for a pass when I want to see it.
>>>>>>>>
>>>>>>>>> At least I would have expected to also get the dump after the
>>>>>>>>> pass, not only the one before it with this dump flag.
>>>>>>>>>
>>>>>>>>> Now, why can't you look at the previous pass output for the
>>>>>>>>> before-dump (as I do usually)?
>>>>>>>>
>>>>>>>> For one thing, you need to either remember what is the previous pass,
>>>>>>>> or dump all passes which for large files can take very long time. Even
>>>>>>>> with all the dumps, you will need to eyeballing to find the previous
>>>>>>>> pass which may or may not have the IR dumped.
>>>>>>>>
>>>>>>>> How about removing dump TODO?
>>>>>>>
>>>>>>> Yeah, I think this would go in the right direction.  Currently some passes
>>>>>>> do not dump function bodies because they presumably do no IL
>>>>>>> modification.  But this is certainly the minority (and some passes do not
>>>>>>> dump bodies even though they are modifying the IL ...).
>>>>>>>
>>>>>>> So I'd say we should by default dump function bodies.
>>>>>>>
>>>>>>> Note that there are three useful dumping positions (maybe four),
>>>>>>> before todo-start, after todo-start, before todo-finish and after todo-finish.
>>>>>>> By default we'd want after todo-finish.  When we no longer dump via
>>>>>>> a TODO then we could indeed use dump-flags to control this
>>>>>>> (maybe -original for the body before todo-start).
>>>>>>>
>>>>>>> What to others think?
>>>>>>>
>>>>>>> Richard.
>>>>>>>
>>>>>>>> Thanks,
>>>>>>>>
>>>>>>>> David
>>>>>>>>
>>>>>>>>
>>>>>>>>>
>>>>>>>>> Richard.
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Dump before flag
  2011-06-10  9:04                       ` Richard Guenther
@ 2011-06-10 16:54                         ` Xinliang David Li
  2011-06-10 18:49                           ` Xinliang David Li
  0 siblings, 1 reply; 30+ messages in thread
From: Xinliang David Li @ 2011-06-10 16:54 UTC (permalink / raw)
  To: Richard Guenther; +Cc: GCC Patches, Diego Novillo

On Fri, Jun 10, 2011 at 1:52 AM, Richard Guenther
<richard.guenther@gmail.com> wrote:
> On Thu, Jun 9, 2011 at 5:47 PM, Xinliang David Li <davidxl@google.com> wrote:
>> See attached.
>
> Hmm.  I don't like how you still wire dumping in the TODO routines.
> Doesn't it work to just dump the body from pass_fini_dump_file ()?
> Or if that doesn't sound clean from (a subset of) places where it
> is called? (we might want to exclude the ipa read/write/summary
> stages)

That may require another round of function traversal -- but probably
not a big deal -- it sounds cleaner.

David

>
> Richard.
>
>> Thanks,
>>
>> David
>>
>> On Thu, Jun 9, 2011 at 2:02 AM, Richard Guenther
>> <richard.guenther@gmail.com> wrote:
>>> On Thu, Jun 9, 2011 at 12:31 AM, Xinliang David Li <davidxl@google.com> wrote:
>>>> this is the patch that just removes the TODO_dump flag and forces it
>>>> to dump. The original code cfun->last_verified = flags &
>>>> TODO_verify_all looks weird -- depending on TODO_dump is set or not,
>>>> the behavior of the update is different (when no other todo flags is
>>>> set).
>>>>
>>>> Ok for trunk?
>>>
>>> -ENOPATCH.
>>>
>>> Richard.
>>>
>>>> David
>>>>
>>>> On Wed, Jun 8, 2011 at 9:52 AM, Xinliang David Li <davidxl@google.com> wrote:
>>>>> On Wed, Jun 8, 2011 at 2:06 AM, Richard Guenther
>>>>> <richard.guenther@gmail.com> wrote:
>>>>>> On Wed, Jun 8, 2011 at 1:08 AM, Xinliang David Li <davidxl@google.com> wrote:
>>>>>>> The following is the patch that does the job. Most of the changes are
>>>>>>> just  removing TODO_dump_func. The major change is in passes.c and
>>>>>>> tree-pass.h.
>>>>>>>
>>>>>>> -fdump-xxx-yyy-start       <-- dump before TODO_start
>>>>>>> -fdump-xxx-yyy-before    <-- dump before main pass after TODO_pass
>>>>>>> -fdump-xxx-yyy-after       <-- dump after main pass before TODO_finish
>>>>>>> -fdump-xxx-yyy-finish      <-- dump after TODO_finish
>>>>>>
>>>>>> Can we bikeshed a bit more about these names?
>>>>>
>>>>> These names may be less confusing:
>>>>>
>>>>> before_preparation
>>>>> before
>>>>> after
>>>>> after_cleanup
>>>>>
>>>>> David
>>>>>
>>>>>> "start" and "before"
>>>>>> have no semantical difference to me ... as the dump before TODO_start
>>>>>> of a pass and the dump after TODO_finish of the previous pass are
>>>>>> identical (hopefully ;)), maybe merge those into a -between flag?
>>>>>> If you'd specify it for a single pass then you'd get both -start and -finish
>>>>>> (using your naming scheme).  Splitting that dump(s) to different files
>>>>>> then might make sense (not sure about the name to use).
>>>>>>
>>>>>> Note that I find it extremely useful to have dumping done in
>>>>>> chronological order - splitting some of it to different files destroys
>>>>>> this, especially a dump after TODO_start or before TODO_finish
>>>>>> should appear in the same file (or we could also start splitting
>>>>>> individual TODO_ output into sub-dump-files).  I guess what would
>>>>>> be nice instread would be a fancy dump-file viewer that could
>>>>>> show diffs, hide things like SCEV output, etc.
>>>>>>
>>>>>> I suppose a patch that removes the dump TODO and unconditionally
>>>>>> dumps at the current point would be a good preparation for this
>>>>>> enhancing patch.
>>>>>>
>>>>>> Richard.
>>>>>>
>>>>>>> The default is 'finish'.
>>>>>>>
>>>>>>> Does it look ok?
>>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>> David
>>>>>>>
>>>>>>> On Tue, Jun 7, 2011 at 2:36 AM, Richard Guenther
>>>>>>> <richard.guenther@gmail.com> wrote:
>>>>>>>> On Mon, Jun 6, 2011 at 6:20 PM, Xinliang David Li <davidxl@google.com> wrote:
>>>>>>>>>>
>>>>>>>>>> Your patch doesn't really improve this but adds to the confusion.
>>>>>>>>>>
>>>>>>>>>> +  /* Override dump TODOs.  */
>>>>>>>>>> +  if (dump_file && (pass->todo_flags_finish & TODO_dump_func)
>>>>>>>>>> +      && (dump_flags & TDF_BEFORE))
>>>>>>>>>> +    {
>>>>>>>>>> +      pass->todo_flags_finish &= ~TODO_dump_func;
>>>>>>>>>> +      pass->todo_flags_start |= TODO_dump_func;
>>>>>>>>>> +    }
>>>>>>>>>>
>>>>>>>>>> and certainly writing to pass is not ok.  And the TDF_BEFORE flag
>>>>>>>>>> looks misplaced as it controls TODOs, not dumping behavior.
>>>>>>>>>> Yes, it's a mess right now but the above looks like a hack ontop
>>>>>>>>>> of that mess (maybe because of it, but well ...).
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> How about removing dumping TODO completely -- this can be done easily
>>>>>>>>> -- I don't understand why pass wants extra control on the dumping if
>>>>>>>>> user already asked for dumping -- it is annoying to see empty IR dump
>>>>>>>>> for a pass when I want to see it.
>>>>>>>>>
>>>>>>>>>> At least I would have expected to also get the dump after the
>>>>>>>>>> pass, not only the one before it with this dump flag.
>>>>>>>>>>
>>>>>>>>>> Now, why can't you look at the previous pass output for the
>>>>>>>>>> before-dump (as I do usually)?
>>>>>>>>>
>>>>>>>>> For one thing, you need to either remember what is the previous pass,
>>>>>>>>> or dump all passes which for large files can take very long time. Even
>>>>>>>>> with all the dumps, you will need to eyeballing to find the previous
>>>>>>>>> pass which may or may not have the IR dumped.
>>>>>>>>>
>>>>>>>>> How about removing dump TODO?
>>>>>>>>
>>>>>>>> Yeah, I think this would go in the right direction.  Currently some passes
>>>>>>>> do not dump function bodies because they presumably do no IL
>>>>>>>> modification.  But this is certainly the minority (and some passes do not
>>>>>>>> dump bodies even though they are modifying the IL ...).
>>>>>>>>
>>>>>>>> So I'd say we should by default dump function bodies.
>>>>>>>>
>>>>>>>> Note that there are three useful dumping positions (maybe four),
>>>>>>>> before todo-start, after todo-start, before todo-finish and after todo-finish.
>>>>>>>> By default we'd want after todo-finish.  When we no longer dump via
>>>>>>>> a TODO then we could indeed use dump-flags to control this
>>>>>>>> (maybe -original for the body before todo-start).
>>>>>>>>
>>>>>>>> What to others think?
>>>>>>>>
>>>>>>>> Richard.
>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>>
>>>>>>>>> David
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Richard.
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Dump before flag
  2011-06-10 16:54                         ` Xinliang David Li
@ 2011-06-10 18:49                           ` Xinliang David Li
  2011-06-14 14:19                             ` Richard Guenther
  0 siblings, 1 reply; 30+ messages in thread
From: Xinliang David Li @ 2011-06-10 18:49 UTC (permalink / raw)
  To: Richard Guenther; +Cc: GCC Patches, Diego Novillo

[-- Attachment #1: Type: text/plain, Size: 6731 bytes --]

This is the revised patch as suggested.

How does it look?

Thanks,

David

On Fri, Jun 10, 2011 at 9:22 AM, Xinliang David Li <davidxl@google.com> wrote:
> On Fri, Jun 10, 2011 at 1:52 AM, Richard Guenther
> <richard.guenther@gmail.com> wrote:
>> On Thu, Jun 9, 2011 at 5:47 PM, Xinliang David Li <davidxl@google.com> wrote:
>>> See attached.
>>
>> Hmm.  I don't like how you still wire dumping in the TODO routines.
>> Doesn't it work to just dump the body from pass_fini_dump_file ()?
>> Or if that doesn't sound clean from (a subset of) places where it
>> is called? (we might want to exclude the ipa read/write/summary
>> stages)
>
> That may require another round of function traversal -- but probably
> not a big deal -- it sounds cleaner.
>
> David
>
>>
>> Richard.
>>
>>> Thanks,
>>>
>>> David
>>>
>>> On Thu, Jun 9, 2011 at 2:02 AM, Richard Guenther
>>> <richard.guenther@gmail.com> wrote:
>>>> On Thu, Jun 9, 2011 at 12:31 AM, Xinliang David Li <davidxl@google.com> wrote:
>>>>> this is the patch that just removes the TODO_dump flag and forces it
>>>>> to dump. The original code cfun->last_verified = flags &
>>>>> TODO_verify_all looks weird -- depending on TODO_dump is set or not,
>>>>> the behavior of the update is different (when no other todo flags is
>>>>> set).
>>>>>
>>>>> Ok for trunk?
>>>>
>>>> -ENOPATCH.
>>>>
>>>> Richard.
>>>>
>>>>> David
>>>>>
>>>>> On Wed, Jun 8, 2011 at 9:52 AM, Xinliang David Li <davidxl@google.com> wrote:
>>>>>> On Wed, Jun 8, 2011 at 2:06 AM, Richard Guenther
>>>>>> <richard.guenther@gmail.com> wrote:
>>>>>>> On Wed, Jun 8, 2011 at 1:08 AM, Xinliang David Li <davidxl@google.com> wrote:
>>>>>>>> The following is the patch that does the job. Most of the changes are
>>>>>>>> just  removing TODO_dump_func. The major change is in passes.c and
>>>>>>>> tree-pass.h.
>>>>>>>>
>>>>>>>> -fdump-xxx-yyy-start       <-- dump before TODO_start
>>>>>>>> -fdump-xxx-yyy-before    <-- dump before main pass after TODO_pass
>>>>>>>> -fdump-xxx-yyy-after       <-- dump after main pass before TODO_finish
>>>>>>>> -fdump-xxx-yyy-finish      <-- dump after TODO_finish
>>>>>>>
>>>>>>> Can we bikeshed a bit more about these names?
>>>>>>
>>>>>> These names may be less confusing:
>>>>>>
>>>>>> before_preparation
>>>>>> before
>>>>>> after
>>>>>> after_cleanup
>>>>>>
>>>>>> David
>>>>>>
>>>>>>> "start" and "before"
>>>>>>> have no semantical difference to me ... as the dump before TODO_start
>>>>>>> of a pass and the dump after TODO_finish of the previous pass are
>>>>>>> identical (hopefully ;)), maybe merge those into a -between flag?
>>>>>>> If you'd specify it for a single pass then you'd get both -start and -finish
>>>>>>> (using your naming scheme).  Splitting that dump(s) to different files
>>>>>>> then might make sense (not sure about the name to use).
>>>>>>>
>>>>>>> Note that I find it extremely useful to have dumping done in
>>>>>>> chronological order - splitting some of it to different files destroys
>>>>>>> this, especially a dump after TODO_start or before TODO_finish
>>>>>>> should appear in the same file (or we could also start splitting
>>>>>>> individual TODO_ output into sub-dump-files).  I guess what would
>>>>>>> be nice instread would be a fancy dump-file viewer that could
>>>>>>> show diffs, hide things like SCEV output, etc.
>>>>>>>
>>>>>>> I suppose a patch that removes the dump TODO and unconditionally
>>>>>>> dumps at the current point would be a good preparation for this
>>>>>>> enhancing patch.
>>>>>>>
>>>>>>> Richard.
>>>>>>>
>>>>>>>> The default is 'finish'.
>>>>>>>>
>>>>>>>> Does it look ok?
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>>
>>>>>>>> David
>>>>>>>>
>>>>>>>> On Tue, Jun 7, 2011 at 2:36 AM, Richard Guenther
>>>>>>>> <richard.guenther@gmail.com> wrote:
>>>>>>>>> On Mon, Jun 6, 2011 at 6:20 PM, Xinliang David Li <davidxl@google.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>> Your patch doesn't really improve this but adds to the confusion.
>>>>>>>>>>>
>>>>>>>>>>> +  /* Override dump TODOs.  */
>>>>>>>>>>> +  if (dump_file && (pass->todo_flags_finish & TODO_dump_func)
>>>>>>>>>>> +      && (dump_flags & TDF_BEFORE))
>>>>>>>>>>> +    {
>>>>>>>>>>> +      pass->todo_flags_finish &= ~TODO_dump_func;
>>>>>>>>>>> +      pass->todo_flags_start |= TODO_dump_func;
>>>>>>>>>>> +    }
>>>>>>>>>>>
>>>>>>>>>>> and certainly writing to pass is not ok.  And the TDF_BEFORE flag
>>>>>>>>>>> looks misplaced as it controls TODOs, not dumping behavior.
>>>>>>>>>>> Yes, it's a mess right now but the above looks like a hack ontop
>>>>>>>>>>> of that mess (maybe because of it, but well ...).
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> How about removing dumping TODO completely -- this can be done easily
>>>>>>>>>> -- I don't understand why pass wants extra control on the dumping if
>>>>>>>>>> user already asked for dumping -- it is annoying to see empty IR dump
>>>>>>>>>> for a pass when I want to see it.
>>>>>>>>>>
>>>>>>>>>>> At least I would have expected to also get the dump after the
>>>>>>>>>>> pass, not only the one before it with this dump flag.
>>>>>>>>>>>
>>>>>>>>>>> Now, why can't you look at the previous pass output for the
>>>>>>>>>>> before-dump (as I do usually)?
>>>>>>>>>>
>>>>>>>>>> For one thing, you need to either remember what is the previous pass,
>>>>>>>>>> or dump all passes which for large files can take very long time. Even
>>>>>>>>>> with all the dumps, you will need to eyeballing to find the previous
>>>>>>>>>> pass which may or may not have the IR dumped.
>>>>>>>>>>
>>>>>>>>>> How about removing dump TODO?
>>>>>>>>>
>>>>>>>>> Yeah, I think this would go in the right direction.  Currently some passes
>>>>>>>>> do not dump function bodies because they presumably do no IL
>>>>>>>>> modification.  But this is certainly the minority (and some passes do not
>>>>>>>>> dump bodies even though they are modifying the IL ...).
>>>>>>>>>
>>>>>>>>> So I'd say we should by default dump function bodies.
>>>>>>>>>
>>>>>>>>> Note that there are three useful dumping positions (maybe four),
>>>>>>>>> before todo-start, after todo-start, before todo-finish and after todo-finish.
>>>>>>>>> By default we'd want after todo-finish.  When we no longer dump via
>>>>>>>>> a TODO then we could indeed use dump-flags to control this
>>>>>>>>> (maybe -original for the body before todo-start).
>>>>>>>>>
>>>>>>>>> What to others think?
>>>>>>>>>
>>>>>>>>> Richard.
>>>>>>>>>
>>>>>>>>>> Thanks,
>>>>>>>>>>
>>>>>>>>>> David
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Richard.
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

[-- Attachment #2: dump-control-3.p --]
[-- Type: text/x-pascal, Size: 71428 bytes --]

Index: tree-vrp.c
===================================================================
--- tree-vrp.c	(revision 174759)
+++ tree-vrp.c	(working copy)
@@ -7818,7 +7818,6 @@ struct gimple_opt_pass pass_vrp =
     | TODO_update_ssa
     | TODO_verify_ssa
     | TODO_verify_flow
-    | TODO_dump_func
     | TODO_ggc_collect			/* todo_flags_finish */
  }
 };
Index: regrename.c
===================================================================
--- regrename.c	(revision 174759)
+++ regrename.c	(working copy)
@@ -1453,7 +1453,6 @@ struct rtl_opt_pass pass_regrename =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
-
Index: fwprop.c
===================================================================
--- fwprop.c	(revision 174759)
+++ fwprop.c	(working copy)
@@ -1473,8 +1473,7 @@ struct rtl_opt_pass pass_rtl_fwprop =
   0,                                    /* todo_flags_start */
   TODO_df_finish
     | TODO_verify_flow
-    | TODO_verify_rtl_sharing
-    | TODO_dump_func                    /* todo_flags_finish */
+    | TODO_verify_rtl_sharing           /* todo_flags_finish */
  }
 };
 
@@ -1521,7 +1520,6 @@ struct rtl_opt_pass pass_rtl_fwprop_addr
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func                        /* todo_flags_finish */
+  TODO_df_finish | TODO_verify_rtl_sharing  /* todo_flags_finish */
  }
 };
Index: tree-into-ssa.c
===================================================================
--- tree-into-ssa.c	(revision 174759)
+++ tree-into-ssa.c	(working copy)
@@ -2413,8 +2413,7 @@ struct gimple_opt_pass pass_build_ssa =
   PROP_ssa,				/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func
-    | TODO_update_ssa_only_virtuals
+  TODO_update_ssa_only_virtuals
     | TODO_verify_ssa
     | TODO_remove_unused_locals		/* todo_flags_finish */
  }
Index: tree-complex.c
===================================================================
--- tree-complex.c	(revision 174759)
+++ tree-complex.c	(working copy)
@@ -1623,8 +1623,7 @@ struct gimple_opt_pass pass_lower_comple
   PROP_gimple_lcx,			/* properties_provided */
   0,                       		/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func
-    | TODO_ggc_collect
+    TODO_ggc_collect
     | TODO_update_ssa
     | TODO_verify_stmts	 		/* todo_flags_finish */
  }
@@ -1654,8 +1653,7 @@ struct gimple_opt_pass pass_lower_comple
   PROP_gimple_lcx,			/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func
-    | TODO_ggc_collect
+  TODO_ggc_collect
     | TODO_update_ssa
     | TODO_verify_stmts	 		/* todo_flags_finish */
  }
Index: tracer.c
===================================================================
--- tracer.c	(revision 174759)
+++ tracer.c	(working copy)
@@ -393,8 +393,7 @@ struct gimple_opt_pass pass_tracer =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func
-    | TODO_update_ssa
+  TODO_update_ssa
     | TODO_verify_ssa                   /* todo_flags_finish */
  }
 };
Index: tree-loop-distribution.c
===================================================================
--- tree-loop-distribution.c	(revision 174759)
+++ tree-loop-distribution.c	(working copy)
@@ -1313,6 +1313,6 @@ struct gimple_opt_pass pass_loop_distrib
   0,				/* properties_provided */
   0,				/* properties_destroyed */
   0,				/* todo_flags_start */
-  TODO_dump_func                /* todo_flags_finish */
+  0                             /* todo_flags_finish */
  }
 };
Index: postreload-gcse.c
===================================================================
--- postreload-gcse.c	(revision 174759)
+++ postreload-gcse.c	(working copy)
@@ -1344,8 +1344,7 @@ struct rtl_opt_pass pass_gcse2 =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing
+  TODO_verify_rtl_sharing
   | TODO_verify_flow | TODO_ggc_collect /* todo_flags_finish */
  }
 };
-
Index: postreload.c
===================================================================
--- postreload.c	(revision 174759)
+++ postreload.c	(working copy)
@@ -2287,6 +2287,6 @@ struct rtl_opt_pass pass_postreload_cse 
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
Index: tree-tailcall.c
===================================================================
--- tree-tailcall.c	(revision 174759)
+++ tree-tailcall.c	(working copy)
@@ -1092,7 +1092,7 @@ struct gimple_opt_pass pass_tail_recursi
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_ssa	/* todo_flags_finish */
+  TODO_verify_ssa	                /* todo_flags_finish */
  }
 };
 
@@ -1111,6 +1111,6 @@ struct gimple_opt_pass pass_tail_calls =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_ssa	/* todo_flags_finish */
+  TODO_verify_ssa	                /* todo_flags_finish */
  }
 };
Index: tree-ssa-loop-ch.c
===================================================================
--- tree-ssa-loop-ch.c	(revision 174759)
+++ tree-ssa-loop-ch.c	(working copy)
@@ -278,7 +278,6 @@ struct gimple_opt_pass pass_ch =
   0,					/* todo_flags_start */
   TODO_cleanup_cfg
     | TODO_verify_ssa
-    | TODO_verify_flow
-    | TODO_dump_func			/* todo_flags_finish */
+    | TODO_verify_flow			/* todo_flags_finish */
  }
 };
Index: ipa-cp.c
===================================================================
--- ipa-cp.c	(revision 174759)
+++ ipa-cp.c	(working copy)
@@ -1570,7 +1570,7 @@ struct ipa_opt_pass_d pass_ipa_cp =
   0,				/* properties_provided */
   0,				/* properties_destroyed */
   0,				/* todo_flags_start */
-  TODO_dump_cgraph | TODO_dump_func |
+  TODO_dump_cgraph |
   TODO_remove_functions | TODO_ggc_collect /* todo_flags_finish */
  },
  ipcp_generate_summary,			/* generate_summary */
Index: final.c
===================================================================
--- final.c	(revision 174759)
+++ final.c	(working copy)
@@ -837,7 +837,7 @@ struct rtl_opt_pass pass_compute_alignme
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing
+  TODO_verify_rtl_sharing
   | TODO_ggc_collect                    /* todo_flags_finish */
  }
 };
@@ -4337,7 +4337,7 @@ struct rtl_opt_pass pass_shorten_branche
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
Index: tree-emutls.c
===================================================================
--- tree-emutls.c	(revision 174759)
+++ tree-emutls.c	(working copy)
@@ -783,7 +783,7 @@ ipa_lower_emutls (void)
   VEC_free (tree, heap, access_vars);
   free_varpool_node_set (tls_vars);
 
-  return TODO_dump_func | TODO_ggc_collect | TODO_verify_all;
+  return TODO_ggc_collect | TODO_verify_all;
 }
 
 /* If the target supports TLS natively, we need do nothing here.  */
Index: omp-low.c
===================================================================
--- omp-low.c	(revision 174759)
+++ omp-low.c	(working copy)
@@ -5553,7 +5553,7 @@ struct gimple_opt_pass pass_expand_omp =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0                      		/* todo_flags_finish */
  }
 };
 \f
@@ -6730,7 +6730,7 @@ struct gimple_opt_pass pass_lower_omp =
   PROP_gimple_lomp,			/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 \f
Index: tree-ssa-dse.c
===================================================================
--- tree-ssa-dse.c	(revision 174759)
+++ tree-ssa-dse.c	(working copy)
@@ -352,9 +352,7 @@ struct gimple_opt_pass pass_dse =
   0,				/* properties_provided */
   0,				/* properties_destroyed */
   0,				/* todo_flags_start */
-  TODO_dump_func
-    | TODO_ggc_collect
+  TODO_ggc_collect
     | TODO_verify_ssa		/* todo_flags_finish */
  }
 };
-
Index: tree-ssa-uncprop.c
===================================================================
--- tree-ssa-uncprop.c	(revision 174759)
+++ tree-ssa-uncprop.c	(working copy)
@@ -596,7 +596,6 @@ struct gimple_opt_pass pass_uncprop =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_ssa	/* todo_flags_finish */
+  TODO_verify_ssa	                /* todo_flags_finish */
  }
 };
-
Index: auto-inc-dec.c
===================================================================
--- auto-inc-dec.c	(revision 174759)
+++ auto-inc-dec.c	(working copy)
@@ -1523,7 +1523,6 @@ struct rtl_opt_pass pass_inc_dec =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_df_finish,                       /* todo_flags_finish */
  }
 };
Index: reorg.c
===================================================================
--- reorg.c	(revision 174759)
+++ reorg.c	(working copy)
@@ -4086,7 +4086,6 @@ struct rtl_opt_pass pass_delay_slots =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
 };
@@ -4121,7 +4120,6 @@ struct rtl_opt_pass pass_machine_reorg =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
 };
Index: tree-ssa-copyrename.c
===================================================================
--- tree-ssa-copyrename.c	(revision 174759)
+++ tree-ssa-copyrename.c	(working copy)
@@ -399,6 +399,6 @@ struct gimple_opt_pass pass_rename_ssa_c
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_ssa      /* todo_flags_finish */
+  TODO_verify_ssa                       /* todo_flags_finish */
  }
 };
Index: tree-ssa-ccp.c
===================================================================
--- tree-ssa-ccp.c	(revision 174759)
+++ tree-ssa-ccp.c	(working copy)
@@ -1953,7 +1953,7 @@ struct gimple_opt_pass pass_ccp =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_ssa
+  TODO_verify_ssa
   | TODO_verify_stmts | TODO_ggc_collect/* todo_flags_finish */
  }
 };
@@ -2256,8 +2256,7 @@ struct gimple_opt_pass pass_fold_builtin
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func
-    | TODO_verify_ssa
+  TODO_verify_ssa
     | TODO_update_ssa			/* todo_flags_finish */
  }
 };
Index: compare-elim.c
===================================================================
--- compare-elim.c	(revision 174759)
+++ compare-elim.c	(working copy)
@@ -636,7 +636,6 @@ struct rtl_opt_pass pass_compare_elim_af
   TODO_df_finish
   | TODO_df_verify
   | TODO_verify_rtl_sharing
-  | TODO_dump_func
   | TODO_ggc_collect			/* todo_flags_finish */
  }
 };
Index: mode-switching.c
===================================================================
--- mode-switching.c	(revision 174759)
+++ mode-switching.c	(working copy)
@@ -772,6 +772,6 @@ struct rtl_opt_pass pass_mode_switching 
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
Index: modulo-sched.c
===================================================================
--- modulo-sched.c	(revision 174759)
+++ modulo-sched.c	(working copy)
@@ -2969,12 +2969,10 @@ struct rtl_opt_pass pass_sms =
   0,                                    /* properties_required */
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
-  TODO_dump_func,                       /* todo_flags_start */
+  0,                                    /* todo_flags_start */
   TODO_df_finish
     | TODO_verify_flow
     | TODO_verify_rtl_sharing
-    | TODO_dump_func
     | TODO_ggc_collect                  /* todo_flags_finish */
  }
 };
-
Index: tree-call-cdce.c
===================================================================
--- tree-call-cdce.c	(revision 174759)
+++ tree-call-cdce.c	(working copy)
@@ -928,6 +928,6 @@ struct gimple_opt_pass pass_call_cdce =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_ssa      /* todo_flags_finish */
+  TODO_verify_ssa                       /* todo_flags_finish */
  }
 };
Index: cse.c
===================================================================
--- cse.c	(revision 174759)
+++ cse.c	(working copy)
@@ -7414,7 +7414,6 @@ struct rtl_opt_pass pass_cse =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_ggc_collect |
   TODO_verify_flow,                     /* todo_flags_finish */
  }
@@ -7477,7 +7476,6 @@ struct rtl_opt_pass pass_cse2 =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_ggc_collect |
   TODO_verify_flow                      /* todo_flags_finish */
  }
@@ -7538,7 +7536,6 @@ struct rtl_opt_pass pass_cse_after_globa
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_ggc_collect |
   TODO_verify_flow                      /* todo_flags_finish */
  }
Index: web.c
===================================================================
--- web.c	(revision 174759)
+++ web.c	(working copy)
@@ -433,8 +433,6 @@ struct rtl_opt_pass pass_web =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func                        /* todo_flags_finish */
+  TODO_df_finish | TODO_verify_rtl_sharing  /* todo_flags_finish */
  }
 };
-
Index: tree-stdarg.c
===================================================================
--- tree-stdarg.c	(revision 174759)
+++ tree-stdarg.c	(working copy)
@@ -963,6 +963,6 @@ struct gimple_opt_pass pass_stdarg =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0             			/* todo_flags_finish */
  }
 };
Index: lto-streamer-out.c
===================================================================
--- lto-streamer-out.c	(revision 174759)
+++ lto-streamer-out.c	(working copy)
@@ -2297,7 +2297,7 @@ struct ipa_opt_pass_d pass_ipa_lto_gimpl
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,            			/* todo_flags_start */
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  },
  NULL,		                        /* generate_summary */
  lto_output,           			/* write_summary */
Index: tree-ssa-math-opts.c
===================================================================
--- tree-ssa-math-opts.c	(revision 174759)
+++ tree-ssa-math-opts.c	(working copy)
@@ -645,7 +645,7 @@ struct gimple_opt_pass pass_cse_reciproc
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_update_ssa | TODO_verify_ssa
+  TODO_update_ssa | TODO_verify_ssa
     | TODO_verify_stmts                /* todo_flags_finish */
  }
 };
@@ -1424,7 +1424,7 @@ struct gimple_opt_pass pass_cse_sincos =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_update_ssa | TODO_verify_ssa
+  TODO_update_ssa | TODO_verify_ssa
     | TODO_verify_stmts                 /* todo_flags_finish */
  }
 };
@@ -1851,7 +1851,7 @@ execute_optimize_bswap (void)
   statistics_counter_event (cfun, "64-bit bswap implementations found",
 			    bswap_stats.found_64bit);
 
-  return (changed ? TODO_dump_func | TODO_update_ssa | TODO_verify_ssa
+  return (changed ? TODO_update_ssa | TODO_verify_ssa
 	  | TODO_verify_stmts : 0);
 }
 
@@ -2404,7 +2404,6 @@ struct gimple_opt_pass pass_optimize_wid
   0,					/* todo_flags_start */
   TODO_verify_ssa
   | TODO_verify_stmts
-  | TODO_dump_func
   | TODO_update_ssa                     /* todo_flags_finish */
  }
 };
Index: tree-ssa-dom.c
===================================================================
--- tree-ssa-dom.c	(revision 174759)
+++ tree-ssa-dom.c	(working copy)
@@ -816,8 +816,7 @@ struct gimple_opt_pass pass_dominator =
   TODO_cleanup_cfg
     | TODO_update_ssa
     | TODO_verify_ssa
-    | TODO_verify_flow
-    | TODO_dump_func			/* todo_flags_finish */
+    | TODO_verify_flow			/* todo_flags_finish */
  }
 };
 
@@ -2969,7 +2968,6 @@ struct gimple_opt_pass pass_phi_only_cpr
   0,		                        /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_cleanup_cfg
-    | TODO_dump_func
     | TODO_ggc_collect
     | TODO_verify_ssa
     | TODO_verify_stmts
Index: tree-nrv.c
===================================================================
--- tree-nrv.c	(revision 174759)
+++ tree-nrv.c	(working copy)
@@ -288,7 +288,7 @@ struct gimple_opt_pass pass_nrv =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_ggc_collect			/* todo_flags_finish */
+  TODO_ggc_collect			/* todo_flags_finish */
  }
 };
 
Index: loop-init.c
===================================================================
--- loop-init.c	(revision 174759)
+++ loop-init.c	(working copy)
@@ -158,7 +158,6 @@ struct rtl_opt_pass pass_loop2 =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
 };
@@ -192,7 +191,7 @@ struct rtl_opt_pass pass_rtl_loop_init =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing /* todo_flags_finish */
+  TODO_verify_rtl_sharing               /* todo_flags_finish */
  }
 };
 
@@ -228,8 +227,7 @@ struct rtl_opt_pass pass_rtl_loop_done =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_verify_flow
-    | TODO_verify_rtl_sharing
-    | TODO_dump_func                    /* todo_flags_finish */
+    | TODO_verify_rtl_sharing           /* todo_flags_finish */
  }
 };
 
@@ -265,8 +263,7 @@ struct rtl_opt_pass pass_rtl_move_loop_i
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_verify |
-  TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func                        /* todo_flags_finish */
+  TODO_df_finish | TODO_verify_rtl_sharing  /* todo_flags_finish */
  }
 };
 
@@ -301,7 +298,7 @@ struct rtl_opt_pass pass_rtl_unswitch =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing, /* todo_flags_finish */
+  TODO_verify_rtl_sharing,              /* todo_flags_finish */
  }
 };
 
@@ -349,7 +346,7 @@ struct rtl_opt_pass pass_rtl_unroll_and_
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing, /* todo_flags_finish */
+  TODO_verify_rtl_sharing,              /* todo_flags_finish */
  }
 };
 
@@ -390,7 +387,6 @@ struct rtl_opt_pass pass_rtl_doloop =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing /* todo_flags_finish */
+  TODO_verify_rtl_sharing               /* todo_flags_finish */
  }
 };
-
Index: gimple-low.c
===================================================================
--- gimple-low.c	(revision 174759)
+++ gimple-low.c	(working copy)
@@ -203,7 +203,7 @@ struct gimple_opt_pass pass_lower_cf =
   PROP_gimple_lcf,			/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0             			/* todo_flags_finish */
  }
 };
 
Index: tree-ssa-sink.c
===================================================================
--- tree-ssa-sink.c	(revision 174759)
+++ tree-ssa-sink.c	(working copy)
@@ -639,7 +639,6 @@ struct gimple_opt_pass pass_sink_code =
   TODO_update_ssa
     | TODO_verify_ssa
     | TODO_verify_flow
-    | TODO_dump_func
     | TODO_ggc_collect			/* todo_flags_finish */
  }
 };
Index: ipa-inline.c
===================================================================
--- ipa-inline.c	(revision 174759)
+++ ipa-inline.c	(working copy)
@@ -1915,7 +1915,7 @@ struct gimple_opt_pass pass_early_inline
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func    			/* todo_flags_finish */
+  0                 			/* todo_flags_finish */
  }
 };
 
@@ -1949,7 +1949,7 @@ struct ipa_opt_pass_d pass_ipa_inline =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   TODO_remove_functions,		/* todo_flags_finish */
-  TODO_dump_cgraph | TODO_dump_func
+  TODO_dump_cgraph 
   | TODO_remove_functions | TODO_ggc_collect	/* todo_flags_finish */
  },
  inline_generate_summary,		/* generate_summary */
Index: ifcvt.c
===================================================================
--- ifcvt.c	(revision 174759)
+++ ifcvt.c	(working copy)
@@ -4368,7 +4368,7 @@ struct rtl_opt_pass pass_rtl_ifcvt =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
@@ -4405,7 +4405,6 @@ struct rtl_opt_pass pass_if_after_combin
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
 };
@@ -4442,7 +4441,6 @@ struct rtl_opt_pass pass_if_after_reload
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
 };
Index: jump.c
===================================================================
--- jump.c	(revision 174759)
+++ jump.c	(working copy)
@@ -156,7 +156,7 @@ struct rtl_opt_pass pass_cleanup_barrier
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
Index: tree-ssa-loop.c
===================================================================
--- tree-ssa-loop.c	(revision 174759)
+++ tree-ssa-loop.c	(working copy)
@@ -60,7 +60,7 @@ struct gimple_opt_pass pass_tree_loop =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   TODO_ggc_collect,			/* todo_flags_start */
-  TODO_dump_func | TODO_verify_ssa | TODO_ggc_collect	/* todo_flags_finish */
+  TODO_verify_ssa | TODO_ggc_collect	/* todo_flags_finish */
  }
 };
 
@@ -95,7 +95,7 @@ struct gimple_opt_pass pass_tree_loop_in
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0             			/* todo_flags_finish */
  }
 };
 
@@ -131,7 +131,7 @@ struct gimple_opt_pass pass_lim =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0             			/* todo_flags_finish */
  }
 };
 
@@ -167,7 +167,7 @@ struct gimple_opt_pass pass_tree_unswitc
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_ggc_collect | TODO_dump_func 	/* todo_flags_finish */
+  TODO_ggc_collect                  	/* todo_flags_finish */
  }
 };
 
@@ -203,8 +203,7 @@ struct gimple_opt_pass pass_predcom =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func
-    | TODO_update_ssa_only_virtuals	/* todo_flags_finish */
+  TODO_update_ssa_only_virtuals 	/* todo_flags_finish */
  }
 };
 
@@ -240,7 +239,7 @@ struct gimple_opt_pass pass_vectorize =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_update_ssa
+  TODO_update_ssa
     | TODO_ggc_collect			/* todo_flags_finish */
  }
 };
@@ -308,7 +307,7 @@ struct gimple_opt_pass pass_graphite_tra
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0             			/* todo_flags_finish */
  }
 };
 
@@ -345,7 +344,7 @@ struct gimple_opt_pass pass_check_data_d
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func                	/* todo_flags_finish */
+  0                             	/* todo_flags_finish */
  }
 };
 
@@ -381,7 +380,7 @@ struct gimple_opt_pass pass_iv_canon =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0             			/* todo_flags_finish */
  }
 };
 
@@ -408,7 +407,7 @@ struct gimple_opt_pass pass_scev_cprop =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_cleanup_cfg
+  TODO_cleanup_cfg
     | TODO_update_ssa_only_virtuals
 					/* todo_flags_finish */
  }
@@ -480,8 +479,7 @@ struct gimple_opt_pass pass_complete_unr
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func
-    | TODO_ggc_collect			/* todo_flags_finish */
+  TODO_ggc_collect			/* todo_flags_finish */
  }
 };
 
@@ -528,7 +526,6 @@ struct gimple_opt_pass pass_complete_unr
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
   TODO_verify_flow
-    | TODO_dump_func
     | TODO_ggc_collect 			/* todo_flags_finish */
  }
 };
@@ -567,7 +564,7 @@ struct gimple_opt_pass pass_parallelize_
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0             			/* todo_flags_finish */
  }
 };
 
@@ -603,7 +600,7 @@ struct gimple_opt_pass pass_loop_prefetc
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0             			/* todo_flags_finish */
  }
 };
 
@@ -640,7 +637,7 @@ struct gimple_opt_pass pass_iv_optimize 
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_update_ssa | TODO_ggc_collect	/* todo_flags_finish */
+  TODO_update_ssa | TODO_ggc_collect	/* todo_flags_finish */
  }
 };
 
@@ -671,7 +668,6 @@ struct gimple_opt_pass pass_tree_loop_do
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
   TODO_cleanup_cfg
-    | TODO_verify_flow
-    | TODO_dump_func			/* todo_flags_finish */
+    | TODO_verify_flow			/* todo_flags_finish */
  }
 };
Index: recog.c
===================================================================
--- recog.c	(revision 174759)
+++ recog.c	(working copy)
@@ -3694,7 +3694,7 @@ struct rtl_opt_pass pass_peephole2 =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func                       /* todo_flags_finish */
+  0                                    /* todo_flags_finish */
  }
 };
 
@@ -3720,7 +3720,7 @@ struct rtl_opt_pass pass_split_all_insns
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
@@ -3750,7 +3750,7 @@ struct rtl_opt_pass pass_split_after_rel
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
@@ -3794,7 +3794,7 @@ struct rtl_opt_pass pass_split_before_re
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
@@ -3832,8 +3832,7 @@ struct rtl_opt_pass pass_split_before_sc
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_verify_flow |
-  TODO_dump_func                        /* todo_flags_finish */
+  TODO_verify_flow                      /* todo_flags_finish */
  }
 };
 
@@ -3864,6 +3863,6 @@ struct rtl_opt_pass pass_split_for_short
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing /* todo_flags_finish */
+  TODO_verify_rtl_sharing               /* todo_flags_finish */
  }
 };
Index: dse.c
===================================================================
--- dse.c	(revision 174759)
+++ dse.c	(working copy)
@@ -3853,7 +3853,6 @@ struct rtl_opt_pass pass_rtl_dse1 =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_df_finish | TODO_verify_rtl_sharing |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
@@ -3874,7 +3873,6 @@ struct rtl_opt_pass pass_rtl_dse2 =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_df_finish | TODO_verify_rtl_sharing |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
Index: tree-ssa-ifcombine.c
===================================================================
--- tree-ssa-ifcombine.c	(revision 174759)
+++ tree-ssa-ifcombine.c	(working copy)
@@ -663,8 +663,7 @@ struct gimple_opt_pass pass_tree_ifcombi
   0,				/* properties_provided */
   0,				/* properties_destroyed */
   0,				/* todo_flags_start */
-  TODO_dump_func
-  | TODO_ggc_collect
+  TODO_ggc_collect
   | TODO_update_ssa
   | TODO_verify_ssa		/* todo_flags_finish */
  }
Index: matrix-reorg.c
===================================================================
--- matrix-reorg.c	(revision 174759)
+++ matrix-reorg.c	(working copy)
@@ -2390,6 +2390,6 @@ struct simple_ipa_opt_pass pass_ipa_matr
   0,				/* properties_provided */
   0,				/* properties_destroyed */
   0,				/* todo_flags_start */
-  TODO_dump_cgraph | TODO_dump_func	/* todo_flags_finish */
+  TODO_dump_cgraph      	/* todo_flags_finish */
  }
 };
Index: tree-eh.c
===================================================================
--- tree-eh.c	(revision 174759)
+++ tree-eh.c	(working copy)
@@ -2052,7 +2052,7 @@ struct gimple_opt_pass pass_lower_eh =
   PROP_gimple_leh,			/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0             			/* todo_flags_finish */
  }
 };
 \f
@@ -2865,7 +2865,7 @@ struct gimple_opt_pass pass_refactor_eh 
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0             			/* todo_flags_finish */
  }
 };
 \f
@@ -3071,7 +3071,7 @@ struct gimple_opt_pass pass_lower_resx =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_flow	/* todo_flags_finish */
+  TODO_verify_flow	                /* todo_flags_finish */
  }
 };
 
@@ -3272,7 +3272,7 @@ struct gimple_opt_pass pass_lower_eh_dis
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_flow	/* todo_flags_finish */
+  TODO_verify_flow	                /* todo_flags_finish */
  }
 };
 \f
@@ -4015,7 +4015,7 @@ struct gimple_opt_pass pass_cleanup_eh =
    0,				/* properties_provided */
    0,				/* properties_destroyed */
    0,				/* todo_flags_start */
-   TODO_dump_func		/* todo_flags_finish */
+   0             		/* todo_flags_finish */
    }
 };
 \f
Index: regmove.c
===================================================================
--- regmove.c	(revision 174759)
+++ regmove.c	(working copy)
@@ -1382,7 +1382,6 @@ struct rtl_opt_pass pass_regmove =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
 };
Index: function.c
===================================================================
--- function.c	(revision 174759)
+++ function.c	(working copy)
@@ -1955,7 +1955,7 @@ struct rtl_opt_pass pass_instantiate_vir
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
@@ -5949,7 +5949,6 @@ struct rtl_opt_pass pass_thread_prologue
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   TODO_verify_flow,                     /* todo_flags_start */
-  TODO_dump_func |
   TODO_df_verify |
   TODO_df_finish | TODO_verify_rtl_sharing |
   TODO_ggc_collect                      /* todo_flags_finish */
@@ -6151,7 +6150,7 @@ struct rtl_opt_pass pass_match_asm_const
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func                       /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
Index: tree-vectorizer.c
===================================================================
--- tree-vectorizer.c	(revision 174759)
+++ tree-vectorizer.c	(working copy)
@@ -292,7 +292,6 @@ struct gimple_opt_pass pass_slp_vectoriz
   0,                                    /* todo_flags_start */
   TODO_ggc_collect
     | TODO_verify_ssa
-    | TODO_dump_func
     | TODO_update_ssa
     | TODO_verify_stmts                 /* todo_flags_finish */
  }
Index: ipa-split.c
===================================================================
--- ipa-split.c	(revision 174759)
+++ ipa-split.c	(working copy)
@@ -1432,7 +1432,7 @@ struct gimple_opt_pass pass_split_functi
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0             			/* todo_flags_finish */
  }
 };
 
@@ -1473,6 +1473,6 @@ struct gimple_opt_pass pass_feedback_spl
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
+  0             			/* todo_flags_finish */
  }
 };
Index: gcse.c
===================================================================
--- gcse.c	(revision 174759)
+++ gcse.c	(working copy)
@@ -3772,7 +3772,6 @@ struct rtl_opt_pass pass_rtl_pre =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_verify_flow | TODO_ggc_collect   /* todo_flags_finish */
  }
 };
@@ -3793,10 +3792,8 @@ struct rtl_opt_pass pass_rtl_hoist =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_verify_flow | TODO_ggc_collect   /* todo_flags_finish */
  }
 };
 
 #include "gt-gcse.h"
-
Index: tree-if-conv.c
===================================================================
--- tree-if-conv.c	(revision 174759)
+++ tree-if-conv.c	(working copy)
@@ -1808,7 +1808,7 @@ struct gimple_opt_pass pass_if_conversio
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_stmts | TODO_verify_flow
+  TODO_verify_stmts | TODO_verify_flow
                                         /* todo_flags_finish */
  }
 };
Index: init-regs.c
===================================================================
--- init-regs.c	(revision 174759)
+++ init-regs.c	(working copy)
@@ -153,7 +153,6 @@ struct rtl_opt_pass pass_initialize_regs
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_df_finish                        /* todo_flags_finish */
  }
 };
Index: tree-ssa-phiopt.c
===================================================================
--- tree-ssa-phiopt.c	(revision 174759)
+++ tree-ssa-phiopt.c	(working copy)
@@ -1588,8 +1588,7 @@ struct gimple_opt_pass pass_phiopt =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func
-    | TODO_ggc_collect
+  TODO_ggc_collect
     | TODO_verify_ssa
     | TODO_verify_flow
     | TODO_verify_stmts	 		/* todo_flags_finish */
@@ -1617,8 +1616,7 @@ struct gimple_opt_pass pass_cselim =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func
-    | TODO_ggc_collect
+  TODO_ggc_collect
     | TODO_verify_ssa
     | TODO_verify_flow
     | TODO_verify_stmts	 		/* todo_flags_finish */
Index: implicit-zee.c
===================================================================
--- implicit-zee.c	(revision 174759)
+++ implicit-zee.c	(working copy)
@@ -988,7 +988,6 @@ struct rtl_opt_pass pass_implicit_zee =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_ggc_collect |
-  TODO_dump_func |
   TODO_verify_rtl_sharing,              /* todo_flags_finish */
  }
 };
Index: lower-subreg.c
===================================================================
--- lower-subreg.c	(revision 174759)
+++ lower-subreg.c	(working copy)
@@ -1370,7 +1370,6 @@ struct rtl_opt_pass pass_lower_subreg =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_ggc_collect |
   TODO_verify_flow                      /* todo_flags_finish */
  }
@@ -1392,7 +1391,6 @@ struct rtl_opt_pass pass_lower_subreg2 =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_ggc_collect |
   TODO_verify_flow                      /* todo_flags_finish */
  }
Index: bt-load.c
===================================================================
--- bt-load.c	(revision 174759)
+++ bt-load.c	(working copy)
@@ -1519,7 +1519,6 @@ struct rtl_opt_pass pass_branch_target_l
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_verify_rtl_sharing |
   TODO_ggc_collect,                     /* todo_flags_finish */
  }
@@ -1569,7 +1568,6 @@ struct rtl_opt_pass pass_branch_target_l
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_ggc_collect,                     /* todo_flags_finish */
  }
 };
Index: tree-dfa.c
===================================================================
--- tree-dfa.c	(revision 174759)
+++ tree-dfa.c	(working copy)
@@ -113,8 +113,8 @@ struct gimple_opt_pass pass_referenced_v
   PROP_gimple_leh | PROP_cfg,		/* properties_required */
   PROP_referenced_vars,			/* properties_provided */
   0,					/* properties_destroyed */
-  TODO_dump_func,			/* todo_flags_start */
-  TODO_dump_func                        /* todo_flags_finish */
+  0,                     		/* todo_flags_start */
+  0                                     /* todo_flags_finish */
  }
 };
 
@@ -1000,4 +1000,3 @@ stmt_references_abnormal_ssa_name (gimpl
 
   return false;
 }
-
Index: except.c
===================================================================
--- except.c	(revision 174759)
+++ except.c	(working copy)
@@ -1468,7 +1468,7 @@ struct rtl_opt_pass pass_rtl_eh =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 \f
@@ -1910,7 +1910,7 @@ struct rtl_opt_pass pass_set_nothrow_fun
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func,                       /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
@@ -2665,7 +2665,7 @@ struct rtl_opt_pass pass_convert_to_eh_r
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func,			/* todo_flags_finish */
+  0              			/* todo_flags_finish */
  }
 };
 \f
Index: emit-rtl.c
===================================================================
--- emit-rtl.c	(revision 174759)
+++ emit-rtl.c	(working copy)
@@ -2413,7 +2413,7 @@ struct rtl_opt_pass pass_unshare_all_rtl
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing /* todo_flags_finish */
+  TODO_verify_rtl_sharing               /* todo_flags_finish */
  }
 };
 
Index: cfgexpand.c
===================================================================
--- cfgexpand.c	(revision 174759)
+++ cfgexpand.c	(working copy)
@@ -4269,7 +4269,6 @@ struct rtl_opt_pass pass_expand =
   PROP_ssa | PROP_trees,		/* properties_destroyed */
   TODO_verify_ssa | TODO_verify_flow
     | TODO_verify_stmts,		/* todo_flags_start */
-  TODO_dump_func
-  | TODO_ggc_collect			/* todo_flags_finish */
+  TODO_ggc_collect			/* todo_flags_finish */
  }
 };
Index: store-motion.c
===================================================================
--- store-motion.c	(revision 174759)
+++ store-motion.c	(working copy)
@@ -1258,8 +1258,6 @@ struct rtl_opt_pass pass_rtl_store_motio
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_verify_flow | TODO_ggc_collect   /* todo_flags_finish */
  }
 };
-
Index: tree-cfgcleanup.c
===================================================================
--- tree-cfgcleanup.c	(revision 174759)
+++ tree-cfgcleanup.c	(working copy)
@@ -1054,7 +1054,7 @@ struct gimple_opt_pass pass_merge_phi =
   0,				/* properties_provided */
   0,				/* properties_destroyed */
   0,				/* todo_flags_start */
-  TODO_dump_func | TODO_ggc_collect	/* todo_flags_finish */
+  TODO_ggc_collect      	/* todo_flags_finish */
   | TODO_verify_ssa
  }
 };
Index: tree-ssa-pre.c
===================================================================
--- tree-ssa-pre.c	(revision 174759)
+++ tree-ssa-pre.c	(working copy)
@@ -4978,7 +4978,7 @@ struct gimple_opt_pass pass_pre =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   TODO_rebuild_alias,			/* todo_flags_start */
-  TODO_update_ssa_only_virtuals | TODO_dump_func | TODO_ggc_collect
+  TODO_update_ssa_only_virtuals  | TODO_ggc_collect
   | TODO_verify_ssa /* todo_flags_finish */
  }
 };
@@ -5013,6 +5013,6 @@ struct gimple_opt_pass pass_fre =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_ggc_collect | TODO_verify_ssa /* todo_flags_finish */
+  TODO_ggc_collect | TODO_verify_ssa /* todo_flags_finish */
  }
 };
Index: cfgcleanup.c
===================================================================
--- cfgcleanup.c	(revision 174759)
+++ cfgcleanup.c	(working copy)
@@ -2989,8 +2989,6 @@ struct rtl_opt_pass pass_jump2 =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   TODO_ggc_collect,                     /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing,/* todo_flags_finish */
+  TODO_verify_rtl_sharing,              /* todo_flags_finish */
  }
 };
-
-
Index: tree-sra.c
===================================================================
--- tree-sra.c	(revision 174759)
+++ tree-sra.c	(working copy)
@@ -3110,8 +3110,7 @@ struct gimple_opt_pass pass_sra_early =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func
-  | TODO_update_ssa
+  TODO_update_ssa
   | TODO_ggc_collect
   | TODO_verify_ssa			/* todo_flags_finish */
  }
@@ -3132,8 +3131,7 @@ struct gimple_opt_pass pass_sra =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   TODO_update_address_taken,		/* todo_flags_start */
-  TODO_dump_func
-  | TODO_update_ssa
+  TODO_update_ssa
   | TODO_ggc_collect
   | TODO_verify_ssa			/* todo_flags_finish */
  }
@@ -4600,8 +4598,6 @@ struct gimple_opt_pass pass_early_ipa_sr
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_dump_cgraph 	/* todo_flags_finish */
+  TODO_dump_cgraph              	/* todo_flags_finish */
  }
 };
-
-
Index: tree-mudflap.c
===================================================================
--- tree-mudflap.c	(revision 174759)
+++ tree-mudflap.c	(working copy)
@@ -1389,7 +1389,7 @@ struct gimple_opt_pass pass_mudflap_1 =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
@@ -1409,7 +1409,7 @@ struct gimple_opt_pass pass_mudflap_2 =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_verify_flow | TODO_verify_stmts
-  | TODO_dump_func | TODO_update_ssa    /* todo_flags_finish */
+  | TODO_update_ssa                     /* todo_flags_finish */
  }
 };
 
Index: tree-ssa-copy.c
===================================================================
--- tree-ssa-copy.c	(revision 174759)
+++ tree-ssa-copy.c	(working copy)
@@ -848,7 +848,6 @@ struct gimple_opt_pass pass_copy_prop =
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
   TODO_cleanup_cfg
-    | TODO_dump_func
     | TODO_ggc_collect
     | TODO_verify_ssa
     | TODO_update_ssa			/* todo_flags_finish */
Index: cfglayout.c
===================================================================
--- cfglayout.c	(revision 174759)
+++ cfglayout.c	(working copy)
@@ -378,7 +378,7 @@ struct rtl_opt_pass pass_into_cfg_layout
   PROP_cfglayout,                       /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func,                       /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
@@ -397,7 +397,7 @@ struct rtl_opt_pass pass_outof_cfg_layou
   0,                                    /* properties_provided */
   PROP_cfglayout,                       /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func,                       /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 \f
Index: tree-ssa-forwprop.c
===================================================================
--- tree-ssa-forwprop.c	(revision 174759)
+++ tree-ssa-forwprop.c	(working copy)
@@ -2420,10 +2420,8 @@ struct gimple_opt_pass pass_forwprop =
   0,				/* properties_provided */
   0,				/* properties_destroyed */
   0,				/* todo_flags_start */
-  TODO_dump_func
-  | TODO_ggc_collect
+  TODO_ggc_collect
   | TODO_update_ssa
   | TODO_verify_ssa		/* todo_flags_finish */
  }
 };
-
Index: tree-ssa-dce.c
===================================================================
--- tree-ssa-dce.c	(revision 174759)
+++ tree-ssa-dce.c	(working copy)
@@ -1527,7 +1527,7 @@ struct gimple_opt_pass pass_dce =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_ssa	/* todo_flags_finish */
+  TODO_verify_ssa	                /* todo_flags_finish */
  }
 };
 
@@ -1546,7 +1546,7 @@ struct gimple_opt_pass pass_dce_loop =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_ssa	/* todo_flags_finish */
+  TODO_verify_ssa	                /* todo_flags_finish */
  }
 };
 
@@ -1565,7 +1565,7 @@ struct gimple_opt_pass pass_cd_dce =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_ssa
+  TODO_verify_ssa
   | TODO_verify_flow			/* todo_flags_finish */
  }
 };
Index: ira.c
===================================================================
--- ira.c	(revision 174759)
+++ ira.c	(working copy)
@@ -3806,7 +3806,6 @@ struct rtl_opt_pass pass_ira =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
 };
Index: tree-ssa.c
===================================================================
--- tree-ssa.c	(revision 174759)
+++ tree-ssa.c	(working copy)
@@ -2277,7 +2277,6 @@ struct gimple_opt_pass pass_update_addre
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_update_address_taken
-  | TODO_dump_func			/* todo_flags_finish */
+  TODO_update_address_taken             /* todo_flags_finish */
  }
 };
Index: integrate.c
===================================================================
--- integrate.c	(revision 174759)
+++ integrate.c	(working copy)
@@ -325,7 +325,7 @@ struct rtl_opt_pass pass_initial_value_s
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
Index: tree-optimize.c
===================================================================
--- tree-optimize.c	(revision 174759)
+++ tree-optimize.c	(working copy)
@@ -208,8 +208,7 @@ struct gimple_opt_pass pass_cleanup_cfg_
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func			/* todo_flags_finish */
-    | TODO_remove_unused_locals
+  TODO_remove_unused_locals             /* todo_flags_finish */
  }
 };
 
Index: tree-ssa-phiprop.c
===================================================================
--- tree-ssa-phiprop.c	(revision 174759)
+++ tree-ssa-phiprop.c	(working copy)
@@ -426,8 +426,7 @@ struct gimple_opt_pass pass_phiprop =
   0,				/* properties_provided */
   0,				/* properties_destroyed */
   0,				/* todo_flags_start */
-  TODO_dump_func
-  | TODO_ggc_collect
+  TODO_ggc_collect
   | TODO_update_ssa
   | TODO_verify_ssa		/* todo_flags_finish */
  }
Index: tree-object-size.c
===================================================================
--- tree-object-size.c	(revision 174759)
+++ tree-object-size.c	(working copy)
@@ -1282,6 +1282,6 @@ struct gimple_opt_pass pass_object_sizes
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_ssa	/* todo_flags_finish */
+  TODO_verify_ssa	                /* todo_flags_finish */
  }
 };
Index: combine.c
===================================================================
--- combine.c	(revision 174759)
+++ combine.c	(working copy)
@@ -13944,7 +13944,6 @@ struct rtl_opt_pass pass_combine =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_df_finish | TODO_verify_rtl_sharing |
   TODO_ggc_collect,                     /* todo_flags_finish */
  }
Index: bb-reorder.c
===================================================================
--- bb-reorder.c	(revision 174759)
+++ bb-reorder.c	(working copy)
@@ -2117,7 +2117,7 @@ struct rtl_opt_pass pass_duplicate_compu
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing,/* todo_flags_finish */
+  TODO_verify_rtl_sharing,/* todo_flags_finish */
  }
 };
 
@@ -2260,7 +2260,7 @@ struct rtl_opt_pass pass_reorder_blocks 
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing,/* todo_flags_finish */
+  TODO_verify_rtl_sharing,              /* todo_flags_finish */
  }
 };
 
@@ -2300,6 +2300,6 @@ struct rtl_opt_pass pass_partition_block
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing/* todo_flags_finish */
+  TODO_verify_rtl_sharing               /* todo_flags_finish */
  }
 };
Index: cprop.c
===================================================================
--- cprop.c	(revision 174759)
+++ cprop.c	(working copy)
@@ -1878,8 +1878,6 @@ struct rtl_opt_pass pass_rtl_cprop =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_verify_flow | TODO_ggc_collect   /* todo_flags_finish */
  }
 };
-
Index: var-tracking.c
===================================================================
--- var-tracking.c	(revision 174759)
+++ var-tracking.c	(working copy)
@@ -9131,6 +9131,6 @@ struct rtl_opt_pass pass_variable_tracki
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing/* todo_flags_finish */
+  TODO_verify_rtl_sharing               /* todo_flags_finish */
  }
 };
Index: tree-profile.c
===================================================================
--- tree-profile.c	(revision 174759)
+++ tree-profile.c	(working copy)
@@ -590,7 +590,7 @@ struct simple_ipa_opt_pass pass_ipa_tree
   0,                                   /* properties_provided */
   0,                                   /* properties_destroyed */
   0,                                   /* todo_flags_start */
-  TODO_dump_func                       /* todo_flags_finish */
+  0                                    /* todo_flags_finish */
  }
 };
 
Index: tree-vect-generic.c
===================================================================
--- tree-vect-generic.c	(revision 174759)
+++ tree-vect-generic.c	(working copy)
@@ -658,7 +658,7 @@ struct gimple_opt_pass pass_lower_vector
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_update_ssa	/* todo_flags_finish */
+  TODO_update_ssa	                /* todo_flags_finish */
     | TODO_verify_ssa
     | TODO_verify_stmts | TODO_verify_flow
  }
@@ -679,7 +679,7 @@ struct gimple_opt_pass pass_lower_vector
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_update_ssa	/* todo_flags_finish */
+  TODO_update_ssa	                /* todo_flags_finish */
     | TODO_verify_ssa
     | TODO_verify_stmts | TODO_verify_flow
  }
Index: reg-stack.c
===================================================================
--- reg-stack.c	(revision 174759)
+++ reg-stack.c	(working copy)
@@ -3352,7 +3352,6 @@ struct rtl_opt_pass pass_stack_regs_run 
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
 };
Index: sched-rgn.c
===================================================================
--- sched-rgn.c	(revision 174759)
+++ sched-rgn.c	(working copy)
@@ -3551,7 +3551,6 @@ struct rtl_opt_pass pass_sched =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_verify_flow |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
@@ -3573,7 +3572,6 @@ struct rtl_opt_pass pass_sched2 =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_verify_flow |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
Index: tree-ssa-structalias.c
===================================================================
--- tree-ssa-structalias.c	(revision 174759)
+++ tree-ssa-structalias.c	(working copy)
@@ -6634,7 +6634,7 @@ struct gimple_opt_pass pass_build_alias 
   0,			    /* properties_provided */
   0,                        /* properties_destroyed */
   0,                        /* todo_flags_start */
-  TODO_rebuild_alias | TODO_dump_func  /* todo_flags_finish */
+  TODO_rebuild_alias        /* todo_flags_finish */
  }
 };
 
@@ -6656,7 +6656,7 @@ struct gimple_opt_pass pass_build_ealias
   0,			    /* properties_provided */
   0,                        /* properties_destroyed */
   0,                        /* todo_flags_start */
-  TODO_rebuild_alias | TODO_dump_func  /* todo_flags_finish */
+  TODO_rebuild_alias        /* todo_flags_finish */
  }
 };
 
Index: tree-switch-conversion.c
===================================================================
--- tree-switch-conversion.c	(revision 174759)
+++ tree-switch-conversion.c	(working copy)
@@ -1028,7 +1028,7 @@ struct gimple_opt_pass pass_convert_swit
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_update_ssa | TODO_dump_func
+  TODO_update_ssa 
   | TODO_ggc_collect | TODO_verify_ssa  /* todo_flags_finish */
  }
 };
Index: tree-cfg.c
===================================================================
--- tree-cfg.c	(revision 174759)
+++ tree-cfg.c	(working copy)
@@ -261,8 +261,7 @@ struct gimple_opt_pass pass_build_cfg =
   PROP_cfg,				/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_verify_stmts | TODO_cleanup_cfg
-  | TODO_dump_func			/* todo_flags_finish */
+  TODO_verify_stmts | TODO_cleanup_cfg  /* todo_flags_finish */
  }
 };
 
@@ -7234,7 +7233,7 @@ struct gimple_opt_pass pass_split_crit_e
   PROP_no_crit_edges,            /* properties_provided */
   0,                             /* properties_destroyed */
   0,                             /* todo_flags_start */
-  TODO_dump_func | TODO_verify_flow  /* todo_flags_finish */
+  TODO_verify_flow               /* todo_flags_finish */
  }
 };
 
Index: passes.c
===================================================================
--- passes.c	(revision 174762)
+++ passes.c	(working copy)
@@ -1485,6 +1485,35 @@ do_per_function_toporder (void (*callbac
   nnodes = 0;
 }
 
+static void
+execute_function_dump (void *data ATTRIBUTE_UNUSED)
+{
+  if (dump_file && current_function_decl)
+    {
+      if (cfun->curr_properties & PROP_trees)
+        dump_function_to_file (current_function_decl, dump_file, dump_flags);
+      else
+	{
+	  if (dump_flags & TDF_SLIM)
+	    print_rtl_slim_with_bb (dump_file, get_insns (), dump_flags);
+	  else if ((cfun->curr_properties & PROP_cfg)
+		   && (dump_flags & TDF_BLOCKS))
+	    print_rtl_with_bb (dump_file, get_insns ());
+          else
+	    print_rtl (dump_file, get_insns ());
+
+	  if ((cfun->curr_properties & PROP_cfg)
+	      && graph_dump_format != no_graph
+	      && (dump_flags & TDF_GRAPH))
+	    print_rtl_graph_with_bb (dump_file_name, get_insns ());
+	}
+
+      /* Flush the file.  If verification fails, we won't be able to
+	 close the file before aborting.  */
+      fflush (dump_file);
+    }
+}
+
 /* Perform all TODO actions that ought to be done on each function.  */
 
 static void
@@ -1531,31 +1560,6 @@ execute_function_todo (void *data)
   if (flags & TODO_remove_unused_locals)
     remove_unused_locals ();
 
-  if ((flags & TODO_dump_func) && dump_file && current_function_decl)
-    {
-      if (cfun->curr_properties & PROP_trees)
-        dump_function_to_file (current_function_decl, dump_file, dump_flags);
-      else
-	{
-	  if (dump_flags & TDF_SLIM)
-	    print_rtl_slim_with_bb (dump_file, get_insns (), dump_flags);
-	  else if ((cfun->curr_properties & PROP_cfg)
-		   && (dump_flags & TDF_BLOCKS))
-	    print_rtl_with_bb (dump_file, get_insns ());
-          else
-	    print_rtl (dump_file, get_insns ());
-
-	  if ((cfun->curr_properties & PROP_cfg)
-	      && graph_dump_format != no_graph
-	      && (dump_flags & TDF_GRAPH))
-	    print_rtl_graph_with_bb (dump_file_name, get_insns ());
-	}
-
-      /* Flush the file.  If verification fails, we won't be able to
-	 close the file before aborting.  */
-      fflush (dump_file);
-    }
-
   if (flags & TODO_rebuild_frequencies)
     rebuild_frequencies ();
 
@@ -1781,6 +1785,7 @@ execute_one_ipa_transform_pass (struct c
   execute_todo (todo_after);
   verify_interpass_invariants ();
 
+  do_per_function (execute_function_dump, NULL);
   pass_fini_dump_file (pass);
 
   current_pass = NULL;
@@ -1921,6 +1926,7 @@ execute_one_pass (struct opt_pass *pass)
   /* Run post-pass cleanup and verification.  */
   execute_todo (todo_after | pass->todo_flags_finish);
   verify_interpass_invariants ();
+  do_per_function (execute_function_dump, NULL);
   if (pass->type == IPA_PASS)
     {
       struct cgraph_node *node;
Index: tree-ssa-reassoc.c
===================================================================
--- tree-ssa-reassoc.c	(revision 174759)
+++ tree-ssa-reassoc.c	(working copy)
@@ -2299,8 +2299,6 @@ struct gimple_opt_pass pass_reassoc =
   0,					/* todo_flags_start */
   TODO_verify_ssa
     | TODO_verify_flow
-    | TODO_dump_func
     | TODO_ggc_collect			/* todo_flags_finish */
  }
 };
-
Index: combine-stack-adj.c
===================================================================
--- combine-stack-adj.c	(revision 174759)
+++ combine-stack-adj.c	(working copy)
@@ -584,7 +584,6 @@ struct rtl_opt_pass pass_stack_adjustmen
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_ggc_collect,                     /* todo_flags_finish */
  }
 };
Index: dce.c
===================================================================
--- dce.c	(revision 174759)
+++ dce.c	(working copy)
@@ -785,7 +785,6 @@ struct rtl_opt_pass pass_ud_rtl_dce =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_df_finish | TODO_verify_rtl_sharing |
   TODO_ggc_collect                     /* todo_flags_finish */
  }
@@ -1137,7 +1136,6 @@ struct rtl_opt_pass pass_fast_rtl_dce =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_df_finish | TODO_verify_rtl_sharing |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
Index: tree-ssanames.c
===================================================================
--- tree-ssanames.c	(revision 174759)
+++ tree-ssanames.c	(working copy)
@@ -366,6 +366,6 @@ struct gimple_opt_pass pass_release_ssa_
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func 			/* todo_flags_finish */
+  0              			/* todo_flags_finish */
  }
 };
Index: regcprop.c
===================================================================
--- regcprop.c	(revision 174759)
+++ regcprop.c	(working copy)
@@ -1188,7 +1188,7 @@ struct rtl_opt_pass pass_cprop_hardreg =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_df_finish
+  TODO_df_finish
   | TODO_verify_rtl_sharing		/* todo_flags_finish */
  }
 };

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Dump before flag
  2011-06-10 18:49                           ` Xinliang David Li
@ 2011-06-14 14:19                             ` Richard Guenther
  2011-06-14 16:02                               ` Xinliang David Li
  0 siblings, 1 reply; 30+ messages in thread
From: Richard Guenther @ 2011-06-14 14:19 UTC (permalink / raw)
  To: Xinliang David Li; +Cc: GCC Patches, Diego Novillo

On Fri, Jun 10, 2011 at 8:44 PM, Xinliang David Li <davidxl@google.com> wrote:
> This is the revised patch as suggested.
>
> How does it look?

 }

+static void
+execute_function_dump (void *data ATTRIBUTE_UNUSED)

function needs a comment.

Ok with that change.

Please always specify how you tested the patch - the past fallouts
suggest you didn't do the required testing carefully.

A changelog is missing as well.

Thanks,
Richard.

> Thanks,
>
> David
>
> On Fri, Jun 10, 2011 at 9:22 AM, Xinliang David Li <davidxl@google.com> wrote:
>> On Fri, Jun 10, 2011 at 1:52 AM, Richard Guenther
>> <richard.guenther@gmail.com> wrote:
>>> On Thu, Jun 9, 2011 at 5:47 PM, Xinliang David Li <davidxl@google.com> wrote:
>>>> See attached.
>>>
>>> Hmm.  I don't like how you still wire dumping in the TODO routines.
>>> Doesn't it work to just dump the body from pass_fini_dump_file ()?
>>> Or if that doesn't sound clean from (a subset of) places where it
>>> is called? (we might want to exclude the ipa read/write/summary
>>> stages)
>>
>> That may require another round of function traversal -- but probably
>> not a big deal -- it sounds cleaner.
>>
>> David
>>
>>>
>>> Richard.
>>>
>>>> Thanks,
>>>>
>>>> David
>>>>
>>>> On Thu, Jun 9, 2011 at 2:02 AM, Richard Guenther
>>>> <richard.guenther@gmail.com> wrote:
>>>>> On Thu, Jun 9, 2011 at 12:31 AM, Xinliang David Li <davidxl@google.com> wrote:
>>>>>> this is the patch that just removes the TODO_dump flag and forces it
>>>>>> to dump. The original code cfun->last_verified = flags &
>>>>>> TODO_verify_all looks weird -- depending on TODO_dump is set or not,
>>>>>> the behavior of the update is different (when no other todo flags is
>>>>>> set).
>>>>>>
>>>>>> Ok for trunk?
>>>>>
>>>>> -ENOPATCH.
>>>>>
>>>>> Richard.
>>>>>
>>>>>> David
>>>>>>
>>>>>> On Wed, Jun 8, 2011 at 9:52 AM, Xinliang David Li <davidxl@google.com> wrote:
>>>>>>> On Wed, Jun 8, 2011 at 2:06 AM, Richard Guenther
>>>>>>> <richard.guenther@gmail.com> wrote:
>>>>>>>> On Wed, Jun 8, 2011 at 1:08 AM, Xinliang David Li <davidxl@google.com> wrote:
>>>>>>>>> The following is the patch that does the job. Most of the changes are
>>>>>>>>> just  removing TODO_dump_func. The major change is in passes.c and
>>>>>>>>> tree-pass.h.
>>>>>>>>>
>>>>>>>>> -fdump-xxx-yyy-start       <-- dump before TODO_start
>>>>>>>>> -fdump-xxx-yyy-before    <-- dump before main pass after TODO_pass
>>>>>>>>> -fdump-xxx-yyy-after       <-- dump after main pass before TODO_finish
>>>>>>>>> -fdump-xxx-yyy-finish      <-- dump after TODO_finish
>>>>>>>>
>>>>>>>> Can we bikeshed a bit more about these names?
>>>>>>>
>>>>>>> These names may be less confusing:
>>>>>>>
>>>>>>> before_preparation
>>>>>>> before
>>>>>>> after
>>>>>>> after_cleanup
>>>>>>>
>>>>>>> David
>>>>>>>
>>>>>>>> "start" and "before"
>>>>>>>> have no semantical difference to me ... as the dump before TODO_start
>>>>>>>> of a pass and the dump after TODO_finish of the previous pass are
>>>>>>>> identical (hopefully ;)), maybe merge those into a -between flag?
>>>>>>>> If you'd specify it for a single pass then you'd get both -start and -finish
>>>>>>>> (using your naming scheme).  Splitting that dump(s) to different files
>>>>>>>> then might make sense (not sure about the name to use).
>>>>>>>>
>>>>>>>> Note that I find it extremely useful to have dumping done in
>>>>>>>> chronological order - splitting some of it to different files destroys
>>>>>>>> this, especially a dump after TODO_start or before TODO_finish
>>>>>>>> should appear in the same file (or we could also start splitting
>>>>>>>> individual TODO_ output into sub-dump-files).  I guess what would
>>>>>>>> be nice instread would be a fancy dump-file viewer that could
>>>>>>>> show diffs, hide things like SCEV output, etc.
>>>>>>>>
>>>>>>>> I suppose a patch that removes the dump TODO and unconditionally
>>>>>>>> dumps at the current point would be a good preparation for this
>>>>>>>> enhancing patch.
>>>>>>>>
>>>>>>>> Richard.
>>>>>>>>
>>>>>>>>> The default is 'finish'.
>>>>>>>>>
>>>>>>>>> Does it look ok?
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>>
>>>>>>>>> David
>>>>>>>>>
>>>>>>>>> On Tue, Jun 7, 2011 at 2:36 AM, Richard Guenther
>>>>>>>>> <richard.guenther@gmail.com> wrote:
>>>>>>>>>> On Mon, Jun 6, 2011 at 6:20 PM, Xinliang David Li <davidxl@google.com> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>> Your patch doesn't really improve this but adds to the confusion.
>>>>>>>>>>>>
>>>>>>>>>>>> +  /* Override dump TODOs.  */
>>>>>>>>>>>> +  if (dump_file && (pass->todo_flags_finish & TODO_dump_func)
>>>>>>>>>>>> +      && (dump_flags & TDF_BEFORE))
>>>>>>>>>>>> +    {
>>>>>>>>>>>> +      pass->todo_flags_finish &= ~TODO_dump_func;
>>>>>>>>>>>> +      pass->todo_flags_start |= TODO_dump_func;
>>>>>>>>>>>> +    }
>>>>>>>>>>>>
>>>>>>>>>>>> and certainly writing to pass is not ok.  And the TDF_BEFORE flag
>>>>>>>>>>>> looks misplaced as it controls TODOs, not dumping behavior.
>>>>>>>>>>>> Yes, it's a mess right now but the above looks like a hack ontop
>>>>>>>>>>>> of that mess (maybe because of it, but well ...).
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> How about removing dumping TODO completely -- this can be done easily
>>>>>>>>>>> -- I don't understand why pass wants extra control on the dumping if
>>>>>>>>>>> user already asked for dumping -- it is annoying to see empty IR dump
>>>>>>>>>>> for a pass when I want to see it.
>>>>>>>>>>>
>>>>>>>>>>>> At least I would have expected to also get the dump after the
>>>>>>>>>>>> pass, not only the one before it with this dump flag.
>>>>>>>>>>>>
>>>>>>>>>>>> Now, why can't you look at the previous pass output for the
>>>>>>>>>>>> before-dump (as I do usually)?
>>>>>>>>>>>
>>>>>>>>>>> For one thing, you need to either remember what is the previous pass,
>>>>>>>>>>> or dump all passes which for large files can take very long time. Even
>>>>>>>>>>> with all the dumps, you will need to eyeballing to find the previous
>>>>>>>>>>> pass which may or may not have the IR dumped.
>>>>>>>>>>>
>>>>>>>>>>> How about removing dump TODO?
>>>>>>>>>>
>>>>>>>>>> Yeah, I think this would go in the right direction.  Currently some passes
>>>>>>>>>> do not dump function bodies because they presumably do no IL
>>>>>>>>>> modification.  But this is certainly the minority (and some passes do not
>>>>>>>>>> dump bodies even though they are modifying the IL ...).
>>>>>>>>>>
>>>>>>>>>> So I'd say we should by default dump function bodies.
>>>>>>>>>>
>>>>>>>>>> Note that there are three useful dumping positions (maybe four),
>>>>>>>>>> before todo-start, after todo-start, before todo-finish and after todo-finish.
>>>>>>>>>> By default we'd want after todo-finish.  When we no longer dump via
>>>>>>>>>> a TODO then we could indeed use dump-flags to control this
>>>>>>>>>> (maybe -original for the body before todo-start).
>>>>>>>>>>
>>>>>>>>>> What to others think?
>>>>>>>>>>
>>>>>>>>>> Richard.
>>>>>>>>>>
>>>>>>>>>>> Thanks,
>>>>>>>>>>>
>>>>>>>>>>> David
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> Richard.
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Dump before flag
  2011-06-14 14:19                             ` Richard Guenther
@ 2011-06-14 16:02                               ` Xinliang David Li
  2011-06-14 20:05                                 ` Xinliang David Li
  0 siblings, 1 reply; 30+ messages in thread
From: Xinliang David Li @ 2011-06-14 16:02 UTC (permalink / raw)
  To: Richard Guenther; +Cc: GCC Patches, Diego Novillo

On Tue, Jun 14, 2011 at 6:58 AM, Richard Guenther
<richard.guenther@gmail.com> wrote:
> On Fri, Jun 10, 2011 at 8:44 PM, Xinliang David Li <davidxl@google.com> wrote:
>> This is the revised patch as suggested.
>>
>> How does it look?
>
>  }
>
> +static void
> +execute_function_dump (void *data ATTRIBUTE_UNUSED)
>
> function needs a comment.
>
> Ok with that change.
>
> Please always specify how you tested the patch - the past fallouts
> suggest you didn't do the required testing carefully.

I think I did -- the fallout was probably due to different
'--enable-checking' setting. I have now turned it to 'yes'

Thanks,

David

>
> A changelog is missing as well.
>
> Thanks,
> Richard.
>
>> Thanks,
>>
>> David
>>
>> On Fri, Jun 10, 2011 at 9:22 AM, Xinliang David Li <davidxl@google.com> wrote:
>>> On Fri, Jun 10, 2011 at 1:52 AM, Richard Guenther
>>> <richard.guenther@gmail.com> wrote:
>>>> On Thu, Jun 9, 2011 at 5:47 PM, Xinliang David Li <davidxl@google.com> wrote:
>>>>> See attached.
>>>>
>>>> Hmm.  I don't like how you still wire dumping in the TODO routines.
>>>> Doesn't it work to just dump the body from pass_fini_dump_file ()?
>>>> Or if that doesn't sound clean from (a subset of) places where it
>>>> is called? (we might want to exclude the ipa read/write/summary
>>>> stages)
>>>
>>> That may require another round of function traversal -- but probably
>>> not a big deal -- it sounds cleaner.
>>>
>>> David
>>>
>>>>
>>>> Richard.
>>>>
>>>>> Thanks,
>>>>>
>>>>> David
>>>>>
>>>>> On Thu, Jun 9, 2011 at 2:02 AM, Richard Guenther
>>>>> <richard.guenther@gmail.com> wrote:
>>>>>> On Thu, Jun 9, 2011 at 12:31 AM, Xinliang David Li <davidxl@google.com> wrote:
>>>>>>> this is the patch that just removes the TODO_dump flag and forces it
>>>>>>> to dump. The original code cfun->last_verified = flags &
>>>>>>> TODO_verify_all looks weird -- depending on TODO_dump is set or not,
>>>>>>> the behavior of the update is different (when no other todo flags is
>>>>>>> set).
>>>>>>>
>>>>>>> Ok for trunk?
>>>>>>
>>>>>> -ENOPATCH.
>>>>>>
>>>>>> Richard.
>>>>>>
>>>>>>> David
>>>>>>>
>>>>>>> On Wed, Jun 8, 2011 at 9:52 AM, Xinliang David Li <davidxl@google.com> wrote:
>>>>>>>> On Wed, Jun 8, 2011 at 2:06 AM, Richard Guenther
>>>>>>>> <richard.guenther@gmail.com> wrote:
>>>>>>>>> On Wed, Jun 8, 2011 at 1:08 AM, Xinliang David Li <davidxl@google.com> wrote:
>>>>>>>>>> The following is the patch that does the job. Most of the changes are
>>>>>>>>>> just  removing TODO_dump_func. The major change is in passes.c and
>>>>>>>>>> tree-pass.h.
>>>>>>>>>>
>>>>>>>>>> -fdump-xxx-yyy-start       <-- dump before TODO_start
>>>>>>>>>> -fdump-xxx-yyy-before    <-- dump before main pass after TODO_pass
>>>>>>>>>> -fdump-xxx-yyy-after       <-- dump after main pass before TODO_finish
>>>>>>>>>> -fdump-xxx-yyy-finish      <-- dump after TODO_finish
>>>>>>>>>
>>>>>>>>> Can we bikeshed a bit more about these names?
>>>>>>>>
>>>>>>>> These names may be less confusing:
>>>>>>>>
>>>>>>>> before_preparation
>>>>>>>> before
>>>>>>>> after
>>>>>>>> after_cleanup
>>>>>>>>
>>>>>>>> David
>>>>>>>>
>>>>>>>>> "start" and "before"
>>>>>>>>> have no semantical difference to me ... as the dump before TODO_start
>>>>>>>>> of a pass and the dump after TODO_finish of the previous pass are
>>>>>>>>> identical (hopefully ;)), maybe merge those into a -between flag?
>>>>>>>>> If you'd specify it for a single pass then you'd get both -start and -finish
>>>>>>>>> (using your naming scheme).  Splitting that dump(s) to different files
>>>>>>>>> then might make sense (not sure about the name to use).
>>>>>>>>>
>>>>>>>>> Note that I find it extremely useful to have dumping done in
>>>>>>>>> chronological order - splitting some of it to different files destroys
>>>>>>>>> this, especially a dump after TODO_start or before TODO_finish
>>>>>>>>> should appear in the same file (or we could also start splitting
>>>>>>>>> individual TODO_ output into sub-dump-files).  I guess what would
>>>>>>>>> be nice instread would be a fancy dump-file viewer that could
>>>>>>>>> show diffs, hide things like SCEV output, etc.
>>>>>>>>>
>>>>>>>>> I suppose a patch that removes the dump TODO and unconditionally
>>>>>>>>> dumps at the current point would be a good preparation for this
>>>>>>>>> enhancing patch.
>>>>>>>>>
>>>>>>>>> Richard.
>>>>>>>>>
>>>>>>>>>> The default is 'finish'.
>>>>>>>>>>
>>>>>>>>>> Does it look ok?
>>>>>>>>>>
>>>>>>>>>> Thanks,
>>>>>>>>>>
>>>>>>>>>> David
>>>>>>>>>>
>>>>>>>>>> On Tue, Jun 7, 2011 at 2:36 AM, Richard Guenther
>>>>>>>>>> <richard.guenther@gmail.com> wrote:
>>>>>>>>>>> On Mon, Jun 6, 2011 at 6:20 PM, Xinliang David Li <davidxl@google.com> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>> Your patch doesn't really improve this but adds to the confusion.
>>>>>>>>>>>>>
>>>>>>>>>>>>> +  /* Override dump TODOs.  */
>>>>>>>>>>>>> +  if (dump_file && (pass->todo_flags_finish & TODO_dump_func)
>>>>>>>>>>>>> +      && (dump_flags & TDF_BEFORE))
>>>>>>>>>>>>> +    {
>>>>>>>>>>>>> +      pass->todo_flags_finish &= ~TODO_dump_func;
>>>>>>>>>>>>> +      pass->todo_flags_start |= TODO_dump_func;
>>>>>>>>>>>>> +    }
>>>>>>>>>>>>>
>>>>>>>>>>>>> and certainly writing to pass is not ok.  And the TDF_BEFORE flag
>>>>>>>>>>>>> looks misplaced as it controls TODOs, not dumping behavior.
>>>>>>>>>>>>> Yes, it's a mess right now but the above looks like a hack ontop
>>>>>>>>>>>>> of that mess (maybe because of it, but well ...).
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> How about removing dumping TODO completely -- this can be done easily
>>>>>>>>>>>> -- I don't understand why pass wants extra control on the dumping if
>>>>>>>>>>>> user already asked for dumping -- it is annoying to see empty IR dump
>>>>>>>>>>>> for a pass when I want to see it.
>>>>>>>>>>>>
>>>>>>>>>>>>> At least I would have expected to also get the dump after the
>>>>>>>>>>>>> pass, not only the one before it with this dump flag.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Now, why can't you look at the previous pass output for the
>>>>>>>>>>>>> before-dump (as I do usually)?
>>>>>>>>>>>>
>>>>>>>>>>>> For one thing, you need to either remember what is the previous pass,
>>>>>>>>>>>> or dump all passes which for large files can take very long time. Even
>>>>>>>>>>>> with all the dumps, you will need to eyeballing to find the previous
>>>>>>>>>>>> pass which may or may not have the IR dumped.
>>>>>>>>>>>>
>>>>>>>>>>>> How about removing dump TODO?
>>>>>>>>>>>
>>>>>>>>>>> Yeah, I think this would go in the right direction.  Currently some passes
>>>>>>>>>>> do not dump function bodies because they presumably do no IL
>>>>>>>>>>> modification.  But this is certainly the minority (and some passes do not
>>>>>>>>>>> dump bodies even though they are modifying the IL ...).
>>>>>>>>>>>
>>>>>>>>>>> So I'd say we should by default dump function bodies.
>>>>>>>>>>>
>>>>>>>>>>> Note that there are three useful dumping positions (maybe four),
>>>>>>>>>>> before todo-start, after todo-start, before todo-finish and after todo-finish.
>>>>>>>>>>> By default we'd want after todo-finish.  When we no longer dump via
>>>>>>>>>>> a TODO then we could indeed use dump-flags to control this
>>>>>>>>>>> (maybe -original for the body before todo-start).
>>>>>>>>>>>
>>>>>>>>>>> What to others think?
>>>>>>>>>>>
>>>>>>>>>>> Richard.
>>>>>>>>>>>
>>>>>>>>>>>> Thanks,
>>>>>>>>>>>>
>>>>>>>>>>>> David
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Richard.
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Dump before flag
  2011-06-14 16:02                               ` Xinliang David Li
@ 2011-06-14 20:05                                 ` Xinliang David Li
  2011-06-14 23:22                                   ` Xinliang David Li
  0 siblings, 1 reply; 30+ messages in thread
From: Xinliang David Li @ 2011-06-14 20:05 UTC (permalink / raw)
  To: Richard Guenther; +Cc: GCC Patches, Diego Novillo

Committed after Bootstrapping and regression testing on x86-64/linux.
The follow up patch will come soon.

Thanks,

David

On Tue, Jun 14, 2011 at 8:57 AM, Xinliang David Li <davidxl@google.com> wrote:
> On Tue, Jun 14, 2011 at 6:58 AM, Richard Guenther
> <richard.guenther@gmail.com> wrote:
>> On Fri, Jun 10, 2011 at 8:44 PM, Xinliang David Li <davidxl@google.com> wrote:
>>> This is the revised patch as suggested.
>>>
>>> How does it look?
>>
>>  }
>>
>> +static void
>> +execute_function_dump (void *data ATTRIBUTE_UNUSED)
>>
>> function needs a comment.
>>
>> Ok with that change.
>>
>> Please always specify how you tested the patch - the past fallouts
>> suggest you didn't do the required testing carefully.
>
> I think I did -- the fallout was probably due to different
> '--enable-checking' setting. I have now turned it to 'yes'
>
> Thanks,
>
> David
>
>>
>> A changelog is missing as well.
>>
>> Thanks,
>> Richard.
>>
>>> Thanks,
>>>
>>> David
>>>
>>> On Fri, Jun 10, 2011 at 9:22 AM, Xinliang David Li <davidxl@google.com> wrote:
>>>> On Fri, Jun 10, 2011 at 1:52 AM, Richard Guenther
>>>> <richard.guenther@gmail.com> wrote:
>>>>> On Thu, Jun 9, 2011 at 5:47 PM, Xinliang David Li <davidxl@google.com> wrote:
>>>>>> See attached.
>>>>>
>>>>> Hmm.  I don't like how you still wire dumping in the TODO routines.
>>>>> Doesn't it work to just dump the body from pass_fini_dump_file ()?
>>>>> Or if that doesn't sound clean from (a subset of) places where it
>>>>> is called? (we might want to exclude the ipa read/write/summary
>>>>> stages)
>>>>
>>>> That may require another round of function traversal -- but probably
>>>> not a big deal -- it sounds cleaner.
>>>>
>>>> David
>>>>
>>>>>
>>>>> Richard.
>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> David
>>>>>>
>>>>>> On Thu, Jun 9, 2011 at 2:02 AM, Richard Guenther
>>>>>> <richard.guenther@gmail.com> wrote:
>>>>>>> On Thu, Jun 9, 2011 at 12:31 AM, Xinliang David Li <davidxl@google.com> wrote:
>>>>>>>> this is the patch that just removes the TODO_dump flag and forces it
>>>>>>>> to dump. The original code cfun->last_verified = flags &
>>>>>>>> TODO_verify_all looks weird -- depending on TODO_dump is set or not,
>>>>>>>> the behavior of the update is different (when no other todo flags is
>>>>>>>> set).
>>>>>>>>
>>>>>>>> Ok for trunk?
>>>>>>>
>>>>>>> -ENOPATCH.
>>>>>>>
>>>>>>> Richard.
>>>>>>>
>>>>>>>> David
>>>>>>>>
>>>>>>>> On Wed, Jun 8, 2011 at 9:52 AM, Xinliang David Li <davidxl@google.com> wrote:
>>>>>>>>> On Wed, Jun 8, 2011 at 2:06 AM, Richard Guenther
>>>>>>>>> <richard.guenther@gmail.com> wrote:
>>>>>>>>>> On Wed, Jun 8, 2011 at 1:08 AM, Xinliang David Li <davidxl@google.com> wrote:
>>>>>>>>>>> The following is the patch that does the job. Most of the changes are
>>>>>>>>>>> just  removing TODO_dump_func. The major change is in passes.c and
>>>>>>>>>>> tree-pass.h.
>>>>>>>>>>>
>>>>>>>>>>> -fdump-xxx-yyy-start       <-- dump before TODO_start
>>>>>>>>>>> -fdump-xxx-yyy-before    <-- dump before main pass after TODO_pass
>>>>>>>>>>> -fdump-xxx-yyy-after       <-- dump after main pass before TODO_finish
>>>>>>>>>>> -fdump-xxx-yyy-finish      <-- dump after TODO_finish
>>>>>>>>>>
>>>>>>>>>> Can we bikeshed a bit more about these names?
>>>>>>>>>
>>>>>>>>> These names may be less confusing:
>>>>>>>>>
>>>>>>>>> before_preparation
>>>>>>>>> before
>>>>>>>>> after
>>>>>>>>> after_cleanup
>>>>>>>>>
>>>>>>>>> David
>>>>>>>>>
>>>>>>>>>> "start" and "before"
>>>>>>>>>> have no semantical difference to me ... as the dump before TODO_start
>>>>>>>>>> of a pass and the dump after TODO_finish of the previous pass are
>>>>>>>>>> identical (hopefully ;)), maybe merge those into a -between flag?
>>>>>>>>>> If you'd specify it for a single pass then you'd get both -start and -finish
>>>>>>>>>> (using your naming scheme).  Splitting that dump(s) to different files
>>>>>>>>>> then might make sense (not sure about the name to use).
>>>>>>>>>>
>>>>>>>>>> Note that I find it extremely useful to have dumping done in
>>>>>>>>>> chronological order - splitting some of it to different files destroys
>>>>>>>>>> this, especially a dump after TODO_start or before TODO_finish
>>>>>>>>>> should appear in the same file (or we could also start splitting
>>>>>>>>>> individual TODO_ output into sub-dump-files).  I guess what would
>>>>>>>>>> be nice instread would be a fancy dump-file viewer that could
>>>>>>>>>> show diffs, hide things like SCEV output, etc.
>>>>>>>>>>
>>>>>>>>>> I suppose a patch that removes the dump TODO and unconditionally
>>>>>>>>>> dumps at the current point would be a good preparation for this
>>>>>>>>>> enhancing patch.
>>>>>>>>>>
>>>>>>>>>> Richard.
>>>>>>>>>>
>>>>>>>>>>> The default is 'finish'.
>>>>>>>>>>>
>>>>>>>>>>> Does it look ok?
>>>>>>>>>>>
>>>>>>>>>>> Thanks,
>>>>>>>>>>>
>>>>>>>>>>> David
>>>>>>>>>>>
>>>>>>>>>>> On Tue, Jun 7, 2011 at 2:36 AM, Richard Guenther
>>>>>>>>>>> <richard.guenther@gmail.com> wrote:
>>>>>>>>>>>> On Mon, Jun 6, 2011 at 6:20 PM, Xinliang David Li <davidxl@google.com> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Your patch doesn't really improve this but adds to the confusion.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> +  /* Override dump TODOs.  */
>>>>>>>>>>>>>> +  if (dump_file && (pass->todo_flags_finish & TODO_dump_func)
>>>>>>>>>>>>>> +      && (dump_flags & TDF_BEFORE))
>>>>>>>>>>>>>> +    {
>>>>>>>>>>>>>> +      pass->todo_flags_finish &= ~TODO_dump_func;
>>>>>>>>>>>>>> +      pass->todo_flags_start |= TODO_dump_func;
>>>>>>>>>>>>>> +    }
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> and certainly writing to pass is not ok.  And the TDF_BEFORE flag
>>>>>>>>>>>>>> looks misplaced as it controls TODOs, not dumping behavior.
>>>>>>>>>>>>>> Yes, it's a mess right now but the above looks like a hack ontop
>>>>>>>>>>>>>> of that mess (maybe because of it, but well ...).
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> How about removing dumping TODO completely -- this can be done easily
>>>>>>>>>>>>> -- I don't understand why pass wants extra control on the dumping if
>>>>>>>>>>>>> user already asked for dumping -- it is annoying to see empty IR dump
>>>>>>>>>>>>> for a pass when I want to see it.
>>>>>>>>>>>>>
>>>>>>>>>>>>>> At least I would have expected to also get the dump after the
>>>>>>>>>>>>>> pass, not only the one before it with this dump flag.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Now, why can't you look at the previous pass output for the
>>>>>>>>>>>>>> before-dump (as I do usually)?
>>>>>>>>>>>>>
>>>>>>>>>>>>> For one thing, you need to either remember what is the previous pass,
>>>>>>>>>>>>> or dump all passes which for large files can take very long time. Even
>>>>>>>>>>>>> with all the dumps, you will need to eyeballing to find the previous
>>>>>>>>>>>>> pass which may or may not have the IR dumped.
>>>>>>>>>>>>>
>>>>>>>>>>>>> How about removing dump TODO?
>>>>>>>>>>>>
>>>>>>>>>>>> Yeah, I think this would go in the right direction.  Currently some passes
>>>>>>>>>>>> do not dump function bodies because they presumably do no IL
>>>>>>>>>>>> modification.  But this is certainly the minority (and some passes do not
>>>>>>>>>>>> dump bodies even though they are modifying the IL ...).
>>>>>>>>>>>>
>>>>>>>>>>>> So I'd say we should by default dump function bodies.
>>>>>>>>>>>>
>>>>>>>>>>>> Note that there are three useful dumping positions (maybe four),
>>>>>>>>>>>> before todo-start, after todo-start, before todo-finish and after todo-finish.
>>>>>>>>>>>> By default we'd want after todo-finish.  When we no longer dump via
>>>>>>>>>>>> a TODO then we could indeed use dump-flags to control this
>>>>>>>>>>>> (maybe -original for the body before todo-start).
>>>>>>>>>>>>
>>>>>>>>>>>> What to others think?
>>>>>>>>>>>>
>>>>>>>>>>>> Richard.
>>>>>>>>>>>>
>>>>>>>>>>>>> Thanks,
>>>>>>>>>>>>>
>>>>>>>>>>>>> David
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Richard.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Dump before flag
  2011-06-14 20:05                                 ` Xinliang David Li
@ 2011-06-14 23:22                                   ` Xinliang David Li
  0 siblings, 0 replies; 30+ messages in thread
From: Xinliang David Li @ 2011-06-14 23:22 UTC (permalink / raw)
  To: Richard Guenther; +Cc: GCC Patches, Diego Novillo

[-- Attachment #1: Type: text/plain, Size: 8910 bytes --]

Here is one the of follow up patches:  support of -before_preparation,
-before, -after, -after_cleanup dump flags.

The default dumping behavior does not change at all, but if any one of
the above flags is specified, the function IR will be dumped into a
file with the corresponding suffix.  The enhancement is to simplify IR
diffing.

Bootstrapped and regression tested on x86-64/linux.

Ok for trunk?

Thanks,

David

On Tue, Jun 14, 2011 at 12:40 PM, Xinliang David Li <davidxl@google.com> wrote:
> Committed after Bootstrapping and regression testing on x86-64/linux.
> The follow up patch will come soon.
>
> Thanks,
>
> David
>
> On Tue, Jun 14, 2011 at 8:57 AM, Xinliang David Li <davidxl@google.com> wrote:
>> On Tue, Jun 14, 2011 at 6:58 AM, Richard Guenther
>> <richard.guenther@gmail.com> wrote:
>>> On Fri, Jun 10, 2011 at 8:44 PM, Xinliang David Li <davidxl@google.com> wrote:
>>>> This is the revised patch as suggested.
>>>>
>>>> How does it look?
>>>
>>>  }
>>>
>>> +static void
>>> +execute_function_dump (void *data ATTRIBUTE_UNUSED)
>>>
>>> function needs a comment.
>>>
>>> Ok with that change.
>>>
>>> Please always specify how you tested the patch - the past fallouts
>>> suggest you didn't do the required testing carefully.
>>
>> I think I did -- the fallout was probably due to different
>> '--enable-checking' setting. I have now turned it to 'yes'
>>
>> Thanks,
>>
>> David
>>
>>>
>>> A changelog is missing as well.
>>>
>>> Thanks,
>>> Richard.
>>>
>>>> Thanks,
>>>>
>>>> David
>>>>
>>>> On Fri, Jun 10, 2011 at 9:22 AM, Xinliang David Li <davidxl@google.com> wrote:
>>>>> On Fri, Jun 10, 2011 at 1:52 AM, Richard Guenther
>>>>> <richard.guenther@gmail.com> wrote:
>>>>>> On Thu, Jun 9, 2011 at 5:47 PM, Xinliang David Li <davidxl@google.com> wrote:
>>>>>>> See attached.
>>>>>>
>>>>>> Hmm.  I don't like how you still wire dumping in the TODO routines.
>>>>>> Doesn't it work to just dump the body from pass_fini_dump_file ()?
>>>>>> Or if that doesn't sound clean from (a subset of) places where it
>>>>>> is called? (we might want to exclude the ipa read/write/summary
>>>>>> stages)
>>>>>
>>>>> That may require another round of function traversal -- but probably
>>>>> not a big deal -- it sounds cleaner.
>>>>>
>>>>> David
>>>>>
>>>>>>
>>>>>> Richard.
>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>> David
>>>>>>>
>>>>>>> On Thu, Jun 9, 2011 at 2:02 AM, Richard Guenther
>>>>>>> <richard.guenther@gmail.com> wrote:
>>>>>>>> On Thu, Jun 9, 2011 at 12:31 AM, Xinliang David Li <davidxl@google.com> wrote:
>>>>>>>>> this is the patch that just removes the TODO_dump flag and forces it
>>>>>>>>> to dump. The original code cfun->last_verified = flags &
>>>>>>>>> TODO_verify_all looks weird -- depending on TODO_dump is set or not,
>>>>>>>>> the behavior of the update is different (when no other todo flags is
>>>>>>>>> set).
>>>>>>>>>
>>>>>>>>> Ok for trunk?
>>>>>>>>
>>>>>>>> -ENOPATCH.
>>>>>>>>
>>>>>>>> Richard.
>>>>>>>>
>>>>>>>>> David
>>>>>>>>>
>>>>>>>>> On Wed, Jun 8, 2011 at 9:52 AM, Xinliang David Li <davidxl@google.com> wrote:
>>>>>>>>>> On Wed, Jun 8, 2011 at 2:06 AM, Richard Guenther
>>>>>>>>>> <richard.guenther@gmail.com> wrote:
>>>>>>>>>>> On Wed, Jun 8, 2011 at 1:08 AM, Xinliang David Li <davidxl@google.com> wrote:
>>>>>>>>>>>> The following is the patch that does the job. Most of the changes are
>>>>>>>>>>>> just  removing TODO_dump_func. The major change is in passes.c and
>>>>>>>>>>>> tree-pass.h.
>>>>>>>>>>>>
>>>>>>>>>>>> -fdump-xxx-yyy-start       <-- dump before TODO_start
>>>>>>>>>>>> -fdump-xxx-yyy-before    <-- dump before main pass after TODO_pass
>>>>>>>>>>>> -fdump-xxx-yyy-after       <-- dump after main pass before TODO_finish
>>>>>>>>>>>> -fdump-xxx-yyy-finish      <-- dump after TODO_finish
>>>>>>>>>>>
>>>>>>>>>>> Can we bikeshed a bit more about these names?
>>>>>>>>>>
>>>>>>>>>> These names may be less confusing:
>>>>>>>>>>
>>>>>>>>>> before_preparation
>>>>>>>>>> before
>>>>>>>>>> after
>>>>>>>>>> after_cleanup
>>>>>>>>>>
>>>>>>>>>> David
>>>>>>>>>>
>>>>>>>>>>> "start" and "before"
>>>>>>>>>>> have no semantical difference to me ... as the dump before TODO_start
>>>>>>>>>>> of a pass and the dump after TODO_finish of the previous pass are
>>>>>>>>>>> identical (hopefully ;)), maybe merge those into a -between flag?
>>>>>>>>>>> If you'd specify it for a single pass then you'd get both -start and -finish
>>>>>>>>>>> (using your naming scheme).  Splitting that dump(s) to different files
>>>>>>>>>>> then might make sense (not sure about the name to use).
>>>>>>>>>>>
>>>>>>>>>>> Note that I find it extremely useful to have dumping done in
>>>>>>>>>>> chronological order - splitting some of it to different files destroys
>>>>>>>>>>> this, especially a dump after TODO_start or before TODO_finish
>>>>>>>>>>> should appear in the same file (or we could also start splitting
>>>>>>>>>>> individual TODO_ output into sub-dump-files).  I guess what would
>>>>>>>>>>> be nice instread would be a fancy dump-file viewer that could
>>>>>>>>>>> show diffs, hide things like SCEV output, etc.
>>>>>>>>>>>
>>>>>>>>>>> I suppose a patch that removes the dump TODO and unconditionally
>>>>>>>>>>> dumps at the current point would be a good preparation for this
>>>>>>>>>>> enhancing patch.
>>>>>>>>>>>
>>>>>>>>>>> Richard.
>>>>>>>>>>>
>>>>>>>>>>>> The default is 'finish'.
>>>>>>>>>>>>
>>>>>>>>>>>> Does it look ok?
>>>>>>>>>>>>
>>>>>>>>>>>> Thanks,
>>>>>>>>>>>>
>>>>>>>>>>>> David
>>>>>>>>>>>>
>>>>>>>>>>>> On Tue, Jun 7, 2011 at 2:36 AM, Richard Guenther
>>>>>>>>>>>> <richard.guenther@gmail.com> wrote:
>>>>>>>>>>>>> On Mon, Jun 6, 2011 at 6:20 PM, Xinliang David Li <davidxl@google.com> wrote:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Your patch doesn't really improve this but adds to the confusion.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> +  /* Override dump TODOs.  */
>>>>>>>>>>>>>>> +  if (dump_file && (pass->todo_flags_finish & TODO_dump_func)
>>>>>>>>>>>>>>> +      && (dump_flags & TDF_BEFORE))
>>>>>>>>>>>>>>> +    {
>>>>>>>>>>>>>>> +      pass->todo_flags_finish &= ~TODO_dump_func;
>>>>>>>>>>>>>>> +      pass->todo_flags_start |= TODO_dump_func;
>>>>>>>>>>>>>>> +    }
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> and certainly writing to pass is not ok.  And the TDF_BEFORE flag
>>>>>>>>>>>>>>> looks misplaced as it controls TODOs, not dumping behavior.
>>>>>>>>>>>>>>> Yes, it's a mess right now but the above looks like a hack ontop
>>>>>>>>>>>>>>> of that mess (maybe because of it, but well ...).
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> How about removing dumping TODO completely -- this can be done easily
>>>>>>>>>>>>>> -- I don't understand why pass wants extra control on the dumping if
>>>>>>>>>>>>>> user already asked for dumping -- it is annoying to see empty IR dump
>>>>>>>>>>>>>> for a pass when I want to see it.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> At least I would have expected to also get the dump after the
>>>>>>>>>>>>>>> pass, not only the one before it with this dump flag.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Now, why can't you look at the previous pass output for the
>>>>>>>>>>>>>>> before-dump (as I do usually)?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> For one thing, you need to either remember what is the previous pass,
>>>>>>>>>>>>>> or dump all passes which for large files can take very long time. Even
>>>>>>>>>>>>>> with all the dumps, you will need to eyeballing to find the previous
>>>>>>>>>>>>>> pass which may or may not have the IR dumped.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> How about removing dump TODO?
>>>>>>>>>>>>>
>>>>>>>>>>>>> Yeah, I think this would go in the right direction.  Currently some passes
>>>>>>>>>>>>> do not dump function bodies because they presumably do no IL
>>>>>>>>>>>>> modification.  But this is certainly the minority (and some passes do not
>>>>>>>>>>>>> dump bodies even though they are modifying the IL ...).
>>>>>>>>>>>>>
>>>>>>>>>>>>> So I'd say we should by default dump function bodies.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Note that there are three useful dumping positions (maybe four),
>>>>>>>>>>>>> before todo-start, after todo-start, before todo-finish and after todo-finish.
>>>>>>>>>>>>> By default we'd want after todo-finish.  When we no longer dump via
>>>>>>>>>>>>> a TODO then we could indeed use dump-flags to control this
>>>>>>>>>>>>> (maybe -original for the body before todo-start).
>>>>>>>>>>>>>
>>>>>>>>>>>>> What to others think?
>>>>>>>>>>>>>
>>>>>>>>>>>>> Richard.
>>>>>>>>>>>>>
>>>>>>>>>>>>>> Thanks,
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> David
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Richard.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

[-- Attachment #2: dump-where.p --]
[-- Type: text/x-pascal, Size: 8212 bytes --]

2011-06-14  David Li  <davidxl@google.com>

	* passes.c
	(do_per_function_toporder):  Support for dump splitting.
	(execute_function_dump):  Support for dump splitting.
	(pass_init_dump_file):  Support for dump splitting.
	(execute_one_ipa_transform_pass): Support for dump splitting.
	(execute_one_pass): Support for dump splitting.

Index: tree-dump.c
===================================================================
--- tree-dump.c	(revision 175032)
+++ tree-dump.c	(working copy)
@@ -822,6 +822,10 @@ static const struct dump_option_value_in
   {"eh", TDF_EH},
   {"alias", TDF_ALIAS},
   {"nouid", TDF_NOUID},
+  {"before_preparation", TDF_START},
+  {"before", TDF_BEFORE},
+  {"after", TDF_AFTER},
+  {"after_cleanup", TDF_FINISH},
   {"enumerate_locals", TDF_ENUMERATE_LOCALS},
   {"all", ~(TDF_RAW | TDF_SLIM | TDF_LINENO | TDF_TREE | TDF_RTL | TDF_IPA
 	    | TDF_STMTADDR | TDF_GRAPH | TDF_DIAGNOSTIC | TDF_VERBOSE
Index: tree-pass.h
===================================================================
--- tree-pass.h	(revision 175032)
+++ tree-pass.h	(working copy)
@@ -83,6 +83,11 @@ enum tree_dump_index
 #define TDF_ALIAS	(1 << 21)	/* display alias information  */
 #define TDF_ENUMERATE_LOCALS (1 << 22)	/* Enumerate locals by uid.  */
 #define TDF_CSELIB	(1 << 23)	/* Dump cselib details.  */
+#define TDF_START       (1 << 24)	/* Dump before TODO_start.  */
+#define TDF_BEFORE      (1 << 25)	/* Dump before pass.  */
+#define TDF_AFTER       (1 << 26)	/* Dump after pass.  */
+#define TDF_FINISH      (1 << 27)	/* Dump after TODO_finish.  */
+
 
 
 /* In tree-dump.c */
Index: passes.c
===================================================================
--- passes.c	(revision 175051)
+++ passes.c	(working copy)
@@ -128,6 +128,7 @@ int dump_flags;
 bool in_gimple_form;
 bool first_pass_instance;
 
+static FILE *dump_file_start, *dump_file_before, *dump_file_after, *dump_file_finish;
 
 /* This is called from various places for FUNCTION_DECL, VAR_DECL,
    and TYPE_DECL nodes.
@@ -1605,21 +1606,23 @@ do_per_function_toporder (void (*callbac
 /* Helper function to perform function body dump.  */
 
 static void
-execute_function_dump (void *data ATTRIBUTE_UNUSED)
+execute_function_dump (void *data)
 {
-  if (dump_file && current_function_decl)
+  FILE *df = (FILE *)data;
+
+  if (df && current_function_decl)
     {
       if (cfun->curr_properties & PROP_trees)
-        dump_function_to_file (current_function_decl, dump_file, dump_flags);
+        dump_function_to_file (current_function_decl, df, dump_flags);
       else
 	{
 	  if (dump_flags & TDF_SLIM)
-	    print_rtl_slim_with_bb (dump_file, get_insns (), dump_flags);
+	    print_rtl_slim_with_bb (df, get_insns (), dump_flags);
 	  else if ((cfun->curr_properties & PROP_cfg)
 		   && (dump_flags & TDF_BLOCKS))
-	    print_rtl_with_bb (dump_file, get_insns ());
+	    print_rtl_with_bb (df, get_insns ());
           else
-	    print_rtl (dump_file, get_insns ());
+	    print_rtl (df, get_insns ());
 
 	  if ((cfun->curr_properties & PROP_cfg)
 	      && graph_dump_format != no_graph
@@ -1629,7 +1632,7 @@ execute_function_dump (void *data ATTRIB
 
       /* Flush the file.  If verification fails, we won't be able to
 	 close the file before aborting.  */
-      fflush (dump_file);
+      fflush (df);
     }
 }
 
@@ -1784,6 +1787,50 @@ verify_curr_properties (void *data)
 }
 #endif
 
+
+/* Helper function to set up file descriptors for IR dumps. WHERE_FLAG
+   is the flag indicating where the IR come from; SUFFIX is the file suffix
+   of the dump file, and MODE is the file open mode.  */
+
+static FILE *
+init_ir_dump_file (int where_flag, const char *suffix, const char *mode)
+{
+  if (dump_flags & where_flag)
+    {
+      char *dump_name = concat (dump_file_name, suffix, NULL);
+      FILE *stream = fopen (dump_name, mode);
+      if (!stream)
+        error ("could not open dump file %qs: %m", dump_name);
+      free (dump_name);
+      if (current_function_decl)
+        dump_function_header (stream, current_function_decl, dump_flags);
+      return stream;
+    }
+  else
+    return dump_file;
+}
+
+/* Helper function to set up file descriptors for IR dumps.  */
+
+static void
+pass_init_ir_dump_files (struct opt_pass *pass)
+{
+  struct dump_file_info *dfi;
+  const char *mode;
+
+  if (!dump_file)
+    return;
+
+  dfi = get_dump_file_info (pass->static_pass_number);
+  mode = dfi->state < 0 ? "w" : "a";
+
+  dump_file_start = init_ir_dump_file (TDF_START, ".before_preparation", mode);
+  dump_file_before = init_ir_dump_file (TDF_BEFORE, ".before", mode);
+  dump_file_after = init_ir_dump_file (TDF_AFTER, ".after", mode);
+  dump_file_finish = init_ir_dump_file (TDF_FINISH, ".after_cleanup", mode);
+}
+
+
 /* Initialize pass dump file.  */
 /* This is non-static so that the plugins can use it.  */
 
@@ -1798,12 +1845,35 @@ pass_init_dump_file (struct opt_pass *pa
       dump_file = dump_begin (pass->static_pass_number, &dump_flags);
       if (dump_file && current_function_decl)
         dump_function_header (dump_file, current_function_decl, dump_flags);
+
+      if (dump_file)
+        pass_init_ir_dump_files (pass);
+
       return initializing_dump;
     }
   else
     return false;
 }
 
+/* Close dump files.  */
+
+static void
+close_ir_dump_file (void)
+{
+  if (dump_file_start != dump_file)
+    fclose (dump_file_start);
+  dump_file_start = NULL;
+  if (dump_file_before != dump_file)
+    fclose (dump_file_before);
+  dump_file_before = NULL;
+  if (dump_file_after != dump_file)
+    fclose (dump_file_after);
+  dump_file_after = NULL;
+  if (dump_file_finish != dump_file)
+    fclose (dump_file_finish);
+  dump_file_finish = NULL;
+}
+
 /* Flush PASS dump file.  */
 /* This is non-static so that plugins can use it.  */
 
@@ -1811,6 +1881,7 @@ void
 pass_fini_dump_file (struct opt_pass *pass)
 {
   /* Flush and close dump file.  */
+  close_ir_dump_file ();
   if (dump_file_name)
     {
       free (CONST_CAST (char *, dump_file_name));
@@ -1886,9 +1957,15 @@ execute_one_ipa_transform_pass (struct c
 
   pass_init_dump_file (pass);
 
+  if (dump_file && (dump_flags & TDF_START))
+    do_per_function (execute_function_dump, dump_file_start);
+
   /* Run pre-pass verification.  */
   execute_todo (ipa_pass->function_transform_todo_flags_start);
 
+  if (dump_file && (dump_flags & TDF_BEFORE))
+    do_per_function (execute_function_dump, dump_file_before);
+
   /* If a timevar is present, start it.  */
   if (pass->tv_id != TV_NONE)
     timevar_push (pass->tv_id);
@@ -1900,11 +1977,15 @@ execute_one_ipa_transform_pass (struct c
   if (pass->tv_id != TV_NONE)
     timevar_pop (pass->tv_id);
 
+  if (dump_file && (dump_flags & TDF_AFTER))
+    do_per_function (execute_function_dump, dump_file_after);
+
   /* Run post-pass cleanup and verification.  */
   execute_todo (todo_after);
   verify_interpass_invariants ();
 
-  do_per_function (execute_function_dump, NULL);
+  if (dump_file)
+    do_per_function (execute_function_dump, dump_file_finish);
   pass_fini_dump_file (pass);
 
   current_pass = NULL;
@@ -2005,9 +2086,15 @@ execute_one_pass (struct opt_pass *pass)
 
   initializing_dump = pass_init_dump_file (pass);
 
+  if (dump_file && (dump_flags & TDF_START))
+    do_per_function (execute_function_dump, dump_file_start);
+
   /* Run pre-pass verification.  */
   execute_todo (pass->todo_flags_start);
 
+  if (dump_file && (dump_flags & TDF_BEFORE))
+    do_per_function (execute_function_dump, dump_file_before);
+
 #ifdef ENABLE_CHECKING
   do_per_function (verify_curr_properties,
 		   (void *)(size_t)pass->properties_required);
@@ -2042,10 +2129,16 @@ execute_one_pass (struct opt_pass *pass)
       clean_graph_dump_file (dump_file_name);
     }
 
+  if (dump_file && (dump_flags & TDF_AFTER))
+    do_per_function (execute_function_dump, dump_file_after);
+
   /* Run post-pass cleanup and verification.  */
   execute_todo (todo_after | pass->todo_flags_finish);
   verify_interpass_invariants ();
-  do_per_function (execute_function_dump, NULL);
+
+  if (dump_file)
+    do_per_function (execute_function_dump, dump_file_finish);
+
   if (pass->type == IPA_PASS)
     {
       struct cgraph_node *node;

^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2011-06-14 23:15 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-01 20:26 Dump before flag 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
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

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).