passes.c (execute_todo): Don't call do_per_function if flags are zero.
authorJakub Jelinek <jakub@redhat.com>
Wed, 13 Nov 2013 17:34:29 +0000 (18:34 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 13 Nov 2013 17:34:29 +0000 (18:34 +0100)
* 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

gcc/ChangeLog
gcc/passes.c

index 77f3ea285b0d7236c9410168ec48e1bb1455d96b..8903f7ce59990672a150dfebbc86d3e992c7cf1d 100644 (file)
@@ -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
index 19e5869c14bc43a7e0bd2c73ab64961c750647df..f45ed0aed1c6bbeca7737bac4b7a063088565e71 100644 (file)
@@ -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;