From f9e9225bfe54fb97ebacc41762a0fdbffbb4688c Mon Sep 17 00:00:00 2001 From: vries Date: Tue, 15 Mar 2016 11:51:32 +0000 Subject: Fix fdump-ipa-all-graph 2016-03-15 Tom de Vries PR ipa/70161 * cgraph.c (cgraph_node::get_body): Save, reset and restore dump_file_name. * passes.c (execute_one_ipa_transform_pass): Add missing argument to execute_function_dump. (execute_one_pass): Don't dump function if it will be dumped after ipa transform. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234211 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/passes.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'gcc/passes.c') diff --git a/gcc/passes.c b/gcc/passes.c index 1bf89edc921..9d9025116f4 100644 --- a/gcc/passes.c +++ b/gcc/passes.c @@ -2214,7 +2214,7 @@ execute_one_ipa_transform_pass (struct cgraph_node *node, check_profile_consistency (pass->static_pass_number, 1, true); if (dump_file) - do_per_function (execute_function_dump, NULL); + do_per_function (execute_function_dump, pass); pass_fini_dump_file (pass); current_pass = NULL; @@ -2351,15 +2351,15 @@ execute_one_pass (opt_pass *pass) check_profile_consistency (pass->static_pass_number, 1, true); verify_interpass_invariants (); - if (dump_file) - do_per_function (execute_function_dump, pass); - if (pass->type == IPA_PASS) + if (pass->type == IPA_PASS + && ((ipa_opt_pass_d *)pass)->function_transform) { struct cgraph_node *node; - if (((ipa_opt_pass_d *)pass)->function_transform) - FOR_EACH_FUNCTION_WITH_GIMPLE_BODY (node) - node->ipa_transforms_to_apply.safe_push ((ipa_opt_pass_d *)pass); + FOR_EACH_FUNCTION_WITH_GIMPLE_BODY (node) + node->ipa_transforms_to_apply.safe_push ((ipa_opt_pass_d *)pass); } + else if (dump_file) + do_per_function (execute_function_dump, pass); if (!current_function_decl) symtab->process_new_functions (); -- cgit v1.2.1