diff options
author | Jan Hubicka <jh@suse.cz> | 2012-04-22 23:28:07 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2012-04-22 21:28:07 +0000 |
commit | 660584689a4397f18cda03b458703bbbf909dd12 (patch) | |
tree | a4cd93cef18f73580dc0226c3ce10cbae70f9f08 /gcc/cgraph.c | |
parent | f04e40afc115bcf2143f541baa9e4cccef19922a (diff) | |
download | gcc-660584689a4397f18cda03b458703bbbf909dd12.zip gcc-660584689a4397f18cda03b458703bbbf909dd12.tar.gz gcc-660584689a4397f18cda03b458703bbbf909dd12.tar.bz2 |
lto-symtab.c (lto_varpool_replace_node): Do not merge needed flags.
* lto-symtab.c (lto_varpool_replace_node): Do not merge needed flags.
* cgraphbuild.c (record_reference, record_type_list, mark_address,
mark_load, mark_store): Do not mark varpool nodes as needed.
* cgraph.c (cgraph_new_nodes): Remove.
(cgraph_create_function_alias): Do not mark nodes as reachable.
(cgraph_add_thunk): Likewise.
(cgraph_mark_reachable_node): Do not manage the queue.
* cgraph.h (cgraph_node): Remove next_needed.
(varpool_nodes_queue): Remove next_needed and prev_needed.
(x_cgraph_nodes_queue, x_cgraph_nodes_queue, cgraph_new_nodes): Remove.
(cgraph_new_nodes): Declare.
(x_varpool_nodes_queue, varpool_nodes_queue); Remove.
(varpool_analyze_pending_decls): Remove.
(varpool_analyze_node): New.
(varpool_mark_needed_node): Remove.
(varpool_first_variable, varpool_next_variable): New inlines.
(varpool_first_static_initializer, varpool_next_static_initializer): Update.
(FOR_EACH_STATIC_VARIABLE): Remove unused walker.
(varpool_first_defined_variable): New inline.
(varpool_next_defined_variable): New inline
(FOR_EACH_VARIABLE): Reimplement.
(FOR_EACH_DEFINED_VARIABLE): Reimplement.
* toplev.c (wrapup_global_declaration_2): Use analyzed instead of
needed flag.
* cgraphunit.c (cgraph_new_nodes): Declare here.
(enqueue_node): New function.
(cgraph_process_new_functions): update for new
node set; when constructing cgraph enqueue node for processing.
(cgraph_add_new_function): Use new node set.
(process_function_and_variable_attributes): Do not set varpool needed
flags.
(referred_to_p): New function.
(varpool_finalize_decl): Move here from varpool.c; enqueue needed node
when varpool is in construction.
(cgraph_analyze_functions): Rewrite.
(cgraph_expand_all_functions): Update.
(cgraph_output_in_order): Do not analyze pending decls; do not set needed flags.
(cgraph_optimize): Do not analyze pending decls.
* lto-cgraph.c (input_varpool_node): Clear analyzed flag for objects in other
partition; do not mark node as needed.
* dwarf2out.c (reference_to_unused): Use analyzed flag.
(premark_types_used_by_global_vars_helper): Likewise.
* ipa.c (process_references): Do not call varpool_mark_needed_node.
(cgraph_remove_unreachable_nodes): Do not rely on varpool and
cgrpah queues.
(function_and_variable_visibility): Do not mark node as needed.
(whole_program_function_and_variable_visibility): Likewise.
* Makefile.in (gt-varpool.h): No longer needed.
* passes.c (execute_one_pass, execute_ipa_pass_list): Update.
(ipa_write_summaries): Do not use needed flag.
* varpool.c: Do not include gt-varpool.h
(x_varpool_nodes_queue, x_varpool_last_needed_node,
x_varpool_last_needed_node, x_varpool_first_unanalyzed_node,
x_varpool_first_unanalyzed_node, varpool_assembled_nodes_queue):
Remove.
(varpool_remove_node): Do not update the lists.
(dump_varpool_node): Do not dump needed flag.
(varpool_enqueue_needed_node): Remove.
(varpool_mark_needed_node): Remove.
(varpool_reset_queue): Remove.
(varpool_finalize_decl): Move to cgraphunit.c
(varpool_analyze_node): New functions based on former
varpool_analyze_pending_decls.
(varpool_analyze_pending_decls): Remove.
(varpool_assemble_decl): Do not update the lists.
(enqueue_node): New function.
(varpool_remove_unreferenced_decls): Rewrite.
(varpool_empty_needed_queue): Remove.
(add_new_static_var): Do not mark node as needed.
(varpool_create_variable_alias): Handle expansion state
creation.
* except.c (output_ttype): Do not mark node as needed.
* varasm.c (mark_decl_referenced): Do not use mark_needed_node.
* tree-profile.c (init_ic_make_global_vars, init_ic_make_global_vars):
Likewise.
* tree-switch-conversion.c (build_one_array): Likewise.
* class.c (build_utf8_ref): Do not mark varpool node as needed.
* gcc-interface/utils.c (gnat_write_global_declarations): Do not mark
needed node.
* lto-partition.c (partition_varpool_node_p): Do not use needed flag.
* decl2.c (maybe_make_one_only): Mark keyed COMDATs as USED so they
gets finalized.
From-SVN: r186687
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r-- | gcc/cgraph.c | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c index 4588249..ed4cdf6 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -123,11 +123,6 @@ static inline void cgraph_edge_remove_callee (struct cgraph_edge *e); symtab_node x_cgraph_nodes_queue; #define cgraph_nodes_queue ((struct cgraph_node *)x_cgraph_nodes_queue) -/* Queue of cgraph nodes scheduled to be added into cgraph. This is a - secondary queue used during optimization to accommodate passes that - may generate new functions that need to be optimized and expanded. */ -struct cgraph_node *cgraph_new_nodes; - /* Number of nodes in existence. */ int cgraph_n_nodes; @@ -141,7 +136,7 @@ int cgraph_edge_max_uid; bool cgraph_global_info_ready = false; /* What state callgraph is in right now. */ -enum cgraph_state cgraph_state = CGRAPH_STATE_CONSTRUCTION; +enum cgraph_state cgraph_state = CGRAPH_STATE_PARSING; /* Set when the cgraph is fully build and the basic flags are computed. */ bool cgraph_function_flags_ready = false; @@ -499,11 +494,6 @@ cgraph_create_function_alias (tree alias, tree decl) alias_node->thunk.alias = decl; alias_node->local.finalized = true; alias_node->alias = 1; - - if ((TREE_PUBLIC (alias) && !DECL_COMDAT (alias) && !DECL_EXTERNAL (alias)) - || (DECL_VIRTUAL_P (alias) - && (DECL_COMDAT (alias) || DECL_EXTERNAL (alias)))) - cgraph_mark_reachable_node (alias_node); return alias_node; } @@ -539,7 +529,7 @@ cgraph_same_body_alias (struct cgraph_node *decl_node ATTRIBUTE_UNUSED, tree ali struct cgraph_node * cgraph_add_thunk (struct cgraph_node *decl_node ATTRIBUTE_UNUSED, - tree alias, tree decl, + tree alias, tree decl ATTRIBUTE_UNUSED, bool this_adjusting, HOST_WIDE_INT fixed_offset, HOST_WIDE_INT virtual_value, tree virtual_offset, @@ -569,14 +559,6 @@ cgraph_add_thunk (struct cgraph_node *decl_node ATTRIBUTE_UNUSED, node->thunk.thunk_p = true; node->local.finalized = true; - if (cgraph_decide_is_function_needed (node, decl)) - cgraph_mark_reachable_node (node); - - if ((TREE_PUBLIC (decl) && !DECL_COMDAT (decl) && !DECL_EXTERNAL (decl)) - || (DECL_VIRTUAL_P (decl) - && (DECL_COMDAT (decl) || DECL_EXTERNAL (decl)))) - cgraph_mark_reachable_node (node); - return node; } @@ -1508,9 +1490,6 @@ cgraph_mark_reachable_node (struct cgraph_node *node) else notice_global_symbol (node->symbol.decl); node->reachable = 1; - - node->next_needed = cgraph_nodes_queue; - x_cgraph_nodes_queue = (symtab_node)node; } } |