OSDN Git Service

2010-06-04 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 4 Jun 2010 11:00:09 +0000 (11:00 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 4 Jun 2010 11:00:09 +0000 (11:00 +0000)
PR lto/41584
* cgraph.h (struct varpool_node): Add lto_file_data field.
* lto-cgraph.c (input_varpool_node): Initialize it.

lto/
* lto.c (lto_1_to_1_map): Use the proper file_data for
varpool nodes.

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

gcc/ChangeLog
gcc/cgraph.h
gcc/lto-cgraph.c
gcc/lto/ChangeLog
gcc/lto/lto.c

index bab4a24..8ad6bf6 100644 (file)
@@ -1,3 +1,9 @@
+2010-06-04  Richard Guenther  <rguenther@suse.de>
+
+       PR lto/41584
+       * cgraph.h (struct varpool_node): Add lto_file_data field.
+       * lto-cgraph.c (input_varpool_node): Initialize it.
+
 2010-06-04  Uros Bizjak  <ubizjak@gmail.com>
 
        * config/i386/predicates.md (pic_symbolic_operand): Remove predicate.
index c82fc18..48a6c3f 100644 (file)
@@ -466,6 +466,8 @@ struct GTY((chain_next ("%h.next"), chain_prev ("%h.prev"))) varpool_node {
   /* Circular list of nodes in the same comdat group if non-NULL.  */
   struct varpool_node *same_comdat_group;
   struct ipa_ref_list ref_list;
+  /* File stream where this node is being written to.  */
+  struct lto_file_decl_data * lto_file_data;
   PTR GTY ((skip)) aux;
   /* Ordering of all cgraph nodes.  */
   int order;
index bb912ce..0795932 100644 (file)
@@ -1089,6 +1089,7 @@ input_varpool_node (struct lto_file_decl_data *file_data,
   decl_index = lto_input_uleb128 (ib);
   var_decl = lto_file_decl_data_get_var_decl (file_data, decl_index);
   node = varpool_node (var_decl);
+  node->lto_file_data = file_data;
 
   bp = lto_input_bitpack (ib);
   node->externally_visible = bp_unpack_value (bp, 1);
index c67cee7..f7f2703 100644 (file)
@@ -1,3 +1,9 @@
+2010-06-04  Richard Guenther  <rguenther@suse.de>
+
+       PR lto/41584
+       * lto.c (lto_1_to_1_map): Use the proper file_data for
+       varpool nodes.
+
 2010-05-30  Jan Hubicka  <jh@suse.cz>
 
        * lto.c (promote_var, promote_fn, lto_wpa_write_files): Dump
index 5031659..fd474b6 100644 (file)
@@ -599,6 +599,7 @@ lto_1_to_1_map (void)
     {
       if (vnode->alias || !vnode->needed)
        continue;
+      file_data = vnode->lto_file_data;
       slot = pointer_map_contains (pmap, file_data);
       if (slot)
        partition = (ltrans_partition) *slot;