This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[lto] fix call to init_ssa_operands
- From: Nathan Froyd <froydnj at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: zadeck at naturalbridge dot com
- Date: Tue, 23 Oct 2007 07:27:29 -0700
- Subject: [lto] fix call to init_ssa_operands
Apparently it does matter a great deal where the call to
init_ssa_operands is placed. In our case, it needs to be placed *after*
we have built the function in SSA form.
Committed to the lto branch.
-Nathan
2007-10-23 Nathan Froyd <froydnj@codesourcery.com>
* lto-read.c (lto_read_body): Move call to init_ssa_operands...
* lto.c (lto_materialize_function): ...to here.
Index: lto.c
===================================================================
--- lto.c (revision 129563)
+++ lto.c (working copy)
@@ -2426,7 +2426,12 @@ lto_materialize_function (lto_info_fd *f
/*top_level=*/1,
/*at_end=*/0);
if (body)
- cgraph_finalize_function (decl, /*nested=*/false);
+ {
+ /* cgraph expects this to be called once for each function. */
+ init_ssa_operands ();
+
+ cgraph_finalize_function (decl, /*nested=*/false);
+ }
}
static tree
Index: lto-read.c
===================================================================
--- lto-read.c (revision 129563)
+++ lto-read.c (working copy)
@@ -1623,9 +1623,6 @@ lto_read_body (lto_info_fd *fd,
cfun = fn;
data_in.num_named_labels = header->num_named_labels;
- /* cgraph expects this to be called once for each function. */
- init_ssa_operands ();
-
#ifdef LTO_STREAM_DEBUGGING
lto_debug_context.current_data = &debug_label;
#endif