1. 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
  2. 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
  3. 19 Oct, 2010 1 commit
  4. 18 Oct, 2010 1 commit
  5. 16 Oct, 2010 1 commit
  6. 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
  7. 07 Oct, 2010 1 commit
  8. 06 Oct, 2010 1 commit
  9. 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
  10. 20 Sep, 2010 1 commit
    • re PR tree-optimization/45605 (Missed devirtualization) · 64e0f5ff
      	PR tree-optimize/45605
      	* cgraph.h (const_value_known_p): Declare.
      	(varpool_decide_const_value_known): Remove.
      	* tree-ssa-ccp.c (get_base_constructor): Use it.
      	* lto-cgraph.c (compute_ltrans_boundary): Likewise.
      	* expr.c (string_constant): Likewise.
      	* tree-ssa-loop-ivcanon.c (constant_after_peeling): Likewise.
      	* ipa.c (ipa_discover_readonly_nonaddressable_var,
      	function_and_variable_visibility): Likewise.
      	* gimplify.c (gimplify_call_expr): Likewise.
      	* gimple-fold.c (get_symbol_constant_value): Likewise.
      	* varpool.c (varpool_decide_const_value_known): Replace by...
      	(const_value_known_p): ... this one; handle other kinds of DECLs
      	too and work for automatic vars.
      	(varpool_finalize_decl): Use const_value_known_p.
      
      	* lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
      
      	* g++.dg/tree-ssa/pr45605.C: New testcase.
      
      From-SVN: r164438
      Jan Hubicka committed
  11. 18 Sep, 2010 1 commit
    • re PR tree-optimization/45453 (ICE: verify_cgraph_node failed: inlined_to… · 9b389a5e
      re PR tree-optimization/45453 (ICE: verify_cgraph_node failed: inlined_to pointer set for noninline callers with -O2 -fno-early-inlining)
      
      
      	PR tree-optimization/45453
      	* cgraphunit.c (cgraph_finalize_function): Consider comdat & external
      	virtual functions are reachable.
      	* ipa-inline.c (cgraph_clone_inlined_nodes): Likewise.
      	* ipa.c (cgraph_remove_unreachable_nodes): Likewise.
      	* ipa-prop.c (ipa_modify_formal_parameters): Clear DECL_VIRTUAL_P
      	when modifying function.
      
      	* g++.dg/tree-ssa/pr45453.C: New testcase.
      
      From-SVN: r164405
      Jan Hubicka committed
  12. 16 Sep, 2010 1 commit
    • pr45679-1_0.C: New file. · 0cac82a0
      	* g++.dg/lto/pr45679-1_0.C: New file.
      	* g++.dg/lto/pr45679-1_1.C: New file.
      	* g++.dg/lto/pr45679-0_0.C: New file.
      	* g++.dg/lto/pr45679-0_1.C: New file.
      	* lto-cgraph.c (lto_output_node): Fix handling of clones.
      	* ipa.c (cgraph_remove_unreachabloe_nodes): Fix handling of
      	unreachable clones with reachable clones.
      	* tree-inline.c (copy_bb): Fix sanity checking when producing
      	unreachable clone.
      
      From-SVN: r164344
      Jan Hubicka committed
  13. 03 Sep, 2010 2 commits
    • ipa.c (build_cdtor): Take VECtor as argument; fix array walk. · 48c24aca
      	* ipa.c (build_cdtor): Take VECtor as argument; fix array walk.
      	(build_cdtor_fns): Update use of build_cdtor.
      
      From-SVN: r163849
      Jan Hubicka committed
    • cgraph.h (struct varpool_node): Add const_value_known. · 155c92a7
      	* 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.
      
      From-SVN: r163808
      Jan Hubicka committed
  14. 21 Aug, 2010 1 commit
    • tree-pass.h (pass_ipa_cdtor_merge): New function. · 9e97ff61
      	* tree-pass.h (pass_ipa_cdtor_merge): New function.
      	* cgraphunit.c (static_ctors, static_dtors): Move to ipa.c; make
      	heap allocated.
      	(record_cdtor_fn): Move to ipa.c; do not test for
      	have_ctors_dtors.
      	(build_cdtor): Move to ipa.c; add code avoiding construction
      	when target have ctors/dtors and there is only one ctor/dtor at given
      	priority.
      	(compare_ctor, compare_dtor): Move to ipa.c; use DECL_UID to stabilize sort;
      	reverse order of constructors.
      	(cgraph_build_cdtor_fns):Move to ipa.c; rename to build_cdtor_fns.
      	(cgraph_finalize_function): Do not call record_cdtor_fn.
      	(cgraph_finalize_compilation_unit): Do not call cgraph_build_cdtor_fns.
      	(cgraph_build_static_cdtor): Move to ipa.c.
      	* ipa.c: Include target.h and tree-iterator.h.
      	(cgraph_build_static_cdtor, static_ctors, static_dtors,
      	record_cdtor_fn, build_cdtor, compare_ctor, compare_dtor,
      	build_cdtor_fns, ipa_cdtor_merge, gate_ipa_cdtor_merge,
      	pass_ipa_cdtor_merge): New.
      	* passes.c (init_optimization_passes): Enqueue pass_ipa_cdtor_merge.
      	* ipa-prop.c (update_indirect_edges_after_inlining): Avoid out of bounds access.
      
      From-SVN: r163443
      Jan Hubicka committed
  15. 20 Aug, 2010 1 commit
    • vec.h (FOR_EACH_VEC_ELT): Define. · ac47786e
      gcc/
      	* vec.h (FOR_EACH_VEC_ELT): Define.
      	* c-decl.c: Use it.
      	* cfgloop.c: Likewise.
      	* cfgloopmanip.c: Likewise.
      	* cgraph.c: Likewise.
      	* cgraphunit.c: Likewise.
      	* combine.c: Likewise.
      	* config/bfin/bfin.c: Likewise.
      	* config/mips/mips.c: Likewise.
      	* config/rs6000/rs6000.c: Likewise.
      	* dbxout.c: Likewise.
      	* df-scan.c: Likewise.
      	* dominance.c: Likewise.
      	* dse.c: Likewise.
      	* dwarf2out.c: Likewise.
      	* except.c: Likewise.
      	* expr.c: Likewise.
      	* function.c: Likewise.
      	* gcse.c: Likewise.
      	* genattr.c: Likewise.
      	* ggc-common.c: Likewise.
      	* gimplify.c: Likewise.
      	* graphite-blocking.c: Likewise.
      	* graphite-clast-to-gimple.c: Likewise.
      	* graphite-dependences.c: Likewise.
      	* graphite-interchange.c: Likewise.
      	* graphite-poly.c: Likewise.
      	* graphite-scop-detection.c: Likewise.
      	* graphite-sese-to-poly.c: Likewise.
      	* graphite.c: Likewise.
      	* haifa-sched.c: Likewise.
      	* ifcvt.c: Likewise.
      	* implicit-zee.c: Likewise.
      	* ipa-prop.c: Likewise.
      	* ipa-struct-reorg.c: Likewise.
      	* ipa.c: Likewise.
      	* ira-build.c: Likewise.
      	* ira-color.c: Likewise.
      	* ira-emit.c: Likewise.
      	* lambda-code.c: Likewise.
      	* loop-invariant.c: Likewise.
      	* loop-unroll.c: Likewise.
      	* lower-subreg.c: Likewise.
      	* lto-cgraph.c: Likewise.
      	* lto-opts.c: Likewise.
      	* lto-streamer-in.c: Likewise.
      	* lto-streamer-out.c: Likewise.
      	* lto-streamer.c: Likewise.
      	* lto-symtab.c: Likewise.
      	* matrix-reorg.c: Likewise.
      	* opts.c: Likewise.
      	* predict.c: Likewise.
      	* print-tree.c: Likewise.
      	* sdbout.c: Likewise.
      	* sel-sched-dump.c: Likewise.
      	* sel-sched-ir.c: Likewise.
      	* sel-sched.c: Likewise.
      	* sese.c: Likewise.
      	* stor-layout.c: Likewise.
      	* tree-cfg.c: Likewise.
      	* tree-cfgcleanup.c: Likewise.
      	* tree-chrec.c: Likewise.
      	* tree-data-ref.c: Likewise.
      	* tree-emutls.c: Likewise.
      	* tree-inline.c: Likewise.
      	* tree-into-ssa.c: Likewise.
      	* tree-loop-distribution.c: Likewise.
      	* tree-loop-linear.c: Likewise.
      	* tree-mudflap.c: Likewise.
      	* tree-outof-ssa.c: Likewise.
      	* tree-parloops.c: Likewise.
      	* tree-predcom.c: Likewise.
      	* tree-pretty-print.c: Likewise.
      	* tree-scalar-evolution.c: Likewise.
      	* tree-ssa-live.c: Likewise.
      	* tree-ssa-loop-im.c: Likewise.
      	* tree-ssa-loop-ivcanon.c: Likewise.
      	* tree-ssa-loop-ivopts.c: Likewise.
      	* tree-ssa-loop-manip.c: Likewise.
      	* tree-ssa-loop-niter.c: Likewise.
      	* tree-ssa-loop-prefetch.c: Likewise.
      	* tree-ssa-phiprop.c: Likewise.
      	* tree-ssa-pre.c: Likewise.
      	* tree-ssa-reassoc.c: Likewise.
      	* tree-ssa-sccvn.c: Likewise.
      	* tree-ssa-structalias.c: Likewise.
      	* tree-ssa.c: Likewise.
      	* tree-vect-data-refs.c: Likewise.
      	* tree-vect-loop-manip.c: Likewise.
      	* tree-vect-loop.c: Likewise.
      	* tree-vect-patterns.c: Likewise.
      	* tree-vect-slp.c: Likewise.
      	* tree-vect-stmts.c: Likewise.
      	* tree-vrp.c: Likewise.
      	* tree.c: Likewise.
      	* value-prof.c: Likewise.
      	* var-tracking.c: Likewise.
      	* varasm.c: Likewise.
      	* vmsdbgout.c: Likewise.
      
      gcc/ada/
      	* gcc-interface/decl.c: Use FOR_EACH_VEC_ELT.
      	* gcc-interface/trans.c: Likewise.
      	* gcc-interface/utils.c: Likewise.
      
      gcc/c-family/
      	* c-common.c: Use FOR_EACH_VEC_ELT.
      	* c-gimplify.c: Likewise.
      	* c-pragma.c: Likewise.
      
      gcc/cp/
      	* call.c: Use FOR_EACH_VEC_ELT.
      	* class.c: Likewise.
      	* decl.c: Likewise.
      	* decl2.c: Likewise.
      	* error.c: Likewise.
      	* except.c: Likewise.
      	* mangle.c: Likewise.
      	* method.c: Likewise.
      	* name-lookup.c: Likewise.
      	* parser.c: Likewise.
      	* pt.c: Likewise.
      	* repo.c: Likewise.
      	* semantics.c: Likewise.
      	* typeck2.c: Likewise.
      
      gcc/fortran/
      	* trans-openmp.c: Use FOR_EACH_VEC_ELT.
      
      gcc/java/
      	* class.c: Use FOR_EACH_VEC_ELT.
      	* expr.c: Likewise.
      	* jcf-parse.c: Likewise.
      	* resource.c: Likewise.
      
      gcc/lto/
      	* lto.c: Use FOR_EACH_VEC_ELT.
      
      From-SVN: r163401
      Nathan Froyd committed
  16. 15 Jul, 2010 2 commits
  17. 08 Jul, 2010 1 commit
    • ipa.c: Include pointer-set.h · 5dde3b01
      	* ipa.c: Include pointer-set.h
      	(cgraph_externally_visible_p): New attribute ALIASED;
      	when in LTO, hidden symbols are local unless they are aliased.
      	(function_and_variable_visibility): Compute aliased nodes;
      	handle LTO and hidden symbol on functions and vars.
      	* cgraph.c (cgraph_make_decl_local): Clear NAMED_SECTION
      	for COMDAT symbols; handle COMDAT_GROUPS also at vars.
      
      From-SVN: r161957
      Jan Hubicka committed
  18. 28 Jun, 2010 1 commit
    • cgraph.h (struct varpool_node): new used_from_object_file flag. · 6d41cd02
      2010-06-28  Bingfeng Mei <bmei@broadcom.com>
      
              * cgraph.h (struct varpool_node): new used_from_object_file flag.
              (struct cgraph_local_info): new used_from_object_file flag.
              * cgraph.c (dump_cgraph_node): dump used_from_object_file flag.
              (cgraph_clone_node): initialize used_from_object_file.
              (cgraph_create_virtual_clone): initialize used_from_object_file.
              * lto-symbtab.c (lto_symtab_merge_decls_1): Set
              used_from_object_file flags for symbols of LDPR_PREVAILING_DEF
              when compiling with -fwhole-program.
              (lto_symtab_resolve_symbols) Use LDPR_PREVAILING_DEF_IRONLY for
      	internal resolver.
              * ipa.c (function_and_variable_visibility): Set externally_visible
              flag of varpool_node if used_from_object_file flag is set.
              (cgraph_externally_visible_p): check used_from_object_file flag.
              * doc/invoke.texi (-fwhole-program option): Change description of
              externally_visible attribute accordingly.
              * doc/extend.texi (externally_visible): Ditto.
      
      From-SVN: r161483
      Bingfeng Mei committed
  19. 08 Jun, 2010 1 commit
    • utils.c (init_gnat_to_gnu): Use typed GC allocation. · a9429e29
      gcc/ada:
      
      2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
      
      	* gcc-interface/utils.c (init_gnat_to_gnu): Use typed GC
      	allocation.
      	(init_dummy_type): Likewise.
      	(gnat_pushlevel): Likewise.
      
      	* gcc-interface/trans.c (Attribute_to_gnu): Likewise.
      	(Subprogram_Body_to_gnu): Likewise.
      	(Compilation_Unit_to_gnu): Likewise.
      	(start_stmt_group): Likewise.
      	(extract_encoding): Likewise.
      	(decode_name): Likewise.
      
      	* gcc-interface/misc.c (gnat_printable_name): Likewise.
      
      	* gcc-interface/decl.c (annotate_value): Likewise.
      
      	* gcc-interface/ada-tree.h (struct lang_type): Add variable_size
      	GTY option.
      	(struct lang_decl): Likewise.
      	(SET_TYPE_LANG_SPECIFIC): Use typed GC allocation.
      	(SET_DECL_LANG_SPECIFIC): Likewise.
      
      gcc/c-family:
      
      2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
      
      	* c-pragma.c (push_alignment): Use typed GC allocation.
      	(handle_pragma_push_options): Likewise.
      
      	* c-common.c (parse_optimize_options): Likewise.
      
      	* c-common.h (struct sorted_fields_type): Add variable_size GTY
      	option.
      
      gcc/cp:
      
      2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
      
      	* typeck2.c (abstract_virtuals_error): Likewise.
      
      	* pt.c (maybe_process_partial_specialization): Likewise.
      	(register_specialization): Likewise.
      	(add_pending_template): Likewise.
      	(lookup_template_class): Likewise.
      	(push_tinst_level): Likewise.
      
      	* parser.c (cp_lexer_new_main): Likewise.
      	(cp_lexer_new_from_tokens): Likewise.
      	(cp_token_cache_new): Likewise.
      	(cp_parser_context_new): Likewise.
      	(cp_parser_new): Likewise.
      	(cp_parser_nested_name_specifier_opt): Likewise.
      	(cp_parser_template_id): Likewise.
      
      	* name-lookup.c (binding_entry_make): Likewise.
      	(binding_table_construct): Likewise.
      	(binding_table_new): Likewise.
      	(cxx_binding_make): Likewise.
      	(pushdecl_maybe_friend): Likewise.
      	(begin_scope): Likewise.
      	(push_to_top_level): Likewise.
      
      	* lex.c (init_reswords): Likewise.
      	(retrofit_lang_decl): Likewise.
      	(cxx_dup_lang_specific_decl): Likewise.
      	(copy_lang_type): Likewise.
      	(cxx_make_type): Likewise.
      
      	* decl.c (make_label_decl): Likewise.
      	(check_goto): Likewise.
      	(start_preparsed_function): Likewise.
      	(save_function_data): Likewise.
      
      	* cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
      
      	* cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
      
      	* class.c (finish_struct_1): Likewise.
      
      	* cp-tree.h (struct lang_type): Add variable_size GTY option.
      	(struct lang_decl): Likewise.
      
      	* parser.c (cp_parser_new): Update comment to not reference
      	ggc_alloc.
      
      gcc/fortran:
      
      2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
      
      	* trans-types.c (gfc_get_nodesc_array_type): Use typed GC
      	allocation.
      	(gfc_get_array_type_bounds): Likewise.
      
      	* trans-decl.c (gfc_allocate_lang_decl): Likewise.
      	(gfc_find_module): Likewise.
      
      	* f95-lang.c (pushlevel): Likewise.
      
      	* trans.h (struct lang_type): Add variable_size GTY option.
      	(struct lang_decl): Likewise.
      
      gcc/java:
      
      2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
      
      	* jcf-reader.c (jcf_parse_constant_pool): Use typed GC allocation.
      
      	* jcf-parse.c (java_parse_file): Likewise.
      	(process_zip_dir): Likewise.
      
      	* java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Likewise.
      	(MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise.
      
      	* expr.c (add_type_assertion): Likewise.
      
      	* decl.c (make_binding_level): Likewise.
      	(java_dup_lang_specific_decl): Likewise.
      
      	* constants.c (set_constant_entry): Likewise.
      	(cpool_for_class): Likewise.
      
      	* class.c (add_method_1): Likewise.
      	(java_treetreehash_new): Likewise.
      
      	* java-tree.h (struct lang_type): Add variable_size GTY option.
      	(struct lang_decl): Likewise.
      
      	* jch.h (struct cpool_entry): Likewise.
      
      	* java-tree.h (java_treetreehash_create): Remove parameter ggc.
      
      	* except.c (prepare_eh_table_type): Update
      	java_treetreehash_create call.
      
      	* class.c (add_method_1): Update java_treetreehash_create call.
      	(java_treetreehash_create): Remove parameter gc.  Use
      	htab_create_ggc.
      
      gcc/lto:
      
      2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
      
      	* lto.c (lto_read_in_decl_state): Use typed GC allocation.
      	(lto_file_read): Likewise.
      	(new_partition): Likewise.
      	(read_cgraph_and_symbols): Likewise.
      
      gcc/objc:
      
      2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
      
      	* objc-act.h (ALLOC_OBJC_TYPE_LANG_SPECIFIC): Use typed GC
      	allocation.
      
      	* objc-act.c (objc_volatilize_decl): Likewise.
      	(objc_build_string_object): Likewise.
      	(hash_init): Likewise.
      	(hash_enter): Likewise.
      	(hash_add_attr): Likewise.
      	(add_class): Likewise.
      	(start_class): Likewise.
      
      gcc/objcp:
      
      2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
      
      	* objcp-decl.h (ALLOC_OBJC_TYPE_LANG_SPECIFIC): Use typed GC
      	allocation.
      
      gcc:
      
      2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
      
      	* doc/tm.texi (Per-Function Data): Do not reference ggc_alloc.
      
      	* doc/gty.texi (GTY Options): Document typed GC allocation and
      	variable_size GTY option.
      
      	* ggc-internal.h: New.
      
      	* ggc.h: Update copyright year.
      	(digit_string): Move to stringpool.c.
      	(ggc_mark_stringpool, ggc_purge_stringpool, ggc_mark_roots)
      	(gt_pch_save_stringpool, gt_pch_fixup_stringpool)
      	(gt_pach_restore_stringpool, gt_pch_p_S, gt_pch_note_object)
      	(init_ggc_pch, ggc_pch_count_object, ggc_pch_total_size)
      	(ggc_pch_this_base, ggc_pch_alloc_object, ggc_pch_prepare_write)
      	(ggc_pch_write_object, ggc_pch_finish, ggc_pch_read)
      	(ggc_force_collect, ggc_get_size, ggc_statistics)
      	(ggc_print_common_statistics): Move to ggc-internal.h.
      	(digit_vector, new_ggc_zone, destroy_ggc_zone, ggc_alloc_stat)
      	(ggc_alloc, ggc_alloc_cleared, ggc_realloc, ggc_calloc, GGC_NEW)
      	(GGC_CNEW, GGC_NEWVEC, GGC_CNEWVEC, GGC_NEWVAR, ggc_alloc_rtvec)
      	(ggc_alloc_tree, gt_pch_save, ggc_min_expand_heuristic)
      	(ggc_min_heapsize_heuristic, ggc_alloc_zone)
      	(ggc_alloc_zone_pass_stat): Remove.
      	(ggc_internal_alloc_stat, ggc_internal_alloc)
      	(ggc_internal_cleared_alloc_stat): New.
      	(GGC_RESIZEVEC, GGC_RESIZEVAR): Redefine.
      	(ggc_internal_vec_alloc_stat)
      	(ggc_internal_cleared_vec_alloc_stat)
      	(ggc_internal_vec_alloc_stat, ggc_internal_cleared_vec_alloc)
      	(ggc_alloc_atomic_stat, ggc_alloc_atomic)
      	(ggc_alloc_cleared_atomic, ggc_cleared_alloc_htab_ignore_args)
      	(ggc_cleared_alloc_ptr_array_two_args): New.
      	(htab_create_ggc, splay_tree_new_ggc): Redefine.
      	(ggc_splay_alloc): Change the type of the first argument to
      	enum gt_types_enum.
      	(ggc_alloc_string): Make macro.
      	(ggc_alloc_string_stat): New.
      	(ggc_strdup): Redefine.
      	(rtl_zone, tree_zone, tree_id_zone): Declare unconditionally.
      	(ggc_alloc_rtvec_sized): New.
      	(ggc_alloc_zone_stat): Rename to ggc_internal_alloc_zone_stat.
      	(ggc_internal_alloc_zone_pass_stat, ggc_internal_alloc_zone_stat)
      	(ggc_internal_cleared_alloc_zone_stat)
      	(ggc_internal_zone_alloc_stat)
      	(ggc_internal_zone_cleared_alloc_stat)
      	(ggc_internal_zone_vec_alloc_stat)
      	(ggc_alloc_zone_rtx_def_stat)
      	(ggc_alloc_zone_tree_node_stat)
      	(ggc_alloc_zone_cleared_tree_node_stat)
      	(ggc_alloc_cleared_gimple_statement_d_stat): New.
      
      	* ggc-common.c: Include ggc-internal.h.
      	(ggc_internal_cleared_alloc_stat): Rename from
      	ggc_alloc_cleared_stat.
      	(ggc_realloc_stat): Use ggc_internal_alloc_stat.
      	(ggc_calloc): Remove.
      	(ggc_cleared_alloc_htab_ignore_args): New.
      	(ggc_cleared_alloc_ptr_array_two_args): New.
      	(ggc_splay_alloc): Add obj_type parameter.
      	(init_ggc_heuristics): Formatting fixes.
      
      	* ggc-none.c: Update copyright year.
      	(ggc_alloc_stat): Rename to ggc_alloc_stat.
      	(ggc_alloc_cleared_stat): Rename to
      	ggc_internal_cleared_alloc_stat.
      	(struct alloc_zone, rtl_zone, tree_zone, tree_id_zone): New.
      
      	* ggc-page.c: Update copyright year.  Include ggc-internal.h.
      	Remove references to ggc_alloc in comments.
      	(ggc_alloc_typed_stat): Call ggc_internal_alloc_stat.
      	(ggc_alloc_stat): Rename to ggc_internal_alloc_stat.
      	(new_ggc_zone, destroy_ggc_zone): Remove.
      	(struct alloc_zone, rtl_zone, tree_zone, tree_id_zone): New.
      
      	* ggc-zone.c: Include ggc-internal.h.  Remove references to
      	ggc_alloc in comments.
      	(ggc_alloc_zone_stat): ggc_internal_alloc_zone_stat.
      	(ggc_internal_alloc_zone_pass_stat): New.
      	(ggc_internal_cleared_alloc_zone_stat): New.
      	(ggc_alloc_typed_stat): Use ggc_internal_alloc_zone_pass_stat.
      	(ggc_alloc_stat): Rename ggc_internal_alloc_stat.
      	(new_ggc_zone, destroy_ggc_zone): Remove.
      
      	* stringpool.c: Update copyright year.  Include ggc-internal.h
      	(digit_vector): Make static.
      	(digit_string): Moved from ggc.h.
      	(stringpool_ggc_alloc): Use ggc_alloc_atomic.
      	(ggc_alloc_string): Rename to ggc_alloc_string_stat.
      
      	* Makefile.in (GGC_INTERNAL_H): New.
      	(ggc_common.o, ggc-page.o, ggc-zone.o, stringpool.o): Add
      	$(GGC_INTERNAL_H) to dependencies.
      
      	* gentype.c: Update copyright year.
      	(walk_type): Accept variable_size GTY option.
      	(USED_BY_TYPED_GC_P): New macro.
      	(write_enum_defn): Use USED_BY_TYPED_GC_P.  Do not output
      	whitespace at the end of strings.
      	(get_type_specifier, variable_size_p): New functions.
      	(alloc_quantity, alloc_zone): New enums.
      	(write_typed_alloc_def): New function.
      	(write_typed_struct_alloc_def): Likewise.
      	(write_typed_typed_typedef_alloc_def): Likewise.
      	(write_typed_alloc_defns): Likewise.
      	(output_typename, write_splay_tree_allocator_def): Likewise.
      	(write_splay_tree_allocators): Likewise.
      	(main): Call write_typed_alloc_defns and
      	write_splay_tree_allocators.
      
      	* lto-streamer.h (lto_file_decl_data_ptr): New.
      
      	* passes.c (order): Define using cgraph_node_ptr.
      
      	* strinpool.c (struct string_pool_data): Declare nested_ptr using
      	ht_identifier_ptr.
      
      	* gimple.h (union gimple_statement_d): Likewise.
      
      	* rtl.h (struct rtx_def): Likewise.
      	(struct rtvec_def): Likewise.
      
      	* tree.h (union tree_node): Likewise.
      
      	* tree-ssa-operands.h (struct ssa_operand_memory_d): Likewise.
      
      	* cfgloop.c (record_loop_exits): Use htab_create_ggc.
      
      	* tree-scalar-evolution.c (scev_initialize): Likewise.
      
      	* alias.c (record_alias_subset): Update splay_tree_new_ggc call.
      
      	* dwarf2asm.c (dw2_force_const_mem): Likewise.
      
      	* omp-low.c (lower_omp_critical): Likewise.
      
      	* bitmap.h (struct bitmap_head_def): Update comment to not
      	reference ggc_alloc.
      
      	* config/pa/pa.c (get_deferred_label): Use GGC_RESIZEVEC.
      
      	* ira.c (fix_reg_equiv_init): Use GGC_RESIZEVEC.
      
      	* ipa-prop.c (duplicate_ggc_array): Rename to
      	duplicate_ipa_jump_func_array.  Use typed GC allocation.
      	(ipa_edge_duplication_hook): Call duplicate_ipa_jump_func_array.
      
      	* gimple.c (gimple_alloc_stat): Use
      	ggc_alloc_cleared_gimple_statement_d_stat.
      
      	* varasm.c (create_block_symbol): Use ggc_alloc_zone_rtx_def.
      
      	* tree.c (make_node_stat): Use
      	ggc_alloc_zone_cleared_tree_node_stat.
      	(make_tree_vec_stat): Likewise.
      	(build_vl_exp_stat): Likewise.
      	(copy_node_stat): Use ggc_alloc_zone_tree_node_stat.
      	(make_tree_binfo_stat): Likewise.
      	(tree_cons_stat): Likewise.
      
      	* rtl.c (rtx_alloc_stat): Use ggc_alloc_zone_rtx_def_stat.
      	(shallow_copy_rtx_stat): Likewise.
      	(make_node_stat): Likewise.
      
      	* lto-symtab.c: Fix comment.
      
      	* tree-cfg.c (create_bb): Update comment to not reference
      	ggc_alloc_cleared.
      	* tree-ssa-structalias.c (struct heapvar_for_stmt): Fix param_is
      	value.
      
      	* varpool.c (varpool_node): Use typed GC allocation.
      	(varpool_extra_name_alias): Likewise.
      
      	* varasm.c (emutls_decl): Likewise.
      	(get_unnamed_section): Likewise.
      	(get_noswitch_section): Likewise.
      	(get_section): Likewise.
      	(get_block_for_section): Likewise.
      	(build_constant_desc): Likewise.
      	(create_constant_pool): Likewise.
      	(force_const_mem): Likewise.
      
      	* tree.c (build_vl_exp_stat): Likewise.
      	(build_real): Likewise.
      	(build_string): Likewise.
      	(decl_debug_expr_insert): Likewise.
      	(decl_value_expr_insert): Likewise.
      	(type_hash_add): Likewise.
      	(build_omp_clause): Likewise.
      
      	* tree-ssanames.c (duplicate_ssa_name_ptr_info): Likewise.
      
      	* tree-ssa.c (init_tree_ssa): Likewise.
      
      	* tree-ssa-structalias.c (heapvar_insert): Likewise.
      
      	* tree-ssa-operands.c (ssa_operand_alloc): Likewise.
      
      	* tree-ssa-loop-niter.c (record_estimate): Likewise.
      
      	* tree-ssa-alias.c (get_ptr_info): Likewise.
      
      	* tree-scalar-evolution.c (new_scev_info_str): Likewise.
      
      	* tree-phinodes.c (allocate_phi_node): Likewise.
      
      	* tree-iterator.c (tsi_link_before): Likewise.
      	(tsi_link_after): Likewise.
      
      	* tree-eh.c (add_stmt_to_eh_lp_fn): Likewise.
      
      	* tree-dfa.c (create_var_ann): Likewise.
      
      	* tree-cfg.c (create_bb): Likewise.
      
      	* toplev.c (alloc_for_identifier_to_locale): Likewise.
      	(general_init): Likewise.
      
      	* stringpool.c (stringpool_ggc_alloc): Likewise.
      	(gt_pch_save_stringpool): Likewise.
      
      	* sese.c (if_region_set_false_region): Likewise.
      
      	* passes.c (do_per_function_toporder): Likewise.
      
      	* optabs.c (set_optab_libfunc): Likewise.
      	(set_conv_libfunc): Likewise.
      
      	* lto-symtab.c (lto_symtab_register_decl): Likewise.
      
      	* lto-streamer-in.c (lto_input_eh_catch_list): Likewise.
      	(input_eh_region): Likewise.
      	(input_eh_lp): Likewise.
      	(make_new_block): Likewise.
      	(unpack_ts_real_cst_value_fields): Likewise.
      
      	* lto-section-in.c (lto_new_in_decl_state): Likewise.
      
      	* lto-cgraph.c (input_node_opt_summary): Likewise.
      
      	* loop-init.c (loop_optimizer_init): Likewise.
      
      	* lambda.h (lambda_vector_new): Likewise.
      
      	* lambda-code.c (replace_uses_equiv_to_x_with_y): Likewise.
      
      	* ira.c (update_equiv_regs): Likewise.
      
      	* ipa.c (cgraph_node_set_new): Likewise.
      	(cgraph_node_set_add): Likewise.
      	(varpool_node_set_new): Likewise.
      	(varpool_node_set_add): Likewise.
      
      	* ipa-prop.c (ipa_compute_jump_functions_for_edge): Likewise.
      	(duplicate_ipa_jump_func_array): Likewise.
      	(ipa_read_node_info): Likewise.
      
      	* ipa-cp.c (ipcp_create_replace_map): Likewise.
      
      	* integrate.c (get_hard_reg_initial_val): Likewise.
      
      	* gimple.c (gimple_alloc_stat): Likewise.
      	(gimple_build_omp_for): Likewise.
      	(gimple_seq_alloc): Likewise.
      	(gimple_copy): Likewise.
      
      	* gimple-iterator.c (gsi_insert_before_without_update): Likewise.
      	(gsi_insert_after_without_update): Likewise.
      
      	* function.c (add_frame_space): Likewise.
      	(insert_temp_slot_address): Likewise.
      	(assign_stack_temp_for_type): Likewise.
      	(allocate_struct_function): Likewise.
      	(types_used_by_var_decl_insert): Likewise.
      
      	* except.c (init_eh_for_function): Likewise.
      	(gen_eh_region): Likewise.
      	(gen_eh_region_catch): Likewise.
      	(gen_eh_landing_pad): Likewise.
      	(add_call_site): Likewise.
      
      	* emit-rtl.c (get_mem_attrs): Likewise.
      	(get_reg_attrs): Likewise.
      	(start_sequence): Likewise.
      	(init_emit): Likewise.
      
      	* dwarf2out.c (new_cfi): Likewise.
      	(queue_reg_save): Likewise.
      	(dwarf2out_frame_init): Likewise.
      	(new_loc_descr): Likewise.
      	(find_AT_string): Likewise.
      	(new_die): Likewise.
      	(add_var_loc_to_decl): Likewise.
      	(clone_die): Likewise.
      	(clone_as_declaration): Likewise.
      	(break_out_comdat_types): Likewise.
      	(new_loc_list): Likewise.
      	(loc_descriptor): Likewise.
      	(add_loc_descr_to_each): Likewise.
      	(add_const_value_attribute): Likewise.
      	(tree_add_const_value_attribute): Likewise.
      	(add_comp_dir_attribute): Likewise.
      	(add_name_and_src_coords_attributes): Likewise.
      	(lookup_filename): Likewise.
      	(store_vcall_insn): Likewise.
      	(dwarf2out_init): Likewise.
      
      	* dbxout.c (dbxout_init): Likewise.
      
      	* config/xtensa/xtensa.c (xtensa_init_machine_status): Likewise.
      
      	* config/sparc/sparc.c (sparc_init_machine_status): Likewise.
      
      	* config/score/score7.c (score7_output_external): Likewise.
      
      	* config/score/score3.c (score3_output_external): Likewise.
      
      	* config/s390/s390.c (s390_init_machine_status): Likewise.
      
      	* config/rs6000/rs6000.c (builtin_function_type): Likewise.
      	(rs6000_init_machine_status): Likewise.
      	(output_toc): Likewise.
      
      	* config/pa/pa.c (pa_init_machine_status): Likewise.
      	(get_deferred_plabel): Likewise.
      
      	* config/moxie/moxie.c (moxie_init_machine_status): Likewise.
      
      	* config/mmix/mmix.c (mmix_init_machine_status): Likewise.
      
      	* config/mips/mips.c (mflip_mips16_use_mips16_p): Likewise.
      
      	* config/mep/mep.c (mep_init_machine_status): Likewise.
      	(mep_note_pragma_flag): Likewise.
      
      	* config/m32c/m32c.c (m32c_init_machine_status): Likewise.
      
      	* config/iq2000/iq2000.c (iq2000_init_machine_status): Likewise.
      
      	* config/ia64/ia64.c (ia64_init_machine_status): Likewise.
      
      	* config/i386/winnt.c (i386_pe_record_external_function): Likewise.
      	(i386_pe_maybe_record_exported_symbol): Likewise.
      
      	* config/i386/i386.c (get_dllimport_decl): Likewise.
      	(ix86_init_machine_status): Likewise.
      	(assign_386_stack_local): Likewise.
      
      	* config/frv/frv.c (frv_init_machine_status): Likewise.
      
      	* config/darwin.c (machopic_indirection_name): Likewise.
      
      	* config/cris/cris.c (cris_init_machine_status): Likewise.
      
      	* config/bfin/bfin.c (bfin_init_machine_status): Likewise.
      
      	* config/avr/avr.c (avr_init_machine_status): Likewise.
      
      	* config/arm/arm.c (arm_init_machine_status): Likewise.
      
      	* config/alpha/alpha.c (alpha_init_machine_status): Likewise.
      	(alpha_need_linkage): Likewise.
      	(alpha_use_linkage): Likewise.
      
      	* cgraph.c (cgraph_allocate_node): Likewise.
      	(cgraph_create_edge_1): Likewise.
      	(cgraph_create_indirect_edge): Likewise.
      	(cgraph_add_asm_node): Likewise.
      
      	* cfgrtl.c (init_rtl_bb_info): Likewise.
      
      	* cfgloop.c (alloc_loop): Likewise.
      	(rescan_loop_exit): Likewise.
      
      	* cfg.c (init_flow): Likewise.
      	(alloc_block): Likewise.
      	(unchecked_make_edge): Likewise.
      
      	* c-parser.c (c_parse_init): Likewise.
      	(c_parse_file): Likewise.
      
      	* c-decl.c (bind): Likewise.
      	(record_inline_static): Likewise.
      	(push_scope): Likewise.
      	(make_label): Likewise.
      	(lookup_label_for_goto): Likewise.
      	(finish_struct): Likewise.
      	(finish_enum): Likewise.
      	(c_push_function_context): Likewise.
      
      	* bitmap.c (bitmap_element_allocate): Likewise.
      	(bitmap_gc_alloc_stat): Likewise.
      
      	* alias.c (record_alias_subset): Likewise.
      	(init_alias_analysis): Likewise.
      
      include:
      
      2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
      
      	* splay-tree.h: Update copyright years.
      	(splay_tree_s): Document fields.
      	(splay_tree_new_typed_alloc): New.
      
      	* hashtab.h: Update copyright years.
      	(htab_create_typed_alloc): New.
      
      libcpp:
      
      2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
      
      	* include/symtab.h (ht_identifier_ptr): New.
      
      libiberty:
      
      2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
      
      	* splay-tree.c: Update copyright years.
      	(splay_tree_new_typed_alloc): New.
      	(splay_tree_new_with_allocator): Use it.
      
      	* hashtab.c: Update copyright years.
      	(htab_create_typed_alloc): New.
      	(htab_create_alloc): Use it.
      
      	* functions.texi: Regenerate.
      
      From-SVN: r160425
      Laurynas Biveinis committed
  20. 07 Jun, 2010 1 commit
    • cgraph.c (cgraph_edge_cannot_lead_to_return): Also check if caller is noreturn. · f10ea640
      	* cgraph.c (cgraph_edge_cannot_lead_to_return): Also check
      	if caller is noreturn.
      	* ipa-reference.c (analyze_function): Use ipa_ref_cannot_lead_to_return
      	* ipa-ref.h (ipa_ref_cannot_lead_to_return): New function.
      	* ipa-ref.c (ipa_ref_cannot_lead_to_return): New function.
      	* ipa-pure-const.c (check_decl): Add IPA parameter.
      	(state_from_flags): New function.
      	(better_state, worse_state): New functions.
      	(check_call): When in IPA mode, do not care about callees.
      	(check_load, check_store): Update.
      	(check_ipa_load, check_ipa_store): New.
      	(check_stmt): When in IPA mode, use IPA checkers.
      	(analyze_function): Use state_from_flags.
      	(propagate): Check indirect edges and references.
      
      From-SVN: r160380
      Jan Hubicka committed
  21. 30 May, 2010 2 commits
  22. 29 May, 2010 1 commit
    • tree-vrp.c (debug_value_range, [...]): Annotate with DEBUG_FUNCTION. · 24e47c76
      	* tree-vrp.c (debug_value_range, debug_all_value_ranges,
      	debug_asserts_for, debug_all_asserts): Annotate with DEBUG_FUNCTION.
      	* tree-into-ssa.c (debug_decl_set, debug_defs_stack, debug_currdefs,
      	debug_tree_ssa, debug_tree_ssa_stats, debug_def_blocks,
      	debug_names_replaced_by, debug_update_ssa): Likewise.	
      	* sbitmap.c (debug_sbitmap): Likewise.
      	* genrecog.c (debug_decision, debug_decision_list): Likewise.
      	* tree-pretty-print.c (debug_generic_expr, debug_generic_stmt,
      	debug_tree_chain): Likewise.
      	* tree-loop-distribution.c (debug_rdg_partitions): Likewise.
      	* cgraph.c (debug_cgraph_node, debug_cgraph): Likewise.
      	* optabs.c  (debug_optab_libfuncs): Likewise.
      	(verify_loop_closed_ssa): Likewise.
      	* value-prof.c (verify_histograms): Likewise.
      	* reload.c (debug_reload_to_stream, debug_reload): Likewise.
      	* bitmap.c (debug_bitmap_file, debug_bitmap, bitmap_print): Likewise.
      	* cfghooks.c (verify_flow_info): Likewise.
      	* fold-const.c (debug_fold_checksum): Likewise.
      	* omp-low.c (debug_omp_region, debug_all_omp_regions): Likewise.
      	* cfg.c (debug_regset, debug_flow_info, debug_bb, debug_bb_n):
      	Likewise.
      	* omega.c (debug_omega_problem): Likewise.
      	* cgraphunit.c (verify_cgraph_node, verify_cgraph): Likewise.
      	* tree-ssa-ccp.c (debug_lattice_value): Likewise.
      	* dominance.c (verify_dominators, debug_dominance_info,
      	debug_dominance_tree): Likewise.
      	* df-core.c (df_insn_uid_debug, df_insn_debug, df_insn_debug_regno,
      	* df_regno_debug, df_ref_debug,
      	debug_df_insn, debug_df_reg, debug_df_regno, debug_df_ref,
      	debug_df_defno, debug_df_useno, debug_df_chain): Likewise.
      	* tree-ssa-dom.c (debug_dominator_optimization_stats): Likewise.
      	* sel-sched.c (debug_state): Likewise.
      	* tree-ssa-alias.c (debug_alias_info, debug_points_to_info_for): Likewise.
      	* cfganal.c (print_edge_list, verify_edge_list): Likewise.
      	* dwarf2out.c (debug_dwarf_die, debug_dwarf): Likewise.
      	* tree-eh.c (verify_eh_edges, verify_eh_dispatch_edge): Likewise.
      	* gimple-pretty-print.c (debug_gimple_stmt, debug_gimple_seq): Likewise.
      	* c-pretty-print.c (debug_c_tree): Likewise.
      	* sel-sched-dump.c (debug_insn_rtx, debug_vinsn, debug_expr, debug_insn
      	debug_av_set, debug_lv_set, debug_ilist, debug_blist, debug_insn_vector,
      	debug_hard_reg_set, debug_mem_addr_value): Likewise.
      	* ebitmap.c (debug_ebitmap): Likewise.
      	* function.c (debug_find_var_in_block_tree): Likewise.
      	* print-rtl.c (debug_rtx): Likewise.
      	(debug_rtx_count): Likewise.
      	(debug_rtx_list, debug_rtx_range, debug_rtx_find): Likewise.
      	* stor-layout.c (debug_rli): Likewise.
      	* ipa.c (debug_cgraph_node_set, debug_varpool_node_set): Likewise.
      	* tree-data-ref.c (debug_data_references, debug_data_dependence_relations,
      	debug_data_reference, debug_data_dependence_relation, debug_rdg_vertex,
      	debug_rdg_component, debug_rdg): Likewise.
      	* tree-affine.c (debug_aff): Likewise.
      	* tree-dfa.c (debug_referenced_vars, debug_variable, debug_dfa_stats): Likewise.
      	* except.c (debug_eh_tree, verify_eh_tree): Likewise.
      	* emit-rtl.c (verify_rtl_sharing): Likewise.
      	* tree-ssa-pre.c (debug_pre_expr, debug_bitmap_set,
      	debug_value_expressions): Likewise.
      	* tree-ssa-live.c (debug_scope_block, debug_scope_blocks): Likewise.
      	* sese.c (debug_rename_map, debug_ivtype_map): Likewise.
      	* print-tree.c (debug_tree, debug_vec_tree): Likewise.
      	* cfglayout.c (verify_insn_chain): Likewise.
      	* graphite-clast-to-gimple.c (debug_clast_name_indexes,
      	debug_clast_stmt, debug_generated_program): Likewise.
      	* ggc-page.c (debug_print_page_list): Likewise.
      	* tree-ssa-ter.c (debug_ter): Likewise.
      	* graphite-dependences.c (debug_pddr): Likewise.
      	* sched-deps.c (debug_ds): Likewise.
      	* tree-ssa.c (verify_ssa): Likewise.
      	* graphite-poly.c (debug_scattering_function, debug_iteration_domain,
      	debug_scattering_functions, debug_iteration_domains, debug_pdr,
      	debug_pdrs, debug_pbb_domain, debug_pbb, debug_scop_context, debug_scop,
      	debug_cloog, debug_scop_params, debug_lst): Likewise.
      	* tree-inline.c (debug_find_tree): Likewise.
      	* graphite-ppl.c (debug_ppl_linear_expr, debug_ppl_polyhedron_matrix,
      	debug_ppl_powerset_matrix): Likewise.
      	* var-tracking.c (debug_dv): Likewise.
      	* system.h (DEBUG_FUNCTION, DEBUG_VARIABLE): Define.
      	* cfgloop.c (verify_loop_structure): Likewise.
      	* plugin.c (dump_active_plugins, debug_active_plugins): Likewise.
      	* c-common.c (verify_sequence_points): Likewise.
      	* sched-rgn.c (debug_regions, debug_region, debug_candidate,
      	debug_candidates, debug_rgn_dependencies): Likewise.
      	* tree-ssa-structalias.c (debug_constraint, debug_constraints,
      	* debug_constraint_graph, debug_solution_for_var,
      	debug_sa_points_to_info): Likewise.
      	* sched-vis.c (debug_insn_slim, debug_bb_slim, debug_bb_n_slim):
      	Likewie.
      	* tree-cfg.c (debug_cfg_stats, verify_stmts, debug_function,
      	debug_loops, debug_loop, debug_loop_num): Likewise.
      	* passes.c (debug_pass): Likewise.
      	(dump_properties): Likewise; add cfglayout property.
      	(debug_properties): Likewise.
      	* tree-ssa-reassoc.c (debug_ops_vector): Likewise.
      	* varpool.c (debug_varpool): Likewise.
      	* regcprop.c (debug_value_data): Likewise.
      	* tree-ssa-operands.c (verify_imm_links, debug_immediate_uses,
      	debug_immediate_uses_for): Likewise.
      
      From-SVN: r160036
      Jan Hubicka committed
  23. 22 May, 2010 1 commit
    • decl2.c (maybe_emit_vtables): Produce same comdat group when outputting comdat vtables. · 9f90e80a
      	* decl2.c (maybe_emit_vtables): Produce same comdat group when outputting
      	comdat vtables.
      	(cxx_callgraph_analyze_expr): Remove code marking vtables needed.
      
      	* cgraph.h (struct varpool_node): Add same_comdat_group.
      	* lto-cgrpah.c (lto_output_varpool_node): Output same_comdat_group
      	pointer.
      	(output_varpool): Update call of lto_output_varpool_node.
      	(input_varpool): Read same_comdat_group pointer.
      	(input_varpool_1): Fixup same_comdat_group pointer.
      	* ipa.c (cgraph_remove_unreachable_nodes): WHen one of same comdat
      	group is needed, all are.
      	* varpool.c (varpool_remove_node): Remove node from same comdat group
      	linklist too.
      	(varpool_analyze_pending_decls): Walk same comdat groups.
      
      From-SVN: r159699
      Jan Hubicka committed
  24. 16 May, 2010 1 commit
  25. 14 May, 2010 3 commits
  26. 13 May, 2010 1 commit
    • cgraph.c (cgraph_mark_address_taken_node): No longer imply needed flag. · bd3cdcc0
      	* cgraph.c (cgraph_mark_address_taken_node): No longer imply needed flag.
      	* cgraph.h (cgraph_only_called_directly_p,
      	cgraph_can_remove_if_no_direct_calls_p): test address_taken flag.
      	(cgraph_can_remove_if_no_direct_calls_and_refs_p): New function.
      	* cgraphunit.c (cgraph_mark_functions_to_output): Test address_taken.
      	(assemble
      	* ipa.c (cgraph_remove_unreachable_nodes): Use
      	cgraph_can_remove_if_no_direct_calls_and_refs_p; clear address_taken flags.
      	* tree-inline.c (copy_bb): Check address_taken flag.
      	* tree-profile.c (tree_gen_ic_func_profiler): Check address_taken and
      	externally_visible flag.
      
      	* tree-ssa/unreachable.c: New test.
      
      From-SVN: r159354
      Jan Hubicka committed
  27. 12 May, 2010 1 commit
    • cgraph.h (struct varpool_node): Add aux. · b34fd25c
      	* cgraph.h (struct varpool_node): Add aux.
      	* varasm.c (find_decl_and_mark_needed): Force output of varpool nodes.
      	* varpool.c (varpool_remove_node): Do not remove initializer.
      	(varpool_reset_queue): Export.
      	(varpool_finalize_decl): Volatile vars are forced to be output.
      	* lto-symtab.c (lto_varpool_replace_node): Clear out initializer of
      	replaced decl.
      	* ipa.c (enqueue_cgraph_node, enqueue_varpool_node,
      	process_references, varpool_can_remove_if_no_refs): New functions.
      	(cgraph_remove_unreachable_nodes): Handle variables too.
      
      From-SVN: r159321
      Jan Hubicka committed
  28. 29 Apr, 2010 2 commits
    • gengtype.c (open_base_files): Add lto-streamer.h · 49ba8180
      	* gengtype.c (open_base_files): Add lto-streamer.h
      	* cgraph.h (cgraph_local_info): lto_file_data is now in GGC.
      	(pass_ipa_cp): GGC collect.
      	* toplev. (compile_file): Do not output symbols.
      	* ipa-inline.c (pass_ipa_inline): Add ggc collect.
      	* timevar.def (TV_VARPOOL, TV_IPA_LTO_DECL_INIT_IO,
      	TV_IPA_LTO_DECL_MERGE, TV_IPA_LTO_CGRAPH_MERGE, TV_VAROUT): New.
      	* lto-section-in.c: Include ggc.h
      	(lto_new_in_decl_state): Alloc in GGC.
      	(lto_delete_in_decl_state): Likewise.
      	* ipa.c (pass_ipa_function_visibility, pass_ipa_whole_program): Collect.
      
      	* lto/lto.c (lto_read_in_decl_state): Use GGC.
      	(lto_wpa_write_files): Announce what we are writting.
      	(all_file_decl_data): New.
      	(read_cgraph_and_symbols): Use GGC; correct timevars.
      	(do_whole_program_analysis): Collect.
      	* lto/Make-lang.in (lto.o): Fix dependency.
      	* Makefile.in (GTFILES): Add lto-streamer.h.
      	* varpool.c (varpool_analyze_pending_decls): Use TV_VARPOOL.
      	(varpool_assemble_pending_decls): Use VAROUT.
      	* lto-streamer.h (lto_tree_ref_table): Annotate.
      	(lto_in_decl_state): Annotate.
      	(lto_file_decl_data): Annotate.
      
      From-SVN: r158912
      Jan Hubicka committed
    • * lto-symtab.c (lto_symtab_entry_def) Add vnode. · 2942c502
      	(lto_varpool_replace_node): New.
      	(lto_symtab_resolve_symbols): Resolve varpool nodes.
      	(lto_symtab_merge_decls_1): Prefer decls with varpool node.
      	(lto_symtab_merge_cgraph_nodes_1): Merge varpools.
      	* cgraph.h (varpool_node_ptr): New type.
      	(varpool_node_ptr): New vector.
      	(varpool_node_set_def): New structure.
      	(varpool_node_set): New type.
      	(varpool_node_set): New vector.
      	(varpool_node_set_element_def): New structure.
      	(varpool_node_set_element, const_varpool_node_set_element): New types.
      	(varpool_node_set_iterator): New type.
      	(varpool_node): Add prev pointers, add used_from_other_partition,
      	in_other_partition.
      	(varpool_node_set_new, varpool_node_set_find, varpool_node_set_add,
      	varpool_node_set_remove, dump_varpool_node_set, debug_varpool_node_set,
      	varpool_get_node, varpool_remove_node): Declare.
      	(vsi_end_p, vsi_next, vsi_node, vsi_start, varpool_node_in_set_p,
      	varpool_node_set_size): New inlines.
      	* cgraph.c (dump_cgraph_node): Dump asm names of aliases.
      	* tree-pass.h (varpool_node_set_def): Forward declare.
      	(ipa_opt_pass_d): Summary writting takes vnode sets too.
      	(ipa_write_optimization_summaries): Update prototype.
      	* ipa-cp.c (ipcp_write_summary): Update.
      	* ipa-reference.c (ipa_reference_write_summary): Update.
      	* lto-cgraph.c (lto_output_varpool_node): New static function.
      	(output_varpool): New function.
      	(input_varpool_node): New static function.
      	(input_varpool_1): New function.
      	(input_cgraph): Input varpool.
      	* ipa-pure-const.c (pure_const_write_summary): Update.
      	* lto-streamer-out.c (lto_output): Update, output varpool too.
      	(write_global_stream): Kill WPA hack.
      	(produce_asm_for_decls): Update.
      	(output_alias_pair_p): Handle variables.
      	(output_unreferenced_globals): Output only needed partition of varpool.
      	* ipa-inline.c (inline_write_summary): Update.
      	* lto-streamer-in.c (lto_input_tree_ref, lto_input_tree): Do not build cgraph.
      	* lto-section-in.c (lto_section_name): Add varpool and jump funcs.
      	* ipa.c (hash_varpool_node_set_element, eq_varpool_node_set_element,
      	varpool_node_set_new, varpool_node_set_add,
      	varpool_node_set_remove, varpool_node_set_find, dump_varpool_node_set,
      	debug_varpool_node_set): New functions.
      	* passes.c (rest_of_decl_compilation): when in LTO do not finalize.
      	(execute_one_pass): Process new decls too.
      	(ipa_write_summaries_2): Pass around vsets.
      	(ipa_write_summaries_1): Likewise.
      	(ipa_write_summaries): Build vset; be more selective about cgraph nodes
      	to add.
      	(ipa_write_optimization_summaries_1): Pass around vsets.
      	(ipa_write_optimization_summaries): Likewise.
      	* varpool.c (varpool_get_node): New.
      	(varpool_node): Update doubly linked lists.
      	(varpool_remove_node): New.
      	(dump_varpool_node): More dumping.
      	(varpool_enqueue_needed_node): Update doubly linked lists.
      	(decide_is_variable_needed): Kill ltrans hack.
      	(varpool_finalize_decl): Kill lto hack.
      	(varpool_assemble_decl): Skip decls in other partitions.
      	(varpool_assemble_pending_decls): Update doubly linkes lists.
      	(varpool_empty_needed_queue): Likewise.
      	(varpool_extra_name_alias): Likewise.
      	* lto-streamer.c (lto_get_section_name): Add vars section.
      	* lto-streamer.h (lto_section_type): Update.
      	(output_varpool, input_varpool): Declare.
      
      	* lto.c (lto_varpool_node_sets): New.
      	(lto_1_to_1_map): Partition varpool too.
      	(globalize_context_t, globalize_cross_file_statics,
      	lto_scan_statics_in_ref_table, lto_scan_statics_in_cgraph_node,
      	lto_scan_statics_in_remaining_global_vars): Remove.
      	(lto_promote_cross_file_statics): Rewrite.
      	(get_filename_for_set): Take vset argument.
      	(lto_wpa_write_files): Pass around vsets.
      
      From-SVN: r158854
      Jan Hubicka committed
  29. 27 Apr, 2010 2 commits
    • invoke.texi (-fipa-profile): Document. · e65bb9be
      	* doc/invoke.texi (-fipa-profile): Document.
      	* opts.c (decode_options): Enable ipa-profile at -O1.
      	* timevar.def (TV_IPA_PROFILE): Define.
      	* common.opt (fipa-profile): Add.
      	* cgraph.c (cgraph_clone_node): Set local flag and clear vtable method flag
      	for clones.
      	(cgraph_propagate_frequency): Handle only local ones.
      	* tree-pass.h (pass_ipa_profile): Declare.
      	* ipa-profile.c (gate_profile): Use flag_ipa_profile.
      	(pass_ipa_profile): Use TV_IPA_PROFILE.
      	* ipa.c (ipa_profile): New function.
      	(gate_ipa_profile): Likewise.
      	(pass_ipa_profile): New global variable.
      	* passes.c (pass_ipa_profile): New.
      
      From-SVN: r158788
      Jan Hubicka committed
    • re PR middle-end/43812 (compiling .cc file with -fwhole-program results in ICE,… · 78eaf7bf
      re PR middle-end/43812 (compiling .cc file with -fwhole-program results in ICE, in ipcp_iterate_stage, at ipa-cp.c:760)
      
      2010-04-27  Martin Jambor  <mjambor@suse.cz>
      
      	PR middle-end/43812
      	* ipa.c (dissolve_same_comdat_group_list): New function.
      	(function_and_variable_visibility): Call
      	dissolve_same_comdat_group_list when comdat group contains external or
      	newly local nodes.
      	* cgraphunit.c (verify_cgraph_node): Verify that same_comdat_group
      	lists are circular and that they contain only DECL_ONE_ONLY nodes.
      
      	* testsuite/g++.dg/ipa/pr43812.C: New test.
      
      From-SVN: r158777
      Martin Jambor committed
  30. 21 Apr, 2010 1 commit
    • tree-pass.h (ipa_opt_pass_d): Rename function_read_summary... · e792884f
      	* tree-pass.h (ipa_opt_pass_d): Rename function_read_summary;
      	add write_optimization_summary, read_optimization_summary.
      	(ipa_write_summaries_of_cgraph_node_set): Remove.
      	(ipa_write_optimization_summaries): Declare.
      	(ipa_read_optimization_summaries): Declare.
      	* ipa-cp.c (pass_ipa_cp): Update.
      	* ipa-reference.c (pass_ipa_reference): Update.
      	* ipa-pure-const.c (pass_ipa_pure_const): Update.
      	* lto-streamer-out.c (pass_ipa_lto_gimple, pass_ipa_lto_finish):
      	Update.
      	* ipa-inline.c (pass_ipa_inline): Update.
      	* ipa.c (pass_ipa_whole_program): Update.
      	* lto-wpa-fixup.c (pass_ipa_lto_wpa_fixup): Update.
      	* passes.c (ipa_write_summaries_1): Do not test wpa.
      	(ipa_write_optimization_summaries_1): New.
      	(ipa_write_optimization_summaries): New.
      	(ipa_read_summaries): Do not test ltrans.
      	(ipa_read_optimization_summaries_1): New.
      	(ipa_read_optimization_summaries): New.
      
      	* lto.c (lto_wpa_write_files): Update.
      	(read_cgraph_and_symbols): Be more verbose.
      	(materialize_cgraph): Likewise.
      	(do_whole_program_analysis): Likewise.
      
      From-SVN: r158616
      Jan Hubicka committed