From: Xinliang David Li <davidxl@google.com>
To: Richard Guenther <richard.guenther@gmail.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
Diego Novillo <dnovillo@google.com>
Subject: Re: Dump before flag
Date: Wed, 08 Jun 2011 06:44:00 -0000 [thread overview]
Message-ID: <BANLkTimwKNS4YqNVoA0KTRQtBJ46pK5vxmhsQUunx6XJTxTX7A@mail.gmail.com> (raw)
In-Reply-To: <BANLkTikhP5d7bOCcUbD3h09-ovq6dS-5KoRoA9mAH-Lpq29VZQ@mail.gmail.com>
[-- 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 */
}
};
next prev parent reply other threads:[~2011-06-08 6:23 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-01 20:26 Xinliang David Li
2011-06-01 20:37 ` Richard Guenther
2011-06-01 20:38 ` Xinliang David Li
2011-06-01 21:12 ` Basile Starynkevitch
2011-06-01 21:24 ` Xinliang David Li
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 [this message]
2011-06-08 9:29 ` Richard Guenther
2011-06-08 16:52 ` Xinliang David Li
2011-06-08 17:14 ` Xinliang David Li
2011-06-08 23:15 ` Xinliang David Li
2011-06-09 9:28 ` Richard Guenther
2011-06-09 15:58 ` Xinliang David Li
2011-06-10 9:04 ` Richard Guenther
2011-06-10 16:54 ` Xinliang David Li
2011-06-10 18:49 ` Xinliang David Li
2011-06-14 14:19 ` Richard Guenther
2011-06-14 16:02 ` Xinliang David Li
2011-06-14 20:05 ` Xinliang David Li
2011-06-14 23:22 ` Xinliang David Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BANLkTimwKNS4YqNVoA0KTRQtBJ46pK5vxmhsQUunx6XJTxTX7A@mail.gmail.com \
--to=davidxl@google.com \
--cc=dnovillo@google.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=richard.guenther@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).