aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2013-11-13 18:34:29 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2013-11-13 18:34:29 +0100
commita9335ba2445a4c0a10ed9288b8c712c46a2c8da4 (patch)
tree90da25b32228f253357c6d763abe067c27070dab
parentb62c62f4b017b1b3bab47e2b928c795a15e66a0f (diff)
downloadgcc-a9335ba2445a4c0a10ed9288b8c712c46a2c8da4.zip
gcc-a9335ba2445a4c0a10ed9288b8c712c46a2c8da4.tar.gz
gcc-a9335ba2445a4c0a10ed9288b8c712c46a2c8da4.tar.bz2
passes.c (execute_todo): Don't call do_per_function if flags are zero.
* passes.c (execute_todo): Don't call do_per_function if flags are zero. (execute_one_ipa_transform_pass, execute_one_pass): Don't call execute_function_dump if dump_file is NULL. From-SVN: r204751
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/passes.c9
2 files changed, 13 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 77f3ea2..8903f7c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2013-11-13 Jakub Jelinek <jakub@redhat.com>
+
+ * passes.c (execute_todo): Don't call do_per_function if
+ flags are zero.
+ (execute_one_ipa_transform_pass, execute_one_pass): Don't call
+ execute_function_dump if dump_file is NULL.
+
2013-11-13 Martin Jambor <mjambor@suse.cz>
* cgraph.c (cgraph_get_create_node): Do what
diff --git a/gcc/passes.c b/gcc/passes.c
index 19e5869..f45ed0a 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -1875,7 +1875,8 @@ execute_todo (unsigned int flags)
statistics_fini_pass ();
- do_per_function (execute_function_todo, (void *)(size_t) flags);
+ if (flags)
+ do_per_function (execute_function_todo, (void *)(size_t) flags);
/* Always remove functions just as before inlining: IPA passes might be
interested to see bodies of extern inline functions that are not inlined
@@ -2065,7 +2066,8 @@ execute_one_ipa_transform_pass (struct cgraph_node *node,
if (profile_report && cfun && (cfun->curr_properties & PROP_cfg))
check_profile_consistency (pass->static_pass_number, 1, true);
- do_per_function (execute_function_dump, NULL);
+ if (dump_file)
+ do_per_function (execute_function_dump, NULL);
pass_fini_dump_file (pass);
current_pass = NULL;
@@ -2231,7 +2233,8 @@ execute_one_pass (struct opt_pass *pass)
check_profile_consistency (pass->static_pass_number, 1, true);
verify_interpass_invariants ();
- do_per_function (execute_function_dump, NULL);
+ if (dump_file)
+ do_per_function (execute_function_dump, NULL);
if (pass->type == IPA_PASS)
{
struct cgraph_node *node;