OSDN Git Service

* builtins.c (fold_builtin_cproj): Fold more cases.
[pf3gnuchains/gcc-fork.git] / gcc / lto-cgraph.c
index 6f22968..309db7f 100644 (file)
@@ -286,7 +286,6 @@ lto_output_node (struct lto_simple_output_block *ob, struct cgraph_node *node,
   bp_pack_value (bp, node->process, 1);
   bp_pack_value (bp, node->alias, 1);
   bp_pack_value (bp, node->finalized_by_frontend, 1);
-  bp_pack_value (bp, node->frequency, 2);
   lto_output_bitpack (ob->main_stream, bp);
   bitpack_delete (bp);
 
@@ -325,7 +324,7 @@ lto_output_node (struct lto_simple_output_block *ob, struct cgraph_node *node,
   lto_output_sleb128_stream (ob->main_stream,
                             node->global.estimated_growth);
   lto_output_uleb128_stream (ob->main_stream, node->global.inlined);
-  if (node->same_comdat_group && !boundary_p)
+  if (node->same_comdat_group)
     {
       ref = lto_cgraph_encoder_lookup (encoder, node->same_comdat_group);
       gcc_assert (ref != LCC_NOT_FOUND);
@@ -448,8 +447,30 @@ output_cgraph (cgraph_node_set set)
              /* We should have moved all the inlines.  */
              gcc_assert (!callee->global.inlined_to);
              add_node_to (encoder, callee);
+             /* Also with each included function include all other functions
+                in the same comdat group.  */
+             if (callee->same_comdat_group)
+               {
+                 struct cgraph_node *next;
+                 for (next = callee->same_comdat_group;
+                      next != callee;
+                      next = next->same_comdat_group)
+                   if (!cgraph_node_in_set_p (next, set))
+                     add_node_to (encoder, next);
+               }
            }
        }
+      /* Also with each included function include all other functions
+        in the same comdat group.  */
+      if (node->same_comdat_group)
+       {
+         struct cgraph_node *next;
+         for (next = node->same_comdat_group;
+              next != node;
+              next = next->same_comdat_group)
+           if (!cgraph_node_in_set_p (next, set))
+             add_node_to (encoder, next);
+       }
     }
 
   /* Write out the nodes.  We must first output a node and then its clones,
@@ -545,7 +566,6 @@ input_overwrite_node (struct lto_file_decl_data *file_data,
   node->process = bp_unpack_value (bp, 1);
   node->alias = bp_unpack_value (bp, 1);
   node->finalized_by_frontend = bp_unpack_value (bp, 1);
-  node->frequency = (enum node_frequency)bp_unpack_value (bp, 2);
 }