diff options
author | Jan Hubicka <jh@suse.cz> | 2010-09-17 13:27:25 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2010-09-17 11:27:25 +0000 |
commit | 4c588abff3db7852724edf638a795b7a37f70f2b (patch) | |
tree | f8aa9d7575b411ab590d3f864fa218d6522ee77f /gcc/lto | |
parent | 122603fae22d9e7eebada39d917cc42f990a04de (diff) | |
download | gcc-4c588abff3db7852724edf638a795b7a37f70f2b.zip gcc-4c588abff3db7852724edf638a795b7a37f70f2b.tar.gz gcc-4c588abff3db7852724edf638a795b7a37f70f2b.tar.bz2 |
lto-cgraph.c (compute_ltrans_boundary): Use const_value_known.
* lto-cgraph.c (compute_ltrans_boundary): Use const_value_known.
* lto.c (lto_promote_cross_file_statics): Use const_value_known.
From-SVN: r164366
Diffstat (limited to 'gcc/lto')
-rw-r--r-- | gcc/lto/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/lto/lto.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index 3b229bc..9bcb001 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -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. diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c index 88a3b97..40816e5 100644 --- a/gcc/lto/lto.c +++ b/gcc/lto/lto.c @@ -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); |