ipa-prop.c (ipa_propagate_indirect_call_infos): Remove ipa edge args summaries of...
authorJan Hubicka <hubicka@ucw.cz>
Sun, 10 Nov 2019 15:44:13 +0000 (16:44 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Sun, 10 Nov 2019 15:44:13 +0000 (15:44 +0000)
* ipa-prop.c (ipa_propagate_indirect_call_infos): Remove ipa edge
args summaries of inlined edge unless it holds info about
described reference.

From-SVN: r278020

gcc/ChangeLog
gcc/ipa-prop.c

index a4beddc8ab80b2d7e0bf3b0274ff14db8593cf48..d07b88a3a6bc829fc0caa17c23883d2723d42fca 100644 (file)
@@ -1,3 +1,9 @@
+2019-11-10  Jan Hubicka  <hubicka@ucw.cz>
+
+       * ipa-prop.c (ipa_propagate_indirect_call_infos): Remove ipa edge
+       args summaries of inlined edge unless it holds info about
+       described reference.
+
 2019-11-10  Segher Boessenkool  <segher@kernel.crashing.org>
 
        * config/rs6000/rs6000.md (CC_any): New mode iterator.
index eb783e66926e95b6d940c6c3843650990ecc9da9..71fbf192ffd83489acc29fa00eaae41725c8ca0f 100644 (file)
@@ -3727,6 +3727,26 @@ ipa_propagate_indirect_call_infos (struct cgraph_edge *cs,
   changed = propagate_info_to_inlined_callees (cs, cs->callee, new_edges);
   ipa_node_params_sum->remove (cs->callee);
 
+  class ipa_edge_args *args = IPA_EDGE_REF (cs);
+  if (args)
+    {
+      bool ok = true;
+      if (args->jump_functions)
+       {
+         struct ipa_jump_func *jf;
+         int i;
+         FOR_EACH_VEC_ELT (*args->jump_functions, i, jf)
+           if (jf->type == IPA_JF_CONST
+               && ipa_get_jf_constant_rdesc (jf))
+             {
+               ok = false;
+               break;
+             }
+       }
+      if (ok)
+        ipa_edge_args_sum->remove (cs);
+    }
+
   return changed;
 }