diff options
Diffstat (limited to 'gcc/ipa-pure-const.c')
-rw-r--r-- | gcc/ipa-pure-const.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/gcc/ipa-pure-const.c b/gcc/ipa-pure-const.c index db3f9a8..905ae3b 100644 --- a/gcc/ipa-pure-const.c +++ b/gcc/ipa-pure-const.c @@ -935,18 +935,21 @@ generate_summary (void) /* Serialize the ipa info for lto. */ static void -pure_const_write_summary (cgraph_node_set set, - varpool_node_set vset ATTRIBUTE_UNUSED) +pure_const_write_summary (void) { struct cgraph_node *node; struct lto_simple_output_block *ob = lto_create_simple_output_block (LTO_section_ipa_pure_const); unsigned int count = 0; - cgraph_node_set_iterator csi; + lto_symtab_encoder_iterator lsei; + lto_symtab_encoder_t encoder; - for (csi = csi_start (set); !csi_end_p (csi); csi_next (&csi)) + encoder = lto_get_out_decl_state ()->symtab_node_encoder; + + for (lsei = lsei_start_function_in_partition (encoder); !lsei_end_p (lsei); + lsei_next_function_in_partition (&lsei)) { - node = csi_node (csi); + node = lsei_cgraph_node (lsei); if (node->analyzed && has_function_state (node)) count++; } @@ -954,9 +957,10 @@ pure_const_write_summary (cgraph_node_set set, streamer_write_uhwi_stream (ob->main_stream, count); /* Process all of the functions. */ - for (csi = csi_start (set); !csi_end_p (csi); csi_next (&csi)) + for (lsei = lsei_start_function_in_partition (encoder); !lsei_end_p (lsei); + lsei_next_function_in_partition (&lsei)) { - node = csi_node (csi); + node = lsei_cgraph_node (lsei); if (node->analyzed && has_function_state (node)) { struct bitpack_d bp; |