aboutsummaryrefslogtreecommitdiff
path: root/gcc/varpool.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2010-05-15 01:39:39 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2010-05-14 23:39:39 +0000
commit4a444e581667f110bfa936aa8d364cd751237770 (patch)
tree8b66371ae30124b7de964c08882e02d1b3128842 /gcc/varpool.c
parentc13af44bcc9d9435b4a537d189e5d3b6edffe7fe (diff)
downloadgcc-4a444e581667f110bfa936aa8d364cd751237770.zip
gcc-4a444e581667f110bfa936aa8d364cd751237770.tar.gz
gcc-4a444e581667f110bfa936aa8d364cd751237770.tar.bz2
cgraph.h (ipa_discover_readonly_nonaddressable_vars): Declare.
* cgraph.h (ipa_discover_readonly_nonaddressable_vars): Declare. (varpool_all_refs_explicit_p): New inline function. * ipa-reference.c: Update comment. (module_statics_written): Remove. (get_static_decl): Remove. (ipa_init): Do not initialize module_statics_written. (analyze_function): Likewise. (generate_summary): Likewise; do not compute module_statics_readonly and do not update variable flags. (propagate): Call ipa_discover_readonly_nonaddressable_vars. * ipa.c: Inlucde flags.h (cgraph_local_node_p): New. (cgraph_remove_unreachable_nodes): Return early when not optimizing; promote functions to local. (ipa_discover_readonly_nonaddressable_vars): New function. (function_and_variable_visibility): Use cgraph_local_node_p. * varpool.c (varpool_finalize_decl): Set force_output for DECL_PRESERVE_P vars. From-SVN: r159421
Diffstat (limited to 'gcc/varpool.c')
-rw-r--r--gcc/varpool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/varpool.c b/gcc/varpool.c
index f6e1449..c713a77 100644
--- a/gcc/varpool.c
+++ b/gcc/varpool.c
@@ -374,7 +374,7 @@ varpool_finalize_decl (tree decl)
if (node->needed)
varpool_enqueue_needed_node (node);
node->finalized = true;
- if (TREE_THIS_VOLATILE (decl))
+ if (TREE_THIS_VOLATILE (decl) || DECL_PRESERVE_P (decl))
node->force_output = true;
if (decide_is_variable_needed (node, decl))