diff options
author | Jan Hubicka <jh@suse.cz> | 2010-08-21 10:13:27 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2010-08-21 08:13:27 +0000 |
commit | f1395d4a6e0ea98b1fa3b72d40f02fcba9801500 (patch) | |
tree | ac13290a08f4ac5331c1427478989a701ad10615 /gcc/passes.c | |
parent | 12523de0996e56c7f3094825ea9197b53ca7b445 (diff) | |
download | gcc-f1395d4a6e0ea98b1fa3b72d40f02fcba9801500.zip gcc-f1395d4a6e0ea98b1fa3b72d40f02fcba9801500.tar.gz gcc-f1395d4a6e0ea98b1fa3b72d40f02fcba9801500.tar.bz2 |
lto-cgraph.c (lto_output_edge): Use gimple_has_body_p instead of flag_wpa.
* lto-cgraph.c (lto_output_edge): Use gimple_has_body_p instead of flag_wpa.
* lto-streamer-out.c (lto_output): Likewise.
* passes.c (ipa_write_optimization_summaries): Initialize statement uids.
* lto.c (lto_1_to_1_map): Be prepared for node to have no file data.
(lto_wpa_write_files): Update comments.
From-SVN: r163438
Diffstat (limited to 'gcc/passes.c')
-rw-r--r-- | gcc/passes.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/passes.c b/gcc/passes.c index e2b9369..1b98e99 100644 --- a/gcc/passes.c +++ b/gcc/passes.c @@ -1792,9 +1792,26 @@ void ipa_write_optimization_summaries (cgraph_node_set set, varpool_node_set vset) { struct lto_out_decl_state *state = lto_new_out_decl_state (); + cgraph_node_set_iterator csi; compute_ltrans_boundary (state, set, vset); lto_push_out_decl_state (state); + for (csi = csi_start (set); !csi_end_p (csi); csi_next (&csi)) + { + struct cgraph_node *node = csi_node (csi); + /* When streaming out references to statements as part of some IPA + pass summary, the statements need to have uids assigned. + + For functions newly born at WPA stage we need to initialize + the uids here. */ + if (node->analyzed + && gimple_has_body_p (node->decl)) + { + push_cfun (DECL_STRUCT_FUNCTION (node->decl)); + renumber_gimple_stmt_uids (); + pop_cfun (); + } + } gcc_assert (flag_wpa); ipa_write_optimization_summaries_1 (all_regular_ipa_passes, set, vset, state); |