This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH, LTO] Number gimple statements before streaming out summaries


Hi,

when streaming out references to statements as part of some IPA pass
summary, the statements need to have uids assigned and they currently
don't.   Thus I propose to do the numbering once for all IPA pass
writers as in the patch below.

Naturally, this ordering then matches the one IPA-passes get in their
stmt_fixup hooks.

Bootstrapped and tested on x86_64-linux, OK for trunk?

Thanks,

Martin


2009-11-16  Martin Jambor  <mjambor@suse.cz>

	* passes.c (ipa_write_summaries): Call renumber_gimple_stmt_uids
	on all nodes we write summaries for.

Index: icln/gcc/passes.c
===================================================================
--- icln.orig/gcc/passes.c
+++ icln/gcc/passes.c
@@ -1660,7 +1660,17 @@ ipa_write_summaries (void)
   gcc_assert (order_pos == cgraph_n_nodes);
 
   for (i = order_pos - 1; i >= 0; i--)
-    cgraph_node_set_add (set, order[i]);
+    {
+      struct cgraph_node *node = order[i];
+
+      if (node->analyzed)
+	{
+	  push_cfun (DECL_STRUCT_FUNCTION (node->decl));
+	  renumber_gimple_stmt_uids ();
+	  pop_cfun ();
+	}
+      cgraph_node_set_add (set, node);
+    }
 
   ipa_write_summaries_1 (set);
   lto_delete_extern_inline_states ();


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]