Commit 5a0236f8 by Jan Hubicka Committed by Jan Hubicka

re PR ipa/92242 (LTO ICE in ipa_get_cs_argument_count ipa-prop.h:598)


	PR ipa/92242
	* ipa-fnsummary.c (ipa_merge_fn_summary_after_inlining): Check
	for missing EDGE_REF
	* ipa-prop.c (update_jump_functions_after_inlining): Likewise.

From-SVN: r277504
parent ffbdd78a
2019-10-25 Jan Hubicka <hubicka@ucw.cz>
PR ipa/92242
* ipa-fnsummary.c (ipa_merge_fn_summary_after_inlining): Check
for missing EDGE_REF
* ipa-prop.c (update_jump_functions_after_inlining): Likewise.
2019-10-25 Jiufu Guo <guojiufu@linux.ibm.com> 2019-10-25 Jiufu Guo <guojiufu@linux.ibm.com>
PR tree-optimization/88760 PR tree-optimization/88760
...@@ -3315,7 +3315,7 @@ ipa_merge_fn_summary_after_inlining (struct cgraph_edge *edge) ...@@ -3315,7 +3315,7 @@ ipa_merge_fn_summary_after_inlining (struct cgraph_edge *edge)
if (ipa_node_params_sum && callee_info->conds) if (ipa_node_params_sum && callee_info->conds)
{ {
class ipa_edge_args *args = IPA_EDGE_REF (edge); class ipa_edge_args *args = IPA_EDGE_REF (edge);
int count = ipa_get_cs_argument_count (args); int count = args ? ipa_get_cs_argument_count (args) : 0;
int i; int i;
if (count) if (count)
......
...@@ -2741,7 +2741,7 @@ update_jump_functions_after_inlining (struct cgraph_edge *cs, ...@@ -2741,7 +2741,7 @@ update_jump_functions_after_inlining (struct cgraph_edge *cs,
/* We must check range due to calls with variable number of arguments /* We must check range due to calls with variable number of arguments
and we cannot combine jump functions with operations. */ and we cannot combine jump functions with operations. */
if (dst->value.pass_through.operation == NOP_EXPR if (dst->value.pass_through.operation == NOP_EXPR
&& (dst->value.pass_through.formal_id && (top && dst->value.pass_through.formal_id
< ipa_get_cs_argument_count (top))) < ipa_get_cs_argument_count (top)))
{ {
int dst_fid = dst->value.pass_through.formal_id; int dst_fid = dst->value.pass_through.formal_id;
...@@ -3430,7 +3430,7 @@ update_indirect_edges_after_inlining (struct cgraph_edge *cs, ...@@ -3430,7 +3430,7 @@ update_indirect_edges_after_inlining (struct cgraph_edge *cs,
continue; continue;
/* We must check range due to calls with variable number of arguments: */ /* We must check range due to calls with variable number of arguments: */
if (ici->param_index >= ipa_get_cs_argument_count (top)) if (!top || ici->param_index >= ipa_get_cs_argument_count (top))
{ {
ici->param_index = -1; ici->param_index = -1;
continue; continue;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment