diff options
Diffstat (limited to 'gcc/lto/lto.c')
-rw-r--r-- | gcc/lto/lto.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c index 0b48ce183e7..fb374ff0c9f 100644 --- a/gcc/lto/lto.c +++ b/gcc/lto/lto.c @@ -1868,18 +1868,15 @@ read_cgraph_and_symbols (unsigned nfiles, const char **fnames) lto_symtab_merge_cgraph_nodes (); ggc_collect (); + /* FIXME: ipa_transforms_to_apply holds list of passes that have optimization + summaries computed and needs to apply changes. At the moment WHOPR only + supports inlining, so we can push it here by hand. In future we need to stream + this field into ltrans compilation. */ if (flag_ltrans) - for (node = cgraph_nodes; node; node = node->next) - { - /* FIXME: ipa_transforms_to_apply holds list of passes that have optimization - summaries computed and needs to apply changes. At the moment WHOPR only - supports inlining, so we can push it here by hand. In future we need to stream - this field into ltrans compilation. */ - if (node->analyzed) - VEC_safe_push (ipa_opt_pass, heap, - node->ipa_transforms_to_apply, - (ipa_opt_pass)&pass_ipa_inline); - } + FOR_EACH_DEFINED_FUNCTION (node) + VEC_safe_push (ipa_opt_pass, heap, + node->ipa_transforms_to_apply, + (ipa_opt_pass)&pass_ipa_inline); lto_symtab_free (); timevar_pop (TV_IPA_LTO_CGRAPH_MERGE); @@ -1923,7 +1920,7 @@ materialize_cgraph (void) nodes and read the functions if we are not running in WPA mode. */ timevar_push (TV_IPA_LTO_GIMPLE_IN); - for (node = cgraph_nodes; node; node = node->next) + FOR_EACH_FUNCTION (node) { if (node->symbol.lto_file_data) { |