summaryrefslogtreecommitdiff
path: root/gcc/cfgexpand.c
diff options
context:
space:
mode:
authorbonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-06 10:08:17 +0000
committerbonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-06 10:08:17 +0000
commit0f9005ddc07f0919938a893f0fb526b68783c72c (patch)
tree97abeef925c810d92e8f8fe91a694ecb3c7ca58b /gcc/cfgexpand.c
parentccf99faab79a66c17a2f673be854c95761a79a53 (diff)
downloadgcc-0f9005ddc07f0919938a893f0fb526b68783c72c.tar.gz
2004-09-06 Paolo Bonzini <bonzini@gnu.org>
Unify the management of RTL and tree-level dump files. * cfgexpand.c (tree_expand_cfg): Fix incorrect comment. Don't print function name to the dump file, the pass manager would do this for us. Add code from the top of rest_of_compilation, up to the initial RTL dump. * passes.c (rest_of_handle_jump): Call fixup_tail_calls and close the DFI_sibling dump file. (rest_of_compilation): Don't do that here. Remove code up to the initial RTL dump. (init_optimization_passes): Remove. (pass_rest_of_compilation): Change pass name to NULL. * toplev.c (lang_dependent_init): Do not use an empty dump file prefix. Do not call init_optimization_passes. * toplev.h (init_optimization_passes): Remove. * graph.c (print_rtl_graph_with_bb, clean_graph_dump_file, finish_graph_dump_file): Remove SUFFIX parameter. * graph.h (print_rtl_graph_with_bb, clean_graph_dump_file, finish_graph_dump_file): Likewise. * tree-pass.h (struct tree_opt_pass): Add `letter' field. * cfgexpand.c (pass_expand): Adjust. * gimple-low.c (pass_lower_cf, pass_remove_useless_vars): Adjust. * passes.c (pass_rest_of_compilation): Adjust. * predict.c (pass_profile): Adjust. * tree-alias-common.c (pass_build_pta, pass_del_pta): Adjust. * tree-cfg.c (pass_build_cfg, pass_remove_useless_stmts, pass_split_crit_edges, pass_warn_function_return): Adjust. * tree-complex.c (pass_lower_vector_ssa, pass_pre_expand): Adjust. * tree-dfa.c (pass_referenced_vars): Adjust. * tree-eh.c (pass_lower_eh): Adjust. * tree-if-conv.c (pass_build_ssa): Adjust. * tree-into-ssa.c (pass_build_ssa): Adjust. * tree-mudflap.c (pass_mudflap_1, pass_mudflap_2): Adjust. * tree-nomudflap.c (pass_mudflap_1, pass_mudflap_2): Adjust. * tree-nrv.c (pass_nrv): Adjust. * tree-optimize.c (pass_gimple, pass_all_optimizations, pass_cleanup_cfg_post_optimizing, pass_free_datastructures, pass_init_datastructures): Adjust. * tree-outof-ssa.c (pass_del_ssa): Adjust. * tree-profile.c (pass_tree_profile): Adjust. * tree-sra.c (pass_sra): Adjust. * tree-ssa-alias.c (pass_may_alias): Adjust. * tree-ssa-ccp.c (pass_ccp, pass_fold_builtins): Adjust. * tree-ssa-copyrename.c (pass_rename_ssa_copies): Adjust. * tree-ssa-dce.c (pass_dce, pass_cd_dce): Adjust. * tree-ssa-dom.c (pass_dominator): Adjust. * tree-ssa-dse.c (pass_dse): Adjust. * tree-ssa-forwprop.c (pass_forwprop): Adjust. * tree-ssa-if-conv.c (pass_if_conversion): Adjust. * tree-ssa-loop-ch.c (pass_ch): Adjust. * tree-ssa-loop.c (pass_loop, pass_loop_init, pass_lim, pass_loop_done, pass_complete_unroll, pass_iv_canon, pass_iv_optimize, pass_vectorize): Adjust. * tree-ssa-phiopt.c (pass_phiopt): Adjust. * tree-ssa-pre.c (pass_pre, pass_fre): Adjust. * tree-ssa.c (pass_redundant_phi, pass_early_warn_uninitialized, pass_late_warn_uninnitialized): Adjust. * tree-tailcall.c (pass_tail_recursion, pass_tail_calls): Adjust. * Makefile.in (tree-dump.o): Add new dependencies. * cgraph.c (cgraph_remove_node): TDF_all -> TDF_tree_all. * cgraphunit.c (cgraph_preserve_function_body_p, cgraph_optimize): Likewise. * toplev.c (dump_file_name): New. * tree-dump.c (dump_enable_all): Add LETTER parameter. (struct dump_file_info): Add NUM and LETTER fields. (dump_files): Adjust and add RTL dump files. (dump_register): Add NUM and LETTER fields. (get_dump_file_name, dump_initialized_p, enable_rtl_dump_file): New. (dump_begin): Use get_dump_file_name. (dump_switch_p_1): Adjust call to dump_enable_all. * tree-dump.h (dump_register): Adjust prototype. * tree-optimize.c (register_one_dump_file): Take dump file index. Support flags for RTL dumps. (register_dump_files): Fill in NUM field of struct dump_file_info. Track properties both when the gate is executed and when it is not. (execute_todo): Dump RTL. Add PROPERTIES parameter. (execute_one_pass): Pass properties to execute_todo. Handle VCG dumps of RTL. * tree-pass.h (dump_file_name): New. * tree.h (TDF_TREE, TDF_RTL, get_dump_file_name, dump_initialized_p): New. * Makefile.in (passes.o): Add new dependencies. * passes.c (struct dump_file_info, enum dump_file_index, dump_file_tbl, init_optimization_passes): Remove. (open_dump_file, close_dump_file): Use tree-dumping infrastructure. (rest_of_handle_new_regalloc, rest_of_handle_old_regalloc): Use dump_enabled_p. (finish_optimization_passes): Update finish_graph_dump_file loop. (enable_rtl_dump_file): Remove. * tree-dump.c (dump_files): Adjust and add RTL dump files. (enable_rtl_dump_file): Add here. * tree.h (enum tree_dump_index): Add RTL dump file indices. * doc/invoke.texi (Debugging options): Document new RTL debugging options. Update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87113 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r--gcc/cfgexpand.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index d4456e3d525..122c11b37b8 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -1188,14 +1188,6 @@ tree_expand_cfg (void)
basic_block bb, init_block;
sbitmap blocks;
- if (dump_file)
- {
- fprintf (dump_file, "\n;; Function %s",
- (*lang_hooks.decl_printable_name) (current_function_decl, 2));
- fprintf (dump_file, " (%s)\n",
- IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (current_function_decl)));
- }
-
profile_status = PROFILE_ABSENT;
/* Some backends want to know that we are expanding to RTL. */
@@ -1231,8 +1223,7 @@ tree_expand_cfg (void)
currently_expanding_to_rtl = 0;
/* Convert from NOTE_INSN_EH_REGION style notes, and do other
- sorts of eh initialization. Delay this until after the
- initial rtl dump so that we can see the original nesting. */
+ sorts of eh initialization. */
convert_from_eh_region_ranges ();
rebuild_jump_labels (get_insns ());
@@ -1248,6 +1239,16 @@ tree_expand_cfg (void)
#ifdef ENABLE_CHECKING
verify_flow_info();
#endif
+
+ /* There's no need to defer outputting this function any more; we
+ know we want to output it. */
+ DECL_DEFER_OUTPUT (current_function_decl) = 0;
+
+ /* Now that we're done expanding trees to RTL, we shouldn't have any
+ more CONCATs anywhere. */
+ generating_concat_p = 0;
+
+ finalize_block_changes ();
}
struct tree_opt_pass pass_expand =
@@ -1264,5 +1265,6 @@ struct tree_opt_pass pass_expand =
PROP_rtl, /* properties_provided */
PROP_gimple_leh, /* properties_destroyed */
0, /* todo_flags_start */
- 0 /* todo_flags_finish */
+ 0, /* todo_flags_finish */
+ 'r' /* letter */
};