diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-08-21 08:13:27 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-08-21 08:13:27 +0000 |
commit | c5cc4842461782cb7c04a213f88871434af749ca (patch) | |
tree | ac13290a08f4ac5331c1427478989a701ad10615 /gcc/passes.c | |
parent | 63182c5c48a9601697e228007b6e38e0c7af0958 (diff) | |
download | gcc-c5cc4842461782cb7c04a213f88871434af749ca.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163438 138bc75d-0d04-0410-961f-82ee72b054a4
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 e2b9369824e..1b98e99eef9 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); |