]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
lto-cgraph.c (compute_ltrans_boundary): Use const_value_known.
authorJan Hubicka <jh@suse.cz>
Fri, 17 Sep 2010 11:27:25 +0000 (13:27 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Fri, 17 Sep 2010 11:27:25 +0000 (11:27 +0000)
* lto-cgraph.c (compute_ltrans_boundary): Use const_value_known.
* lto.c (lto_promote_cross_file_statics): Use const_value_known.

From-SVN: r164366

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

index c70863ac88a8be9b2f6e73e4b72b19adaec8f144..87577389a824466b2132ea9f58a74dbd87956c08 100644 (file)
@@ -1,3 +1,7 @@
+2010-09-03  Jan Hubicka  <jh@suse.cz>
+
+       * lto-cgraph.c (compute_ltrans_boundary): Use const_value_known.
+
 2010-09-03  Naveen H.S  <naveen.S@kpitcummins.com>
 
        * config/v850/v850.c (v850_function_value_regno_p): Make static.
index 08607f6e4cc2bf3514f475462c5785ea6e5b0650..c81e3f90ee5a269b3468f8d51b991d80199b97e3 100644 (file)
@@ -814,7 +814,7 @@ compute_ltrans_boundary (struct lto_out_decl_state *state,
          && !lto_varpool_encoder_encode_initializer_p (varpool_encoder,
                                                        vnode)
          && (DECL_IN_CONSTANT_POOL (vnode->decl)
-             ||  TREE_READONLY (vnode->decl)))
+             || vnode->const_value_known))
        {
          lto_set_varpool_encoder_encode_initializer (varpool_encoder, vnode);
          add_references (encoder, varpool_encoder, &vnode->ref_list);
index 3b229bce8b803cdf488df897d0a2a0a6d7921927..9bcb0014459d7cfd673fec2c8feb97ea9b493c33 100644 (file)
@@ -1,3 +1,7 @@
+2010-09-17  Jan Hubicka  <jh@suse.cz>
+
+       * lto.c (lto_promote_cross_file_statics): Use const_value_known.
+
 2010-09-17  Richard Guenther  <rguenther@suse.de>
 
        * lang.opt (flag_wpa): Also enable for the driver.
index 88a3b97d2b15a3d38f0f91f348bb4c06aa50fe10..40816e51e8fbab576d228ac3ba87af0c54465b0a 100644 (file)
@@ -1008,7 +1008,7 @@ lto_promote_cross_file_statics (void)
         from this partition that are not in this partition.
         This needs to be done recursively.  */
       for (vnode = varpool_nodes; vnode; vnode = vnode->next)
-       if ((TREE_READONLY (vnode->decl) || DECL_IN_CONSTANT_POOL (vnode->decl))
+       if ((vnode->const_value_known || DECL_IN_CONSTANT_POOL (vnode->decl))
            && DECL_INITIAL (vnode->decl)
            && !varpool_node_in_set_p (vnode, vset)
            && referenced_from_this_partition_p (&vnode->ref_list, set, vset)
@@ -1048,7 +1048,7 @@ lto_promote_cross_file_statics (void)
                           && !v->externally_visible && v->analyzed)
                    {
                      if (promote_var (v)
-                         && DECL_INITIAL (v->decl) && TREE_READONLY (v->decl)
+                         && DECL_INITIAL (v->decl) && v->const_value_known
                          && !pointer_set_insert (inserted, vnode))
                        VEC_safe_push (varpool_node_ptr, heap,
                                       promoted_initializers, v);