aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-fold.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2012-05-24 12:33:49 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2012-05-24 12:33:49 +0000
commit0faa05629e036ed79335e55c1473458c642278a8 (patch)
tree75e0e3fd63130e66ee5ef53fc1590ec6a8160b24 /gcc/gimple-fold.c
parent0d5a9e784849c3fe7ae59c4a328ccffa60b1d32f (diff)
downloadgcc-0faa05629e036ed79335e55c1473458c642278a8.zip
gcc-0faa05629e036ed79335e55c1473458c642278a8.tar.gz
gcc-0faa05629e036ed79335e55c1473458c642278a8.tar.bz2
tree-flow.h (create_var_ann): Remove.
2012-05-24 Richard Guenther <rguenther@suse.de> * tree-flow.h (create_var_ann): Remove. * tree-dfa.c (create_var_ann): Remove and inline into its single caller ... (add_referenced_var_1): ... here. * varpool.c (add_new_static_var): Do not call add_referenced_var for global vars. * gimple-fold.c (canonicalize_constructor_val): Likewise. * tree-switch-conversion.c (build_one_array): Likewise. * tree-profile.c (gimple_gen_ic_profiler): Likewise. * tree-flow-inline.h (gimple_referenced_vars): Guard against NULL fn argument. * tree-inline.c (remap_gimple_op_r): Likewise. Check gimple_referenced_vars instead of gimple_in_ssa_p. (copy_tree_body_r): Likewise. (setup_one_parameter): Likewise. (declare_return_variable): Likewise. (tree_function_versioning): Likewise. From-SVN: r187829
Diffstat (limited to 'gcc/gimple-fold.c')
-rw-r--r--gcc/gimple-fold.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/gimple-fold.c b/gcc/gimple-fold.c
index 6b4d987..9358bf8 100644
--- a/gcc/gimple-fold.c
+++ b/gcc/gimple-fold.c
@@ -164,7 +164,8 @@ canonicalize_constructor_val (tree cval, tree from_decl)
if (TREE_CODE (base) == VAR_DECL)
{
TREE_ADDRESSABLE (base) = 1;
- if (cfun && gimple_referenced_vars (cfun))
+ if (cfun && gimple_referenced_vars (cfun)
+ && !is_global_var (base))
add_referenced_var (base);
}
else if (TREE_CODE (base) == FUNCTION_DECL)