From ef3baff5fbb72989650869080e1ff6ef7641ab21 Mon Sep 17 00:00:00 2001 From: rguenth Date: Wed, 10 Apr 2013 11:33:31 +0000 Subject: 2013-04-10 Richard Biener * passes.c (execute_todo): Do not call ggc_collect conditional here. (execute_one_ipa_transform_pass): But unconditionally here. (execute_one_pass): And here. (init_optimization_passes): Remove reload pass. * tree-pass.h (TODO_ggc_collect): Remove. (pass_reload): Likewise. * ira.c (do_reload): Merge into ... (ira): ... this. (rest_of_handle_reload): Remove. (pass_reload): Likewise. * config/i386/i386.c (ix86_option_override): Refer to ira instead of reload for vzeroupper pass placement. * : Remove TODO_ggc_collect from todo_flags_start and todo_flags_finish of all passes. * g++.dg/pr55604.C: Use -fdump-rtl-ira. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@197671 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 17 +++++++++++++++++ gcc/bt-load.c | 5 ++--- gcc/cfgcleanup.c | 4 ++-- gcc/cfgexpand.c | 2 +- gcc/combine-stack-adj.c | 3 +-- gcc/combine.c | 3 +-- gcc/compare-elim.c | 3 +-- gcc/config/i386/i386.c | 2 +- gcc/cprop.c | 2 +- gcc/cse.c | 5 +---- gcc/dce.c | 6 ++---- gcc/dse.c | 6 ++---- gcc/final.c | 5 ++--- gcc/function.c | 5 ++--- gcc/gcse.c | 4 ++-- gcc/ifcvt.c | 6 ++---- gcc/ipa-cp.c | 2 +- gcc/ipa-inline.c | 2 +- gcc/ipa.c | 8 +++----- gcc/ira.c | 42 +++--------------------------------------- gcc/loop-init.c | 2 +- gcc/lower-subreg.c | 2 -- gcc/modulo-sched.c | 3 +-- gcc/passes.c | 14 ++++++++------ gcc/postreload-gcse.c | 2 +- gcc/predict.c | 4 ++-- gcc/ree.c | 1 - gcc/reg-stack.c | 3 +-- gcc/regmove.c | 3 +-- gcc/reorg.c | 4 ++-- gcc/sched-rgn.c | 6 ++---- gcc/store-motion.c | 2 +- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/g++.dg/pr55604.C | 4 ++-- gcc/tree-cfgcleanup.c | 3 +-- gcc/tree-complex.c | 10 ++++------ gcc/tree-emutls.c | 2 +- gcc/tree-loop-distribution.c | 3 +-- gcc/tree-nrv.c | 2 +- gcc/tree-pass.h | 2 -- gcc/tree-sra.c | 2 -- gcc/tree-ssa-ccp.c | 2 +- gcc/tree-ssa-copy.c | 1 - gcc/tree-ssa-dom.c | 1 - gcc/tree-ssa-dse.c | 3 +-- gcc/tree-ssa-forwprop.c | 3 +-- gcc/tree-ssa-ifcombine.c | 3 +-- gcc/tree-ssa-loop.c | 15 +++++++-------- gcc/tree-ssa-phiopt.c | 6 ++---- gcc/tree-ssa-phiprop.c | 3 +-- gcc/tree-ssa-pre.c | 4 ++-- gcc/tree-ssa-reassoc.c | 3 +-- gcc/tree-ssa-sink.c | 3 +-- gcc/tree-ssa-strlen.c | 3 +-- gcc/tree-switch-conversion.c | 2 +- gcc/tree-vectorizer.c | 3 +-- gcc/tree-vrp.c | 3 +-- gcc/tree.c | 2 +- 58 files changed, 105 insertions(+), 165 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 98feb2c2314..2a95de18852 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,20 @@ +2013-04-10 Richard Biener + + * passes.c (execute_todo): Do not call ggc_collect conditional here. + (execute_one_ipa_transform_pass): But unconditionally here. + (execute_one_pass): And here. + (init_optimization_passes): Remove reload pass. + * tree-pass.h (TODO_ggc_collect): Remove. + (pass_reload): Likewise. + * ira.c (do_reload): Merge into ... + (ira): ... this. + (rest_of_handle_reload): Remove. + (pass_reload): Likewise. + * config/i386/i386.c (ix86_option_override): Refer to ira instead + of reload for vzeroupper pass placement. + * : Remove TODO_ggc_collect from todo_flags_start + and todo_flags_finish of all passes. + 2013-04-10 Richard Biener * tree-vectorizer.h (struct _slp_oprnd_info): Remove diff --git a/gcc/bt-load.c b/gcc/bt-load.c index 471ae42e4c6..9ca1bd98dcd 100644 --- a/gcc/bt-load.c +++ b/gcc/bt-load.c @@ -1520,8 +1520,7 @@ struct rtl_opt_pass pass_branch_target_load_optimize1 = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_verify_rtl_sharing | - TODO_ggc_collect, /* todo_flags_finish */ + TODO_verify_rtl_sharing, /* todo_flags_finish */ } }; @@ -1570,6 +1569,6 @@ struct rtl_opt_pass pass_branch_target_load_optimize2 = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_ggc_collect, /* todo_flags_finish */ + 0, /* todo_flags_finish */ } }; diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c index 2fcefc60b23..7764c6c9d2d 100644 --- a/gcc/cfgcleanup.c +++ b/gcc/cfgcleanup.c @@ -3055,7 +3055,7 @@ struct rtl_opt_pass pass_jump = 0, /* properties_required */ 0, /* properties_provided */ 0, /* properties_destroyed */ - TODO_ggc_collect, /* todo_flags_start */ + 0, /* todo_flags_start */ TODO_verify_rtl_sharing, /* todo_flags_finish */ } }; @@ -3082,7 +3082,7 @@ struct rtl_opt_pass pass_jump2 = 0, /* properties_required */ 0, /* properties_provided */ 0, /* properties_destroyed */ - TODO_ggc_collect, /* todo_flags_start */ + 0, /* todo_flags_start */ TODO_verify_rtl_sharing, /* todo_flags_finish */ } }; diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index 771b019c65b..a651d8c5868 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -4864,6 +4864,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_ggc_collect /* todo_flags_finish */ + 0 /* todo_flags_finish */ } }; diff --git a/gcc/combine-stack-adj.c b/gcc/combine-stack-adj.c index 0a4d8a51d1d..7392b92b3f5 100644 --- a/gcc/combine-stack-adj.c +++ b/gcc/combine-stack-adj.c @@ -659,7 +659,6 @@ struct rtl_opt_pass pass_stack_adjustments = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_df_finish | TODO_verify_rtl_sharing | - TODO_ggc_collect, /* todo_flags_finish */ + TODO_df_finish | TODO_verify_rtl_sharing /* todo_flags_finish */ } }; diff --git a/gcc/combine.c b/gcc/combine.c index 667b7b43c70..6d58b19dbe9 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -13818,7 +13818,6 @@ struct rtl_opt_pass pass_combine = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_df_finish | TODO_verify_rtl_sharing | - TODO_ggc_collect, /* todo_flags_finish */ + TODO_df_finish | TODO_verify_rtl_sharing /* todo_flags_finish */ } }; diff --git a/gcc/compare-elim.c b/gcc/compare-elim.c index 81b0c2d3050..367cd8ea8dc 100644 --- a/gcc/compare-elim.c +++ b/gcc/compare-elim.c @@ -669,7 +669,6 @@ struct rtl_opt_pass pass_compare_elim_after_reload = 0, /* todo_flags_start */ TODO_df_finish | TODO_df_verify - | TODO_verify_rtl_sharing - | TODO_ggc_collect /* todo_flags_finish */ + | TODO_verify_rtl_sharing /* todo_flags_finish */ } }; diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 9f5a24f6c00..21ebd0faee5 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -3930,7 +3930,7 @@ static void ix86_option_override (void) { static struct register_pass_info insert_vzeroupper_info - = { &pass_insert_vzeroupper.pass, "reload", + = { &pass_insert_vzeroupper.pass, "ira", 1, PASS_POS_INSERT_AFTER }; diff --git a/gcc/cprop.c b/gcc/cprop.c index 855a1d2873d..6a6b5f1fd10 100644 --- a/gcc/cprop.c +++ b/gcc/cprop.c @@ -1930,6 +1930,6 @@ struct rtl_opt_pass pass_rtl_cprop = 0, /* properties_destroyed */ 0, /* todo_flags_start */ TODO_df_finish | TODO_verify_rtl_sharing | - TODO_verify_flow | TODO_ggc_collect /* todo_flags_finish */ + TODO_verify_flow /* todo_flags_finish */ } }; diff --git a/gcc/cse.c b/gcc/cse.c index b200fef4dfb..f2c8f635d39 100644 --- a/gcc/cse.c +++ b/gcc/cse.c @@ -7466,8 +7466,7 @@ struct rtl_opt_pass pass_cse = 0, /* properties_destroyed */ 0, /* todo_flags_start */ TODO_df_finish | TODO_verify_rtl_sharing | - TODO_ggc_collect | - TODO_verify_flow, /* todo_flags_finish */ + TODO_verify_flow /* todo_flags_finish */ } }; @@ -7529,7 +7528,6 @@ struct rtl_opt_pass pass_cse2 = 0, /* properties_destroyed */ 0, /* todo_flags_start */ TODO_df_finish | TODO_verify_rtl_sharing | - TODO_ggc_collect | TODO_verify_flow /* todo_flags_finish */ } }; @@ -7590,7 +7588,6 @@ struct rtl_opt_pass pass_cse_after_global_opts = 0, /* properties_destroyed */ 0, /* todo_flags_start */ TODO_df_finish | TODO_verify_rtl_sharing | - TODO_ggc_collect | TODO_verify_flow /* todo_flags_finish */ } }; diff --git a/gcc/dce.c b/gcc/dce.c index b7ecc3046a1..64ed81e35e8 100644 --- a/gcc/dce.c +++ b/gcc/dce.c @@ -802,8 +802,7 @@ struct rtl_opt_pass pass_ud_rtl_dce = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_df_finish | TODO_verify_rtl_sharing | - TODO_ggc_collect /* todo_flags_finish */ + TODO_df_finish | TODO_verify_rtl_sharing /* todo_flags_finish */ } }; @@ -1218,7 +1217,6 @@ struct rtl_opt_pass pass_fast_rtl_dce = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_df_finish | TODO_verify_rtl_sharing | - TODO_ggc_collect /* todo_flags_finish */ + TODO_df_finish | TODO_verify_rtl_sharing /* todo_flags_finish */ } }; diff --git a/gcc/dse.c b/gcc/dse.c index 629d2387923..d643cb0b4fa 100644 --- a/gcc/dse.c +++ b/gcc/dse.c @@ -3745,8 +3745,7 @@ struct rtl_opt_pass pass_rtl_dse1 = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_df_finish | TODO_verify_rtl_sharing | - TODO_ggc_collect /* todo_flags_finish */ + TODO_df_finish | TODO_verify_rtl_sharing /* todo_flags_finish */ } }; @@ -3766,7 +3765,6 @@ struct rtl_opt_pass pass_rtl_dse2 = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_df_finish | TODO_verify_rtl_sharing | - TODO_ggc_collect /* todo_flags_finish */ + TODO_df_finish | TODO_verify_rtl_sharing /* todo_flags_finish */ } }; diff --git a/gcc/final.c b/gcc/final.c index 714137c712e..f6974f4be27 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -811,8 +811,7 @@ struct rtl_opt_pass pass_compute_alignments = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_verify_rtl_sharing - | TODO_ggc_collect /* todo_flags_finish */ + TODO_verify_rtl_sharing /* todo_flags_finish */ } }; @@ -4396,7 +4395,7 @@ struct rtl_opt_pass pass_final = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_ggc_collect /* todo_flags_finish */ + 0 /* todo_flags_finish */ } }; diff --git a/gcc/function.c b/gcc/function.c index 7e55c94cf75..36c874fd372 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -6999,9 +6999,8 @@ struct rtl_opt_pass pass_thread_prologue_and_epilogue = 0, /* properties_provided */ 0, /* properties_destroyed */ TODO_verify_flow, /* todo_flags_start */ - TODO_df_verify | - TODO_df_finish | TODO_verify_rtl_sharing | - TODO_ggc_collect /* todo_flags_finish */ + TODO_df_verify | TODO_df_finish + | TODO_verify_rtl_sharing /* todo_flags_finish */ } }; diff --git a/gcc/gcse.c b/gcc/gcse.c index f421a3a7a07..e1daf18f8b0 100644 --- a/gcc/gcse.c +++ b/gcc/gcse.c @@ -4148,7 +4148,7 @@ struct rtl_opt_pass pass_rtl_pre = 0, /* properties_destroyed */ 0, /* todo_flags_start */ TODO_df_finish | TODO_verify_rtl_sharing | - TODO_verify_flow | TODO_ggc_collect /* todo_flags_finish */ + TODO_verify_flow /* todo_flags_finish */ } }; @@ -4169,7 +4169,7 @@ struct rtl_opt_pass pass_rtl_hoist = 0, /* properties_destroyed */ 0, /* todo_flags_start */ TODO_df_finish | TODO_verify_rtl_sharing | - TODO_verify_flow | TODO_ggc_collect /* todo_flags_finish */ + TODO_verify_flow /* todo_flags_finish */ } }; diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c index faea882cefa..f1309cfc449 100644 --- a/gcc/ifcvt.c +++ b/gcc/ifcvt.c @@ -4514,8 +4514,7 @@ struct rtl_opt_pass pass_if_after_combine = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_df_finish | TODO_verify_rtl_sharing | - TODO_ggc_collect /* todo_flags_finish */ + TODO_df_finish | TODO_verify_rtl_sharing /* todo_flags_finish */ } }; @@ -4551,7 +4550,6 @@ struct rtl_opt_pass pass_if_after_reload = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_df_finish | TODO_verify_rtl_sharing | - TODO_ggc_collect /* todo_flags_finish */ + TODO_df_finish | TODO_verify_rtl_sharing /* todo_flags_finish */ } }; diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c index 0ca25d286f4..27aed3c368f 100644 --- a/gcc/ipa-cp.c +++ b/gcc/ipa-cp.c @@ -3660,7 +3660,7 @@ struct ipa_opt_pass_d pass_ipa_cp = 0, /* properties_destroyed */ 0, /* todo_flags_start */ TODO_dump_symtab | - TODO_remove_functions | TODO_ggc_collect /* todo_flags_finish */ + TODO_remove_functions /* todo_flags_finish */ }, ipcp_generate_summary, /* generate_summary */ ipcp_write_summary, /* write_summary */ diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c index 171d6a2266c..964d1f9d9de 100644 --- a/gcc/ipa-inline.c +++ b/gcc/ipa-inline.c @@ -2123,7 +2123,7 @@ struct ipa_opt_pass_d pass_ipa_inline = 0, /* properties_destroyed */ TODO_remove_functions, /* todo_flags_finish */ TODO_dump_symtab - | TODO_remove_functions | TODO_ggc_collect /* todo_flags_finish */ + | TODO_remove_functions /* todo_flags_finish */ }, inline_generate_summary, /* generate_summary */ inline_write_summary, /* write_summary */ diff --git a/gcc/ipa.c b/gcc/ipa.c index f53d9db29b2..cb7b6b56b8e 100644 --- a/gcc/ipa.c +++ b/gcc/ipa.c @@ -914,8 +914,7 @@ struct simple_ipa_opt_pass pass_ipa_function_and_variable_visibility = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_remove_functions | TODO_dump_symtab - | TODO_ggc_collect /* todo_flags_finish */ + TODO_remove_functions | TODO_dump_symtab /* todo_flags_finish */ } }; @@ -944,7 +943,7 @@ struct simple_ipa_opt_pass pass_ipa_free_inline_summary = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_ggc_collect /* todo_flags_finish */ + 0 /* todo_flags_finish */ } }; @@ -983,8 +982,7 @@ struct ipa_opt_pass_d pass_ipa_whole_program_visibility = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_remove_functions | TODO_dump_symtab - | TODO_ggc_collect /* todo_flags_finish */ + TODO_remove_functions | TODO_dump_symtab /* todo_flags_finish */ }, NULL, /* generate_summary */ NULL, /* write_summary */ diff --git a/gcc/ira.c b/gcc/ira.c index 03b336831fa..edfc974fad6 100644 --- a/gcc/ira.c +++ b/gcc/ira.c @@ -4359,6 +4359,8 @@ ira (FILE *f) int rebuild_p; bool saved_flag_caller_saves = flag_caller_saves; enum ira_region saved_flag_ira_region = flag_ira_region; + basic_block bb; + bool need_dce; ira_conflicts_p = optimize > 0; @@ -4588,13 +4590,6 @@ ira (FILE *f) flag_caller_saves = saved_flag_caller_saves; flag_ira_region = saved_flag_ira_region; } -} - -static void -do_reload (void) -{ - basic_block bb; - bool need_dce; if (flag_ira_verbose < 10) ira_dump_file = dump_file; @@ -4634,8 +4629,6 @@ do_reload (void) timevar_pop (TV_RELOAD); - timevar_push (TV_IRA); - if (ira_conflicts_p && ! ira_use_lra_p) { ira_free (ira_spilled_reg_stack_slots); @@ -4693,8 +4686,6 @@ do_reload (void) if (need_dce && optimize) run_fast_dce (); - - timevar_pop (TV_IRA); } /* Run the integrated register allocator. */ @@ -4721,33 +4712,6 @@ struct rtl_opt_pass pass_ira = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - 0, /* todo_flags_finish */ - } -}; - -static unsigned int -rest_of_handle_reload (void) -{ - do_reload (); - return 0; -} - -struct rtl_opt_pass pass_reload = -{ - { - RTL_PASS, - "reload", /* name */ - OPTGROUP_NONE, /* optinfo_flags */ - NULL, /* gate */ - rest_of_handle_reload, /* execute */ - NULL, /* sub */ - NULL, /* next */ - 0, /* static_pass_number */ - TV_RELOAD, /* tv_id */ - 0, /* properties_required */ - 0, /* properties_provided */ - 0, /* properties_destroyed */ - 0, /* todo_flags_start */ - TODO_ggc_collect /* todo_flags_finish */ + 0 /* todo_flags_finish */ } }; diff --git a/gcc/loop-init.c b/gcc/loop-init.c index f75493817bb..92d621e273c 100644 --- a/gcc/loop-init.c +++ b/gcc/loop-init.c @@ -318,7 +318,7 @@ struct rtl_opt_pass pass_loop2 = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_ggc_collect /* todo_flags_finish */ + 0 /* todo_flags_finish */ } }; diff --git a/gcc/lower-subreg.c b/gcc/lower-subreg.c index 05927e13b08..5b5b03fb0bd 100644 --- a/gcc/lower-subreg.c +++ b/gcc/lower-subreg.c @@ -1699,7 +1699,6 @@ struct rtl_opt_pass pass_lower_subreg = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_ggc_collect | TODO_verify_flow /* todo_flags_finish */ } }; @@ -1721,7 +1720,6 @@ struct rtl_opt_pass pass_lower_subreg2 = 0, /* properties_destroyed */ 0, /* todo_flags_start */ TODO_df_finish | TODO_verify_rtl_sharing | - TODO_ggc_collect | TODO_verify_flow /* todo_flags_finish */ } }; diff --git a/gcc/modulo-sched.c b/gcc/modulo-sched.c index 1273b2b701c..6ce79a96f6e 100644 --- a/gcc/modulo-sched.c +++ b/gcc/modulo-sched.c @@ -3369,7 +3369,6 @@ struct rtl_opt_pass pass_sms = 0, /* todo_flags_start */ TODO_df_finish | TODO_verify_flow - | TODO_verify_rtl_sharing - | TODO_ggc_collect /* todo_flags_finish */ + | TODO_verify_rtl_sharing /* todo_flags_finish */ } }; diff --git a/gcc/passes.c b/gcc/passes.c index a47e092ea23..c9911b932f2 100644 --- a/gcc/passes.c +++ b/gcc/passes.c @@ -406,7 +406,7 @@ static struct rtl_opt_pass pass_rest_of_compilation = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_ggc_collect /* todo_flags_finish */ + 0 /* todo_flags_finish */ } }; @@ -432,7 +432,7 @@ static struct rtl_opt_pass pass_postreload = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_ggc_collect | TODO_verify_rtl_sharing /* todo_flags_finish */ + TODO_verify_rtl_sharing /* todo_flags_finish */ } }; @@ -1620,7 +1620,6 @@ init_optimization_passes (void) NEXT_PASS (pass_sms); NEXT_PASS (pass_sched); NEXT_PASS (pass_ira); - NEXT_PASS (pass_reload); NEXT_PASS (pass_postreload); { struct opt_pass **p = &pass_postreload.pass.sub; @@ -2014,9 +2013,6 @@ execute_todo (unsigned int flags) fflush (dump_file); } - if (flags & TODO_ggc_collect) - ggc_collect (); - /* Now that the dumping has been done, we can get rid of the optional df problems. */ if (flags & TODO_df_finish) @@ -2188,6 +2184,9 @@ execute_one_ipa_transform_pass (struct cgraph_node *node, pass_fini_dump_file (pass); current_pass = NULL; + + /* Signal this is a suitable GC collection point. */ + ggc_collect (); } /* For the current function, execute all ipa transforms. */ @@ -2365,6 +2364,9 @@ execute_one_pass (struct opt_pass *pass) current_pass = NULL; + /* Signal this is a suitable GC collection point. */ + ggc_collect (); + return true; } diff --git a/gcc/postreload-gcse.c b/gcc/postreload-gcse.c index 1b94b5c7d73..b9befe0e9e8 100644 --- a/gcc/postreload-gcse.c +++ b/gcc/postreload-gcse.c @@ -1339,6 +1339,6 @@ struct rtl_opt_pass pass_gcse2 = 0, /* properties_destroyed */ 0, /* todo_flags_start */ TODO_verify_rtl_sharing - | TODO_verify_flow | TODO_ggc_collect /* todo_flags_finish */ + | TODO_verify_flow /* todo_flags_finish */ } }; diff --git a/gcc/predict.c b/gcc/predict.c index 1871976d99b..91f66a8dc2a 100644 --- a/gcc/predict.c +++ b/gcc/predict.c @@ -2916,7 +2916,7 @@ struct gimple_opt_pass pass_profile = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_ggc_collect | TODO_verify_ssa /* todo_flags_finish */ + TODO_verify_ssa /* todo_flags_finish */ } }; @@ -2936,7 +2936,7 @@ struct gimple_opt_pass pass_strip_predict_hints = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_ggc_collect | TODO_verify_ssa /* todo_flags_finish */ + TODO_verify_ssa /* todo_flags_finish */ } }; diff --git a/gcc/ree.c b/gcc/ree.c index c60921239a7..c0d43c8f72a 100644 --- a/gcc/ree.c +++ b/gcc/ree.c @@ -957,7 +957,6 @@ struct rtl_opt_pass pass_ree = 0, /* properties_destroyed */ 0, /* todo_flags_start */ TODO_df_finish - | TODO_ggc_collect | TODO_verify_rtl_sharing, /* todo_flags_finish */ } }; diff --git a/gcc/reg-stack.c b/gcc/reg-stack.c index d6a39e14aa7..28127878987 100644 --- a/gcc/reg-stack.c +++ b/gcc/reg-stack.c @@ -3344,7 +3344,6 @@ struct rtl_opt_pass pass_stack_regs_run = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_df_finish | TODO_verify_rtl_sharing | - TODO_ggc_collect /* todo_flags_finish */ + TODO_df_finish | TODO_verify_rtl_sharing /* todo_flags_finish */ } }; diff --git a/gcc/regmove.c b/gcc/regmove.c index 3d25fe07bad..1ce8a7ed285 100644 --- a/gcc/regmove.c +++ b/gcc/regmove.c @@ -1377,7 +1377,6 @@ struct rtl_opt_pass pass_regmove = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_df_finish | TODO_verify_rtl_sharing | - TODO_ggc_collect /* todo_flags_finish */ + TODO_df_finish | TODO_verify_rtl_sharing /* todo_flags_finish */ } }; diff --git a/gcc/reorg.c b/gcc/reorg.c index f89598276b1..d37d1b6fba6 100644 --- a/gcc/reorg.c +++ b/gcc/reorg.c @@ -3886,7 +3886,7 @@ struct rtl_opt_pass pass_delay_slots = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_ggc_collect /* todo_flags_finish */ + 0 /* todo_flags_finish */ } }; @@ -3921,6 +3921,6 @@ struct rtl_opt_pass pass_machine_reorg = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_ggc_collect /* todo_flags_finish */ + 0 /* todo_flags_finish */ } }; diff --git a/gcc/sched-rgn.c b/gcc/sched-rgn.c index 02a6705afc4..6eb00e93adc 100644 --- a/gcc/sched-rgn.c +++ b/gcc/sched-rgn.c @@ -3630,8 +3630,7 @@ struct rtl_opt_pass pass_sched = 0, /* properties_destroyed */ 0, /* todo_flags_start */ TODO_df_finish | TODO_verify_rtl_sharing | - TODO_verify_flow | - TODO_ggc_collect /* todo_flags_finish */ + TODO_verify_flow /* todo_flags_finish */ } }; @@ -3652,7 +3651,6 @@ struct rtl_opt_pass pass_sched2 = 0, /* properties_destroyed */ 0, /* todo_flags_start */ TODO_df_finish | TODO_verify_rtl_sharing | - TODO_verify_flow | - TODO_ggc_collect /* todo_flags_finish */ + TODO_verify_flow /* todo_flags_finish */ } }; diff --git a/gcc/store-motion.c b/gcc/store-motion.c index 2e57d32422c..6fc072c38e6 100644 --- a/gcc/store-motion.c +++ b/gcc/store-motion.c @@ -1249,6 +1249,6 @@ struct rtl_opt_pass pass_rtl_store_motion = 0, /* properties_destroyed */ 0, /* todo_flags_start */ TODO_df_finish | TODO_verify_rtl_sharing | - TODO_verify_flow | TODO_ggc_collect /* todo_flags_finish */ + TODO_verify_flow /* todo_flags_finish */ } }; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index debc2aba16b..8bc42b41d95 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2013-04-10 Richard Biener + + * g++.dg/pr55604.C: Use -fdump-rtl-ira. + 2013-04-10 Richard Biener * gcc.dg/vect/slp-39.c: New testcase. diff --git a/gcc/testsuite/g++.dg/pr55604.C b/gcc/testsuite/g++.dg/pr55604.C index 135ae4d5e55..b2e7af0ebe3 100644 --- a/gcc/testsuite/g++.dg/pr55604.C +++ b/gcc/testsuite/g++.dg/pr55604.C @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O -fdump-rtl-reload" } */ +/* { dg-options "-O -fdump-rtl-ira" } */ main () { @@ -8,4 +8,4 @@ main () __builtin_printf ("%d %s\n", t, s); } -/* { dg-final { cleanup-rtl-dump "reload" } } */ +/* { dg-final { cleanup-rtl-dump "ira" } } */ diff --git a/gcc/tree-cfgcleanup.c b/gcc/tree-cfgcleanup.c index 064d994ad3d..b355a8607d5 100644 --- a/gcc/tree-cfgcleanup.c +++ b/gcc/tree-cfgcleanup.c @@ -992,7 +992,6 @@ struct gimple_opt_pass pass_merge_phi = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_ggc_collect /* todo_flags_finish */ - | TODO_verify_ssa + TODO_verify_ssa /* todo_flags_finish */ } }; diff --git a/gcc/tree-complex.c b/gcc/tree-complex.c index f8dbe0a8519..760083b64ca 100644 --- a/gcc/tree-complex.c +++ b/gcc/tree-complex.c @@ -1648,9 +1648,8 @@ struct gimple_opt_pass pass_lower_complex = PROP_gimple_lcx, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_ggc_collect - | TODO_update_ssa - | TODO_verify_stmts /* todo_flags_finish */ + TODO_update_ssa + | TODO_verify_stmts /* todo_flags_finish */ } }; @@ -1679,8 +1678,7 @@ struct gimple_opt_pass pass_lower_complex_O0 = PROP_gimple_lcx, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_ggc_collect - | TODO_update_ssa - | TODO_verify_stmts /* todo_flags_finish */ + TODO_update_ssa + | TODO_verify_stmts /* todo_flags_finish */ } }; diff --git a/gcc/tree-emutls.c b/gcc/tree-emutls.c index d7d7360a9f9..fc75b3144e3 100644 --- a/gcc/tree-emutls.c +++ b/gcc/tree-emutls.c @@ -798,7 +798,7 @@ ipa_lower_emutls (void) access_vars.release (); free_varpool_node_set (tls_vars); - return TODO_ggc_collect | TODO_verify_all; + return TODO_verify_all; } /* If the target supports TLS natively, we need do nothing here. */ diff --git a/gcc/tree-loop-distribution.c b/gcc/tree-loop-distribution.c index 668ceec1743..5c2c7db4400 100644 --- a/gcc/tree-loop-distribution.c +++ b/gcc/tree-loop-distribution.c @@ -1605,7 +1605,6 @@ struct gimple_opt_pass pass_loop_distribution = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_ggc_collect - | TODO_verify_ssa /* todo_flags_finish */ + TODO_verify_ssa /* todo_flags_finish */ } }; diff --git a/gcc/tree-nrv.c b/gcc/tree-nrv.c index 58e7e80c808..51bc7cd90cd 100644 --- a/gcc/tree-nrv.c +++ b/gcc/tree-nrv.c @@ -285,7 +285,7 @@ struct gimple_opt_pass pass_nrv = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_ggc_collect /* todo_flags_finish */ + 0 /* todo_flags_finish */ } }; diff --git a/gcc/tree-pass.h b/gcc/tree-pass.h index 0942ad7793f..a6bb4faf081 100644 --- a/gcc/tree-pass.h +++ b/gcc/tree-pass.h @@ -154,7 +154,6 @@ struct simple_ipa_opt_pass (PROP_gimple_any | PROP_gimple_lcf | PROP_gimple_leh | PROP_gimple_lomp) /* To-do flags. */ -#define TODO_ggc_collect (1 << 1) #define TODO_verify_ssa (1 << 2) #define TODO_verify_flow (1 << 3) #define TODO_verify_stmts (1 << 4) @@ -446,7 +445,6 @@ extern struct rtl_opt_pass pass_mode_switching; extern struct rtl_opt_pass pass_sms; extern struct rtl_opt_pass pass_sched; extern struct rtl_opt_pass pass_ira; -extern struct rtl_opt_pass pass_reload; extern struct rtl_opt_pass pass_clean_state; extern struct rtl_opt_pass pass_branch_prob; extern struct rtl_opt_pass pass_value_profile_transformations; diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index 78efa255b1d..a148a600017 100644 --- a/gcc/tree-sra.c +++ b/gcc/tree-sra.c @@ -3450,7 +3450,6 @@ struct gimple_opt_pass pass_sra_early = 0, /* properties_destroyed */ 0, /* todo_flags_start */ TODO_update_ssa - | TODO_ggc_collect | TODO_verify_ssa /* todo_flags_finish */ } }; @@ -3472,7 +3471,6 @@ struct gimple_opt_pass pass_sra = 0, /* properties_destroyed */ TODO_update_address_taken, /* todo_flags_start */ TODO_update_ssa - | TODO_ggc_collect | TODO_verify_ssa /* todo_flags_finish */ } }; diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c index f298b27ad97..1bc4c2fb7b5 100644 --- a/gcc/tree-ssa-ccp.c +++ b/gcc/tree-ssa-ccp.c @@ -2139,7 +2139,7 @@ struct gimple_opt_pass pass_ccp = 0, /* todo_flags_start */ TODO_verify_ssa | TODO_update_address_taken - | TODO_verify_stmts | TODO_ggc_collect/* todo_flags_finish */ + | TODO_verify_stmts /* todo_flags_finish */ } }; diff --git a/gcc/tree-ssa-copy.c b/gcc/tree-ssa-copy.c index 1514745dda5..d16756cb79a 100644 --- a/gcc/tree-ssa-copy.c +++ b/gcc/tree-ssa-copy.c @@ -844,7 +844,6 @@ struct gimple_opt_pass pass_copy_prop = 0, /* properties_destroyed */ 0, /* todo_flags_start */ TODO_cleanup_cfg - | TODO_ggc_collect | TODO_verify_ssa | TODO_update_ssa /* todo_flags_finish */ } diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c index d98a646aa4f..d650d95f23e 100644 --- a/gcc/tree-ssa-dom.c +++ b/gcc/tree-ssa-dom.c @@ -3076,7 +3076,6 @@ struct gimple_opt_pass pass_phi_only_cprop = 0, /* properties_destroyed */ 0, /* todo_flags_start */ TODO_cleanup_cfg - | TODO_ggc_collect | TODO_verify_ssa | TODO_verify_stmts | TODO_update_ssa /* todo_flags_finish */ diff --git a/gcc/tree-ssa-dse.c b/gcc/tree-ssa-dse.c index e0c3b745b1e..ad99ea9d5d4 100644 --- a/gcc/tree-ssa-dse.c +++ b/gcc/tree-ssa-dse.c @@ -375,7 +375,6 @@ struct gimple_opt_pass pass_dse = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_ggc_collect - | TODO_verify_ssa /* todo_flags_finish */ + TODO_verify_ssa /* todo_flags_finish */ } }; diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c index 26b076146d3..ac930c68755 100644 --- a/gcc/tree-ssa-forwprop.c +++ b/gcc/tree-ssa-forwprop.c @@ -3152,8 +3152,7 @@ struct gimple_opt_pass pass_forwprop = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_ggc_collect - | TODO_update_ssa + TODO_update_ssa | TODO_verify_ssa /* todo_flags_finish */ } }; diff --git a/gcc/tree-ssa-ifcombine.c b/gcc/tree-ssa-ifcombine.c index cc06ca13b1e..9598eb81a45 100644 --- a/gcc/tree-ssa-ifcombine.c +++ b/gcc/tree-ssa-ifcombine.c @@ -664,8 +664,7 @@ struct gimple_opt_pass pass_tree_ifcombine = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_ggc_collect - | TODO_update_ssa + TODO_update_ssa | TODO_verify_ssa /* todo_flags_finish */ } }; diff --git a/gcc/tree-ssa-loop.c b/gcc/tree-ssa-loop.c index fdfb9e71262..fef6883a13d 100644 --- a/gcc/tree-ssa-loop.c +++ b/gcc/tree-ssa-loop.c @@ -56,8 +56,8 @@ struct gimple_opt_pass pass_tree_loop = PROP_cfg, /* properties_required */ 0, /* properties_provided */ 0, /* properties_destroyed */ - TODO_ggc_collect, /* todo_flags_start */ - TODO_verify_ssa | TODO_ggc_collect /* todo_flags_finish */ + 0, /* todo_flags_start */ + TODO_verify_ssa /* todo_flags_finish */ } }; @@ -170,7 +170,7 @@ struct gimple_opt_pass pass_tree_unswitch = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_ggc_collect /* todo_flags_finish */ + 0 /* todo_flags_finish */ } }; @@ -245,7 +245,7 @@ struct gimple_opt_pass pass_vectorize = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_ggc_collect /* todo_flags_finish */ + 0 /* todo_flags_finish */ } }; @@ -491,7 +491,7 @@ struct gimple_opt_pass pass_complete_unroll = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_ggc_collect /* todo_flags_finish */ + 0 /* todo_flags_finish */ } }; @@ -538,8 +538,7 @@ struct gimple_opt_pass pass_complete_unrolli = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_verify_flow - | TODO_ggc_collect /* todo_flags_finish */ + TODO_verify_flow /* todo_flags_finish */ } }; @@ -653,7 +652,7 @@ struct gimple_opt_pass pass_iv_optimize = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_update_ssa | TODO_ggc_collect /* todo_flags_finish */ + TODO_update_ssa /* todo_flags_finish */ } }; diff --git a/gcc/tree-ssa-phiopt.c b/gcc/tree-ssa-phiopt.c index 300016f7a0b..91df10714e5 100644 --- a/gcc/tree-ssa-phiopt.c +++ b/gcc/tree-ssa-phiopt.c @@ -2013,8 +2013,7 @@ struct gimple_opt_pass pass_phiopt = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_ggc_collect - | TODO_verify_ssa + TODO_verify_ssa | TODO_verify_flow | TODO_verify_stmts /* todo_flags_finish */ } @@ -2042,8 +2041,7 @@ struct gimple_opt_pass pass_cselim = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_ggc_collect - | TODO_verify_ssa + TODO_verify_ssa | TODO_verify_flow | TODO_verify_stmts /* todo_flags_finish */ } diff --git a/gcc/tree-ssa-phiprop.c b/gcc/tree-ssa-phiprop.c index 4da18148782..6555ae344b7 100644 --- a/gcc/tree-ssa-phiprop.c +++ b/gcc/tree-ssa-phiprop.c @@ -420,8 +420,7 @@ struct gimple_opt_pass pass_phiprop = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_ggc_collect - | TODO_update_ssa + TODO_update_ssa | TODO_verify_ssa /* todo_flags_finish */ } }; diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c index 10c8091758e..798409afa82 100644 --- a/gcc/tree-ssa-pre.c +++ b/gcc/tree-ssa-pre.c @@ -4788,7 +4788,7 @@ struct gimple_opt_pass pass_pre = 0, /* properties_provided */ 0, /* properties_destroyed */ TODO_rebuild_alias, /* todo_flags_start */ - TODO_ggc_collect | TODO_verify_ssa /* todo_flags_finish */ + TODO_verify_ssa /* todo_flags_finish */ } }; @@ -4840,6 +4840,6 @@ struct gimple_opt_pass pass_fre = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_ggc_collect | TODO_verify_ssa /* todo_flags_finish */ + TODO_verify_ssa /* todo_flags_finish */ } }; diff --git a/gcc/tree-ssa-reassoc.c b/gcc/tree-ssa-reassoc.c index 27161cd1860..534c51cdb96 100644 --- a/gcc/tree-ssa-reassoc.c +++ b/gcc/tree-ssa-reassoc.c @@ -4293,7 +4293,6 @@ struct gimple_opt_pass pass_reassoc = 0, /* properties_destroyed */ 0, /* todo_flags_start */ TODO_verify_ssa - | TODO_verify_flow - | TODO_ggc_collect /* todo_flags_finish */ + | TODO_verify_flow /* todo_flags_finish */ } }; diff --git a/gcc/tree-ssa-sink.c b/gcc/tree-ssa-sink.c index 48dae0b9f99..0d9029bc66e 100644 --- a/gcc/tree-ssa-sink.c +++ b/gcc/tree-ssa-sink.c @@ -597,7 +597,6 @@ struct gimple_opt_pass pass_sink_code = 0, /* todo_flags_start */ TODO_update_ssa | TODO_verify_ssa - | TODO_verify_flow - | TODO_ggc_collect /* todo_flags_finish */ + | TODO_verify_flow /* todo_flags_finish */ } }; diff --git a/gcc/tree-ssa-strlen.c b/gcc/tree-ssa-strlen.c index c8324610914..9c724dc43cb 100644 --- a/gcc/tree-ssa-strlen.c +++ b/gcc/tree-ssa-strlen.c @@ -2020,7 +2020,6 @@ struct gimple_opt_pass pass_strlen = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_ggc_collect - | TODO_verify_ssa /* todo_flags_finish */ + TODO_verify_ssa /* todo_flags_finish */ } }; diff --git a/gcc/tree-switch-conversion.c b/gcc/tree-switch-conversion.c index b7d4b249553..3fffdf7e6cd 100644 --- a/gcc/tree-switch-conversion.c +++ b/gcc/tree-switch-conversion.c @@ -1477,7 +1477,7 @@ struct gimple_opt_pass pass_convert_switch = 0, /* properties_destroyed */ 0, /* todo_flags_start */ TODO_update_ssa - | TODO_ggc_collect | TODO_verify_ssa + | TODO_verify_ssa | TODO_verify_stmts | TODO_verify_flow /* todo_flags_finish */ } diff --git a/gcc/tree-vectorizer.c b/gcc/tree-vectorizer.c index 9d461997516..0227d08c9f0 100644 --- a/gcc/tree-vectorizer.c +++ b/gcc/tree-vectorizer.c @@ -214,8 +214,7 @@ struct gimple_opt_pass pass_slp_vectorize = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_ggc_collect - | TODO_verify_ssa + TODO_verify_ssa | TODO_update_ssa | TODO_verify_stmts /* todo_flags_finish */ } diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index e1b88a9e138..be1a3808cf5 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -9408,7 +9408,6 @@ struct gimple_opt_pass pass_vrp = TODO_cleanup_cfg | TODO_update_ssa | TODO_verify_ssa - | TODO_verify_flow - | TODO_ggc_collect /* todo_flags_finish */ + | TODO_verify_flow /* todo_flags_finish */ } }; diff --git a/gcc/tree.c b/gcc/tree.c index 078caae9b9e..ba3dcddaf42 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -5299,7 +5299,7 @@ struct simple_ipa_opt_pass pass_ipa_free_lang_data = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_ggc_collect /* todo_flags_finish */ + 0 /* todo_flags_finish */ } }; -- cgit v1.2.3