diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-09-03 10:15:54 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-09-03 10:15:54 +0000 |
commit | 9d924a14cb3657941ca4f1406f1b710fec343aec (patch) | |
tree | 557b00c4e086e7d798393273321f3907a7d16cb4 /gcc/tree-ssa-loop-ivcanon.c | |
parent | bf0e72b2492b09bb9be1c0aa55a6991dec33f374 (diff) | |
download | gcc-9d924a14cb3657941ca4f1406f1b710fec343aec.tar.gz |
* cgraph.h (struct varpool_node): Add const_value_known.
(varpool_decide_const_value_known): Declare.
* tree-ssa-ccp.c (fold_const_aggregate_ref): Update initializer folding.
* lto-cgraph.c (lto_output_varpool_node): Store const_value_known.
(input_varpool_node): Restore const_value_known.
* tree-ssa-loop-ivcanon (constant_after_peeling): Check varpool for
initializer folding.
* ipa.c (ipa_discover_readonly_nonaddressable_var,
function_and_variable_visibility): Compute const_value_known.
* gimple-fold.c (get_symbol_constant_value): Use varpool for initializer
folding.
* varpool.c (varpool_decide_const_value_known): New function.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163808 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-loop-ivcanon.c')
-rw-r--r-- | gcc/tree-ssa-loop-ivcanon.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/gcc/tree-ssa-loop-ivcanon.c b/gcc/tree-ssa-loop-ivcanon.c index b0d45bc4b41..2ced3070d48 100644 --- a/gcc/tree-ssa-loop-ivcanon.c +++ b/gcc/tree-ssa-loop-ivcanon.c @@ -165,9 +165,7 @@ constant_after_peeling (tree op, gimple stmt, struct loop *loop) if ((DECL_P (base) && TREE_STATIC (base) && TREE_READONLY (base) - && (DECL_INITIAL (base) - || (!DECL_EXTERNAL (base) - && targetm.binds_local_p (base)))) + && varpool_get_node (base)->const_value_known) || CONSTANT_CLASS_P (base)) { /* If so, see if we understand all the indices. */ |