1. 09 Jul, 2011 1 commit
    • cgraph.c (cgraph_add_to_same_comdat_group): New. · 2fda8e14
      gcc/
      	* cgraph.c (cgraph_add_to_same_comdat_group): New.
      	* cgraph.h: Declare it.
      	* ipa.c (function_and_variable_visibility): Make sure thunks
      	have the right visibility.
      gcc/cp/
      	* method.c (use_thunk): Use cgraph_add_to_same_comdat_group.
      	* optimize.c (maybe_clone_body): Likewise.
      	* semantics.c (maybe_add_lambda_conv_op): Likewise.
      
      From-SVN: r176071
      Jason Merrill committed
  2. 27 Jun, 2011 1 commit
  3. 18 Jun, 2011 1 commit
    • lto-symtab.c (lto_varpool_replace_node): Remove code handling extra name aliases. · 0e27699a
      	* lto-symtab.c (lto_varpool_replace_node): Remove code handling
      	extra name aliases.
      	(lto_symtab_resolve_can_prevail_p): Likewise.
      	(lto_symtab_merge_cgraph_nodes): Update alias_of pointers.
      	* cgraphbuild.c (record_reference): Remove extra body alias code.
      	(mark_load): Likewise.
      	(mark_store): Likewise.
      	* cgraph.h (varpool_node): Remove extra_name filed;
      	add alias_of and extraname_alias.
      	(varpool_create_variable_alias, varpool_for_node_and_aliases): Declare.
      	(varpool_alias_aliased_node): New inline function.
      	(varpool_variable_node): New function.
      	* cgraphunit.c (handle_alias_pairs): Handle also variable aliases.
      	* ipa-ref.c (ipa_record_reference): Allow aliases on variables.
      	* lto-cgraph.c (lto_output_varpool_node): Update streaming.
      	(input_varpool_node): Likewise.
      	* lto-streamer-out.c (produce_symtab): Remove extra name aliases.
      	(varpool_externally_visible_p): Remove extra body alias code.
      	(function_and_variable_visibility): Likewise.
      	* tree-ssa-structalias.c (associate_varinfo_to_alias_1): New function.
      	(ipa_pta_execute): Use it.
      	* varpool.c (varpool_remove_node): Remove extra name alias code.
      	(varpool_mark_needed_node): Likewise.
      	(varpool_analyze_pending_decls): Analyze aliases.
      	(assemble_aliases): New functoin.
      	(varpool_assemble_decl): Use it.
      	(varpool_create_variable_alias): New function.
      	(varpool_extra_name_alias): Rewrite.
      	(varpool_for_node_and_aliases): New function.
      
      From-SVN: r175169
      Jan Hubicka committed
  4. 15 Jun, 2011 1 commit
  5. 14 Jun, 2011 2 commits
  6. 12 Jun, 2011 2 commits
  7. 11 Jun, 2011 2 commits
    • * ipa.c (cgraph_comdat_can_be_unshared_p): Fix pasto. · 00cfc363
      From-SVN: r174954
      Jan Hubicka committed
    • lto-symtab.c (lto_cgraph_replace_node): Kill same body alias code. · 39e2db00
      	* lto-symtab.c (lto_cgraph_replace_node): Kill same body alias code.
      	(lto_symtab_resolve_can_prevail_p): Likewise.
      	(lto_symtab_merge_cgraph_nodes): Update merging of aliases.
      	* cgraph.c (same_body_aliases_done): New global var.
      	(cgraph_same_body_alias_1): Rename to ...
      	(cgraph_create_function_alias): ... this one; reorg to new
      	representation.
      	(cgraph_same_body_alias): Use cgraph_create_function_alias;
      	record references when asked to.
      	(cgraph_add_thunk): Fix formating.
      	(cgraph_get_node): Kill same body alias code.
      	(cgraph_node_for_asm): Likewise.
      	(cgraph_remove_same_body_alias): Remove.
      	(cgraph_remove_node): Kill same body alias code.
      	(cgraph_mark_address_taken_node): Mark also the aliased function
      	as having address taken.
      	(dump_cgraph_node): Dump same body aliases.
      	(cgraph_for_node_thunks_and_aliases): Update for new alias
      	representation.
      	(cgraph_for_node_and_aliases): Likewise.
      	* cgraph.h (same_body): Kll pointer.
      	(same_body_alias): Update comment.
      	(same_body_aliases_done): Declare.
      	(cgraph_remove_same_body_alias): Remove declaration.
      	(cgraph_create_function_alias): Declare.
      	(cgraph_process_same_body_aliases): Declare.
      	(cgraph_function_with_gimple_body_p): Check for alias.
      	(cgraph_can_remove_if_no_direct_calls_p): Look for aliases.
      	(cgraph_alias_aliased_node): New function.
      	(cgraph_function_node): Update for new aliases.
      	(cgraph_function_or_thunk_node): Likewise.
      	* ipa-inline-transform.c (can_remove_node_now_p): Look for aliases.
      	(inline_call): Remove dead aliases.
      	* cgraphunit.c (cgraph_decide_is_function_needed): Disable assembler name
      	hack for same body aliases.
      	(clone_of_p): Look through aliases.
      	(verify_cgraph_node): Verify aliases.
      	(cgraph_analyze_function): Analyze aliases; fixup C++ bugs.
      	(cgraph_process_same_body_aliases): New function.
      	(process_function_and_variable_attributes): Disable weakref warning on
      	alias.
      	(cgraph_analyze_functions): Handle aliases.
      	(cgraph_mark_functions_to_output): Handle aliases same way as thunks.
      	(assemble_thunks): Rename to ...
      	(assemble_thunks_and_aliases): ... this one; handle aliases, too.
      	(cgraph_expand_function): Remove alias output code.
      	(cgraph_output_in_order): Skip aliases.
      	(cgraph_preserve_function_body_p): Aliases don't need preserving.
      	* ipa-ref.c (ipa_ref_use_name): Add alias reference.
      	(ipa_record_reference): Do not assert on alias references.
      	(ipa_ref_has_aliases_p): New function.
      	* ipa-ref.h (enum ipa_ref_use): Add IPA_REF_ALIAS.
      	(ipa_ref_has_aliases_p): Declare.
      	* lto-cgraph.c (lto_output_node): Handle aliases.
      	(input_node): Likewise.
      	* lto-streamer-out.c (lto_output): Skip aliases.
      	(produce_symtab): Kill same_body_alias code.
      	* ipa-utils.c (ipa_reverse_postorder): Add FIXME.
      	(ipa_reverse_postorder): Use cgraph_only_called_directly_or_aliased_p.
      	* ipa-inline.c (update_caller_keys): Walk aliases.
      	(inline_small_functions): Fix thinko in previous patch.
      	* ipa.c (cgraph_externally_visible_p): Do not walk aliases.
      	(function_and_variable_visibility): Do not walk same body aliases.
      	* tree-ssa-structalias.c (associate_varinfo_to_alias): New function.
      	(ipa_pta_execute): Use it.
      
      	* lto.c (add_cgraph_node_to_partition_1): Break out from ...
      	(add_cgraph_node_to_partition) ... here; walk aliases.
      	(lto_1_to_1_map): Remove same body alias code.
      	(promote_fn): Likewise.
      	(lto_promote_cross_file_statics): Update comment.
      
      	* decl2.c (cp_write_global_declarations): Process aliases; look trhough
      	same body aliases.
      
      From-SVN: r174952
      Jan Hubicka committed
  8. 10 Jun, 2011 1 commit
  9. 01 Jun, 2011 1 commit
  10. 25 May, 2011 1 commit
  11. 06 May, 2011 1 commit
    • cgraph.c (cgraph_add_thunk): Create real function node instead of alias node... · c47d0034
      	* cgraph.c (cgraph_add_thunk): Create real function node instead
      	of alias node; finalize it and mark needed/reachale; arrange visibility
      	to be right and add it into the corresponding same comdat group list.
      	(dump_cgraph_node): Dump thunks.
      	* cgraph.h (cgraph_first_defined_function, cgraph_next_defined_function,
      	cgraph_function_with_gimple_body_p, cgraph_first_function_with_gimple_body,
      	cgraph_next_function_with_gimple_body): New functions.
      	(FOR_EACH_FUNCTION_WITH_GIMPLE_BODY, FOR_EACH_DEFINED_FUNCTION):
      	New macros.
      	* ipa-cp.c (ipcp_need_redirect_p): Thunks can't be redirected.
      	(ipcp_generate_summary): Use FOR_EACH_FUNCTION_WITH_GIMPLE_BODY.
      	* cgraphunit.c (cgraph_finalize_function): Only look into possible
      	devirtualization when optimizing.
      	(verify_cgraph_node): Verify thunks.
      	(cgraph_analyze_function): Analyze thunks.
      	(cgraph_mark_functions_to_output): Output thunks only in combination
      	with function they are assigned to.
      	(assemble_thunk): Turn thunk into non-thunk; don't try to turn
      	alias into normal node.
      	(assemble_thunks): New functoin.
      	(cgraph_expand_function): Use it.
      	* lto-cgraph.c (lto_output_node): Stream thunks.
      	(input_overwrite_node): Stream in thunks.
      	* ipa-pure-const.c (analyze_function): Thunks do nothing interesting.
      	* lto-streamer-out.c (lto_output): Do not try to output thunk's body.
      	* ipa-inline.c (inline_small_functions): Use FOR_EACH_DEFINED_FUNCTION.
      	* ipa-inline-analysis.c (compute_inline_parameters): "Analyze" thunks.
      	(inline_analyze_function): Do not care about thunk jump functions.
      	(inline_generate_summary):Use FOR_EACH_DEFINED_FUNCTION.
      	* ipa-prop.c (ipa_prop_write_jump_functions): Use cgraph_function_with_gimple_body_p.
      	* passes.c (do_per_function_toporder): Use cgraph_function_with_gimple_body_p.
      	(execute_one_pass);Use FOR_EACH_FUNCTION_WITH_GIMPLE_BODY.
      	(ipa_write_summaries): Use cgraph_function_with_gimple_body_p.
      	(function_called_by_processed_nodes_p): Likewise.
      	* lto.c (lto_materialize_function): Use cgraph_function_with_gimple_body_p.
      	(add_cgraph_node_to_partition): Do not re-add items to partition; handle thunks.
      	(add_varpool_node_to_partition): Do not re-add items to partition.
      
      From-SVN: r173517
      Jan Hubicka committed
  12. 03 May, 2011 1 commit
    • cgraph.h (cgraph_node_set_def, [...]): Move out of GTY; replace hash by pointer map. · 1cb1a99f
      	* cgraph.h (cgraph_node_set_def, varpool_node_set_def): Move out of GTY;
      	replace hash by pointer map.
      	(cgraph_node_set_element_def, cgraph_node_set_element,
      	const_cgraph_node_set_element, varpool_node_set_element_def,
      	varpool_node_set_element, const_varpool_node_set_element): Remove.
      	(free_cgraph_node_set, free_varpool_node_set): New function.
      	(cgraph_node_set_size, varpool_node_set_size): Use vector size.
      	* tree-emutls.c: Free varpool node set.
      	* ipa-utils.c (cgraph_node_set_new, cgraph_node_set_add,
      	cgraph_node_set_remove, cgraph_node_set_find, dump_cgraph_node_set,
      	debug_cgraph_node_set, free_cgraph_node_set, varpool_node_set_new,
      	varpool_node_set_add, varpool_node_set_remove, varpool_node_set_find,
      	dump_varpool_node_set, free_varpool_node_set, debug_varpool_node_set):
      	Move here from ipa.c; implement using pointer_map
      	* ipa.c (cgraph_node_set_new, cgraph_node_set_add,
      	cgraph_node_set_remove, cgraph_node_set_find, dump_cgraph_node_set,
      	debug_cgraph_node_set, varpool_node_set_new,
      	varpool_node_set_add, varpool_node_set_remove, varpool_node_set_find,
      	dump_varpool_node_set, debug_varpool_node_set):
      	Move to ipa-uitls.c.
      	* lto/lto.c (ltrans_partition_def): Remove GTY annotations.
      	(ltrans_partitions): Move to heap.
      	(new_partition): Update.
      	(free_ltrans_partitions): New function.
      	(lto_wpa_write_files): Use it.
      	* passes.c (ipa_write_summaries): Update.
      
      From-SVN: r173334
      Jan Hubicka committed
  13. 29 Apr, 2011 1 commit
    • cgraph.h (cgraph_postorder): Remove declaration. · af8bca3c
      2011-04-29  Martin Jambor  <mjambor@suse.cz>
      
      	* cgraph.h (cgraph_postorder): Remove declaration.
      	* ipa-utils.h (ipa_free_postorder_info): Declare.
      	(ipa_reverse_postorder): Likewise.
      	* cgraphunit.c: Include ipa-utils.h.
      	(cgraph_expand_all_functions): Update call to ipa_reverse_postorder.
      	* ipa-inline.c: Include ipa-utils.h.
      	(ipa_inline): Update call to ipa_reverse_postorder.
      	* ipa-pure-const.c (propagate_pure_const): Update call to
      	ipa_reduced_postorder and ipa_print_order.  Call
      	ipa_free_postorder_info to clean up.
      	(propagate_nothrow): Likewise.
      	* ipa-reference.c (propagate): Removed a useless call to
      	ipa_utils_reduced_inorder, updated a call to ipa_reduced_postorder
      	and ipa_print_order.  Call ipa_free_postorder_info to clean up.
      	* ipa.c: Include ipa-utils.h.
      	(ipa_profile): Update call to ipa_reverse_postorder.
      	(cgraph_postorder): Moved to...
      	* ipa-utils.c (ipa_reverse_postorder): ...here and renamed.
      	(ipa_utils_print_order): Renamed to ipa_print_order.
      	(ipa_utils_reduced_inorder): Renamed to ipa_reduced_postorder. Updated
      	comments.
      	(ipa_free_postorder_info): New function.
      	* passes.c: Include ipa-utils.h.
      	(do_per_function_toporder): Update call to ipa_reverse_postorder.
      	(ipa_write_summaries): Likewise.
      
      	* Makefile.in (passes.o): Add IPA_UTILS_H to dependencies.
      	(cgraphunit.o): Likewise.
      	(ipa.o): Likewise.
      	(ipa-inline.o): Likewise.
      
      lto/
      	* lto.c: Include ipa-utils.h.
      	(lto_balanced_map): Update call to ipa_reverse_postorder.
      	* Make-lang.in (lto/lto.o): Add IPA_UTILS_H to dependencies.
      
      From-SVN: r173197
      Martin Jambor committed
  14. 16 Apr, 2011 1 commit
    • cgraphbuild.c: Include ipa-inline.h. · e7f23018
      	* cgraphbuild.c: Include ipa-inline.h.
      	(reset_inline_failed): Use initialize_inline_failed.
      	* cgraph.c: Include ipa-inline.h.
      	(cgraph_create_node_1): Do not initialize estimated_growth.
      	(initialize_inline_failed): More to ipa-inline-analysis.c
      	(dump_cgraph_node): Do not dump inline flags.
      	* cgraph.h (cgraph_local_info): Remove inlineable, versionable
      	and disregard_inline_limits flags.
      	(cgrpah_global_info): Remove estimated_stack_size, stack_frame_offset,
      	time, size, estimated_growth.
      	* ipa-cp.c (ipcp_versionable_function_p, ipcp_generate_summary): Update.
      	* cgraphunit.c (cgraph_decide_is_function_needed): Use
      	DECL_DISREGARD_INLINE_LIMITS.
      	(cgraph_analyze_function): Do not initialize
      	node->local.disregard_inline_limits.
      	* lto-cgraph.c (lto_output_node, input_overwrite_node): Do not stream
      	inlinable, versionable and disregard_inline_limits.
      	* ipa-inline.c (cgraph_clone_inlined_nodes, cgraph_mark_inline_edge,
      	cgraph_check_inline_limits, cgraph_default_inline_p, cgraph_edge_badness,
      	update_caller_keys, update_callee_keys, add_new_edges_to_heap): Update.
      	(cgraph_decide_inlining_of_small_function): Update; set CIF_FUNCTION_NOT_INLINABLE
      	for uninlinable functions.
      	(cgraph_decide_inlining, cgraph_edge_early_inlinable_p,
      	cgraph_decide_inlining_incrementally): Update.
      	* ipa-inline.h (inline_summary): Add inlinable, versionable, disregard_inline_limits,
      	estimated_stack_size, stack_frame_offset, time, size and estimated_growth
      	parameters.
      	(estimate_edge_growth): Update.
      	(initialize_inline_failed): Declare.
      	* ipa-split.c: Include ipa-inline.h
      	(execute_split_functions): Update.
      	* ipa.c (cgraph_postorder): Use DECL_DISREGARD_INLINE_LIMITS.
      	(cgraph_remove_unreachable_nodes): Do not clear inlinable flag.
      	(record_cdtor_fn): Use DECL_DISREGARD_INLINE_LIMITS.
      	* ipa-inline-analysis.c (inline_node_removal_hook): Update; set
      	estimated_growth to INT_MIN.
      	(inline_node_duplication_hook): Likewise.
      	(dump_inline_summary): Dump new fields.
      	(compute_inline_parameters): Update.
      	(estimate_edge_time, estimate_time_after_inlining,
      	estimate_size_after_inlining, estimate_growth, inline_read_summary,
      	inline_write_summary):
      	(initialize_inline_failed): Move here from cgraph.c.
      	* tree-sra.c: Include ipa-inline.h.
      	(ipa_sra_preliminary_function_checks): Update.
      	* lto/lto.c (lto_balanced_map): Update.
      	Update.
      	* Makefile.in: (cgraph.o, cgraphbuild.o): Add dependency on
      	ipa-inline.h
      
      From-SVN: r172581
      Jan Hubicka committed
  15. 14 Apr, 2011 1 commit
    • cgraph.c (dump_cgraph_node): Do not dump inline summaries. · 10a5dd5d
      	* cgraph.c (dump_cgraph_node): Do not dump inline summaries.
      	* cgraph.h (struct inline_summary): Move to ipa-inline.h
      	(cgraph_local_info): Remove inline_summary.
      	* ipa-cp.c: Include ipa-inline.h.
      	(ipcp_cloning_candidate_p, ipcp_estimate_growth,
      	ipcp_estimate_cloning_cost, ipcp_insert_stage): Use inline_summary
      	accesor.
      	* lto-cgraph.c (lto_output_node): Do not stream inline summary.
      	(input_overwrite_node): Do not set inline summary.
      	(input_node): Do not stream inline summary.
      	* ipa-inline.c (cgraph_decide_inlining): Dump inline summaries.
      	(cgraph_decide_inlining_incrementally): Do not try to estimate overall
      	growth; we do not have inline parameters computed for that anyway.
      	(cgraph_early_inlining): After inlining compute call_stmt_sizes.
      	* ipa-inline.h (struct inline_summary): Move here from ipa-inline.h
      	(inline_summary_t): New type and VECtor.
      	(debug_inline_summary, dump_inline_summaries): Declare.
      	(inline_summary): Use VOCtor.
      	(estimate_edge_growth): Kill hack computing call stmt size directly.
      	* lto-section-in.c (lto_section_name): Add inline section.
      	* ipa-inline-analysis.c: Include lto-streamer.h
      	(node_removal_hook_holder, node_duplication_hook_holder): New holders
      	(inline_node_removal_hook, inline_node_duplication_hook): New functions.
      	(inline_summary_vec): Define.
      	(inline_summary_alloc, dump_inline_summary, debug_inline_summary,
      	dump_inline_summaries): New functions.
      	(estimate_function_body_sizes): Properly compute size/time of outgoing calls.
      	(compute_inline_parameters): Alloc inline_summary; do not compute size/time
      	of incomming calls.
      	(estimate_edge_time): Avoid missing time summary hack.
      	(inline_read_summary): Read inline summary info.
      	(inline_write_summary): Write inline summary info.
      	(inline_free_summary): Free all hooks and inline summary vector.
      	* lto-streamer.h: Add LTO_section_inline_summary section.
      	* Makefile.in (ipa-cp.o, ipa-inline-analysis.o): Update dependencies.
      	* ipa.c (cgraph_remove_unreachable_nodes): Fix dump file formating.
      
      	* lto.c: Include ipa-inline.h
      	(add_cgraph_node_to_partition, undo_partition): Use inline_summary accessor.
      	(ipa_node_duplication_hook): Fix declaration.
      	* Make-lang.in (lto.o): Update dependencies.
      
      From-SVN: r172430
      Jan Hubicka committed
  16. 11 Apr, 2011 1 commit
    • except.c (set_nothrow_function_flags): Call cgraph_get_node instead of cgraph_node. · 581985d7
      2011-04-11  Martin Jambor  <mjambor@suse.cz>
      
      	* except.c (set_nothrow_function_flags): Call cgraph_get_node instead
      	of cgraph_node.
      	* final.c (rest_of_clean_state): Likewise.
      	* gimple-iterator.c (update_call_edge_frequencies): Likewise.
      	* passes.c (pass_init_dump_file): Likewise.
      	(execute_all_ipa_transforms): Likewise.
      	(function_called_by_processed_nodes_p): Likewise.
      	* predict.c (maybe_hot_frequency_p): Likewise.
      	(probably_never_executed_bb_p): Likewise.
      	(compute_function_frequency): Likewise.
      	* tree-nested.c (check_for_nested_with_variably_modified): Likewise.
      	(unnest_nesting_tree_1): Likewise.
      	(lower_nested_functions): Likewise.
      	* tree-optimize.c (execute_fixup_cfg): Likewise.
      	(tree_rest_of_compilation): Likewise.
      	* tree-profile.c (gimple_gen_ic_func_profiler): Likewise.
      	* tree-sra.c (ipa_early_sra): Likewise.
      	* tree-ssa-loop-ivopts.c (computation_cost): Likewise.
      	* config/i386/i386.c (ix86_compute_frame_layout): Likewise.
      	* ipa.c (record_cdtor_fn): Likewise.
      	* ipa-inline.c (cgraph_early_inlining): Likewise.
      	(compute_inline_parameters_for_current): Likewise.
      	* ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
      	* ipa-pure-const.c (local_pure_const): Likewise.
      	* ipa-split.c (split_function): Likewise.
      	(execute_split_functions): Likewise.
      	* cgraphbuild.c (build_cgraph_edges): Likewise.
      	(rebuild_cgraph_edges): Likewise.
      	(cgraph_rebuild_references): Likewise.	
      	(remove_cgraph_callee_edges): Likewise.
      	* cgraphunit.c (cgraph_mark_if_needed): Likewise.
      	(verify_cgraph_node): Likewise.
      	(cgraph_analyze_functions): Likewise.
      	(cgraph_preserve_function_body_p): Likewise.
      	(save_inline_function_body): Likewise.
      	(save_inline_function_body): Likewise.
      	* tree-inline.c (copy_bb): Likewise.
      	(optimize_inline_calls): Likewise.
      
      From-SVN: r172257
      Martin Jambor committed
  17. 11 Mar, 2011 1 commit
  18. 15 Jan, 2011 1 commit
  19. 08 Jan, 2011 1 commit
  20. 23 Dec, 2010 1 commit
  21. 14 Dec, 2010 1 commit
    • This time really commit PR middle-end/45388 · 3a9ed12a
      This time really commit
      	PR middle-end/45388
      	* decl2.c (start_objects): Do not generate collect2 recognicable name
      	for static ctor.
      	* ipa.c (cgraph_build_static_cdtor_1): Break out from ... ; add FINAL parameter.
      	(cgraph_build_static_cdtor): ... here.
      	(build_cdtor): Use cgraph_build_static_cdtor_1.
      
      From-SVN: r167781
      Jan Hubicka committed
  22. 05 Dec, 2010 1 commit
  23. 25 Nov, 2010 1 commit
    • cgraphunit.c (process_function_and_variable_attributes): Mark dllexport-ed… · 9d602c59
      cgraphunit.c (process_function_and_variable_attributes): Mark dllexport-ed function/variables as needed.
      
      2010-11-25  Kai Tietz  <kai.tietz@onevision.com>
      
      	* cgraphunit.c (process_function_and_variable_attributes):
      	Mark dllexport-ed function/variables as needed.
      	* ipa.c (cgraph_externally_visible_p): Make dllexport-ed
      	as externally visible.
      
      2010-11-25  Kai Tietz  <kai.tietz@onevision.com>
      
      	* gcc.dg/dll-8.c: New.
      
      From-SVN: r167144
      Kai Tietz committed
  24. 20 Nov, 2010 1 commit
    • cgraph.c (ld_plugin_symbol_resolution_names): New. · 430c6ceb
      	* cgraph.c (ld_plugin_symbol_resolution_names): New.
      	(dump_cgraph_node): Dump resolution.
      	* cgraph.h (ld_plugin_symbol_resolution_names): Declare.
      	(cgraph_comdat_can_be_unshared_p): Dclare.
      	* lto-streamer-out.c (produce_symtab): Use
      	cgraph_comdat_can_be_unshared_p.
      	* ipa.c (cgraph_address_taken_from_non_vtable_p): New function.
      	(cgraph_comdat_can_be_unshared_p): New function based on logic
      	in cgraph_externally_visible_p.
      	(cgraph_externally_visible_p): Use it.
      	(varpool_externally_visible_p): Virtual tables can be unshared.
      	* varpool.c (dump_varpool_node): Dump resolution.
      
      From-SVN: r166985
      Jan Hubicka committed
  25. 16 Nov, 2010 1 commit
    • cgraph.h (+varpool_can_remove_if_no_refs): Move here from ...... · df7705b1
      	* cgraph.h (+varpool_can_remove_if_no_refs): Move here from ...;
      	when !flag_toplevel_reorder do not remove unless variable is
      	COMDAT or ARTIFICIAL.
      	* ipa.c (varpool_can_remove_if_no_refs): ... here.
      	(cgraph_remove_unreachable_nodes): Only analyzed nodes needs to stay.
      	* cgraphunit.c (cgraph_analyze_functions): Dump varpool, too.
      	* varpool.c (decide_is_variable_needed): Do not handle visibility issues.
      	(varpool_finalize_decl): Likewise.
      	(varpool_remove_unreferenced_decls): Use varpool_mark_needed_node; update
      	outdated comment on DECL_RTL_SET_P check.
      
      From-SVN: r166812
      Jan Hubicka committed
  26. 11 Nov, 2010 1 commit
    • invoke.texi (-fwhopr): Merge into -flto section. · 014d92e1
      	* doc/invoke.texi (-fwhopr): Merge into -flto section.
      	(-flto-partition): Document none.
      	* gcc.c (LINK_COMMAND_SPEC): Remove -fwhopr.
      	* lto-wrapper.c: Update comment.
      	(run_gcc): Update LTO option parsing.
      	* opts.c (finish_options): add support -flto-partition=none
      	(common_handle_option): Remove fwhopr.
      	* common.opt: Turn fwhopr into flto.
      	* collect2.c (main): Update option handling.
      	* cgraphunit.c (cgraph_decide_is_function_needed): Remove flag_whopr.
      	* ipa-split.c (execute_split_functions): Remove flag_whopr.
      	* ipa.c (function_and_variable_visibility): Remove flag_whopr.
      	* ipa-prop.c (ipa_compute_jump_functions): Remove flag_whopr.
      	* varpool.c (decide_is_variable_needed): Remove flag_whopr.
      	
      	* gcc.dg/20081223-1.c: Update LTO options.
      	* gcc.dg/lto/20090206-1_0.c: Update LTO options.
      	* gcc.dg/lto/20081118_0.c: Update LTO options.
      	* gcc.dg/lto/ipareference_0.c: Update LTO options.
      	* gcc.dg/lto/20100423-2_0.c: Update LTO options.
      	* gcc.dg/lto/20081201-1_0.c: Update LTO options.
      	* gcc.dg/lto/ipacp_0.c: Update LTO options.
      	* gcc.dg/lto/20090116_0.c: Update LTO options.
      	* gcc.dg/lto/20091015-1_0.c: Update LTO options.
      	* gcc.dg/lto/20090126-2_0.c: Update LTO options.
      	* gcc.dg/lto/20081202-2_0.c: Update LTO options.
      	* gcc.dg/lto/20081204-1_0.c: Update LTO options.
      	* gcc.dg/lto/const-uniq_0.c: Update LTO options.
      	* gcc.dg/lto/20081224_0.c: Update LTO options.
      	* gcc.dg/lto/20090219_0.c: Update LTO options.
      	* gcc.dg/lto/ipareference2_0.c: Update LTO options.
      	* gcc.dg/lto/20090206-2_0.c: Update LTO options.
      	* gcc.dg/lto/20081115_0.c: Update LTO options.
      	* gcc.dg/lto/20081201-2_0.c: Update LTO options.
      	* gcc.dg/lto/20081120-2_0.c: Update LTO options.
      	* gcc.dg/lto/materialize-1_0.c: Update LTO options.
      	* gcc.dg/lto/20090126-1_0.c: Update LTO options.
      	* gcc.dg/lto/20081202-1_0.c: Update LTO options.
      	* gcc.dg/lto/noreturn-1_0.c: Update LTO options.
      	* g++.dg/20090107-1.C: Update LTO options.
      	* g++.dg/lto/pr45679-2_0.C: Update LTO options.
      	* g++.dg/lto/20081123_0.C: Update LTO options.
      	* g++.dg/lto/20090313_0.C: Update LTO options.
      	* g++.dg/lto/20081125_0.C: Update LTO options.
      	* g++.dg/lto/20081109-1_0.C: Update LTO options.
      	* g++.dg/lto/20081219_0.C: Update LTO options.
      	* g++.dg/lto/20100724-1_0.C: Update LTO options.
      	* g++.dg/lto/20081204-1_0.C: Update LTO options.
      	* g++.dg/lto/20090303_0.C: Update LTO options.
      	* g++.dg/lto/20100723-1_0.C: Update LTO options.
      	* g++.dg/lto/pr45679-1_0.C: Update LTO options.
      	* g++.dg/lto/20090128_0.C: Update LTO options.
      	* g++.dg/lto/20081204-2_0.C: Update LTO options.
      	* g++.dg/lto/20090302_0.C: Update LTO options.
      	* g++.dg/lto/20081119-1_0.C: Update LTO options.
      	* g++.dg/lto/20081118_0.C: Update LTO options.
      	* g++.dg/20090121-1.C: Update LTO options.
      	* objc.dg/lto/lto.exp: Update LTO options.
      	* lib/lto.exp: Update LTO options.
      	* lib/gcc-dg.exp: Update LTO options.
      	* lib/c-torture.exp: Update LTO options.
      	* obj-c++.dg/lto/lto.exp: Update LTO options.
      
      From-SVN: r166625
      Jan Hubicka committed
  27. 26 Oct, 2010 3 commits
    • ipa.c (process_references): Enqueue all referenced nodes; mark as reachable only… · ed62e0d9
      ipa.c (process_references): Enqueue all referenced nodes; mark as reachable only non-external nodes.
      
      
      	* ipa.c (process_references): Enqueue all referenced nodes;
      	mark as reachable only non-external nodes.
      	(cgraph_remove_unreachable_nodes): All referenced nodes should
      	be enqueued; remove bogues node->needed check.
      
      From-SVN: r165990
      Jan Hubicka committed
    • ipa.c (cgraph_externally_visible_p, [...]): Use info provided by linker plugin. · 892ae21c
      	* ipa.c (cgraph_externally_visible_p, varpool_externally_visible_p):
      	Use info provided by linker plugin.
      
      From-SVN: r165978
      Jan Hubicka committed
    • re PR lto/45736 (ICE: in cgraph_remove_unreachable_nodes, at ipa.c:245 with… · 530f3a1b
      re PR lto/45736 (ICE: in cgraph_remove_unreachable_nodes, at ipa.c:245 with -flto and attribute((constructor)))
      
      
      	PR middle-end/45736
      	* cgraph.c (cgraph_set_readonly_flag): Rename to...
      	(cgraph_set_const_flags) ... this one; get also looping argument;
      	clear constructor/destructor flags.
      	(cgraph_set_pure_flag): Likewise.
      	(cgraph_set_looping_const_or_pure_flag): Remove.
      	(cgraph_can_remove_if_no_direct_calls_and_refs): Do not try
      	to optimize away static ctors/dtors; it does not work on inline clones;
      	external functions can always be rmeoved.
      	(cgraph_will_be_removed_from_program_if_no_direct_calls): Assert on inline
      	clones; in LTO external functions always can go.
      	(cgraph_used_from_object_file_p): Handle EXTERNAL functions correctly.
      	(cgraph_mark_address_taken_node): Assert that we are not taking address of
      	inline clone.
      	(cgraph_can_remove_if_no_direct_calls_p): We always eventually remove
      	external functions.
      	* ipa-cp.c (ipcp_cloning_candidate_p): Do not clone functions with address taken.
      	(ipcp_initialize_node_lattices): Only local functions can be handled without cloning.
      	* cgraph.h (cgraph_set_readonly_flag,
      	cgraph_set_looping_const_or_pure_flag): Remove.
      	(cgraph_set_const_flag): Declare.
      	(cgraph_set_pure_flag): Update.
      	* ipa-pure-const (propagate_pure_const, local_pure_const): Update
      	flags setting code.
      	* ipa.c (cgraph_remove_unreachable_nodes): Fix formating; do not look at inline
      	clones; fix handling of external definitions.
      	(cgraph_postorder): Do not look at inline clones in the first pass.
      	(function_and_variable_visibility): Drop constructors/destructor
      	flags at pure and const functions.
      	* tree-profile.c (tree_profiling): Update.
      	* ipa-inline.c (cgraph_clone_inlined_nodes): Always clone functions with
      	address taken; external functions do not account to whole program size.
      	(cgraph_decide_inlining): Likewise; do not try to inline functions already
      	inlined.
      	* testsuite/gcc.dg/lto/pr45736_0.c: New function.
      
      From-SVN: r165972
      Jan Hubicka committed
  28. 19 Oct, 2010 1 commit
  29. 18 Oct, 2010 1 commit
  30. 16 Oct, 2010 1 commit
  31. 11 Oct, 2010 2 commits
    • vec.h (VEC_qsort): Define. · 5095da95
      gcc/
      	* vec.h (VEC_qsort): Define.
      	* dbxout.c (output_used_types): Use it.
      	* df-scan.c (df_sort_and_compress_refs): Likewise.
      	(df_sort_and_compress_mws): Likewise.
      	* genautomata.c (uniq_sort_alt_states): Likewise.
      	(evaluate_equiv_classes): Likewise.
      	(output_trans_table): Likewise.
      	(output_state): Likewise.
      	* gimplify.c (compare_case_labels): Likewise.
      	* graphite-sese-to-poly.c (graphite_sort_dominated_info): Likewise.
      	* ipa.c (build_cdtor_fns): Likewise.
      	* lto.c (lto_wpa_write_files): Likewise.
      	* sel-sched.c (fill_vec_av_set): Likewise.
      	* tree-predcom.c (determine_roots_comp): Likewise.
      	* tree-sra.c (sort_and_spliace_var_accesses): Likewise.
      	(splice_param_accesses): Likewise.
      	* tree-ssa-live.c (dump_enumerated_decls): Likewise.
      	* tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
      	(reassociate_bb): Likewise.
      	* tree-ssa-sccvn.c (sort_scc): Likewise.
      	* tree-ssa-structalias.c (sort_fieldstack): Likewise.
      
      gcc/ada/
      	* gcc-interface/utils2.c (gnat_build_constructor): Use VEC_qsort.
      
      From-SVN: r165314
      Nathan Froyd committed
    • re PR middle-end/45955 (FAIL: gcc.dg/initpri1.c (test for excess errors)) · 7d26a391
      	PR middle-end/45955
      	* ipa.c (build_cdtor): Delete endless loop.
      
      From-SVN: r165308
      John David Anglin committed
  32. 07 Oct, 2010 1 commit
  33. 06 Oct, 2010 1 commit
  34. 24 Sep, 2010 1 commit
    • lto-symtab.c (lto_symtab_entry_def): Add guessed field. · 051f8cc6
      	* lto-symtab.c (lto_symtab_entry_def): Add guessed field.
      	(lto_symtab_resolve_symbols): Set it.
      	(lto_symtab_merge_decls_1): Do not compute used_from_object_file;
      	store resolution field in cgraph/varpool.
      	* cgraph.c (cgraph_same_body_alias, cgraph_add_thunk): Return node.
      	(cgraph_get_node_or_alias, cgraph_get_node_or_alias): Constify.
      	(cgraph_dump_node): Drop used_from_object_file.
      	(cgraph_clone_node, cgraph_create_virtual_clone): Likewise.
      	(cgraph_function_body_availability): Use decl_replaceable_p.
      	(cgraph_make_node_local): Set resolution to LDPR_PREVAILING_DEF_IRONLY.
      	(cgraph_can_remove_if_no_direct_calls_and_refs): Use
      	cgraph_used_from_object_file_p.
      	(cgraph_will_be_removed_from_program_if_no_direct_calls): Use
      	cgraph_used_from_object_file_p.
      	(resolution_used_from_other_file_p): New functoin.
      	(cgraph_used_from_object_file_p): New predicate.
      	* cgraph.h: Include plugin-api.h
      	(struct cgraph_local_info): Remove used_from_object_file.
      	(struct cgraph_node): Add resolution field.
      	(struct varpool_node): Likewise; remove used_from_object_file;
      	reove const_value_known.
      	(cgraph_get_node, cgraph_get_node_or_alias, cgraph_node,
      	cgraph_same_body_alias, cgraph_add_thunk): Update prototypes.
      	(resolution_used_from_other_file_p, cgraph_used_from_object_file_p,
      	varpool_used_from_object_file_p): Declare.
      	(varpool_get_node, varpool_extra_name_alias): Update prototype.
      	* tree.h (DECL_REPLACEABLE_P): Remove.
      	(decl_replaceable_p, decl_binds_to_current_def_p): Declare.
      	* final.c (rest_of_clean_state): Use decl_binds_to_current_def_p.
      	* lto-cgraph.c (lto_output_node, lto_output_varpool_node,
      	input_overwrite_node, input_node, input_varpool_node): Stream
      	resolution.
      	* expr.c (expand_expr_real_1): Use const_value_known_p
      	* ipa.c (ipa_discover_readonly_nonaddressable_var): Do not set
      	const_value_known.
      	(cgraph_externally_visible_p): Use cgraph_used_from_object_file_p.
      	(function_and_variable_visibility): Set resolution for local vars
      	and functions.
      	use varpool_used_from_object_file_p.
      	* varasm.c (resolution_to_local_definition_p, resolution_local_p): New
      	static functions.
      	(default_binds_local_p_1): Use resolutoin info.
      	(decl_binds_to_current_def_p, decl_replaceable_p): New functions.
      	* varpool.c (varpool_get_node): Constify.
      	(const_value_known_p): Do not use vnode->const_value_known;
      	use decl_replaceable_p.
      	(varpool_finalize_decl): Do not set const_value_known.
      	(cgraph_variable_initializer_availability): Use decl_replaceable_p
      	(varpool_extra_name_alias): Return new node.
      	(varpool_used_from_object_file_p): New function.
      
      	* decl.c (finish_function): Use decl_replaceable_p
      	* method.c (make_alias_for_thunk): Update call of cgraph_same_body_alias.
      
      	* lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
      
      From-SVN: r164610
      Jan Hubicka committed