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/ipa.c | |
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/ipa.c')
-rw-r--r-- | gcc/ipa.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/ipa.c b/gcc/ipa.c index e4835c1e03f..5ff7c149e15 100644 --- a/gcc/ipa.c +++ b/gcc/ipa.c @@ -570,7 +570,7 @@ ipa_discover_readonly_nonaddressable_vars (void) if (dump_file) fprintf (dump_file, " %s (read-only)", varpool_node_name (vnode)); TREE_READONLY (vnode->decl) = 1; - vnode->const_value_known |= varpool_decide_const_value_known (vnode); + vnode->const_value_known |= const_value_known_p (vnode->decl); } } if (dump_file) @@ -779,7 +779,7 @@ function_and_variable_visibility (bool whole_program) DECL_COMMON (vnode->decl) = 0; /* Even extern variables might have initializers known. See, for example testsuite/g++.dg/opt/static3.C */ - vnode->const_value_known |= varpool_decide_const_value_known (vnode); + vnode->const_value_known |= const_value_known_p (vnode->decl); } for (vnode = varpool_nodes_queue; vnode; vnode = vnode->next_needed) { @@ -814,7 +814,7 @@ function_and_variable_visibility (bool whole_program) gcc_assert (in_lto_p || whole_program || !TREE_PUBLIC (vnode->decl)); cgraph_make_decl_local (vnode->decl); } - vnode->const_value_known |= varpool_decide_const_value_known (vnode); + vnode->const_value_known |= const_value_known_p (vnode->decl); gcc_assert (TREE_STATIC (vnode->decl)); } pointer_set_destroy (aliased_nodes); |