diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-09-20 15:48:42 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-09-20 15:48:42 +0000 |
commit | 7ae8b539ca01417750951904f33f9ad7846ba3aa (patch) | |
tree | 5dc2da773507a107b478346e98a80752893d9599 /gcc/lto | |
parent | 181ab2776c9d3a2e81b479fee68be22ff63ec272 (diff) | |
download | gcc-7ae8b539ca01417750951904f33f9ad7846ba3aa.tar.gz |
PR tree-optimize/45605
* cgraph.h (const_value_known_p): Declare.
(varpool_decide_const_value_known): Remove.
* tree-ssa-ccp.c (get_base_constructor): Use it.
* lto-cgraph.c (compute_ltrans_boundary): Likewise.
* expr.c (string_constant): Likewise.
* tree-ssa-loop-ivcanon.c (constant_after_peeling): Likewise.
* ipa.c (ipa_discover_readonly_nonaddressable_var,
function_and_variable_visibility): Likewise.
* gimplify.c (gimplify_call_expr): Likewise.
* gimple-fold.c (get_symbol_constant_value): Likewise.
* varpool.c (varpool_decide_const_value_known): Replace by...
(const_value_known_p): ... this one; handle other kinds of DECLs
too and work for automatic vars.
(varpool_finalize_decl): Use const_value_known_p.
* lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
* g++.dg/tree-ssa/pr45605.C: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164438 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto')
-rw-r--r-- | gcc/lto/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/lto/lto.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index 59124ee3481..6aab1af6426 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,3 +1,8 @@ +2010-09-20 Jan Hubicka <jh@suse.cz> + + PR tree-optimize/45605 + * lto.c (lto_promote_cross_file_statics): Use const_value_known_p. + 2010-09-18 Gerald Pfeifer <gerald@pfeifer.com> * lto-elf.c (lto_obj_file_open): Also provide filename when diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c index 40816e51e8f..98a9387ce9d 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 ((vnode->const_value_known || DECL_IN_CONSTANT_POOL (vnode->decl)) + if (const_value_known_p (vnode->decl) && DECL_INITIAL (vnode->decl) && !varpool_node_in_set_p (vnode, vset) && referenced_from_this_partition_p (&vnode->ref_list, set, vset) |