ipa-cp.c (ipcp_driver): Relase prev_edge.
authorJan Hubicka <hubicka@ucw.cz>
Mon, 13 Apr 2015 06:27:57 +0000 (08:27 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Mon, 13 Apr 2015 06:27:57 +0000 (06:27 +0000)
* ipa-cp.c (ipcp_driver): Relase prev_edge.
* passes.c (execute_one_pass): Only add transform if pass has one.

From-SVN: r222038

gcc/ChangeLog
gcc/ipa-cp.c
gcc/passes.c

index dfd76ab6147f41f342fe1e9663c548d6edc19a2e..bf946562db0b991cdbba330a69afc1f011aad525 100644 (file)
@@ -1,3 +1,8 @@
+2015-04-12  Jan Hubicka  <hubicka@ucw.cz>
+
+       * ipa-cp.c (ipcp_driver): Relase prev_edge.
+       * passes.c (execute_one_pass): Only add transform if pass has one.
+
 2015-04-12  Joseph Myers  <joseph@codesourcery.com>
 
        * config/i386/i386.c (ix86_option_override_internal): Don't set
index bfe4821da338dcb8609e1921d865223b9517c273..38240290423fbdc5e770ef6ef13116c58ea3dd9b 100644 (file)
@@ -4493,6 +4493,7 @@ ipcp_driver (void)
   /* Free all IPCP structures.  */
   free_toporder_info (&topo);
   next_edge_clone.release ();
+  prev_edge_clone.release ();
   symtab->remove_edge_removal_hook (edge_removal_hook_holder);
   symtab->remove_edge_duplication_hook (edge_duplication_hook_holder);
   ipa_free_all_structures_after_ipa_cp ();
index 062ae4f0d1b40c0dddfafefc1e79e85d7926c706..beffd3f587a2e963ddad717d85833ab99fc3178c 100644 (file)
@@ -2350,8 +2350,9 @@ execute_one_pass (opt_pass *pass)
   if (pass->type == IPA_PASS)
     {
       struct cgraph_node *node;
-      FOR_EACH_FUNCTION_WITH_GIMPLE_BODY (node)
-       node->ipa_transforms_to_apply.safe_push ((ipa_opt_pass_d *)pass);
+      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);
     }
 
   if (!current_function_decl)