diff mbox

[RFC,3/3] Remove ipa_update_after_lto_read

Message ID add3e4c068b3fd3f330b2e4f2a404bf05d927269.1488213408.git.mjambor@suse.cz
State New
Headers show

Commit Message

Martin Jambor Feb. 27, 2017, 4:35 p.m. UTC
Hello,

when working on call summaries, I have found a weird function
ipa_update_after_lto_read which currently only makes sure that IPA-CP
function and edge summaries exist, at times when they already have to
exist.

So I did some digging in history and found out that originally the
function was meant for setting a called_with_var_arguments flags where
appropriate after LTO stream-in.  We have however removed that flag in
2011 and the function is basically useless since then (although only
with call summaries it is definitely a no-OP).  Thus, I'll propose to
remove it next stage1.

Thanks,

Martin

2017-02-27  Martin Jambor  <mjambor@suse.cz>

	* ipa-prop.c (ipa_update_after_lto_read): Removed.
	* ipa-prop.h (ipa_update_after_lto_read): Remove declaration.
	* ipa-cp.c (ipcp_propagate_stage): Do not call
	ipa_update_after_lto_read.
	* ipa-inline.c (ipa_inline): Likewise.
---
 gcc/ipa-cp.c     |  4 ----
 gcc/ipa-inline.c |  3 ---
 gcc/ipa-prop.c   | 11 -----------
 gcc/ipa-prop.h   |  1 -
 4 files changed, 19 deletions(-)

Comments

Jan Hubicka Feb. 28, 2017, 10:48 a.m. UTC | #1
Dne 2017-02-27 17:35, Martin Jambor napsal:
> Hello,
> 
> when working on call summaries, I have found a weird function
> ipa_update_after_lto_read which currently only makes sure that IPA-CP
> function and edge summaries exist, at times when they already have to
> exist.
> 
> So I did some digging in history and found out that originally the
> function was meant for setting a called_with_var_arguments flags where
> appropriate after LTO stream-in.  We have however removed that flag in
> 2011 and the function is basically useless since then (although only
> with call summaries it is definitely a no-OP).  Thus, I'll propose to
> remove it next stage1.
> 
> Thanks,
> 
> Martin
> 
> 2017-02-27  Martin Jambor  <mjambor@suse.cz>
> 
> 	* ipa-prop.c (ipa_update_after_lto_read): Removed.
> 	* ipa-prop.h (ipa_update_after_lto_read): Remove declaration.
> 	* ipa-cp.c (ipcp_propagate_stage): Do not call
> 	ipa_update_after_lto_read.
> 	* ipa-inline.c (ipa_inline): Likewise.

OK, thanks!
Whole streaming infrastructure would deserve major cleanups next stage1 
:)

Honza
diff mbox

Patch

diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c
index aa3c9973a66..6a6467ce8ba 100644
--- a/gcc/ipa-cp.c
+++ b/gcc/ipa-cp.c
@@ -3234,10 +3234,6 @@  ipcp_propagate_stage (struct ipa_topo_info *topo)
   if (dump_file)
     fprintf (dump_file, "\n Propagating constants:\n\n");
 
-  if (in_lto_p)
-    ipa_update_after_lto_read ();
-
-
   FOR_EACH_DEFINED_FUNCTION (node)
   {
     struct ipa_node_params *info = IPA_NODE_REF (node);
diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c
index 4843f8a2f8e..b681c568c89 100644
--- a/gcc/ipa-inline.c
+++ b/gcc/ipa-inline.c
@@ -2379,9 +2379,6 @@  ipa_inline (void)
 
   order = XCNEWVEC (struct cgraph_node *, symtab->cgraph_count);
 
-  if (in_lto_p && optimize)
-    ipa_update_after_lto_read ();
-
   if (dump_file)
     dump_inline_summaries (dump_file);
 
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c
index 6d598763d02..47936a92adb 100644
--- a/gcc/ipa-prop.c
+++ b/gcc/ipa-prop.c
@@ -5096,17 +5096,6 @@  ipa_prop_read_jump_functions (void)
     }
 }
 
-/* After merging units, we can get mismatch in argument counts.
-   Also decl merging might've rendered parameter lists obsolete.
-   Also compute called_with_variable_arg info.  */
-
-void
-ipa_update_after_lto_read (void)
-{
-  ipa_check_create_node_params ();
-  ipa_check_create_edge_args ();
-}
-
 void
 write_ipcp_transformation_info (output_block *ob, cgraph_node *node)
 {
diff --git a/gcc/ipa-prop.h b/gcc/ipa-prop.h
index 4d8ee0d351d..bf5d02f8e3a 100644
--- a/gcc/ipa-prop.h
+++ b/gcc/ipa-prop.h
@@ -867,7 +867,6 @@  void ipa_prop_write_jump_functions (void);
 void ipa_prop_read_jump_functions (void);
 void ipcp_write_transformation_summaries (void);
 void ipcp_read_transformation_summaries (void);
-void ipa_update_after_lto_read (void);
 int ipa_get_param_decl_index (struct ipa_node_params *, tree);
 tree ipa_value_from_jfunc (struct ipa_node_params *info,
 			   struct ipa_jump_func *jfunc);