1. 17 May, 2013 1 commit
  2. 16 May, 2013 1 commit
  3. 15 May, 2013 2 commits
    • ipa-prop.c (ipa_print_node_jump_functions): Print symbol order in header... · 9de04252
      2013-05-15  Martin Jambor  <mjambor@suse.cz>
      
      	* ipa-prop.c (ipa_print_node_jump_functions): Print symbol order in
      	header, print symbol order instead of node uid, print more information
      	about indirect edge targets.
      	(ipa_make_edge_direct_to_target): Print symbol order instead of node
      	uids.
      	(ipa_make_edge_direct_to_target): Likewise.
      	(remove_described_reference): Likewise.
      	(propagate_controlled_uses): Likewise.
      	(ipa_print_node_params): Also print symbol order.
      	(ipcp_transform_function): Print symbol order instead of node uids.
      	* cgraph.c (cgraph_redirect_edge_call_stmt_to_callee): Likewise.
      	(cgraph_get_create_real_symbol_node): Likewise.
      	* ipa-cp.c (print_lattice): Likewise.
      	(print_all_lattices): Likewise.
      	(determine_versionability): Likewise.
      	(initialize_node_lattices): Likewise.
      	(estimate_local_effects): Likewise.
      	(update_profiling_info): Likewise.
      	(create_specialized_node): Likewise.
      	(perhaps_add_new_callers): Likewise.
      	(decide_about_value): Likewise.
      	(decide_whether_version_node): Likewise.
      	(identify_dead_nodes): Likewise.
      	* ipa-inline-analysis.c (dump_inline_edge_summary): Likewise.
      	(dump_inline_summary): Likewise.
      	(estimate_node_size_and_time): Likewise.
      	(inline_analyze_function): Likewise.
      	* ipa-inline.c (report_inline_failed_reason): Likewise.
      	(want_early_inline_function_p): Likewise.
      	(edge_badness): Likewise.
      	(update_edge_key): Likewise.
      	(inline_small_functions): Likewise.  Add dumping of order to two other
      	dumps.
      	* ipa-pure-const.c (pure_const_read_summary): Print symbol order
      	instead of node uids.
      	(propagate_pure_const): Likewise.
      	(propagate_pure_const): Likewise.
      	* ipa-utils.c (dump_cgraph_node_set): Likewise.
      	* lto-cgraph.c (input_node): Explicitly specify we dump uid.
      	* lto-symtab.c (lto_cgraph_replace_node): Print symbol order instead
      	of node uids.
      	* tree-pretty-print.c (dump_function_header): Likewise.
      	* tree-sra.c (convert_callers_for_node): Dump in traditional format.
      	Print symbol order instead of node uids.
      
      lto/
      	* lto-partition.c (lto_balanced_map): Print symbol order instead
      	of node uids.
      
      From-SVN: r198925
      Martin Jambor committed
    • re PR c++/57038 (Latest libreoffice compilation fails with enabled LTO) · 2d6e4603
      	PR lto/57038
      	PR lto/47375
      	* lto-symtab.c (lto_symtab_symbol_p): Add external symbol; weakrefs are
      	not external.
      	(lto_symtab_merge_decls): Fix thinko when dealing with non-lto_symtab decls.
      	(lto_symtab_merge_cgraph_nodes): Use lto_symtab_symbol_p.
      	(lto_symtab_prevailing_decl): Get int sync with lto_symtab_symbol_p.
      	* varpool.c (dump_varpool_node): Dump more flags.
      
      	* lto-partition.c (get_symbol_class): Fix weakrefs.
      	(lto_balanced_map): Fix weakrefs.
      	(privatize_symbol_name): Remove unnecesary label.
      	(rename_statics): Handle weakrefs as statics.
      
      	* gcc.dg/lto/attr-weakref-1_0.c: New testcase.
      	* gcc.dg/lto/attr-weakref-1_1.c: New testcase.
      	* gcc.dg/lto/attr-weakref-1_2.c: New testcase.
      
      From-SVN: r198917
      Jan Hubicka committed
  4. 09 May, 2013 1 commit
    • Jan Hubicka <jh@suse.cz> · 64cfa6c0
      	Richard Biener  <rguenther@suse.de>
      
      	PR lto/54095
      	* symtab.c (symtab_make_decl_local): Do not add private names.
      
      	* lto.c (lto_register_var_decl_in_symtab): Don't do renaming.
      	(lto_register_var_decl_in_symtab): Likewise.
      	(lto_main): Promote statics.
      	* lto-partition.c (privatize_symbol_name): New function.
      	(promote_symbol): Use it.
      	(may_need_named_section_p): New predicate.
      	(rename_statics): New functions.
      	(lto_promote_cross_file_statics): Simplify; do renaming.
      	(lto_promote_statics_nonwpa): New function.
      	* lto-partition.h (lto_promote_statics_nonwpa): New function.
      
      Co-Authored-By: Richard Biener <rguenther@suse.de>
      
      From-SVN: r198741
      Jan Hubicka committed
  5. 23 Apr, 2013 3 commits
    • Fix lto report names · 53669259
      Some of the hash tables in lto-report are misnamed in the report.
      Fix this up.
      
      gcc/:
      
      2013-04-22  Andi Kleen  <ak@linux.intel.com>
      
      	* lto/lto.c (print_lto_report_1): Fix LTO report names.
      
      From-SVN: r198174
      Andi Kleen committed
    • Print lto report at the right place · 1a0ad150
      The LTO report is currently printed when the type merging hash tables
      are already destroyed, which makes them always show up as empty.
      Print it earlier. Right now it's printed twice.
      
      gcc/:
      
      2013-04-22  Andi Kleen  <ak@linux.intel.com>
      
      	* lto/lto.c (print_lto_report_1): Declare early.
      	(read_cgraph_and_symbols): Call print_lto_report_1 early.
      
      From-SVN: r198173
      Andi Kleen committed
    • Add -flto-report-wpa · 057f8f20
      -flto-report is useful, but it prints for every LTRANS pass and
      is very noisy and the main problem is often in WPA only.
      
      Add a new -flto-report-wpa option that is only printed for WPA.
      
      gcc/:
      
      2013-04-22  Andi Kleen  <ak@linux.intel.com>
      
      	* common.opt (-flto-report-wpa): Add.
      	* doc/invoke.texi (-flto-report-wpa): Add.
      	* lto/lto.c (do_whole_program_analysis): Check for lto-report-wpa.
      	(lto_main): dito.
      
      From-SVN: r198172
      Andi Kleen committed
  6. 08 Feb, 2013 1 commit
    • re PR middle-end/56231 (warning traces have bogus line information when using LTO) · e45cde98
      2013-02-08  Richard Biener  <rguenther@suse.de>
      
      	PR lto/56231
      	* lto-streamer.h (struct data_in): Remove current_file, current_line
      	and current_col members.
      	* lto-streamer-out.c (lto_output_location): Stream changed bits
      	en-block for efficiency.
      	* lto-streamer-in.c (clear_line_info): Remove.
      	(lto_input_location): Cache current file, line and column
      	globally via local statics.  Read changed bits en-block.
      	(input_function): Do not call clear_line_info.
      	(lto_read_body): Likewise.
      	(lto_input_toplevel_asms): Likewise.
      
      	lto/
      	* lto-lang.c (lto_init): Do not enter a dummy file.
      
      From-SVN: r195884
      Richard Biener committed
  7. 07 Feb, 2013 1 commit
  8. 04 Feb, 2013 1 commit
    • re PR lto/56168 (GCC seems to disregard -fno-builtin when compiling with LTO) · ed73881e
      2013-02-04  Richard Guenther  <rguenther@suse.de>
      
      	PR lto/56168
      	* lto-symtab.c (lto_symtab_merge_decls_1): Make non-builtin
      	node prevail as last resort.
      	(lto_symtab_merge_decls): Remove guard on LTRANS here.
      	(lto_symtab_prevailing_decl): Builtins are their own prevailing
      	decl.
      
      	lto/
      	* lto.c (read_cgraph_and_symbols): Do not call lto_symtab_merge_decls
      	or lto_fixup_decls at LTRANS time.
      
      	* gcc.dg/lto/pr56168_0.c: New testcase.
      	* gcc.dg/lto/pr56168_1.c: Likewise.
      
      From-SVN: r195709
      Richard Guenther committed
  9. 10 Jan, 2013 1 commit
  10. 09 Jan, 2013 1 commit
  11. 04 Jan, 2013 1 commit
  12. 03 Jan, 2013 1 commit
  13. 10 Dec, 2012 1 commit
  14. 20 Nov, 2012 1 commit
    • Introduce vNULL to use as a nil initializer for vec<>. · 6e1aa848
      This patch implements Jakub's idea of adding an empty struct with
      a typecast operator that returns nil vectors.  This is useful to
      shorten all the initializers when declaring vec instances or passing
      nil vectors as function arguments.
      
      2012-11-20  Diego Novillo  <dnovillo@google.com>
      	    Jakub Jelinek  <jakub@redhat.com>
      
      ChangeLog
      	* vec.h (struct vnull): Declare.
      	(vNULL): Declare.
      	* vec.c (vNULL): Define.
      	* bb-reorder.c: Replace all vec<T, A>() initializers with vNULL.
      	* cfgexpand.c: Likewise.
      	* cfgloop.c: Likewise.
      	* cfgloopanal.c: Likewise.
      	* cfgloopmanip.c: Likewise.
      	* cgraph.c: Likewise.
      	* config/c6x/c6x.c: Likewise.
      	* config/i386/i386.c: Likewise.
      	* df-core.c: Likewise.
      	* dominance.c: Likewise.
      	* dwarf2out.c: Likewise.
      	* except.c: Likewise.
      	* function.c: Likewise.
      	* gcse.c: Likewise.
      	* genautomata.c: Likewise.
      	* graphds.c: Likewise.
      	* graphite-scop-detection.c: Likewise.
      	* graphite.c: Likewise.
      	* haifa-sched.c: Likewise.
      	* ifcvt.c: Likewise.
      	* ipa-cp.c: Likewise.
      	* ipa-inline-analysis.c: Likewise.
      	* ipa-inline-transform.c: Likewise.
      	* ipa-inline.c: Likewise.
      	* ipa-prop.c: Likewise.
      	* ipa-split.c: Likewise.
      	* ipa-utils.c: Likewise.
      	* ira-build.c: Likewise.
      	* lto-cgraph.c: Likewise.
      	* lto-streamer-in.c: Likewise.
      	* lto-symtab.c: Likewise.
      	* opts-global.c: Likewise.
      	* passes.c: Likewise.
      	* ree.c: Likewise.
      	* sched-deps.c: Likewise.
      	* sel-sched-ir.c: Likewise.
      	* sel-sched-ir.h: Likewise.
      	* sel-sched.c: Likewise.
      	* stor-layout.c: Likewise.
      	* trans-mem.c: Likewise.
      	* tree-call-cdce.c: Likewise.
      	* tree-cfg.c: Likewise.
      	* tree-data-ref.c: Likewise.
      	* tree-diagnostic.c: Likewise.
      	* tree-eh.c: Likewise.
      	* tree-loop-distribution.c: Likewise.
      	* tree-predcom.c: Likewise.
      	* tree-ssa-loop-im.c: Likewise.
      	* tree-ssa-loop-ivcanon.c: Likewise.
      	* tree-ssa-loop-manip.c: Likewise.
      	* tree-ssa-loop-niter.c: Likewise.
      	* tree-ssa-loop-prefetch.c: Likewise.
      	* tree-ssa-math-opts.c: Likewise.
      	* tree-ssa-phiopt.c: Likewise.
      	* tree-ssa-pre.c: Likewise.
      	* tree-ssa-propagate.c: Likewise.
      	* tree-ssa-reassoc.c: Likewise.
      	* tree-ssa-sccvn.c: Likewise.
      	* tree-ssa-structalias.c: Likewise.
      	* tree-ssa-threadedge.c: Likewise.
      	* tree-ssa-uninit.c: Likewise.
      	* tree-stdarg.c: Likewise.
      	* tree-switch-conversion.c: Likewise.
      	* tree-vect-data-refs.c: Likewise.
      	* tree-vect-loop.c: Likewise.
      	* tree-vect-slp.c: Likewise.
      	* tree-vect-stmts.c: Likewise.
      	* value-prof.c: Likewise.
      	* varasm.c: Likewise.
      
      ada/ChangeLog
      	* gcc-interface/decl.c: Replace all vec<T,A>()
      	initializers with vNULL.
      
      cp/ChangeLog
      	* name-lookup.c: Replace all vec<T, A>() initializers
      	with vNULL.
      	* semantics.c: Likewise.
      
      fortran/ChangeLog
      	* trans-openmp.c: Replace all vec<T, A>() initializers
      	with vNULL.
      
      lto/ChangeLog
      	* lto.c: Replace all vec<T, A>() initializers with vNULL.
      
      objc/ChangeLog
      	* objc-act.c: Replace all vec<T, A>() initializers with vNULL.
      
      Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
      
      From-SVN: r193677
      Diego Novillo committed
  15. 18 Nov, 2012 1 commit
    • This patch rewrites the old VEC macro-based interface into a new one based on… · 9771b263
      This patch rewrites the old VEC macro-based interface into a new one based on the template class 'vec'.
      
      This patch rewrites the old VEC macro-based interface into a new one
      based on the template class 'vec'.  The user-visible changes are
      described in http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec.
      
      I have tested the patch pretty extensively:
      
      - Regular bootstraps on x86_64, ppc, ia64, sparc and hppa.
      - Bootstraps with --enable-checking=release
      - Bootstraps with --enable-checking=gc,gcac
      - Basic builds on all targets (using contrib/config-list.mk).
      
      We no longer access the vectors via VEC_* macros.  The pattern is
      "VEC_operation (T, A, V, args)" becomes "V.operation (args)".
      
      The only thing I could not do is create proper ctors and dtors for the
      vec class.  Since these vectors are stored in unions, we
      have to keep them as PODs (C++03 does not allow non-PODs in unions).
      
      This means that creation and destruction must be explicit.  There is a
      new method vec<type, allocation, layout>::create() and another vec<type,
      allocation, layout>::destroy() to allocate the internal vector.
      
      For vectors that must be pointers, there is a family of free functions
      that implement the operations that need to tolerate NULL vectors.
      These functions all start with the prefix 'vec_safe_'.  See the wiki
      page for details.
      
      The gengtype change removes the special handling for VEC() that used
      to exist in gengtype. Additionally, it allows gengtype to recognize
      templates of more than one argument and introduces the concept of an
      undefined type (useful for template arguments that may or may not be
      types).
      
      When a TYPE_UNDEFINED is reached, gengtype will ignore it if it
      happens inside a type marked with GTY((user)).  Otherwise, it will
      emit an error.
      
      Finally, gengtype rejects root types marked GTY((user)) that are not
      first class pointers.
      
      2012-11-16  Diego Novillo  <dnovillo@google.com>
      
      	VEC API overhaul (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
      
      	* vec.c (register_overhead): Convert it into
      	member function of vec_prefix.
      	(release_overhead): Likewise.
      	(calculate_allocation): Likewise.
      	(vec_heap_free): Remove.
      	(vec_gc_o_reserve_1): Remove.
      	(vec_heap_o_reserve_1): Remove.
      	(vec_stack_o_reserve_1): Remove.
      	(vec_stack_o_reserve_exact): Remove.
      	(register_stack_vec): New.
      	(stack_vec_register_index): New.
      	(unregister_stack_vec): New.
      	(vec_assert_fail): Remove.
      	* vec.h: Conditionally include ggc.h.  Document conditional
      	hackery.
      	Update top-level documentation.
      	(ALONE_VEC_CHECK_INFO): Remove.
      	(VEC_CHECK_INFO): Remove.
      	(ALONE_VEC_CHECK_DECL): Remove.
      	(VEC_CHECK_DECL): Remove.
      	(ALONE_VEC_CHECK_PASS): Remove.
      	(VEC_CHECK_PASS): Remove.
      	(VEC_ASSERT): Remove.
      	(vec_prefix): Add friends va_gc, va_gc_atomic, va_heap and
      	va_stack.
      	Mark fields alloc_ and num_ as protected.
      	(struct vec_t): Remove.  Remove all function members.
      	(struct vl_embed): Declare.
      	(struct vl_ptr): Declare.
      	(free): Remove.
      	(reserve_exact): Remove.
      	(reserve): Remove.
      	(safe_splice): Remove.
      	(safe_push): Remove.
      	(safe_grow): Remove.
      	(safe_grow_cleared): Remove.
      	(safe_insert): Remove.
      	(DEF_VEC_I): Remove.
      	(DEF_VEC_ALLOC_I): Remove.
      	(DEF_VEC_P): Remove.
      	(DEF_VEC_ALLOC_P): Remove.
      	(DEF_VEC_O): Remove.
      	(DEF_VEC_ALLOC_O): Remove.
      	(DEF_VEC_ALLOC_P_STACK): Remove.
      	(DEF_VEC_ALLOC_O_STACK): Remove.
      	(DEF_VEC_ALLOC_I_STACK): Remove.
      	(DEF_VEC_A): Remove.
      	(DEF_VEC_ALLOC_A): Remove.
      	(vec_stack_p_reserve_exact_1): Remove.
      	(vec_stack_o_reserve): Remove.
      	(vec_stack_o_reserve_exact): Remove.
      	(VEC_length): Remove.
      	(VEC_empty): Remove.
      	(VEC_address): Remove.
      	(vec_address): Remove.
      	(VEC_last): Remove.
      	(VEC_index): Remove.
      	(VEC_iterate): Remove.
      	(VEC_embedded_size): Remove.
      	(VEC_embedded_init): Remove.
      	(VEC_free): Remove.
      	(VEC_copy): Remove.
      	(VEC_space): Remove.
      	(VEC_reserve): Remove.
      	(VEC_reserve_exact): Remove.
      	(VEC_splice): Remove.
      	(VEC_safe_splice): Remove.
      	(VEC_quick_push): Remove.
      	(VEC_safe_push): Remove.
      	(VEC_pop): Remove.
      	(VEC_truncate): Remove.
      	(VEC_safe_grow): Remove.
      	(VEC_replace): Remove.
      	(VEC_quick_insert): Remove.
      	(VEC_safe_insert): Remove.
      	(VEC_ordered_remove): Remove.
      	(VEC_unordered_remove): Remove.
      	(VEC_block_remove): Remove.
      	(VEC_lower_bound): Remove.
      	(VEC_alloc): Remove.
      	(VEC_qsort): Remove.
      
      	(va_heap): Declare.
      	(va_heap::default_layout): New typedef to vl_ptr.
      	(va_heap::reserve): New.
      	(va_heap::release): New.
      	(va_gc): Declare.
      	(va_gc::default_layout): New typedef to vl_embed.
      	(va_gc::reserve): New.
      	(va_gc::release): New.
      	(va_gc_atomic): Declare.  Inherit from va_gc.
      	(va_stack): Declare.
      	(va_stack::default_layout): New typedef to vl_ptr.
      	(va_stack::alloc): New.
      	(va_stack::reserve): New.
      	(va_stack::release): New.
      	(register_stack_vec): Declare.
      	(stack_vec_register_index): Declare.
      	(unregister_stack_vec): Declare.
      
      	(vec<T, A = va_heap, L = typename A::default_layout>): Declare
      	empty vec template.
      	(vec<T, A, vl_embed>): Partial specialization for embedded
      	layout.
      	(vec<T, A, vl_embed>::allocated): New.
      	(vec<T, A, vl_embed>::length): New.
      	(vec<T, A, vl_embed>::is_empty): New.
      	(vec<T, A, vl_embed>::address): New.
      	(vec<T, A, vl_embed>::operator[]): New.
      	(vec<T, A, vl_embed>::last New.
      	(vec<T, A, vl_embed>::space): New.
      	(vec<T, A, vl_embed>::iterate): New.
      	(vec<T, A, vl_embed>::iterate): New.
      	(vec<T, A, vl_embed>::copy): New.
      	(vec<T, A, vl_embed>::splice): New.
      	(vec<T, A, vl_embed>::quick_push New.
      	(vec<T, A, vl_embed>::pop New.
      	(vec<T, A, vl_embed>::truncate): New.
      	(vec<T, A, vl_embed>::quick_insert): New.
      	(vec<T, A, vl_embed>::ordered_remove): New.
      	(vec<T, A, vl_embed>::unordered_remove): New.
      	(vec<T, A, vl_embed>::block_remove): New.
      	(vec<T, A, vl_embed>::qsort): New.
      	(vec<T, A, vl_embed>::lower_bound): New.
      	(vec<T, A, vl_embed>::embedded_size): New.
      	(vec<T, A, vl_embed>::embedded_init): New.
      	(vec<T, A, vl_embed>::quick_grow): New.
      	(vec<T, A, vl_embed>::quick_grow_cleared): New.
      	(vec_safe_space): New.
      	(vec_safe_length): New.
      	(vec_safe_address): New.
      	(vec_safe_is_empty): New.
      	(vec_safe_reserve): New.
      	(vec_safe_reserve_exact): New.
      	(vec_alloc): New.
      	(vec_free): New.
      	(vec_safe_grow): New.
      	(vec_safe_grow_cleared): New.
      	(vec_safe_iterate): New.
      	(vec_safe_push): New.
      	(vec_safe_insert): New.
      	(vec_safe_truncate): New.
      	(vec_safe_copy): New.
      	(vec_safe_splice): New.
      
      	(vec<T, A, vl_ptr>): New partial specialization for the space
      	efficient layout.
      	(vec<T, A, vl_ptr>::exists): New.
      	(vec<T, A, vl_ptr>::is_empty): New.
      	(vec<T, A, vl_ptr>::length): New.
      	(vec<T, A, vl_ptr>::address): New.
      	(vec<T, A, vl_ptr>::operator[]): New.
      	(vec<T, A, vl_ptr>::operator!=): New.
      	(vec<T, A, vl_ptr>::operator==): New.
      	(vec<T, A, vl_ptr>::last): New.
      	(vec<T, A, vl_ptr>::space): New.
      	(vec<T, A, vl_ptr>::iterate): New.
      	(vec<T, A, vl_ptr>::copy): New.
      	(vec<T, A, vl_ptr>::reserve): New.
      	(vec<T, A, vl_ptr>::reserve_exact): New.
      	(vec<T, A, vl_ptr>::splice): New.
      	(vec<T, A, vl_ptr>::safe_splice): New.
      	(vec<T, A, vl_ptr>::quick_push): New.
      	(vec<T, A, vl_ptr>::safe_push): New.
      	(vec<T, A, vl_ptr>::pop): New.
      	(vec<T, A, vl_ptr>::truncate): New.
      	(vec<T, A, vl_ptr>::safe_grow): New.
      	(vec<T, A, vl_ptr>::safe_grow_cleared): New.
      	(vec<T, A, vl_ptr>::quick_grow): New.
      	(vec<T, A, vl_ptr>::quick_grow_cleared): New.
      	(vec<T, A, vl_ptr>::quick_insert): New.
      	(vec<T, A, vl_ptr>::safe_insert): New.
      	(vec<T, A, vl_ptr>::ordered_remove): New.
      	(vec<T, A, vl_ptr>::unordered_remove): New.
      	(vec<T, A, vl_ptr>::block_remove): New.
      	(vec<T, A, vl_ptr>::qsort): New.
      	(vec<T, A, vl_ptr>::lower_bound): New.
      	(vec_stack_alloc): Define.
      	(FOR_EACH_VEC_SAFE_ELT): Define.
      	* vecir.h: Remove.  Update all users.
      	* vecprim.h: Remove.  Update all users.
      	Move uchar to coretypes.h.
      
      	* Makefile.in (VEC_H): Add $(GGC_H).
      	Remove vecir.h and vecprim.h dependencies everywhere.
      
      2012-11-16  Diego Novillo  <dnovillo@google.com>
      
      	* gengtype-lex.l (VEC): Remove.
      	Add characters in the set [\!\>\.-].
      	* gengtype-parse.c (token_names): Remove "VEC".
      	(require_template_declaration): Remove handling of VEC_TOKEN.
      	(type): Likewise.
      	Call create_user_defined_type when parsing GTY((user)).
      	* gengtype-state.c (type_lineloc): handle TYPE_UNDEFINED.
      	(write_state_undefined_type): New.
      	(write_state_type): Call write_state_undefined_type for
      	TYPE_UNDEFINED.
      	(read_state_type): Call read_state_undefined_type for
      	TYPE_UNDEFINED.
      	* gengtype.c (dbgprint_count_type_at): Handle TYPE_UNDEFINED.
      	(create_user_defined_type): Make extern.
      	(type_for_name): Factor out of resolve_typedef.
      	(create_undefined_type): New
      	(resolve_typedef): Call it when we cannot find a previous
      	typedef and the type is not a template.
      	(find_structure): Accept TYPE_UNDEFINED.
      	(set_gc_used_type): Add argument ALLOWED_UNDEFINED_TYPES,
      	default to false.
      	Emit an error for TYPE_UNDEFINED unless LEVEL is GC_UNUSED or
      	ALLOWED_UNDEFINED_TYPES is set.
      	Set ALLOWED_UNDEFINED_TYPES to true for TYPE_USER_STRUCT.
      	(filter_type_name): Accept templates with more than one
      	argument.
      	(output_mangled_typename): Handle TYPE_UNDEFINED
      	(walk_type): Likewise.
      	(write_types_process_field): Likewise.
      	(write_func_for_structure): If CHAIN_NEXT is set, ORIG_S
      	should not be a user-defined type.
      	(write_types_local_user_process_field): Handle TYPE_ARRAY,
      	TYPE_NONE and TYPE_UNDEFINED.
      	(write_types_local_process_field): Likewise.
      	(contains_scalar_p): Return 0 for TYPE_USER_STRUCT.
      	(write_root): Reject user-defined types that are not pointers.
      	Handle TYPE_NONE, TYPE_UNDEFINED, TYPE_UNION, TYPE_LANG_STRUCT
      	and TYPE_PARAM_STRUCT.
      	(output_typename): Handle TYPE_NONE, TYPE_UNDEFINED, and
      	TYPE_ARRAY.
      	(dump_typekind): Handle TYPE_UNDEFINED.
      	* gengtype.h (enum typekind): Add TYPE_UNDEFINED.
      	(create_user_defined_type): Declare.
      	(enum gty_token): Remove VEC_TOKEN.
      
      2012-11-16  Diego Novillo  <dnovillo@google.com>
      
      	Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
      
      	* coretypes.h (uchar): Define.
      	* alias.c: Use new vec API in vec.h.
      	* asan.c: Likewise.
      	* attribs.c: Likewise.
      	* basic-block.h: Likewise.
      	* bb-reorder.c: Likewise.
      	* builtins.c: Likewise.
      	* calls.c: Likewise.
      	* cfg.c: Likewise.
      	* cfganal.c: Likewise.
      	* cfgcleanup.c: Likewise.
      	* cfgexpand.c: Likewise.
      	* cfghooks.c: Likewise.
      	* cfghooks.h: Likewise.
      	* cfgloop.c: Likewise.
      	* cfgloop.h: Likewise.
      	* cfgloopanal.c: Likewise.
      	* cfgloopmanip.c: Likewise.
      	* cfgrtl.c: Likewise.
      	* cgraph.c: Likewise.
      	* cgraph.h: Likewise.
      	* cgraphclones.c: Likewise.
      	* cgraphunit.c: Likewise.
      	* combine.c: Likewise.
      	* compare-elim.c: Likewise.
      	* coverage.c: Likewise.
      	* cprop.c: Likewise.
      	* data-streamer.h: Likewise.
      	* dbxout.c: Likewise.
      	* dce.c: Likewise.
      	* df-core.c: Likewise.
      	* df-problems.c: Likewise.
      	* df-scan.c: Likewise.
      	* dominance.c: Likewise.
      	* domwalk.c: Likewise.
      	* domwalk.h: Likewise.
      	* dse.c: Likewise.
      	* dwarf2cfi.c: Likewise.
      	* dwarf2out.c: Likewise.
      	* dwarf2out.h: Likewise.
      	* emit-rtl.c: Likewise.
      	* except.c: Likewise.
      	* except.h: Likewise.
      	* expr.c: Likewise.
      	* expr.h: Likewise.
      	* final.c: Likewise.
      	* fold-const.c: Likewise.
      	* function.c: Likewise.
      	* function.h: Likewise.
      	* fwprop.c: Likewise.
      	* gcc.c: Likewise.
      	* gcse.c: Likewise.
      	* genattr.c: Likewise.
      	* genattrtab.c: Likewise.
      	* genautomata.c: Likewise.
      	* genextract.c: Likewise.
      	* genopinit.c: Likewise
      	* ggc-common.c: Likewise.
      	* ggc.h: Likewise.
      	* gimple-low.c: Likewise.
      	* gimple-ssa-strength-reduction.c: Likewise.
      	* gimple-streamer-in.c: Likewise.
      	* gimple.c: Likewise.
      	* gimple.h: Likewise.
      	* gimplify.c: Likewise.
      	* graph.c: Likewise.
      	* graphds.c: Likewise.
      	* graphds.h: Likewise.
      	* graphite-blocking.c: Likewise.
      	* graphite-clast-to-gimple.c: Likewise.
      	* graphite-dependences.c: Likewise.
      	* graphite-interchange.c: Likewise.
      	* graphite-optimize-isl.c: Likewise.
      	* graphite-poly.c: Likewise.
      	* graphite-poly.h: Likewise.
      	* graphite-scop-detection.c: Likewise.
      	* graphite-scop-detection.h: Likewise.
      	* graphite-sese-to-poly.c: Likewise.
      	* graphite.c: Likewise.
      	* godump.c: Likewise.
      	* haifa-sched.c: Likewise.
      	* hw-doloop.c: Likewise.
      	* hw-doloop.h: Likewise.
      	* ifcvt.c: Likewise.
      	* insn-addr.h: Likewise.
      	* ipa-cp.c: Likewise.
      	* ipa-inline-analysis.c: Likewise.
      	* ipa-inline-transform.c: Likewise.
      	* ipa-inline.c: Likewise.
      	* ipa-inline.h: Likewise.
      	* ipa-prop.c: Likewise.
      	* ipa-prop.h: Likewise.
      	* ipa-pure-const.c: Likewise.
      	* ipa-ref-inline.h: Likewise.
      	* ipa-ref.c: Likewise.
      	* ipa-ref.h: Likewise.
      	* ipa-reference.c: Likewise.
      	* ipa-split.c: Likewise.
      	* ipa-utils.c: Likewise.
      	* ipa-utils.h: Likewise.
      	* ipa.c: Likewise.
      	* ira-build.c: Likewise.
      	* ira-color.c: Likewise.
      	* ira-emit.c: Likewise.
      	* ira-int.h: Likewise.
      	* ira.c: Likewise.
      	* loop-invariant.c: Likewise.
      	* loop-unroll.c: Likewise.
      	* lower-subreg.c: Likewise.
      	* lra-lives.c: Likewise.
      	* lra.c: Likewise.
      	* lto-cgraph.c: Likewise.
      	* lto-section-out.c: Likewise.
      	* lto-streamer-in.c: Likewise.
      	* lto-streamer-out.c: Likewise.
      	* lto-streamer.h: Likewise.
      	* lto-symtab.c: Likewise.
      	* mcf.c: Likewise.
      	* modulo-sched.c: Likewise.
      	* omp-low.c: Likewise.
      	* opts-common.c: Likewise.
      	* opts-global.c: Likewise.
      	* opts.c: Likewise.
      	* opts.h: Likewise.
      	* passes.c: Likewise.
      	* predict.c: Likewise.
      	* print-tree.c: Likewise.
      	* profile.c: Likewise.
      	* profile.h: Likewise.
      	* read-rtl.c: Likewise.
      	* ree.c: Likewise.
      	* reg-stack.c: Likewise.
      	* regrename.c: Likewise.
      	* regrename.h: Likewise.
      	* reload.c: Likewise.
      	* reload.h: Likewise.
      	* reload1.c: Likewise.
      	* rtl.h: Likewise.
      	* sched-deps.c: Likewise.
      	* sched-int.h: Likewise.
      	* sdbout.c: Likewise.
      	* sel-sched-dump.c: Likewise.
      	* sel-sched-ir.c: Likewise.
      	* sel-sched-ir.h: Likewise.
      	* sel-sched.c: Likewise.
      	* sese.c: Likewise.
      	* sese.h: Likewise.
      	* statistics.h: Likewise.
      	* stmt.c: Likewise.
      	* stor-layout.c: Likewise.
      	* store-motion.c: Likewise.
      	* tlink.c: Likewise.
      	* toplev.c: Likewise.
      	* trans-mem.c: Likewise.
      	* tree-browser.c: Likewise.
      	* tree-call-cdce.c: Likewise.
      	* tree-cfg.c: Likewise.
      	* tree-cfgcleanup.c: Likewise.
      	* tree-chrec.c: Likewise.
      	* tree-chrec.h: Likewise.
      	* tree-complex.c: Likewise.
      	* tree-data-ref.c: Likewise.
      	* tree-data-ref.h: Likewise.
      	* tree-dfa.c: Likewise.
      	* tree-diagnostic.c: Likewise.
      	* tree-dump.c: Likewise.
      	* tree-eh.c: Likewise.
      	* tree-emutls.c: Likewise.
      	* tree-flow.h: Likewise.
      	* tree-if-conv.c: Likewise.
      	* tree-inline.c: Likewise.
      	* tree-inline.h: Likewise.
      	* tree-into-ssa.c: Likewise.
      	* tree-iterator.c: Likewise.
      	* tree-loop-distribution.c: Likewise.
      	* tree-mudflap.c: Likewise.
      	* tree-optimize.c: Likewise.
      	* tree-outof-ssa.c: Likewise.
      	* tree-parloops.c: Likewise.
      	* tree-phinodes.c: Likewise.
      	* tree-predcom.c: Likewise.
      	* tree-pretty-print.c: Likewise.
      	* tree-scalar-evolution.c: Likewise.
      	* tree-sra.c: Likewise.
      	* tree-ssa-address.c: Likewise.
      	* tree-ssa-alias.c: Likewise.
      	* tree-ssa-ccp.c: Likewise.
      	* tree-ssa-coalesce.c: Likewise.
      	* tree-ssa-dce.c: Likewise.
      	* tree-ssa-dom.c: Likewise.
      	* tree-ssa-forwprop.c: Likewise.
      	* tree-ssa-live.c: Likewise.
      	* tree-ssa-live.h: 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-math-opts.c: Likewise.
      	* tree-ssa-operands.c: Likewise.
      	* tree-ssa-phiopt.c: Likewise.
      	* tree-ssa-phiprop.c: Likewise.
      	* tree-ssa-pre.c: Likewise.
      	* tree-ssa-propagate.c: Likewise.
      	* tree-ssa-reassoc.c: Likewise.
      	* tree-ssa-sccvn.c: Likewise.
      	* tree-ssa-sccvn.h: Likewise.
      	* tree-ssa-strlen.c: Likewise.
      	* tree-ssa-structalias.c: Likewise.
      	* tree-ssa-tail-merge.c: Likewise.
      	* tree-ssa-threadedge.c: Likewise.
      	* tree-ssa-threadupdate.c: Likewise.
      	* tree-ssa-uncprop.c: Likewise.
      	* tree-ssa-uninit.c: Likewise.
      	* tree-ssa.c: Likewise.
      	* tree-ssanames.c: Likewise.
      	* tree-stdarg.c: Likewise.
      	* tree-streamer-in.c: Likewise.
      	* tree-streamer-out.c: Likewise.
      	* tree-streamer.c: Likewise.
      	* tree-streamer.h: Likewise.
      	* tree-switch-conversion.c: Likewise.
      	* tree-vect-data-refs.c: Likewise.
      	* tree-vect-generic.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-vectorizer.c: Likewise.
      	* tree-vectorizer.h: Likewise.
      	* tree-vrp.c: Likewise.
      	* tree.c: Likewise.
      	* tree.h: Likewise.
      	* value-prof.c: Likewise.
      	* value-prof.h: Likewise.
      	* var-tracking.c: Likewise.
      	* varasm.c: Likewise.
      	* varpool.c: Likewise.
      	* vmsdbgout.c: Likewise.
      	* config/bfin/bfin.c: Likewise.
      	* config/c6x/c6x.c: Likewise.
      	* config/darwin.c: Likewise.
      	* config/i386/i386.c: Likewise.
      	* config/ia64/ia64.c: Likewise.
      	* config/mep/mep.c: Likewise.
      	* config/mips/mips.c: Likewise.
      	* config/pa/pa.c: Likewise.
      	* config/rs6000/rs6000-c.c: Likewise.
      	* config/rs6000/rs6000.c: Likewise.
      	* config/rx/rx.c: Likewise.
      	* config/spu/spu-c.c: Likewise.
      	* config/vms/vms.c: Likewise.
      	* config/vxworks.c: Likewise.
      	* config/epiphany/resolve-sw-modes.c: Likewise.
      
      From-SVN: r193595
      Diego Novillo committed
  16. 02 Nov, 2012 1 commit
    • Update ChangeLog files as requested for cgraph change to checked down cast. · 24551b9c
      Index: gcc/cp/ChangeLog
      
      2012-10-31  Lawrence Crowl  <crowl@google.com>
      
      	* decl2.c (var_finalized_p): Rename varpool_node to
      	varpool_node_for_decl.
      	(maybe_emit_vtables): Likewise.
      
      Index: gcc/ada/ChangeLog
      
      2012-10-31  Lawrence Crowl  <crowl@google.com>
      
      	* gcc-interface/utils.c (gnat_write_global_declarations):
      	Rename varpool_node to varpool_node_for_decl.
      
      Index: gcc/lto/ChangeLog
      
      2012-10-31  Lawrence Crowl  <crowl@google.com>
      
      	* lto.c (lto_wpa_write_files): Change symtab checking to a checked
      	down-cast via dyn_cast.
      	* lto-partition.c (add_symbol_to_partition_1): Likewise.
      	(undo_partition): Likewise.
      	(lto_balanced_map): Likewise.
      	(get_symbol_class): Likewise and via is_a.
      	(lto_balanced_map): Change symtab checking to is_a.
      
      From-SVN: r193106
      Lawrence Crowl committed
  17. 31 Oct, 2012 1 commit
    • This patch implements generic type query and conversion functions, · 5d59b5e1
      and applies them to the use of cgraph_node, varpool_node, and symtab_node.
      
      The functions are:
      
      bool is_a <TYPE> (pointer)
        Tests whether the pointer actually points to a more derived TYPE.
      
      TYPE *as_a <TYPE> (pointer)
        Converts pointer to a TYPE*.
      
      TYPE *dyn_cast <TYPE> (pointer)
        Converts pointer to TYPE* if and only if "is_a <TYPE> pointer".
        Otherwise, returns NULL.
        This function is essentially a checked down cast.
      
      These functions reduce compile time and increase type safety when treating a
      generic item as a more specific item.  In essence, the code change is from
      
        if (symtab_function_p (node))
          {
            struct cgraph_node *cnode = cgraph (node);
            ....
          }
      
      to
      
        if (cgraph_node *cnode = dyn_cast <cgraph_node> (node))
          {
            ....
          }
      
      The necessary conditional test defines a variable that holds a known good
      pointer to the specific item and avoids subsequent conversion calls and
      the assertion checks that may come with them.
      
      When, the property test is embedded within a larger condition, the variable
      declaration gets pulled out of the condition.  (This leaves some room for
      using the variable inappropriately.)
      
        if (symtab_variable_p (node)
            && varpool (node)->finalized)
          varpool_analyze_node (varpool (node));
      
      becomes
      
        varpool_node *vnode = dyn_cast <varpool_node> (node);
        if (vnode && vnode->finalized)
          varpool_analyze_node (vnode);
      
      Note that we have converted two sets of assertions in the calls to varpool
      into safe and efficient use of a variable.
      
      
      There are remaining calls to symtab_function_p and symtab_variable_p that
      do not involve a pointer to a more specific type.  These have been converted
      to calls to a functions is_a <cgraph_node> and is_a <varpool_node>.  The
      original predicate functions have been removed.
      
      The cgraph.h header defined both a struct and a function with the name
      varpool_node.  This name overloading can cause some unintuitive error messages
      when, as is common in C++, one omits the struct keyword when using the type.
      I have renamed the function to varpool_node_for_decl.
      
      Tested on x86_64.
      
      
      Index: gcc/ChangeLog
      
      2012-10-31  Lawrence Crowl  <crowl@google.com>
      
      	* is-a.h: New.
      	(is_a <T> (U*)): New.  Test for is-a relationship.
      	(as_a <T> (U*)): New.  Treat as a derived type.
      	(dyn_cast <T> (U*)): New.  Conditionally cast based on is_a.
      	* cgraph.h (varpool_node): Rename to varpool_node_for_decl.
      	Adjust callers to match.
      	(is_a_helper <cgraph_node>::test (symtab_node_def *)): New.
      	(is_a_helper <varpool_node>::test (symtab_node_def *)): New.
      	(symtab_node_def::try_function): New.  Change most calls to
      	symtab_function_p with calls to dyn_cast <cgraph_node> (p).
      	(symtab_node_def::try_variable): New.  Change most calls to
      	symtab_variable_p with calls to dyn_cast <varpool_node> (p).
      	(symtab_function_p): Remove.  Change callers to use
              is_a <cgraph_node> (p) instead.
      	(symtab_variable_p): Remove.  Change callers to use
              is_a <varpool_node> (p) instead.
      	* cgraph.c (cgraph_node_for_asm): Remove redundant call to
      	symtab_node_for_asm.
      	* cgraphunit.c (symbol_finalized_and_needed): New.
      	(symbol_finalized): New.
      	(cgraph_analyze_functions): Split complicated conditionals out into
      	above new functions.
      	* Makefile.in (CGRAPH_H): Add is-a.h as used by cgraph.h.
      
      From-SVN: r193051
      Lawrence Crowl committed
  18. 12 Oct, 2012 1 commit
  19. 09 Oct, 2012 1 commit
    • lto-cgraph.c (input_node_opt_summary): Remove unused code. · 0b8c30f9
      gcc/
      2012-10-08  Tobias Burnus  <burnus@net-b.de>
      
      	* lto-cgraph.c (input_node_opt_summary): Remove unused code.
      	* lto-opts.c (append_to_collect_gcc_options): Fix condition.
      	* lto-symtab.c (lto_cgraph_replace_node): Don't xstrdup string
      	which is passed to fprintf.
      
      gcc/lto/
      2012-10-08  Tobias Burnus  <burnus@net-b.de>
      
      	* lto-lang.c (lto_register_builtin_type): Avoid useless
      	decl creation.
      	* lto-object.c (lto_obj_file_open, lto_obj_file_open): Free memory.
      
      From-SVN: r192250
      Tobias Burnus committed
  20. 08 Oct, 2012 2 commits
  21. 07 Oct, 2012 1 commit
    • lto-cgraph.c (lto_symtab_encoder_new): New parameter FOR_INPUT. · e75f8f79
      	* lto-cgraph.c (lto_symtab_encoder_new): New parameter FOR_INPUT.
      	(lto_symtab_encoder_delete): Update.
      	(lto_symtab_encoder_encode): Update.
      	(compute_ltrans_boundary): Update.
      	(input_symtab): Update.
       	* lto-streamer.h (lto_symtab_encoder_new): Update.
      	
      	* lto.c (read_cgraph_and_symbols): Release type merging hash early;
      	release input encoders.
      	* lto-partition.c (new_partition): Update for new lto_symtab_encoder_new.
      
      From-SVN: r192184
      Jan Hubicka committed
  22. 06 Oct, 2012 1 commit
    • re PR lto/54790 (Missing optimization with LTO) · 46591697
      	PR lto/54790 
      	* lto.c (resolution_map): New static var.
      	(register_resolution): New function.
      	(lto_register_var_decl_in_symtab): Use it.
      	(read_cgraph_and_symbols): Copy resolutions into the symtab.
      	* lto-streamer.h (lto_symtab_register_decl, lto_symtab_get_resolution,
      	lto_mark_nothrow_fndecl, lto_fixup_nothrow_decls): Remove.
      	* lto-symtab.c (lto_symtab_register_decl): Remove.
      
      From-SVN: r192159
      Jan Hubicka committed
  23. 20 Sep, 2012 1 commit
    • function.c (push_cfun): Check old current_function_decl matches old cfun... · af16bc76
      2012-09-20  Martin Jambor  <mjambor@suse.cz>
      
      	* function.c (push_cfun): Check old current_function_decl matches
      	old cfun, set new current_function_decl to the decl of the new
      	cfun.
      	(push_struct_function): Likewise.
      	(pop_cfun): Likewise.
      	(allocate_struct_function): Move call to
      	invoke_set_current_function_hook to the end of the function.
      	* cfgexpand.c (estimated_stack_frame_size): Do not set and restore
      	current_function_decl.
      	* cgraph.c (cgraph_release_function_body): Likewise.
      	* cgraphunit.c (cgraph_process_new_functions): Likewise.
      	(cgraph_add_new_function): Likewise.
      	(cgraph_analyze_function): Likewise.
      	(assemble_thunk): Set cfun to NULL at the end.
      	(expand_function): Move call to set_cfun downwards.
      	* gimple-low.c (record_vars_into): Only check current_function_decl
      	before possibly doing push_cfun.
      	* gimplify.c (gimplify_function_tree): Do not set and restore
      	current_function_decl.
      	* ipa-inline-analysis.c (compute_inline_parameters): Likewise.
      	(inline_analyze_function): Likewise.
      	* ipa-prop.c (ipa_analyze_node): Likewise.
      	* ipa-pure-const.c (analyze_function): Likewise.
      	* lto-streamer-in.c (lto_input_function_body): Do not set
      	current_function_decl.
      	* lto-streamer-out.c (output_function): Do not set and restore
      	current_function_decl.
      	* omp-low.c (finalize_task_copyfn): Likewise.
      	(expand_omp_taskreg): Likewise.
      	(create_task_copyfn): Likewise, move push_cfun up quite a bit.
      	* passes.c (dump_passes): Do not set and restore current_function_decl.
      	(do_per_function): Likewise.
      	(do_per_function_toporder): Likewise.
      	* trans-mem.c (ipa_tm_scan_irr_function): Likewise.
      	(ipa_tm_transform_transaction): Likewise.
      	(ipa_tm_transform_clone): Likewise.
      	(ipa_tm_execute): Likewise.
      	* tree-emutls.c (lower_emutls_function_body): Likewise.
      	* tree-inline.c (initialize_cfun): Do not call pop_cfun.
      	(tree_function_versioning): Do not call push_cfun, do not set and
      	restore current_function_decl.  Remove assert checking consistency of
      	cfun and current_function_decl.
      	* tree-profile.c (tree_profiling): Do not set and restore
      	current_function_decl.
      	* tree-sra.c (convert_callers_for_node): Do not set
      	current_function_decl.
      	(convert_callers): Do not restore current_function_decl.
      	(modify_function): Do not set current_function_decl.
      	* tree-ssa-structalias.c (ipa_pta_execute): Do not set and restore
      	current_function_decl.
      
      fortran/
      	* trans-decl.c (gfc_get_extern_function_decl): Push NULL cfun.  Do not
      	set and restore current_function_decl.
      	(gfc_init_coarray_decl): Do not set and restore current_function_decl.
      
      lto/
      	* lto.c (lto_materialize_function): Call push_struct_function and
      	pop_cfun.
      
      From-SVN: r191577
      Martin Jambor committed
  24. 19 Sep, 2012 2 commits
    • Integrate lexical block into source_location. · 5368224f
      gcc:
      	2012-09-19  Dehao Chen  <dehao@google.com>
      
      	* toplev.c (general_init): Init block_locations.
      	* tree.c (tree_set_block): New.
      	(tree_block): Change to use LOCATION_BLOCK.
      	* tree.h (TREE_SET_BLOCK): New.
      	* final.c (reemit_insn_block_notes): Change to use LOCATION_BLOCK.
      	(final_start_function): Likewise.
      	* input.c (expand_location_1): Likewise.
      	* input.h (LOCATION_LOCUS): New.
      	(LOCATION_BLOCK): New.
      	(IS_UNKNOWN_LOCATION): New.
      	* fold-const.c (expr_location_or): Change to use new location.
      	* reorg.c (emit_delay_sequence): Likewise.
      	(try_merge_delay_insns): Likewise.
      	* modulo-sched.c (dump_insn_location): Likewise.
      	* lto-streamer-out.c (lto_output_location_bitpack): Likewise.
      	* lto-cgraph.c (output_node_opt_summary): Likewise.
      	* jump.c (rtx_renumbered_equal_p): Likewise.
      	* ifcvt.c (noce_try_move): Likewise.
      	(noce_try_store_flag): Likewise.
      	(noce_try_store_flag_constants): Likewise.
      	(noce_try_addcc): Likewise.
      	(noce_try_store_flag_mask): Likewise.
      	(noce_try_cmove): Likewise.
      	(noce_try_cmove_arith): Likewise.
      	(noce_try_minmax): Likewise.
      	(noce_try_abs): Likewise.
      	(noce_try_sign_mask): Likewise.
      	(noce_try_bitop): Likewise.
      	(noce_process_if_block): Likewise.
      	(cond_move_process_if_block): Likewise.
      	(find_cond_trap): Likewise.
      	* ipa-prop.c (ipa_set_jf_constant): Likewise.
      	(ipa_write_jump_function): Likewise.
      	* dwarf2out.c (add_src_coords_attributes): Likewise.
      	* expr.c (expand_expr_real): Likewise.
      	* tree-parloops.c (create_loop_fn): Likewise.
      	* recog.c (peep2_attempt): Likewise.
      	* function.c (free_after_compilation): Likewise.
      	(expand_function_end): Likewise.
      	(set_insn_locations): Likewise.
      	(thread_prologue_and_epilogue_insns): Likewise.
      	* print-rtl.c (print_rtx): Likewise.
      	* profile.c (branch_prob): Likewise.
      	* trans-mem.c (ipa_tm_scan_irr_block): Likewise.
      	* gimplify.c (gimplify_call_expr): Likewise.
      	* except.c (duplicate_eh_regions_1): Likewise.
      	* emit-rtl.c (try_split): Likewise.
      	(make_insn_raw): Likewise.
      	(make_debug_insn_raw): Likewise.
      	(make_jump_insn_raw): Likewise.
      	(make_call_insn_raw): Likewise.
      	(emit_pattern_after_setloc): Likewise.
      	(emit_pattern_after): Likewise.
      	(emit_debug_insn_after): Likewise.
      	(emit_pattern_before): Likewise.
      	(emit_insn_before_setloc): Likewise.
      	(emit_jump_insn_before): Likewise.
      	(emit_call_insn_before_setloc): Likewise.
      	(emit_call_insn_before): Likeise.
      	(emit_debug_insn_before_setloc): Likewise.
      	(emit_copy_of_insn_after): Likewise.
      	(insn_locators_alloc): Remove.
      	(insn_locators_finalize): Remove.
      	(insn_locators_free): Remove.
      	(set_curr_insn_source_location): Remove.
      	(get_curr_insn_source_location): Remove.
      	(set_curr_insn_block): Remove.
      	(get_curr_insn_block): Remove.
      	(locator_scope): Remove.
      	(insn_scope): Change to use new location.
      	(locator_location): Remove.
      	(insn_line): Change to use new location.
      	(locator_file): Remove.
      	(insn_file): Change to use new location.
      	(locator_eq): Remove.
      	(insn_locations_init): New.
      	(insn_locations_finalize): New.
      	(set_curr_insn_location): New.
      	(curr_insn_location): New.
      	* cfgexpand.c (gimple_assign_rhs_to_tree): Change to use new location.
      	(expand_gimple_cond): Likewise.
      	(expand_call_stmt): Likewise.
      	(expand_gimple_stmt_1): Likewise.
      	(expand_gimple_basic_block): Likewise.
      	(construct_exit_block): Likewise.
      	(gimple_expand_cfg): Likewise.
      	* cfgcleanup.c (try_forward_edges): Likewise.
      	* tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
      	(dump_scope_block): Likewise.
      	(remove_unused_locals): Likewise.
      	* rtl.c (rtx_equal_p_cb): Likewise.
      	(rtx_equal_p): Likewise.
      	* rtl.h (XUINT): New.
      	(INSN_LOCATOR): Remove.
      	(CURR_INSN_LOCATION): Remove.
      	(INSN_LOCATION): New.
      	(INSN_HAS_LOCATION): New.
      	* tree-inline.c (remap_gimple_op_r): Change to use new location.
      	(copy_tree_body_r): Likewise.
      	(copy_phis_for_bb): Likewise.
      	(expand_call_inline): Likewise.
      	* tree-streamer-in.c (lto_input_ts_exp_tree_pointers): Likewise.
      	* tree-streamer-out.c (write_ts_decl_minimal_tree_pointers): Likewise.
      	* gimple-streamer-out.c (output_gimple_stmt): Likewise.
      	* combine.c (try_combine): Likewise.
      	* tree-outof-ssa.c (set_location_for_edge): Likewise.
      	(insert_partition_copy_on_edge): Likewise.
      	(insert_value_copy_on_edge): Likewise.
      	(insert_rtx_to_part_on_edge): Likewise.
      	(insert_part_to_rtx_on_edge): Likewise.
      	* basic-block.h (edge_def): Remove field.
      	* gimple.h (gimple_statement_base): Remove field.
      	(gimple_bb): Change to use new location.
      	(gimple_set_block): Likewise.
      	(gimple_has_location): Likewise.
      	* tree-cfg.c (make_cond_expr_edges): Likewise.
      	(make_goto_expr_edges): Likewise.
      	(gimple_can_merge_blocks_p): Likewise.
      	(move_stmt_op): Likewise.
      	(move_block_to_fn): Likewise.
      	* config/alpha/alpha.c (alpha_output_mi_thunk_osf): Likewise.
      	* config/sparc/sparc.c (sparc_output_mi_thunk): Likewise.
      	* config/i386/i386.c (x86_output_mi_thunk): Likewise.
      	* config/tilegx/tilegx.c (tilegx_output_mi_thunk): Likewise.
      	* config/sh/sh.c (sh_output_mi_thunk): Likewise.
      	* config/ia64/ia64.c (ia64_output_mi_thunk): Likewise.
      	* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise.
      	* config/score/score.c (score_output_mi_thunk): Likewise.
      	* config/tilepro/tilepro.c (tilepro_asm_output_mi_thunk): Likewise.
      	* config/mips/mips.c (mips_output_mi_thunk): Likewise.
      	* cfgrtl.c (unique_locus_on_edge_between_p): Likewise.
      	(unique_locus_on_edge_between_p): Likewise.
      	(emit_nop_for_unique_locus_between): Likewise.
      	(force_nonfallthru_and_redirect): Likewise.
      	(fixup_reorder_chain): Likewise.
      	(cfg_layout_merge_blocks): Likewise.
      	* stmt.c (emit_case_nodes): Likewise.
      
      gcc/lto:
      	2012-09-19  Dehao Chen  <dehao@google.com>
      
      	* lto/lto.c (lto_fixup_prevailing_decls): Remove tree.exp.block field.
      
      libcpp:
      	2012-09-19  Dehao Chen  <dehao@google.com>
      
      	* include/line-map.h (MAX_SOURCE_LOCATION): New value.
      	(location_adhoc_data_fini): New.
      	(get_combined_adhoc_loc): New.
      	(get_data_from_adhoc_loc): New.
      	(get_location_from_adhoc_loc): New.
      	(location_adhoc_data_map): New.
      	(COMBINE_LOCATION_DATA): New.
      	(IS_ADHOC_LOC): New.
      	(expanded_location): New field.
      	(line_maps): New field.
      	* line-map.c (location_adhoc_data): New.
      	(location_adhoc_data_hash): New.
      	(location_adhoc_data_eq): New.
      	(location_adhoc_data_update): New.
      	(get_combined_adhoc_loc): New.
      	(get_data_from_adhoc_loc): New.
      	(get_location_from_adhoc_loc): New.
      	(location_adhoc_data_init): New.
      	(location_adhoc_data_fini): New.
      	(linemap_init): Initialize location_adhoc_data.
      	(linemap_lookup): Change to use new location.
      	(linemap_ordinary_map_lookup): Likewise.
      	(linemap_macro_map_lookup): Likewise.
      	(linemap_macro_map_loc_to_def_point): Likewise.
      	(linemap_macro_map_loc_unwind_toward_spel): Likewise.
      	(linemap_get_expansion_line): Likewise.
      	(linemap_get_expansion_filename): Likewise.
      	(linemap_location_in_system_header_p): Likewise.
      	(linemap_location_from_macro_expansion_p): Likewise.
      	(linemap_macro_loc_to_spelling_point): Likewise.
      	(linemap_macro_loc_to_def_point): Likewise.
      	(linemap_macro_loc_to_exp_point): Likewise.
      	(linemap_resolve_location): Likewise.
      	(linemap_unwind_toward_expansion): Likewise.
      	(linemap_unwind_to_first_non_reserved_loc): Likewise.
      	(linemap_expand_location): Likewise.
      	(linemap_dump_location): Likewise.
      	(linemap_line_start): Likewise.
      
      From-SVN: r191494
      Dehao Chen committed
    • symtab.c (insert_to_assembler_name_hash): Do not insert register vars. · b5493fb2
      	* symtab.c (insert_to_assembler_name_hash): Do not insert
      	register vars.
      	(unlink_from_assembler_name_hash): NULL out pointers of unlinked
      	var.
      	(symtab_prevail_in_asm_name_hash): New.
      	(symtab_initialize_asm_name_hash): Break out from ...
      	(symtab_node_for_asm): ... here.
      	(dump_symtab_base): Dump LTO file data.
      	(verify_symtab_base): Register vars are not in symtab.
      	* cgraph.h (symtab_initialize_asm_name_hash,
      	symtab_prevail_in_asm_name_hash): New functions.
      	(symtab_real_symbol_p): New inline.
      	* lto-symtab.c: Do not include gt-lto-symtab.h.
      	(lto_symtab_entry_def): Remove.
      	(lto_symtab_entry_t): Remove.
      	(lto_symtab_identifiers): Remove.
      	(lto_symtab_free): Remove.
      	(lto_symtab_entry_hash): Remove.
      	(lto_symtab_entry_eq): Remove.
      	(lto_symtab_entry_marked_p): Remove.
      	(lto_symtab_maybe_init_hash_table): Remove.
      	(resolution_guessed_p, set_resolution_guessed): New functions.
      	(lto_symtab_register_decl): Only set resolution info.
      	(lto_symtab_get, lto_symtab_get_resolution): Remove.
      	(lto_symtab_merge): Reorg to work across symtab; do nothing if decls
      	are same.
      	(lto_symtab_resolve_replaceable_p): Reorg to work on symtab.
      	(lto_symtab_resolve_can_prevail_p): Likewise; only real symbols can
      	prevail.
      	(lto_symtab_resolve_symbols): Reorg to work on symtab.
      	(lto_symtab_merge_decls_2): Likewise.
      	(lto_symtab_merge_decls_1): Likewise; add debug dumps.
      	(lto_symtab_merge_decls): Likewise; do not merge at ltrans stage.
      	(lto_symtab_merge_cgraph_nodes_1): Reorg to work on symtab.
      	(lto_symtab_merge_cgraph_nodes): Likewise; do not merge at ltrans stage.
      	(lto_symtab_prevailing_decl): Rewrite to lookup into symtab.
      	* lto-streaer.h (lto_symtab_free): Remove.
      	* lto-cgraph.c (add_references): Cleanup.
      	* varpool.c (varpool_assemble_decl): Skip hard regs.
      
      	* lto.c (lto_materialize_function): Update confused comment.
      	(read_cgraph_and_symbols): Do not free symtab.
      
      From-SVN: r191466
      Jan Hubicka committed
  25. 12 Sep, 2012 2 commits
    • common.opt (flto-partition): Add "max". · c3c445e1
      	* common.opt (flto-partition): Add "max".
      	* invoke.texi (flto-partition): Document "max"
      
      	* lto.c (do_whole_program_analysis): Care timevars, statistics and
      	AUX pointer cleaning. Add max partitioning.
      	* lto-partition.c (enum symbol_class): New.
      	(get_symbol_class): New function.
      	(symbol_partitioned_p): New function.
      	(add_references_to_partition): Remove.
      	(add_aliases_to_partition): Remove.
      	(add_cgraph_node_to_partition_1): Remove.
      	(add_cgraph_node_to_partition): Remove.
      	(add_symbol_to_partition): New function.
      	(add_symbol_to_partition_1): New function.
      	(contained_in_symbol): New function.
      	(partition_cgraph_node_p): Remove.
      	(partition_varpool_node_p): Remove.
      	(partition_symbol_p): Remove.
      	(lto_1_to_1_map): Cleanup.
      	(lto_max_map): New.
      	(lto_balanced_map): Update.
      	(lto_promote_cross_file_statics): Update.
      	* lto-partition.h (lto_max_map): Declare.
      	* timevar.def (TV_WHOPR_PARTITIONING): New timevar.
      
      From-SVN: r191229
      Jan Hubicka committed
    • re PR lto/54312 (uniquify_nodes takes 12% of Mozilla LTO build) · b5c7cdfb
      	PR lto/54312
      	* lto.c (uniquify_nodes): Remove quadratic loop checking if the
      	type is variant leader.
      
      From-SVN: r191228
      Jan Hubicka committed
  26. 11 Sep, 2012 2 commits
    • lto.c (enum gtc_mode): Remove. · b29402f0
      2012-09-11  Richard Guenther  <rguenther@suse.de>
      
      	* lto.c (enum gtc_mode): Remove.
      	(struct type_pair_d): Adjust.
      	(lookup_type_pair): Likewise.
      	(gimple_type_leader): Do not mark as deletable.
      	(gimple_lookup_type_leader): Adjust.
      	(gtc_visit): Likewise.
      	(gimple_types_compatible_p_1): Likewise.
      	(gimple_types_compatible_p): Likewise.
      	(gimple_type_hash): Likewise.
      	(gimple_register_type): Likewise.
      	(read_cgraph_and_symbols): Manage lifetime of tables
      	here.
      
      From-SVN: r191184
      Richard Guenther committed
    • gimple.h (gimple_register_type): Remove. · b8f4e58f
      2012-09-11  Richard Guenther  <rguenther@suse.de>
      
      	* gimple.h (gimple_register_type): Remove.
      	(print_gimple_types_stats): Adjust prototype.
      	* lto-streamer.h (print_lto_report): Likewise.
      	* lto-streamer.c (print_lto_report): Adjust.
      	* gimple.c (gimple_types, type_hash_cache, enum gtc_mode,
      	struct type_pair_d, lookup_type_pair, struct sccs,
      	next_dfs_num, gtc_next_dfs_num, struct gimple_type_leader_entry_s,
      	gimple_type_leader, gimple_lookup_type_leader, compare_type_names_p,
      	gtc_visit, gimple_types_compatible_p_1, gimple_types_compatible_p,
      	visit, iterative_hash_name, struct type_hash_pair,
      	type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
      	gimple_type_eq, gimple_register_type_1, gimple_register_type):
      	Move to lto/lto.c.
      	(print_gimple_types_stats): Adjust.
      	(free_gimple_type_tables): Likewise.
      
      	lto/
      	* lto.c (gimple_types, type_hash_cache, enum gtc_mode,
      	struct type_pair_d, lookup_type_pair, struct sccs,
      	next_dfs_num, gtc_next_dfs_num, struct gimple_type_leader_entry_s,
      	gimple_type_leader, gimple_lookup_type_leader, compare_type_names_p,
      	gtc_visit, gimple_types_compatible_p_1, gimple_types_compatible_p,
      	visit, iterative_hash_name, struct type_hash_pair,
      	type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
      	gimple_type_eq, gimple_register_type_1, gimple_register_type):
      	Move here from gimple.c
      	(read_cgraph_and_symbols): Free hash tables here.
      	(print_lto_report_1): New function wrapping print_lto_report.
      	(do_whole_program_analysis): Call it.
      	(lto_main): Likewise.
      
      From-SVN: r191177
      Richard Guenther committed
  27. 10 Sep, 2012 1 commit
    • lto-cgraph.c (compute_ltrans_boundary): Do not care about aliases. · 1cdbb3f9
      	* lto-cgraph.c (compute_ltrans_boundary): Do not care about aliases.
      	* lto-partition.c (partition_symbol_p): Forward declare.
      	(add_references_to_partition): Reimplement using partition_symbol_p.
      	(add_aliases_to_partition): Break out from add_references_to_partition;
      	reimplement using partition_symbol_p.
      	(add_cgraph_node_to_partition_1): Handle callees using partition_symbol_p;
      	add sanity checks.
      	(add_varpool_node_to_partition): Use add_aliases_to_partition.
      	(partition_varpool_node_p): Do not special case aliases.
      
      From-SVN: r191129
      Jan Hubicka committed
  28. 09 Sep, 2012 2 commits
    • passes.c (ipa_write_summaries_1): Set state; do not call compute_ltrans_boundary. · b4661bfe
      
      	* passes.c (ipa_write_summaries_1): Set state;
      	do not call compute_ltrans_boundary.
      	(ipa_write_optimization_summaries): Likewise.
      	(ipa_write_summaries): compute_ltrans_boundary here.
      	* lto-streamer.h (lto_symtab_encoder_d): NODES are allocated in heap.
      	(compute_ltrans_boundary): Update prototype.
      
      	* lto.c (lto_wpa_write_files): Do not delete partition encoder;
      	it is deleted after streaming.
      	* lto-partition.c (partition_symbol_p): New function.
      	(promote_var, promote_fn): Remove.
      	(promote_symbol): New function.
      	(lto_promote_cross_file_statics): First compute boundaries; rewrite
      	to lookup the actual boundaries instead of computing them ad-hoc.
      
      From-SVN: r191113
      Jan Hubicka committed
    • Replace cgraph_node_set and varpool_node_set by symtab_node_encoder in partitioning. · 7b99cca4
      
      	Replace cgraph_node_set and varpool_node_set by symtab_node_encoder
      	in partitioning.
      	* tree-pass.h (cgraph_node_set_def, varpool_node_set_def): Remove
      	forward declaration.
      	(lto_symtab_encoder_d): Forward declare.
      	(ipa_write_optimization_summaries): Update.
      	* lto-cgraph.c (lto_symtab_encoder_new): Do not initialize
      	body, initializer and in_partition.
      	(lto_symtab_encoder_delete): Update.
      	(lto_symtab_encoder_encode): Update.
      	(lto_symtab_encoder_lookup): Move inline.
      	(lto_symtab_encoder_delete_node): New function.
      	(lto_symtab_encoder_encode_body_p, lto_set_symtab_encoder_encode_body,
      	lto_symtab_encoder_encode_initializer_p,
      	lto_set_symtab_encoder_encode_initializer, lto_symtab_encoder_in_partition_p,
      	lto_symtab_encoder_in_partition_p): Update.
      	(compute_ltrans_boundary): Take encoder as an input.
      	* passes.c (ipa_write_summaries_1): Update.
      	(ipa_write_summaries_1): Update.
      	(ipa_write_summaries): Update.
      	(ipa_write_optimization_summaries): Update.
      	* lto-streamer.c (print_lto_report): Report number of cgraph nodes.
      	* lto-streamer.h (lto_stats_d): Replace num_output_cgraph_nodes by
      	num_output_symtab_nodes.
      	(lto_encoder_entry): New structure.
      	(struct lto_symtab_encoder_d): Reorg.
      	(lto_symtab_encoder_delete_node): Declare.
      	(lto_symtab_encoder_lookup): Bring inline.
      	(compute_ltrans_boundary): Update.
      	(lto_symtab_encoder_size): Update.
      	(lsei_node, lsei_cgraph_node, lsei_varpool_node): Update.
      	(lto_symtab_encoder_deref): Update.
      
      	Replace cgraph_node_set and varpool_node_set by symtab_node_encoder
      	in partitioning.
      	* lto-partition.h (ltrans_partition_def): Replace cgraph_set and varpool_set
      	by encoder.
      	* lto-partition.c (new_partition): Update.
      	* lto.c (cmp_partitions_order): Update.
      	(lto_wpa_write_files): Update.
      	(free_ltrans_partitions): Update.
      	(add_references_to_partition): Update.
      	(add_cgraph_node_to_partition_1): Update.
      	(add_cgraph_node_to_partition): Update.
      	(add_varpool_node_to_partition): Update.
      	(undo_partition): Update.
      	(lto_balanced_map): Update.
      	(set_referenced_from_other_partition_p, set_reachable_from_other_partition_p,
      	set_referenced_from_this_partition_p): Update.
      	(lto_promote_cross_file_statics): Update.
      
      From-SVN: r191107
      Jan Hubicka committed
  29. 08 Sep, 2012 2 commits
    • Fix broken patch · 4e5315e5
      2012-09-08  Andi Kleen  <ak@linux.intel.com>
      
              * gcc/lto/lto.c (do_whole_program_analysis):
              Fix last broken patch
      
      From-SVN: r191097
      Andi Kleen committed
    • Add -fmem-report-wpa · b3e44629
      For parallel LTO builds setting -fmem-report does not work very well
      because all the LTRANS phases dump it in parallel and typically interleave
      it to unreadability.
      
      Since usually the memory bottleneck is WPA add a flag to only dump
      the memory report for that.
      
      gcc/:
      2012-09-08  Andi Kleen  <ak@linux.intel.com>
      
      	* gcc/common.opt (-fmem-report-wpa): Add
      	* gcc/doc/invoke.texi (-fmem-report-wpa): Document.
      	* gcc/lto/lto.c (do_whole_program_analysis): Run mem_report
      	when mem_report_wpa is set.
      
      From-SVN: r191095
      Andi Kleen committed
  30. 07 Sep, 2012 1 commit
    • Reduce memory usage for storing LTO decl resolutions · aed7d7cf
      With a LTO build of a large project (>11k subfiles incrementially linked)
      storing the LTO resolutions took over 0.5GB memory:
      
      lto/lto.c:1087 (lto_resolution_read)                      0: 0.0%  540398500           15903: 0.0%
      
      The reason is that the declaration indexes are quite sparse, but every subfile
      got a full continuous vector for them. Since there are so many of them the
      many vectors add up.
      
      This patch instead stores the resolutions initially in a compact (index, resolution)
      format. This is only expanded into a sparse vector for fast lookup when
      the subfile is actually read, but then immediately freed. This means only one
      vector is allocated at a time.
      
      This brings the overhead for this down to less than 3MB for the test case:
      
      lto/lto.c:1087 (lto_resolution_read)                      0: 0.0%    2821456           42186: 0.0%
      
      gcc/:
      
      2012-09-06  Andi Kleen  <ak@linux.intel.com>
      
      	* gcc/lto-streamer.h (res_pair): Add.
      	(lto_file_decl_data): Replace resolutions with respairs.
      	Add max_index.
      	* gcc/lto/lto.c (lto_resolution_read): Remove max_index.  Add rp.
      	Initialize respairs.
      	(lto_file_finalize): Set up resolutions vector lazily from respairs.
      
      From-SVN: r191051
      Andi Kleen committed
  31. 13 Aug, 2012 1 commit
    • tree-pass.h (write_summary, [...]): Remove set and vset arguments. · f27c1867
      	* tree-pass.h (write_summary, write_optimization_summary): Remove
      	set and vset arguments.
      	* ipa-cp.c (ipcp_write_summary): Remove set and vset arugments.
      	(write_node_summary_p): Likewise; use the encoder.
      	(ipa_reference_write_optimization_summary): Likewise.
      	* lto-cgraph.c (output_cgraph_opt_summary): Use encoder.
      	(lto_symtab_encoder_new): Initialize in_partition field.
      	(lto_symtab_encoder_delete): Destroy in_partition field.
      	(LCC_NOT_FOUND): Move to lto-streamer.h
      	(lto_symtab_encoder_deref): Likewise.
      	(lto_symtab_encoder_in_partition_p,
      	lto_set_symtab_encoder_in_partition): New functions.
      	(referenced_from_other_partition_p): Rewrite to use encoder.
      	(reachable_from_other_partition_p): Likewise.
      	(referenced_from_this_partition_p): Likewise.
      	(reachable_from_this_partition_p): Likewise.
      	(lto_output_node): Likewise.
      	(lto_output_varpool_node): Likewise.
      	(output_refs): Likewise.
      	(compute_ltrans_boundary): Initialize in_partition fileds of
      	the encoder.
      	(output_symtab): Likewise.
      	(input_refs): Match the changes in output_refs.
      	(output_cgraph_opt_summary_p): Remove set argument.
      	(output_node_opt_summary): Replace set by encoder.
      	(output_cgraph_opt_summary): Remove set argument; use
      	the encoder.
      	* ipa-pure-const.c (pure_const_write_summary): Remove set and vset
      	arguments; use the encoder.
      	* lto-streamer-out.c (lto_output): Remove set and vset argument; use
      	the encoder.
      	(produce_symtab): Likewise.
      	* ipa-inline.h (inline_write_summary): Remove set and vset arguments.
      	* ipa-inline-analysis.c (inline_write_summary): Likewise.
      	* ipa-prop.c (ipa_prop_write_jump_functions): Remove set argument;
      	use encoder.
      	* ipa-prop.h (ipa_prop_write_jump_functions): Likewise.
      	* passes.c (ipa_write_summaries_2): Remove set and vset arguments.
      	(ipa_write_summaries_1): Update.
      	(ipa_write_optimization_summaries_1): Likewise.
      	(ipa_write_optimization_summaries): Likewise.
      	* lto-streamer.h (lto_symtab_encoder_t): Add in_partition.
      	(lto_symtab_encoder_iterator): New type.
      	(lto_symtab_encoder_deref): Make inline.
      	(output_symtab, referenced_from_other_partition_p,
      	reachable_from_other_partition_p, referenced_from_this_partition_p,
      	reachable_from_this_partition_p): Update.
      	(lsei_end_p, lsei_next, lsei_node, lsei_cgraph_node, lsei_varpool_node): New
      	inline functions.
      	(LCC_NOT_FOUND): New macro.
      	(lto_symtab_encoder_deref, lsei_start, lsei_next_in_partition,
      	lsei_start_in_partition, lsei_next_function_in_partition,
      	lsei_start_function_in_partition, lsei_next_variable_in_partition,
      	lsei_start_variable_in_partition): New inline functions.
      
      	* lto-partition.c (set_referenced_from_other_partition_p,
      	set_reachable_from_other_partition_p, set_referenced_from_this_partition_p):
      	New functions.
      	(lto_promote_cross_file_statics): Use them.
      
      From-SVN: r190336
      Jan Hubicka committed