]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR lto/41584 (WHOPR doesn't grok empty units)
authorRichard Guenther <rguenther@suse.de>
Fri, 4 Jun 2010 11:00:09 +0000 (11:00 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 4 Jun 2010 11:00:09 +0000 (11:00 +0000)
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.

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

From-SVN: r160258

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

index bab4a24b1473548bf5553a7b86adc4c9c86d9093..8ad6bf66ce950f93f0f0f642b9516c48be213003 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 c82fc181ebef64bab9de49f810c91909371570cf..48a6c3f2e9a5a2d45375984caeaf9b3078639f67 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 bb912cebaea7b10b0cb0a836b9f2c08bf8c0cd08..079593271ed36e9ddf74c61d0fbc5530dab1d441 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 c67cee78d9f5d4beab8276407f3f5303dd27e321..f7f2703badd807bf02c843f37d4675bb609cbd71 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 5031659d740abad79d57a40348bce9944df1865f..fd474b68486304c0db41a19df7452f4440c148e8 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;