2009-11-18 Martin Jambor <mjambor@suse.cz>
authorjamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 18 Nov 2009 12:19:04 +0000 (12:19 +0000)
committerjamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 18 Nov 2009 12:19:04 +0000 (12:19 +0000)
* passes.c (ipa_write_summaries): Call renumber_gimple_stmt_uids
on all nodes we write summaries for.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154290 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/passes.c

index 0a4b5b6..a28276c 100644 (file)
@@ -1,3 +1,8 @@
+2009-11-18  Martin Jambor  <mjambor@suse.cz>
+
+       * passes.c (ipa_write_summaries): Call renumber_gimple_stmt_uids
+       on all nodes we write summaries for.
+
 2009-11-18  Shujing Zhao  <pearly.zhao@oracle.com>
        
        PR middle-end/22201
index e92d086..0c39a7a 100644 (file)
@@ -1660,7 +1660,23 @@ 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)
+       {
+         /* When streaming out references to statements as part of some IPA
+            pass summary, the statements need to have uids assigned and the
+            following does that for all the IPA passes here. Naturally, this
+            ordering then matches the one IPA-passes get in their stmt_fixup
+            hooks.  */
+
+         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 ();