+2014-09-03 Martin Jambor <mjambor@suse.cz>
+
+ PR ipa/61986
+ * ipa-cp.c (find_aggregate_values_for_callers_subset): Chain
+ created replacements in ascending order of offsets.
+ (known_aggs_to_agg_replacement_list): Likewise.
+
2014-09-03 Martin Liska <mliska@suse.cz>
* tree-ssa-sccvn.c (vn_reference_lookup_call): default (NULL) value
vec<cgraph_edge *> callers)
{
struct ipa_node_params *dest_info = IPA_NODE_REF (node);
- struct ipa_agg_replacement_value *res = NULL;
+ struct ipa_agg_replacement_value *res;
+ struct ipa_agg_replacement_value **tail = &res;
struct cgraph_edge *cs;
int i, j, count = ipa_get_param_count (dest_info);
v->offset = item->offset;
v->value = item->value;
v->by_ref = plats->aggs_by_ref;
- v->next = res;
- res = v;
+ *tail = v;
+ tail = &v->next;
}
next_param:
if (inter.exists ())
inter.release ();
}
+ *tail = NULL;
return res;
}
static struct ipa_agg_replacement_value *
known_aggs_to_agg_replacement_list (vec<ipa_agg_jump_function> known_aggs)
{
- struct ipa_agg_replacement_value *res = NULL;
+ struct ipa_agg_replacement_value *res;
+ struct ipa_agg_replacement_value **tail = &res;
struct ipa_agg_jump_function *aggjf;
struct ipa_agg_jf_item *item;
int i, j;
v->offset = item->offset;
v->value = item->value;
v->by_ref = aggjf->by_ref;
- v->next = res;
- res = v;
+ *tail = v;
+ tail = &v->next;
}
+ *tail = NULL;
return res;
}