aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2019-11-10 16:44:13 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2019-11-10 15:44:13 +0000
commitd40e2362bb6dcff1ec3905cd8db1ad7e5ee4a1dd (patch)
treec4c6c8dc772c5111e3f9e4227f8824dc7513b4fe
parent7901a85f3c481856317da431058bd0f34e444747 (diff)
downloadgcc-d40e2362bb6dcff1ec3905cd8db1ad7e5ee4a1dd.zip
gcc-d40e2362bb6dcff1ec3905cd8db1ad7e5ee4a1dd.tar.gz
gcc-d40e2362bb6dcff1ec3905cd8db1ad7e5ee4a1dd.tar.bz2
ipa-prop.c (ipa_propagate_indirect_call_infos): Remove ipa edge args summaries of inlined edge unless...
* 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
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/ipa-prop.c20
2 files changed, 26 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a4beddc..d07b88a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c
index eb783e6..71fbf19 100644
--- a/gcc/ipa-prop.c
+++ b/gcc/ipa-prop.c
@@ -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;
}