diff options
Diffstat (limited to 'gcc/ipa-prop.c')
-rw-r--r-- | gcc/ipa-prop.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c index 8d1363a..b98f9ad 100644 --- a/gcc/ipa-prop.c +++ b/gcc/ipa-prop.c @@ -3712,9 +3712,15 @@ write_agg_replacement_chain (struct output_block *ob, struct cgraph_node *node) for (av = aggvals; av; av = av->next) { + struct bitpack_d bp; + streamer_write_uhwi (ob, av->offset); streamer_write_uhwi (ob, av->index); stream_write_tree (ob, av->value, true); + + bp = bitpack_create (ob->main_stream); + bp_pack_value (&bp, av->by_ref, 1); + streamer_write_bitpack (&bp); } } @@ -3732,11 +3738,14 @@ read_agg_replacement_chain (struct lto_input_block *ib, for (i = 0; i <count; i++) { struct ipa_agg_replacement_value *av; + struct bitpack_d bp; av = ggc_alloc_ipa_agg_replacement_value (); av->offset = streamer_read_uhwi (ib); av->index = streamer_read_uhwi (ib); av->value = stream_read_tree (ib, data_in); + bp = streamer_read_bitpack (ib); + av->by_ref = bp_unpack_value (&bp, 1); av->next = aggvals; aggvals = av; } @@ -3955,7 +3964,7 @@ ipcp_transform_function (struct cgraph_node *node) if (v->index == index && v->offset == offset) break; - if (!v) + if (!v || v->by_ref != by_ref) continue; gcc_checking_assert (is_gimple_ip_invariant (v->value)); |