Commit Graph

118 Commits

Author SHA1 Message Date
Jakub Jelinek 5624e564d2 Update copyright years.
From-SVN: r219188
2015-01-05 13:33:28 +01:00
Trevor Saunders 907dadbd2a remove more ggc htabs
gcc/

	* ipa-utils.c, lto-section-in.c, lto-streamer.h,
	tree-scalar-evolution.c: Replace htab with hash_table.

lto/

	* lto.c: Replace htab with hash_table.

From-SVN: r217871
2014-11-20 15:10:49 +00:00
Trevor Saunders 9c71e9df38 use vec in lto_tree_ref_table
gcc/ChangeLog:

2014-11-20  Trevor Saunders  <tsaunders@mozilla.com>

	* lto-section-in.c (lto_delete_in_decl_state): Adjust.
	(lto_free_function_in_decl_state): Likewise.
	* lto-streamer-out.c (copy_function_or_variable): Likewise.
	* lto-streamer.h (lto_file_decl_data_get_ ## name): Likewise.
	(lto_file_decl_data_num_ ## name ## s): Likewise.
	(struct lto_tree_ref_table): Remove.
	(struct lto_in_decl_state): Replace lto_tree_ref_table with vec<tree>.

gcc/lto/ChangeLog:

2014-11-20  Trevor Saunders  <tsaunders@mozilla.com>

	* lto.c (lto_read_in_decl_state): Adjust.
	(lto_fixup_state): Likewise.

From-SVN: r217870
2014-11-20 15:10:42 +00:00
Jan Hubicka ca9a04dab6 lto-streamer-out.c (hash_tree): Use cl_optimization_hash.
* lto-streamer-out.c (hash_tree): Use cl_optimization_hash.
	* lto-streamer.h (cl_optimization_stream_out, cl_optimization_stream_in): Declare.
	* optc-save-gen.awk: Generate cl_optimization LTO streaming and hashing routines.
	* opth-gen.awk: Add prototype of cl_optimization_hash.
	* tree-streamer-in.c (unpack_ts_optimization): Remove.
	(streamer_unpack_tree_bitfields): Use cl_optimization_stream_in.
	* tree-streamer-out.c (pack_ts_optimization): Remove.
	(streamer_pack_tree_bitfields): Use cl_optimization_stream_out.

From-SVN: r217607
2014-11-15 16:53:51 +00:00
Jan Hubicka 325fe981b5 optc-save-gen.awk: Output cl_target_option_eq...
* optc-save-gen.awk: Output cl_target_option_eq,
	cl_target_option_hash, cl_target_option_stream_out,
	cl_target_option_stream_in functions.
	* opth-gen.awk: Output prototypes for
	cl_target_option_eq and cl_target_option_hash.
	* lto-streamer.h (cl_target_option_stream_out,
	cl_target_option_stream_in): Declare.
	* tree.c (cl_option_hash_hash): Use cl_target_option_hash.
	(cl_option_hash_eq): Use cl_target_option_eq.
	* tree-streamer-in.c (unpack_value_fields): Stream in
	TREE_TARGET_OPTION.
	* lto-streamer-out.c (DFS::DFS_write_tree_body): Follow
	DECL_FUNCTION_SPECIFIC_TARGET.
	(hash_tree): Hash TREE_TARGET_OPTION; visit
	DECL_FUNCTION_SPECIFIC_TARGET.
	* tree-streamer-out.c (streamer_pack_tree_bitfields): Skip
	TS_TARGET_OPTION.
	(streamer_write_tree_body): Output TS_TARGET_OPTION.

	* lto.c (compare_tree_sccs_1): Compare cl_target_option_eq.

From-SVN: r217572
2014-11-14 15:48:47 +00:00
Ilya Verbin ec6fe917cd [PATCH 3/7] OpenMP 4.0 offloading infrastructure: Offload tables.
gcc/
	* Makefile.in (GTFILES): Add omp-low.h to list of GC files.
	* cgraphunit.c: Include omp-low.h.
	* doc/tm.texi: Regenerate.
	* doc/tm.texi.in (TARGET_RECORD_OFFLOAD_SYMBOL): Document.
	* gengtype.c (open_base_files): Add omp-low.h to ifiles.
	* lto-cgraph.c (output_offload_tables): New function.
	(input_offload_tables): Likewise.
	* lto-section-in.c (lto_section_name): Add "offload_table".
	* lto-section-names.h (OFFLOAD_VAR_TABLE_SECTION_NAME): Define.
	(OFFLOAD_FUNC_TABLE_SECTION_NAME): Likewise.
	* lto-streamer-out.c (lto_output): Call output_offload_tables.
	* lto-streamer.h (lto_section_type): Add LTO_section_offload_table.
	(output_offload_tables, input_offload_tables): Declare.
	* omp-low.c: Include common/common-target.h and lto-section-names.h.
	(offload_funcs, offload_vars): New global <tree, va_gc> vectors.
	(expand_omp_target): Add child_fn into offload_funcs vector.
	(add_decls_addresses_to_decl_constructor): New function.
	(omp_finish_file): Likewise.
	* omp-low.h (omp_finish_file, offload_funcs, offload_vars): Declare.
	* target.def (record_offload_symbol): New DEFHOOK.
	* toplev.c: Include omp-low.h.
	(compile_file): Call omp_finish_file.
	* varpool.c: Include omp-low.h.
	(varpool_node::get_create): Add decl into offload_vars vector.

gcc/lto/
	* lto/lto.c (read_cgraph_and_symbols): Call input_offload_tables.

Co-Authored-By: Andrey Turetskiy <andrey.turetskiy@intel.com>
Co-Authored-By: Bernd Schmidt <bernds@codesourcery.com>
Co-Authored-By: Ilya Tocar <ilya.tocar@intel.com>
Co-Authored-By: Michael Zolotukhin <michael.v.zolotukhin@intel.com>

From-SVN: r217489
2014-11-13 13:44:04 +00:00
Ilya Verbin 1f6be68256 [PATCH 2/7] OpenMP 4.0 offloading infrastructure: LTO streaming.
gcc/
	* cgraph.c: Include context.h.
	(cgraph_node::create): Set node->offloadable and g->have_offload if
	decl have "omp declare target" attribute.
	* cgraph.h (symtab_node): Add need_lto_streaming and offloadable flags.
	* cgraphunit.c: Include lto-section-names.h.
	(ipa_passes): Call ipa_write_summaries if there is something to write to
	OFFLOAD_SECTION_NAME_PREFIX sections.
	(symbol_table::compile): Set flag_generate_lto if there is something to
	offload.
	Replace flag_lto with flag_generate_lto before lto_streamer_hooks_init.
	* context.c (gcc::context::context): Initialize have_offload with false.
	* context.h (class context): Add have_offload flag.
	* ipa-inline-analysis.c (inline_generate_summary): Do not exit under
	flag_generate_lto.
	(inline_free_summary): Always remove hooks.
	* lto-cgraph.c (referenced_from_other_partition_p): Ignore references
	from non-offloadable nodes while streaming a node into offload section.
	(reachable_from_other_partition_p): Likewise.
	(select_what_to_stream): New function.
	(compute_ltrans_boundary): Do not call
	lto_set_symtab_encoder_in_partition if the node should not be streamed.
	* lto-section-names.h (OFFLOAD_SECTION_NAME_PREFIX): Define.
	(section_name_prefix): Declare.
	* lto-streamer.c (section_name_prefix): New variable.
	(lto_get_section_name): Use section_name_prefix instead of
	LTO_SECTION_NAME_PREFIX.
	* lto-streamer.h (select_what_to_stream): Declare.
	* omp-low.c: Include context.h.
	(is_targetreg_ctx): New function.
	(scan_sharing_clauses): Use offloadable flag, instead of an attribute.
	(create_omp_child_function, check_omp_nesting_restrictions): Use new
	is_targetreg_ctx function.  Replace usage of "omp declare target"
	attribute with a cgraph_node flag offloadable.
	(expand_omp_target): Set mark_force_output for offloadable functions.
	(lower_omp_critical): Set offloadable flag for omp critical symbol.
	* passes.c (ipa_write_summaries): New argument offload_lto_mode.  Call
	select_what_to_stream.  Do not call lto_set_symtab_encoder_in_partition
	if the node should not be streamed out.
	* tree-pass.h (ipa_write_summaries): New bool argument.
	* varpool.c: Include context.h.
	(varpool_node::get_create): Set node->offloadable and g->have_offload if
	decl have "omp declare target" attribute.

gcc/lto/
	* lto-object.c (lto_obj_add_section): Use section_name_prefix instead of
	LTO_SECTION_NAME_PREFIX.
	* lto-partition.c (lto_promote_cross_file_statics): Call
	select_what_to_stream.
	* lto.c (lto_section_with_id): Use section_name_prefix instead of
	LTO_SECTION_NAME_PREFIX.
	(read_cgraph_and_symbols): Read OFFLOAD_SECTION_NAME_PREFIX sections, if
	being built as an offload compiler.

Co-Authored-By: Andrey Turetskiy <andrey.turetskiy@intel.com>
Co-Authored-By: Bernd Schmidt <bernds@codesourcery.com>
Co-Authored-By: Michael Zolotukhin <michael.v.zolotukhin@intel.com>

From-SVN: r217486
2014-11-13 13:37:38 +00:00
Andrew MacLeod c582198bd9 cgraph.h: Flatten.
* cgraph.h: Flatten.  Remove all include files.
	(symbol_table::initialize): Move to cgraph.c.
	* cgraph.c: Adjust include files.
	(symbol_table::initialize): Relocate from cgraph.h.
	* gengtype.c (open_base_files): Adjust include files.
	* gccplugin.h: Add hash-map.h, is-a.h, plugin-api.h, and ipa-ref.h to
	included files.
	* ipa-inline.h: Remove all include files.
	* ipa-prop.h: Ditto.
	* ipa-reference.h: Ditto.
	* ipa-utils.h: Ditto:
	* lto-streamer.h: Remove cgraph.h from include list.
	* asan.c: Adjust include files.
	* auto-profile.c: Ditto.
	* bb-reorder.c: Ditto.
	* calls.c: Ditto.
	* cfgexpand.c: Ditto.
	* cgraphbuild.c: Ditto.
	* cgraphclones.c: Ditto.
	* cgraphunit.c: Ditto.
	* combine.c: Ditto.
	* coverage.c: Ditto.
	* data-streamer.c: Ditto.
	* data-streamer-in.c: Ditto.
	* data-streamer-out.c: Ditto.
	* dbxout.c: Ditto.
	* dwarf2out.c: Ditto.
	* except.c: Ditto.
	* expr.c: Ditto.
	* final.c: Ditto.
	* fold-const.c: Ditto.
	* ggc-page.c: Ditto.
	* gimple-fold.c: Ditto.
	* gimple-iterator.c: Ditto.
	* gimple-pretty-print.c: Ditto.
	* gimple-streamer-in.c: Ditto.
	* gimple-streamer-out.c: Ditto.
	* gimplify.c: Ditto.
	* ipa.c: Ditto.
	* ipa-comdats.c: Ditto.
	* ipa-cp.c: Ditto.
	* ipa-devirt.c: Ditto.
	* ipa-icf.c: Ditto.
	* ipa-icf-gimple.c: Ditto.
	* ipa-inline-analysis.c: Ditto.
	* ipa-inline.c: Ditto.
	* ipa-inline-transform.c: Ditto.
	* ipa-polymorphic-call.c: Ditto.
	* ipa-profile.c: Ditto.
	* ipa-prop.c: Ditto.
	* ipa-pure-const.c: Ditto.
	* ipa-ref.c: Ditto.
	* ipa-reference.c: Ditto.
	* ipa-split.c: Ditto.
	* ipa-utils.c: Ditto.
	* ipa-visibility.c: Ditto.
	* langhooks.c: Ditto.
	* lto-cgraph.c: Ditto.
	* lto-compress.c: Ditto.
	* lto-opts.c: Ditto.
	* lto-section-in.c: Ditto.
	* lto-section-out.c: Ditto.
	* lto-streamer.c: Ditto.
	* lto-streamer-in.c: Ditto.
	* lto-streamer-out.c: Ditto.
	* omp-low.c: Ditto.
	* opts-global.c: Ditto.
	* passes.c: Ditto.
	* predict.c: Ditto.
	* print-tree.c: Ditto.
	* profile.c: Ditto.
	* ree.c: Ditto.
	* stor-layout.c: Ditto.
	* symtab.c: Ditto.
	* toplev.c: Ditto.
	* trans-mem.c: Ditto.
	* tree.c: Ditto.
	* tree-cfg.c: Ditto.
	* tree-eh.c: Ditto.
	* tree-emutls.c: Ditto.
	* tree-inline.c: Ditto.
	* tree-nested.c: Ditto.
	* tree-pretty-print.c: Ditto.
	* tree-profile.c: Ditto.
	* tree-sra.c: Ditto.
	* tree-ssa-alias.c: Ditto.
	* tree-ssa-loop-ivcanon.c: Ditto.
	* tree-ssa-loop-ivopts.c: Ditto.
	* tree-ssa-pre.c: Ditto.
	* tree-ssa-structalias.c: Ditto.
	* tree-streamer.c: Ditto.
	* tree-streamer-in.c: Ditto.
	* tree-streamer-out.c: Ditto.
	* tree-switch-conversion.c: Ditto.
	* tree-tailcall.c: Ditto.
	* tree-vect-data-refs.c: Ditto.
	* tree-vectorizer.c: Ditto.
	* tree-vect-stmts.c: Ditto.
	* tsan.c: Ditto.
	* ubsan.c: Ditto.
	* value-prof.c: Ditto.
	* varasm.c: Ditto.
	* varpool.c: Ditto.
	* config/arm/arm.c: Ditto.
	* config/bfin/bfin.c: Ditto.
	* config/c6x/c6x.c: Ditto.
	* config/cris/cris.c: Ditto.
	* config/darwin.c: Ditto.
	* config/darwin-c.c: Ditto.
	* config/i386/i386.c: Ditto.
	* config/i386/winnt.c: Ditto.
	* config/microblaze/microblaze.c: Ditto.
	* config/mips/mips.c: Ditto.
	* config/rs6000/rs6000.c: Ditto.
	* config/rx/rx.c: Ditto.

	* ada/gcc-interface/trans.c: Adjust include files.
	* ada/gcc-interface/utils.c: Ditto.

	* c/c-decl.c: Adjust include files.
	* c/c-parser.c: Ditto.

	* c-family/c-common.c: Adjust include files.
	* c-family/c-gimplify.c: Ditto.
	* c-family/cilk.c: Ditto.
	* c-family/c-pragma.c: Ditto.
	* c-family/c-ubsan.c: Ditto.

	* cp/call.c: Adjust include files.
	* cp/class.c: Ditto.
	* cp/decl2.c: Ditto.
	* cp/decl.c: Ditto.
	* cp/lambda.c: Ditto.
	* cp/mangle.c: Ditto.
	* cp/method.c: Ditto.
	* cp/optimize.c: Ditto.
	* cp/parser.c: Ditto.
	* cp/semantics.c: Ditto.
	* cp/tree.c: Ditto.
	* cp/vtable-class-hierarchy.c: Ditto.

	* fortran/f95-lang.c: Adjust include files.
	* fortran/trans-decl.c: Ditto.

	* go/go-gcc.cc: Adjust include files.

	* java/class.c: Adjust include files.
	* java/decl.c: Ditto.
	* java/jcf-parse.c: Ditto.
	* java/resource.c: Ditto.

	* lto/lto.c: Adjust include files.
	* lto/lto-lang.c: Ditto.
	* lto/lto-object.c: Ditto.
	* lto/lto-partition.c: Ditto.
	* lto/lto-symtab.c: Ditto.

	* objc/objc-act.c: Adjust include files.

From-SVN: r216805
2014-10-28 16:17:19 +00:00
Martin Liska b84d4347ac IPA ICF pass, part 3/5
* Makefile.in: New object files included.
	* cgraph.c (cgraph_node::dump): New cgraph_node flag icf_merged
	is printed.
	(verify_edge_corresponds_to_fndecl): More sensitive verification
	of nodes that are merged by IPA ICF.
	* cgraph.h (cgraph_node::num_references): New function.
	* cgraphunit.c (cgraph_node::expand_thunk): White space fixed.
	* common.opt: New options ipa-icf, ipa-icf-functions and
	ipa-icf-variables introduced.
	* doc/invoke.texi: Documentation of new options introduced.
	* ipa-icf-gimple.c: New file.
	* ipa-icf-gimple.h: New file.
	* ipa-icf.c: New file.
	* ipa-icf.h: New file.
	* lto-cgraph.c (lto_output_node): Streaming of icf_merged flag added.
	(input_overwrite_node): Likewise.
	* lto-section-in.c: New icf section added.
	* lto-streamer.h (enum lto_section_type): Likewise.
	* opts.c (common_handle_option): New option added.
	* passes.def: New pass included.
	* timevar.def: Time variable for IPA ICF added.
	* tree-pass.h: New IPA ICF pass entry point added.


Co-Authored-By: Jan Hubicka <hubicka@ucw.cz>

From-SVN: r216305
2014-10-16 10:47:55 +00:00
Gerald Pfeifer f473c082d8 lto-streamer.h (struct output_block::symbol): Change from struct symtab_node to plain symtab_node.
* lto-streamer.h (struct output_block::symbol): Change from
	struct symtab_node to plain symtab_node.
	(referenced_from_this_partition_p): Change first parameter
	from struct symtab_node to plain symtab_node.

From-SVN: r213805
2014-08-11 02:10:00 +00:00
Richard Biener 207c68cd61 lto-streamer.h (struct lto_input_block): Make it a class with a constructor.
2014-08-08  Richard Biener  <rguenther@suse.de>

	* lto-streamer.h (struct lto_input_block): Make it a class
	with a constructor.
	(LTO_INIT_INPUT_BLOCK, LTO_INIT_INPUT_BLOCK_PTR): Remove.
	(struct lto_function_header, struct lto_simple_header,
	struct lto_simple_header_with_strings,
	struct lto_decl_header, struct lto_function_header): Make
	a simple inheritance hieararchy.  Remove unused fields.
	(struct lto_asm_header): Remove.
	* lto-streamer-out.c (produce_asm): Adjust.
	(lto_output_toplevel_asms): Likewise.
	(produce_asm_for_decls): Likewise.
	* lto-section-out.c (lto_destroy_simple_output_block): Likewise.
	* data-streamer-in.c (string_for_index): Likewise.
	* ipa-inline-analysis.c (inline_read_section): Likewise.
	* ipa-prop.c (ipa_prop_read_section): Likewise.
	(read_replacements_section): Likewise.
	* lto-cgraph.c (input_cgraph_opt_section): Likewise.
	* lto-section-in.c (lto_create_simple_input_block): Likewise.
	(lto_destroy_simple_input_block): Likewise.
	* lto-streamer-in.c (lto_read_body_or_constructor): Likewise.
	(lto_input_toplevel_asms): Likewise.

	lto/
	* lto.c (lto_read_decls): Adjust for lto_input_block changes.

From-SVN: r213759
2014-08-08 12:55:31 +00:00
Trevor Saunders 9f25a338f9 remove pointer-set.[ch]
gcc/

	* Makefile.in: Remove references to pointer-set.c and pointer-set.h.
	* alias.c, cfgexpand.c, cgraphbuild.c,
	config/aarch64/aarch64-builtins.c, config/aarch64/aarch64.c,
	config/alpha/alpha.c, config/darwin.c, config/i386/i386.c,
	config/i386/winnt.c, config/ia64/ia64.c, config/m32c/m32c.c,
	config/mep/mep.c, config/mips/mips.c, config/rs6000/rs6000.c,
	config/s390/s390.c, config/sh/sh.c, config/sparc/sparc.c,
	config/spu/spu.c, config/stormy16/stormy16.c, config/tilegx/tilegx.c,
	config/tilepro/tilepro.c, config/xtensa/xtensa.c, dominance.c,
	dse.c, except.c, gengtype.c, gimple-expr.c,
	gimple-ssa-strength-reduction.c, gimplify.c, ifcvt.c,
	ipa-visibility.c, lto-streamer.h, omp-low.c, predict.c, stmt.c,
	tree-affine.c, tree-cfg.c, tree-eh.c, tree-inline.c, tree-nested.c,
	tree-scalar-evolution.c, tree-ssa-loop-im.c, tree-ssa-loop-niter.c,
	tree-ssa-phiopt.c, tree-ssa-structalias.c, tree-ssa-uninit.c,
	tree-ssa.c, tree.c, var-tracking.c, varpool.c: Remove includes of
	pointer-set.h.
	* pointer-set.c: Remove file.
	* pointer-set.h: Remove file.

gcc/c-family/

	* c-gimplify.c, cilk.c: Remove includes of pointer-set.h.

gcc/c/

	* c-typeck.c: Remove include of pointer-set.h.

gcc/cp/

	* class.c, cp-gimplify.c, decl.c, decl2.c, error.c, method.c,
	optimize.c, pt.c, semantics.c: Remove includes of pointer-set.h.

From-SVN: r213738
2014-08-07 20:52:50 +00:00
Trevor Saunders 39c8aaa4bf convert the rest of the users of pointer_map to hash_map
gcc/

	* hash-map.h (default_hashmap_traits): Adjust overloads of hash
	function to not conflict.
	* alias.c, cfgexpand.c, dse.c, except.h, gimple-expr.c,
	gimple-ssa-strength-reduction.c, gimple-ssa.h, ifcvt.c,
	lto-streamer-out.c, lto-streamer.h, tree-affine.c, tree-affine.h,
	tree-predcom.c, tree-scalar-evolution.c, tree-ssa-loop-im.c,
	tree-ssa-loop-niter.c, tree-ssa.c, value-prof.c: Use hash_map instead
	of pointer_map.

gcc/cp/

	* cp-tree.h, pt.c: Use hash_map instead of pointer_map.

gcc/lto/

	* lto-partition.c, lto.c: Use hash_map instead of pointer_map.

From-SVN: r213703
2014-08-07 10:44:14 +00:00
Trevor Saunders b787e7a2c2 convert many uses of pointer_map to hash_map
gcc/c-family/

	* cilk.c: Use hash_map instead of pointer_map.

gcc/c/

	* c-typeck.c: Use hash_map instead of pointer_map.

gcc/cp/

	* optimize.c, semantics.c: Use hash_map instead of pointer_map.

gcc/

	* hash-map.h (default_hashmap_traits::mark_key_deleted):
	Fix cast.
	(hash_map::remove): New method.
(hash_map::traverse): New method.
	* cgraph.h, except.c, except.h, gimple-ssa-strength-reduction.c,
	ipa-utils.c, lto-cgraph.c, lto-streamer.h, omp-low.c, predict.c,
	tree-cfg.c, tree-cfgcleanup.c, tree-eh.c, tree-eh.h, tree-inline.c,
	tree-inline.h, tree-nested.c, tree-sra.c, tree-ssa-loop-im.c,
	tree-ssa-loop-ivopts.c, tree-ssa-reassoc.c, tree-ssa-structalias.c,
	tree-ssa.c, tree-ssa.h, var-tracking.c: Use hash_map instead of
 pointer_map.

From-SVN: r213517
2014-08-02 11:34:54 +00:00
Richard Biener 936ddf9211 lto-streamer.h (struct output_block): Remove global.
2014-07-31  Richard Biener  <rguenther@suse.de>

	* lto-streamer.h (struct output_block): Remove global.
	(struct data_in): Remove labels, num_named_labels and
	num_unnamed_labels.
	* lto-streamer-in.c (lto_data_in_delete): Do not free labels.
	* lto-streamer-out.c (produce_asm_for_decls): Do not set global.

From-SVN: r213340
2014-07-31 10:11:44 +00:00
Richard Biener bfa2ebe3d7 data-streamer.h (streamer_write_data_stream): Declare here, renamed from ...
2014-07-31  Richard Biener  <rguenther@suse.de>

	* data-streamer.h (streamer_write_data_stream): Declare here,
	renamed from ...
	* lto-streamer.h (lto_output_data_stream): ... this.  Remove.
	* lto-cgraph.c (lto_output_node): Adjust.
	(lto_output_varpool_node): Likewise.
	* data-streamer-out.c (streamer_string_index): Likewise.
	(streamer_write_data_stream, lto_append_block): Move from ...
	* lto-section-out.c (lto_output_data_stream,
	lto_append_block): ... here.

From-SVN: r213317
2014-07-31 07:51:41 +00:00
Richard Biener f6bcdb5e05 lto-streamer.h (lto_write_data): New function.
2014-07-30  Richard Biener  <rguenther@suse.de>

	* lto-streamer.h (lto_write_data): New function.
	* langhooks.c (lhd_append_data): Do not free block.
	* lto-section-out.c (lto_write_data): New function writing
	raw data to the current section.
	(lto_write_stream): Adjust for langhook semantic change.
	(lto_destroy_simple_output_block): Write header directly.
	* lto-opts.c (lto_write_options): Write options directly.
	* lto-streamer-out.c (produce_asm): Write heaeder directly.
	(lto_output_toplevel_asms): Likewise.
	(copy_function_or_variable): Copy data directly.
	(write_global_references): Output index table directly.
	(lto_output_decl_state_refs): Likewise.
	(write_symbol): Write data directly.
	(produce_symtab): Adjust.
	(produce_asm_for_decls): Output header and refs directly.

	lto/
	* lto-object.c (lto_obj_append_data): Do not free block.

From-SVN: r213253
2014-07-30 12:14:58 +00:00
Martin Liska d52f529517 IPA C++ refactoring 1/N
* cgraph.h (symtab_node):
  (void register_symbol (void)): created from symtab_register_node
  (void remove (void)): created from symtab_remove_node
  (void dump (FILE *f)): created from dump_symtab_node
  (void DEBUG_FUNCTION debug (void)): created from debug_symtab_node
  (void DEBUG_FUNCTION verify (void)): created from verify_symtab_node
  (struct ipa_ref *add_reference (symtab_node *referred_node,
    enum ipa_ref_use use_type)): created from add_reference 
  (struct ipa_ref *add_reference (symtab_node *referred_node,
    enum ipa_ref_use use_type, gimple stmt)): created from add_reference
  (struct ipa_ref *maybe_add_reference (tree val, enum ipa_ref_use use_type,
    gimple stmt)): created from maybe_add_reference
  (bool semantically_equivalent_p (symtab_node *target)): created from
    symtab_semantically_equivalent_p
  (void remove_from_same_comdat_group (void)): created from
    remove_from_same_comdat_group
  (void add_to_same_comdat_group (symtab_node *old_node)): created from
    symtab_add_to_same_comdat_group
  (void dissolve_same_comdat_group_list (void)): created from
    symtab_dissolve_same_comdat_group_list
  (bool used_from_object_file_p (void)): created from symtab_used_from_object_file_p
  (symtab_node *ultimate_alias_target (enum availability *avail = NULL)):
    created from symtab_alias_ultimate_target
  (inline symtab_node *next_defined_symbol (void)): created from
    symtab_next_defined_symbol
  (bool resolve_alias (symtab_node *target)): created from
    symtab_resolve_alias
  (bool call_for_symbol_and_aliases (bool (*callback) (symtab_node *, void *),
    void *data, bool include_overwrite)): created from symtab_for_node_and_aliases
  (symtab_node *noninterposable_alias (void)): created from symtab_nonoverwritable_alias
  (inline symtab_node *get_alias_target (void)): created from symtab_alias_target
  (void set_section (const char *section)): created from set_section_1 
  (enum availability get_availability (void)): created from symtab_node_availability
  (void make_decl_local (void)): created from symtab_make_decl_local
  (bool real_symbol_p (void)): created from symtab_read_node
  (can_be_discarded_p (void)): created from symtab_can_be_discarded
  (inline bool comdat_local_p (void)): created from symtab_comdat_local_p
  (inline bool in_same_comdat_group_p (symtab_node *target)): created from
    symtab_in_same_comdat_p;
  (bool address_taken_from_non_vtable_p (void)): created from
    address_taken_from_non_vtable_p
  (static inline symtab_node *get (const_tree decl)): created from symtab_get_node
  (static void dump_table (FILE *)): created from dump_symtab
  (static inline DEBUG_FUNCTION void debug_symtab (void)): created from debug_symtab
  (static DEBUG_FUNCTION void verify_symtab_nodes (void)): created from verify_symtab
  (static bool used_from_object_file_p_worker (symtab_node *node)): created from
    symtab_used_from_object_file_p 
  (void dump_base (FILE *)): created from dump_symtab_base
  (bool DEBUG_FUNCTION verify_base (void)): created from verify_symtab_base
  (void unregister (void)): created from symtab_unregister_node
  (struct symbol_priority_map *priority_info (void)): created from symtab_priority_info
  (static bool set_implicit_section (symtab_node *n, void *)): created from set_implicit_section
  (static bool noninterposable_alias (symtab_node *node, void *data)): created from
    symtab_nonoverwritable_alias_1
  * cgraph.h (cgraph_node):
  (bool remove_symbol_and_inline_clones (cgraph_node *forbidden_node = NULL)):
    created from cgraph_remove_node_and_inline_clones
  (void record_stmt_references (gimple stmt)): created from ipa_record_stmt_references
  (void set_call_stmt_including_clones (gimple old_stmt, gimple new_stmt,
    bool update_speculative = true)): created from cgraph_set_call_stmt_including_clones
  (cgraph_node *function_symbol (enum availability *avail = NULL)):
    created from cgraph_function_node
  (cgraph_node *create_clone (tree decl, gcov_type count, int freq, bool update_original,
    vec<cgraph_edge *> redirect_callers, bool call_duplication_hook,
    struct cgraph_node *new_inlined_to, bitmap args_to_skip)):
    created from cgraph_create_clone 
  (cgraph_node *create_virtual_clone (vec<cgraph_edge *> redirect_callers,
    vec<ipa_replace_map *, va_gc> *tree_map, bitmap args_to_skip, const char * suffix)):
    created from cgraph_create_virtual_clone
  (cgraph_node *find_replacement (void)): created from cgraph_find_replacement_node
  (cgraph_node *create_version_clone (tree new_decl, vec<cgraph_edge *> redirect_callers,
    bitmap bbs_to_copy)): created from cgraph_copy_node_for_versioning
  (cgraph_node *create_version_clone_with_body (vec<cgraph_edge *> redirect_callers,
    vec<ipa_replace_map *, va_gc> *tree_map, bitmap args_to_skip, bool skip_return,
    bitmap bbs_to_copy, basic_block new_entry_block, const char *clone_name)):
    created from cgraph_function_version_info
  (struct cgraph_function_version_info *insert_new_function_version (void)):
    created from insert_new_cgraph_node_version
  (struct cgraph_function_version_info *function_version (void)): created from
    get_cgraph_node_version
  (void analyze (void)): created from analyze_function
  (cgraph_node * create_thunk (tree alias, tree, bool this_adjusting,
    HOST_WIDE_INT fixed_offset, HOST_WIDE_INT virtual_value, tree virtual_offset,
    tree real_alias) cgraph_add_thunk
  (inline cgraph_node *get_alias_target (void)): created from cgraph_alias_target
  (cgraph_node *ultimate_alias_target (availability *availability = NULL)):
    created from cgraph_function_or_thunk_node
  (bool expand_thunk (bool output_asm_thunks, bool force_gimple_thunk)):
    created from expand_thunk
  (void reset (void)): created from cgraph_reset_node
  (void create_wrapper (cgraph_node *target)): created from cgraph_make_wrapper
  (void DEBUG_FUNCTION verify_node (void)): created from verify_cgraph_node
  (void remove (void)): created from cgraph_remove_node
  (void dump (FILE *f)): created from dump_cgraph_node
  (void DEBUG_FUNCTION debug (void)): created from debug_cgraph_node
  (bool get_body (void)): created from cgraph_get_body
  (void release_body (void)): created from cgraph_release_function_body
  (void unnest (void)): created from cgraph_unnest_node
  (void make_local (void)): created from cgraph_make_node_local
  (void mark_address_taken (void)): created from cgraph_mark_address_taken_node
  (struct cgraph_edge *create_edge (cgraph_node *callee, gimple call_stmt,
    gcov_type count, int freq)): created from cgraph_create_edge
  (struct cgraph_edge *create_indirect_edge (gimple call_stmt, int ecf_flags,
    gcov_type count, int freq)): created from cgraph_create_indirect_edge
  (void create_edge_including_clones (struct cgraph_node *callee, gimple old_stmt,
    gimple stmt, gcov_type count, int freq, cgraph_inline_failed_t reason)):
    created from cgraph_create_edge_including_clones
  (cgraph_edge *get_edge (gimple call_stmt)): created from cgraph_edge
  (vec<cgraph_edge *> collect_callers (void)): created from collect_callers_of_node
  (void remove_callers (void)): created from cgraph_node_remove_callers
  (void remove_callees (void)): created from cgraph_node_remove_callees
  (enum availability get_availability (void)): created from cgraph_function_body_availability
  (void set_nothrow_flag (bool nothrow)): created from cgraph_set_nothrow_flag
  (void set_const_flag (bool readonly, bool looping)): created from cgraph_set_const_flag
  (void set_pure_flag (bool pure, bool looping)): created from cgraph_set_pure_flag
  (void call_duplication_hooks (cgraph_node *node2)): created from
    cgraph_call_node_duplication_hooks
  (bool call_for_symbol_and_aliases (bool (*callback) (cgraph_node *, void *),
    void *data, bool include_overwritable)): created from cgraph_for_node_and_aliases
  (bool call_for_symbol_thunks_and_aliases (bool (*callback) (cgraph_node *node, void *data),
    void *data, bool include_overwritable)): created from cgraph_for_node_thunks_and_aliases
  (void call_function_insertion_hooks (void)):
    created from cgraph_call_function_insertion_hooks
  (inline void mark_force_output (void)): created from cgraph_mark_force_output_node
  (bool local_p (void)): created from cgraph_local_node
  (bool can_be_local_p (void)): created from cgraph_node_can_be_local_p
  (bool cannot_return_p (void)): created from cgraph_node_cannot_return
  (bool only_called_directly_p (void)): created from cgraph_only_called_directly_p
  (inline bool only_called_directly_or_aliased_p (void)):
    created from cgraph_only_called_directly_or_aliased_p
  (bool will_be_removed_from_program_if_no_direct_calls_p (void)):
    created from cgraph_will_be_removed_from_program_if_no_direct_calls
  (bool can_remove_if_no_direct_calls_and_refs_p (void)):
    created from cgraph_can_remove_if_no_direct_calls_and_refs_p
  (bool can_remove_if_no_direct_calls_p (void)):
    created from cgraph_can_remove_if_no_direct_calls_p
  (inline bool has_gimple_body_p (void)):
    created from cgraph_function_with_gimple_body_p
  (bool optimize_for_size_p (void)): created from cgraph_optimize_for_size_p
  (static void dump_cgraph (FILE *f)): created from dump_cgraph
  (static inline void debug_cgraph (void)): created from debug_cgraph
  (static void record_function_versions (tree decl1, tree decl2)):
    created from record_function_versions
  (static void delete_function_version (tree decl)):
    created from delete_function_version
  (static void add_new_function (tree fndecl, bool lowered)):
    created from cgraph_add_new_function
  (static inline cgraph_node *get (const_tree decl)): created from cgraph_get_node
  (static cgraph_node * create (tree decl)): created from cgraph_create_node
  (static cgraph_node * create_empty (void)): created from cgraph_create_empty_node
  (static cgraph_node * get_create (tree)): created from cgraph_get_create_node
  (static cgraph_node *get_for_asmname (tree asmname)):
    created from cgraph_node_for_asm
  (static cgraph_node * create_same_body_alias (tree alias, tree decl)):
    created from cgraph_same_body_alias 
  (static bool used_from_object_file_p_worker (cgraph_node *node,
    void *): new function
  (static bool non_local_p (cgraph_node *node, void *)):
    created from cgraph_non_local_node_p_1
  (static void DEBUG_FUNCTION verify_cgraph_nodes (void)):
    created from verify_cgraph
  (static bool make_local (cgraph_node *node, void *)):
    created from cgraph_make_node_local
  (static cgraph_node *create_alias (tree alias, tree target)):
    created from cgraph_create_function_alias
  (static cgraph_edge * create_edge (cgraph_node *caller, cgraph_node *callee,
    gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)):
    created from cgraph_create_edge_1
  * cgraph.h (varpool_node):
  (void remove (void)): created from varpool_remove_node
  (void dump (FILE *f)): created from dump_varpool_node

From-SVN: r212982
2014-07-24 12:07:13 +00:00
Jan Hubicka 0b83e68824 vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h
* vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h
	(varpool_get_constructor): New function.
	(varpool_ctor_useable_for_folding_p): Break out from ...
	(ctor_for_folding): ... here; use varpool_get_constructor.
	(varpool_assemble_decl): Likewise.
	* lto-streamer.h (struct output_block): Turn cgraph_node
	to symbol filed.
	(lto_input_variable_constructor): Declare.
	* ipa-visibility.c (function_and_variable_visibility): Use
	varpool_get_constructor.
	* cgraph.h (varpool_get_constructor): Declare.
	(varpool_ctor_useable_for_folding_p): New function.
	* lto-streamer-out.c (get_symbol_initial_value): Take encoder
	parameter; return error_mark_node for non-trivial constructors.
	(lto_write_tree_1, DFS_write_tree): UPdate use of
	get_symbol_initial_value.
	(output_function): Update initialization of symbol.
	(output_constructor): New function.
	(copy_function): Rename to ..
	(copy_function_or_variable): ... this one; handle vars too.
	(lto_output): Output variable sections.
	* lto-streamer-in.c (input_constructor): New function.
	(lto_read_body): Rename from ...
	(lto_read_body_or_constructor): ... this one; handle vars
	too.
	(lto_input_variable_constructor): New function.
	* ipa-prop.c (ipa_prop_write_jump_functions,
	ipa_prop_write_all_agg_replacement): Update.
	* lto-cgraph.c (compute_ltrans_boundary): Use it.
	(output_cgraph_opt_summary): Set symbol to NULL.

	* lto-partition.c (add_references_to_partition): Use 
	varpool_ctor_useable_for_folding_p.
	* lto.c (lto_read_in_decl_state): Update sanity check.

From-SVN: r212467
2014-07-11 17:43:44 +00:00
Martin Liska d122681a3c IPA REF refactoring
* Makefile.in: Removed header file (ipa-ref-inline.h).
	* cgraph.c (cgraph_turn_edge_to_speculative): New IPA REF function
	called.
	(cgraph_speculative_call_info): Likewise.
	(cgraph_for_node_thunks_and_aliases): Likewise.
	(cgraph_for_node_and_aliases): Likewise.
	(verify_cgraph_node): Likewise.
	* cgraph.h: Batch of IPA REF functions become member functions of
	symtab_node: add_reference, maybe_add_reference, clone_references,
	clone_referring, clone_reference, find_reference,
	remove_stmt_references, remove_all_references,
	remove_all_referring, dump_references, dump_referring,
	has_alias_p, iterate_reference, iterate_referring.
	* cgraphbuild.c (record_reference): New IPA REF function used.
	(record_type_list): Likewise.
	(record_eh_tables): Likewise.
	(mark_address): Likewise.
	(mark_load): Likewise.
	(mark_store): Likewise.
	(pass_build_cgraph_edges): Likewise.
	(rebuild_cgraph_edge): Likewise.
	(cgraph_rebuild_references): Likewise.
	(pass_remove_cgraph_callee_edges): Likewise.
	* cgraphclones.c (cgraph_clone_node): Likewise.
	(cgraph_create_virtual_clone): Likewise.
	(cgraph_materialize_clone): Likewise.
	(cgraph_materialize_all_clones): Likewise.
	* cgraphunit.c (cgraph_reset_node): Likewise.
	(cgraph_reset_node): Likewise.
	(analyze_function): Likewise.
	(assemble_thunks_and_aliases): Likewise.
	(expand_function): Likewise.
	* ipa-comdats.c (propagate_comdat_group): Likewise.
	(enqueue_references): Likewise.
	* ipa-cp.c (ipcp_discover_new_direct_edges): Likewise.
	(create_specialized_node): Likewise.
	* ipa-devirt.c (referenced_from_vtable_p): Likewise.
	* ipa-inline-transform.c (can_remove_node_now_p_1): Likewise.
	* ipa-inline.c (reset_edge_caches): Likewise.
	(update_caller_keys): Likewise.
	(execute): Likewise.
	* ipa-prop.c (remove_described_reference): Likewise.
	(propagate_controlled_uses): Likewise.
	(ipa_edge_duplication_hook): Likewise.
	(ipa_modify_call_arguments): Likewise.
	* ipa-pure-const.c (propagate_pure_const): Likewise.
	* ipa-ref-inline.h: Header file removed, functions moved
	to symtab_node class.
	* ipa-ref.c (remove_reference): New class member function.
	(cannot_lead_to_return): New class member function.
	(referring_ref_list): Likewise.
	(referred_ref_list): Likewise.
	Rest of functions moved to symtab_node class.
	* ipa-ref.h: New member functions remove_reference,
	cannot_lead_to_return, referring_ref_list, referred_ref_list added
	to ipa_ref class.
	ipa_ref_list class has new member functions: first_reference,
	first_referring, clear, nreferences.
	* ipa-reference.c (analyze_function): New IPA REF function used.
	(write_node_summary_p): Likewise.
	(ipa_reference_write_optimization_summary): Likewise.
	* ipa-split.c (split_function): Likewise.
	* ipa-utils.c (ipa_reverse_postorder): Likewise.
	* ipa-visibility.c (cgraph_non_local_node_p_1): Likewise.
	(function_and_variable_visibility): Likewise.
	* ipa.c (has_addr_references_p): Likewise.
	(process_references): Argument type changed.
	(symtab_remove_unreachable_nodes): New IPA REF function used.
	(process_references): Likewise.
	(set_writeonly_bit): Likewise.
	* lto-cgraph.c: Implementation of new symtab_node member functions
	that uses new IPA REF functions.
	* lto-streamer-in.c (fixup_call_stmt_edges_1): New IPA REF function used.
	* lto-streamer-out.c (output_symbol_p): Likewise.
	* lto-streamer.h (referenced_from_this_partition_p): Argument type
	changed.
	* lto/lto-partition.c (add_references_to_partition): New IPA REF function
	used.
	(add_symbol_to_partition_1): Likewise.
	(lto_balanced_map): Likewise.
	* lto/lto-symtab.c (lto_cgraph_replace_node): Likewise.
	* symtab.c: Implementation of new IPA REF API.
	* trans-mem.c (ipa_tm_create_version_alias): New IPA REF function used.
	(ipa_tm_create_version): Likewise.
	(ipa_tm_execute): Likewise.
	* tree-emutls.c (gen_emutls_addr): Likewise.
	* tree-inline.c (copy_bb): Likewise.
	(delete_unreachable_blocks_update_callgraph): Likewise.
	* varpool.c (varpool_remove_unreferenced_decls): Likewise.
	(varpool_for_node_and_aliases): Likewise.

From-SVN: r211987
2014-06-25 16:55:46 +00:00
Trevor Saunders 1eb68d2d01 add hash_map class
gcc/

	* alloc-pool.c (alloc_pool_hash): Use hash_map instead of hash_table.
	* dominance.c (iterate_fix_dominators): Use hash_map instead of
	pointer_map.
	* hash-map.h: New file.
	* ipa-comdats.c: Use hash_map instead of pointer_map.
	* ipa.c: Likewise.
	* lto-section-out.c: Adjust.
	* lto-streamer.h: Replace pointer_map with hash_map.
	* symtab.c (verify_symtab): Likewise.
	* tree-ssa-strlen.c (decl_to_stridxlist_htab): Likewise.
	* tree-ssa-uncprop.c (val_ssa_equiv): Likewise.
	* tree-streamer.h: Likewise.
	* tree-streamer.c: Adjust.
	* pointer-set.h: Remove pointer_map.

gcc/lto/

	* lto.c (canonical_type_hash_cache): Use hash_map instead of
	pointer_map.

From-SVN: r211938
2014-06-24 13:22:11 +00:00
Trevor Saunders c203e8a73b Remove a layer of indirection from hash_table
gcc/

	* hash-table.h: Remove a layer of indirection from hash_table so that
	it contains the hash table's data instead of a pointer to the data.
	* alloc-pool.c, asan.c, attribs.c, bitmap.c, cfg.c,
	config/arm/arm.c, config/i386/winnt.c, config/ia64/ia64.c,
	config/mips/mips.c, config/sol2.c, coverage.c, cselib.c,
	data-streamer-out.c, dse.c, dwarf2cfi.c, dwarf2out.c, except.c,
	fold-const.c, gcse.c, ggc-common.c,
	gimple-ssa-strength-reduction.c, gimplify.c,
	graphite-clast-to-gimple.c, graphite-dependences.c,
	graphite-htab.h, graphite.c, haifa-sched.c, ipa-devirt.c,
	ipa-profile.c, ira-color.c, ira-costs.c, loop-invariant.c,
	loop-iv.c, loop-unroll.c, lto-streamer-in.c, lto-streamer-out.c,
	lto-streamer.c, lto-streamer.h, passes.c, plugin.c,
	postreload-gcse.c, sese.c, statistics.c, store-motion.c,
	trans-mem.c, tree-browser.c, tree-cfg.c, tree-complex.c,
	tree-eh.c, tree-into-ssa.c, tree-parloops.c, tree-sra.c,
	tree-ssa-ccp.c, tree-ssa-coalesce.c, tree-ssa-dom.c,
	tree-ssa-live.c, tree-ssa-loop-im.c,
	tree-ssa-loop-ivopts.c, tree-ssa-phiopt.c, tree-ssa-pre.c,
	tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-ssa-strlen.c,
	tree-ssa-structalias.c, tree-ssa-tail-merge.c,
	tree-ssa-threadupdate.c, tree-ssa-uncprop.c,
tree-vect-data-refs.c, tree-vect-loop.c, tree-vectorizer.c,
tree-vectorizer.h, valtrack.c, valtrack.h, var-tracking.c,
vtable-verify.c, vtable-verify.h: Adjust.

gcc/c/

	* c-decl.c: Adjust.

gcc/cp/

	* class.c, semantics.c, tree.c, vtable-class-hierarchy.c:
	Adjust.

gcc/java/

	* jcf-io.c: Adjust.

gcc/lto/

	* lto.c: Adjust.

gcc/objc/

	* objc-act.c: Adjust.

From-SVN: r211936
2014-06-24 13:21:35 +00:00
Bernd Schmidt 4000360e40 Create a new header lto-section-names.h
gcc/
        * config/darwin.c: Include "lto-section-names.h".
        (LTO_SEGMENT_NAME): Don't define.
        * config/i386/winnt.c: Include "lto-section-names.h".
        * lto-streamer.c: Include "lto-section-names.h".
        * lto-streamer.h (LTO_SECTION_NAME_PREFIX): Don't define.
        * lto-wrapper.c: Include "lto-section-names.h".
        (LTO_SECTION_NAME_PREFIX): Don't define.
        * lto-section-names.h: New file.
        * cgraphunit.c: Include "lto-section-names.h".

        gcc/lto/
        * lto-object.c: Include "lto-section-names.h".
        (LTO_SEGMENT_NAME): Don't define.
        * lto.c: Include "lto-section-names.h".

From-SVN: r210819
2014-05-22 16:21:18 +00:00
David Malcolm 7de90a6c27 Change is-a.h to support typedefs of pointers
gcc/
	* is-a.h: Update comments to reflect the following changes to the
	"pointerness" of the API, making the template parameter match the
	return type, allowing use of is-a.h with typedefs of pointers.
	(is_a_helper::cast): Return a T rather then a pointer to a T, so
	that the return type matches the parameter to the is_a_helper.
	(as_a): Likewise.
	(dyn_cast): Likewise.

	* cgraph.c (cgraph_node_for_asm): Update for removal of implicit
	pointer from the is-a.h API.

	* cgraph.h (is_a_helper <cgraph_node>::test): Convert to...
	(is_a_helper <cgraph_node *>::test): ...this, matching change to
	is-a.h API.
	(is_a_helper <varpool_node>::test): Likewise, convert to...
	(is_a_helper <varpool_node *>::test): ...this.

	(varpool_first_variable): Update for removal of implicit pointer
	from the is-a.h API.
	(varpool_next_variable): Likewise.
	(varpool_first_static_initializer): Likewise.
	(varpool_next_static_initializer): Likewise.
	(varpool_first_defined_variable): Likewise.
	(varpool_next_defined_variable): Likewise.
	(cgraph_first_defined_function): Likewise.
	(cgraph_next_defined_function): Likewise.
	(cgraph_first_function): Likewise.
	(cgraph_next_function): Likewise.
	(cgraph_first_function_with_gimple_body): Likewise.
	(cgraph_next_function_with_gimple_body): Likewise.
	(cgraph_alias_target): Likewise.
	(varpool_alias_target): Likewise.
	(cgraph_function_or_thunk_node): Likewise.
	(varpool_variable_node): Likewise.
	(symtab_real_symbol_p): Likewise.
	* cgraphunit.c (referred_to_p): Likewise.
	(analyze_functions): Likewise.
	(handle_alias_pairs): Likewise.
	* gimple-fold.c (can_refer_decl_in_current_unit_p): Likewise.
	* gimple-ssa.h (gimple_vuse_op): Likewise.
	(gimple_vdef_op): Likewise.
	* gimple-streamer-in.c (input_gimple_stmt): Likewise.
	* gimple.c (gimple_build_asm_1): Likewise.
	(gimple_build_try): Likewise.
	(gimple_build_resx): Likewise.
	(gimple_build_eh_dispatch): Likewise.
	(gimple_build_omp_for): Likewise.
	(gimple_omp_for_set_clauses): Likewise.

	* gimple.h (is_a_helper <gimple_statement_asm>::test): Convert to...
	(is_a_helper <gimple_statement_asm *>::test): ...this.
	(is_a_helper <gimple_statement_bind>::test): Convert to...
	(is_a_helper <gimple_statement_bind *>::test): ...this.
	(is_a_helper <gimple_statement_call>::test): Convert to...
	(is_a_helper <gimple_statement_call *>::test): ...this.
	(is_a_helper <gimple_statement_catch>::test): Convert to...
	(is_a_helper <gimple_statement_catch *>::test): ...this.
	(is_a_helper <gimple_statement_resx>::test): Convert to...
	(is_a_helper <gimple_statement_resx *>::test): ...this.
	(is_a_helper <gimple_statement_eh_dispatch>::test): Convert to...
	(is_a_helper <gimple_statement_eh_dispatch *>::test): ...this.
	(is_a_helper <gimple_statement_eh_else>::test): Convert to...
	(is_a_helper <gimple_statement_eh_else *>::test): ...this.
	(is_a_helper <gimple_statement_eh_filter>::test): Convert to...
	(is_a_helper <gimple_statement_eh_filter *>::test): ...this.
	(is_a_helper <gimple_statement_eh_mnt>::test): Convert to...
	(is_a_helper <gimple_statement_eh_mnt *>::test): ...this.
	(is_a_helper <gimple_statement_omp_atomic_load>::test): Convert to...
	(is_a_helper <gimple_statement_omp_atomic_load *>::test): ...this.
	(is_a_helper <gimple_statement_omp_atomic_store>::test): Convert to...
	(is_a_helper <gimple_statement_omp_atomic_store *>::test): ...this.
	(is_a_helper <gimple_statement_omp_return>::test): Convert to...
	(is_a_helper <gimple_statement_omp_return *>::test): ...this.
	(is_a_helper <gimple_statement_omp_continue>::test): Convert to...
	(is_a_helper <gimple_statement_omp_continue *>::test): ...this.
	(is_a_helper <gimple_statement_omp_critical>::test): Convert to...
	(is_a_helper <gimple_statement_omp_critical *>::test): ...this.
	(is_a_helper <gimple_statement_omp_for>::test): Convert to...
	(is_a_helper <gimple_statement_omp_for *>::test): ...this.
	(is_a_helper <gimple_statement_omp_taskreg>::test): Convert to...
	(is_a_helper <gimple_statement_omp_taskreg *>::test): ...this.
	(is_a_helper <gimple_statement_omp_parallel>::test): Convert to...
	(is_a_helper <gimple_statement_omp_parallel *>::test): ...this.
	(is_a_helper <gimple_statement_omp_target>::test): Convert to...
	(is_a_helper <gimple_statement_omp_target *>::test): ...this.
	(is_a_helper <gimple_statement_omp_sections>::test): Convert to...
	(is_a_helper <gimple_statement_omp_sections *>::test): ...this.
	(is_a_helper <gimple_statement_omp_single>::test): Convert to...
	(is_a_helper <gimple_statement_omp_single *>::test): ...this.
	(is_a_helper <gimple_statement_omp_teams>::test): Convert to...
	(is_a_helper <gimple_statement_omp_teams *>::test): ...this.
	(is_a_helper <gimple_statement_omp_task>::test): Convert to...
	(is_a_helper <gimple_statement_omp_task *>::test): ...this.
	(is_a_helper <gimple_statement_phi>::test): Convert to...
	(is_a_helper <gimple_statement_phi *>::test): ...this.
	(is_a_helper <gimple_statement_transaction>::test): Convert to...
	(is_a_helper <gimple_statement_transaction *>::test): ...this.
	(is_a_helper <gimple_statement_try>::test): Convert to...
	(is_a_helper <gimple_statement_try *>::test): ...this.
	(is_a_helper <gimple_statement_wce>::test): Convert to...
	(is_a_helper <gimple_statement_wce *>::test): ...this.
	(is_a_helper <const gimple_statement_asm>::test): Convert to...
	(is_a_helper <const gimple_statement_asm *>::test): ...this.
	(is_a_helper <const gimple_statement_bind>::test): Convert to...
	(is_a_helper <const gimple_statement_bind *>::test): ...this.
	(is_a_helper <const gimple_statement_call>::test): Convert to...
	(is_a_helper <const gimple_statement_call *>::test): ...this.
	(is_a_helper <const gimple_statement_catch>::test): Convert to...
	(is_a_helper <const gimple_statement_catch *>::test): ...this.
	(is_a_helper <const gimple_statement_resx>::test): Convert to...
	(is_a_helper <const gimple_statement_resx *>::test): ...this.
	(is_a_helper <const gimple_statement_eh_dispatch>::test):
	Convert to...
	(is_a_helper <const gimple_statement_eh_dispatch *>::test):
	...this.
	(is_a_helper <const gimple_statement_eh_filter>::test): Convert
	to...
	(is_a_helper <const gimple_statement_eh_filter *>::test): ...this.
	(is_a_helper <const gimple_statement_omp_atomic_load>::test):
	Convert to...
	(is_a_helper <const gimple_statement_omp_atomic_load *>::test):
	...this.
	(is_a_helper <const gimple_statement_omp_atomic_store>::test):
	Convert to...
	(is_a_helper <const gimple_statement_omp_atomic_store *>::test):
	...this.
	(is_a_helper <const gimple_statement_omp_return>::test): Convert
	to...
	(is_a_helper <const gimple_statement_omp_return *>::test): ...this.
	(is_a_helper <const gimple_statement_omp_continue>::test): Convert
	to...
	(is_a_helper <const gimple_statement_omp_continue *>::test): ...this.
	(is_a_helper <const gimple_statement_omp_critical>::test): Convert
	to...
	(is_a_helper <const gimple_statement_omp_critical *>::test): ...this.
	(is_a_helper <const gimple_statement_omp_for>::test): Convert to...
	(is_a_helper <const gimple_statement_omp_for *>::test): ...this.
	(is_a_helper <const gimple_statement_omp_taskreg>::test): Convert
	to...
	(is_a_helper <const gimple_statement_omp_taskreg *>::test): ...this.
	(is_a_helper <const gimple_statement_omp_parallel>::test): Convert
	to...
	(is_a_helper <const gimple_statement_omp_parallel *>::test): ...this.
	(is_a_helper <const gimple_statement_omp_target>::test): Convert
	to...
	(is_a_helper <const gimple_statement_omp_target *>::test): ...this.
	(is_a_helper <const gimple_statement_omp_sections>::test): Convert
	to...
	(is_a_helper <const gimple_statement_omp_sections *>::test): ...this.
	(is_a_helper <const gimple_statement_omp_single>::test): Convert
	to...
	(is_a_helper <const gimple_statement_omp_single *>::test): ...this.
	(is_a_helper <const gimple_statement_omp_teams>::test): Convert
	to...
	(is_a_helper <const gimple_statement_omp_teams *>::test): ...this.
	(is_a_helper <const gimple_statement_omp_task>::test): Convert
	to...
	(is_a_helper <const gimple_statement_omp_task *>::test): ...this.
	(is_a_helper <const gimple_statement_phi>::test): Convert to...
	(is_a_helper <const gimple_statement_phi *>::test): ...this.
	(is_a_helper <const gimple_statement_transaction>::test): Convert
	to...
	(is_a_helper <const gimple_statement_transaction *>::test): ...this.
	(is_a_helper <const gimple_statement_with_ops>::test): Convert
	to...
	(is_a_helper <const gimple_statement_with_ops *>::test): ...this.
	(is_a_helper <gimple_statement_with_ops>::test): Convert to...
	(is_a_helper <gimple_statement_with_ops *>::test): ...this.
	(is_a_helper <const gimple_statement_with_memory_ops>::test):
	Convert to...
	(is_a_helper <const gimple_statement_with_memory_ops *>::test):
	...this.
	(is_a_helper <gimple_statement_with_memory_ops>::test): Convert
	to...
	(is_a_helper <gimple_statement_with_memory_ops *>::test): ...this.

	(gimple_use_ops): Update for removal of implicit pointer from the
	is-a.h API.
	(gimple_set_use_ops): Likewise.
	(gimple_vuse): Likewise.
	(gimple_vdef): Likewise.
	(gimple_vuse_ptr): Likewise.
	(gimple_vdef_ptr): Likewise.
	(gimple_set_vuse): Likewise.
	(gimple_set_vdef): Likewise.
	(gimple_omp_return_set_lhs): Likewise.
	(gimple_omp_return_lhs): Likewise.
	(gimple_omp_return_lhs_ptr): Likewise.
	(gimple_call_fntype): Likewise.
	(gimple_call_set_fntype): Likewise.
	(gimple_call_set_internal_fn): Likewise.
	(gimple_call_use_set): Likewise.
	(gimple_call_clobber_set): Likewise.
	(gimple_bind_vars): Likewise.
	(gimple_bind_set_vars): Likewise.
	(gimple_bind_body_ptr): Likewise.
	(gimple_bind_set_body): Likewise.
	(gimple_bind_add_stmt): Likewise.
	(gimple_bind_block): Likewise.
	(gimple_bind_set_block): Likewise.
	(gimple_asm_ninputs): Likewise.
	(gimple_asm_noutputs): Likewise.
	(gimple_asm_nclobbers): Likewise.
	(gimple_asm_nlabels): Likewise.
	(gimple_asm_input_op): Likewise.
	(gimple_asm_input_op_ptr): Likewise.
	(gimple_asm_output_op): Likewise.
	(gimple_asm_output_op_ptr): Likewise.
	(gimple_asm_set_output_op): Likewise.
	(gimple_asm_clobber_op): Likewise.
	(gimple_asm_set_clobber_op): Likewise.
	(gimple_asm_label_op): Likewise.
	(gimple_asm_set_label_op): Likewise.
	(gimple_asm_string): Likewise.
	(gimple_catch_types): Likewise.
	(gimple_catch_types_ptr): Likewise.
	(gimple_catch_handler_ptr): Likewise.
	(gimple_catch_set_types): Likewise.
	(gimple_catch_set_handler): Likewise.
	(gimple_eh_filter_types): Likewise.
	(gimple_eh_filter_types_ptr): Likewise.
	(gimple_eh_filter_failure_ptr): Likewise.
	(gimple_eh_filter_set_types): Likewise.
	(gimple_eh_filter_set_failure): Likewise.
	(gimple_eh_must_not_throw_fndecl): Likewise.
	(gimple_eh_must_not_throw_set_fndecl): Likewise.
	(gimple_eh_else_n_body_ptr): Likewise.
	(gimple_eh_else_e_body_ptr): Likewise.
	(gimple_eh_else_set_n_body): Likewise.
	(gimple_eh_else_set_e_body): Likewise.
	(gimple_try_eval_ptr): Likewise.
	(gimple_try_cleanup_ptr): Likewise.
	(gimple_try_set_eval): Likewise.
	(gimple_try_set_cleanup): Likewise.
	(gimple_wce_cleanup_ptr): Likewise.
	(gimple_wce_set_cleanup): Likewise.
	(gimple_phi_capacity): Likewise.
	(gimple_phi_num_args): Likewise.
	(gimple_phi_result): Likewise.
	(gimple_phi_result_ptr): Likewise.
	(gimple_phi_set_result): Likewise.
	(gimple_phi_arg): Likewise.
	(gimple_phi_set_arg): Likewise.
	(gimple_resx_region): Likewise.
	(gimple_resx_set_region): Likewise.
	(gimple_eh_dispatch_region): Likewise.
	(gimple_eh_dispatch_set_region): Likewise.
	(gimple_omp_critical_name): Likewise.
	(gimple_omp_critical_name_ptr): Likewise.
	(gimple_omp_critical_set_name): Likewise.
	(gimple_omp_for_clauses): Likewise.
	(gimple_omp_for_clauses_ptr): Likewise.
	(gimple_omp_for_set_clauses): Likewise.
	(gimple_omp_for_collapse): Likewise.
	(gimple_omp_for_index): Likewise.
	(gimple_omp_for_index_ptr): Likewise.
	(gimple_omp_for_set_index): Likewise.
	(gimple_omp_for_initial): Likewise.
	(gimple_omp_for_initial_ptr): Likewise.
	(gimple_omp_for_set_initial): Likewise.
	(gimple_omp_for_final): Likewise.
	(gimple_omp_for_final_ptr): Likewise.
	(gimple_omp_for_set_final): Likewise.
	(gimple_omp_for_incr): Likewise.
	(gimple_omp_for_incr_ptr): Likewise.
	(gimple_omp_for_set_incr): Likewise.
	(gimple_omp_for_pre_body_ptr): Likewise.
	(gimple_omp_for_set_pre_body): Likewise.
	(gimple_omp_parallel_clauses): Likewise.
	(gimple_omp_parallel_clauses_ptr): Likewise.
	(gimple_omp_parallel_set_clauses): Likewise.
	(gimple_omp_parallel_child_fn): Likewise.
	(gimple_omp_parallel_child_fn_ptr): Likewise.
	(gimple_omp_parallel_set_child_fn): Likewise.
	(gimple_omp_parallel_data_arg): Likewise.
	(gimple_omp_parallel_data_arg_ptr): Likewise.
	(gimple_omp_parallel_set_data_arg): Likewise.
	(gimple_omp_task_clauses): Likewise.
	(gimple_omp_task_clauses_ptr): Likewise.
	(gimple_omp_task_set_clauses): Likewise.
	(gimple_omp_task_child_fn): Likewise.
	(gimple_omp_task_child_fn_ptr): Likewise.
	(gimple_omp_task_set_child_fn): Likewise.
	(gimple_omp_task_data_arg): Likewise.
	(gimple_omp_task_data_arg_ptr): Likewise.
	(gimple_omp_task_set_data_arg): Likewise.
	(gimple_omp_taskreg_clauses): Likewise.
	(gimple_omp_taskreg_clauses_ptr): Likewise.
	(gimple_omp_taskreg_set_clauses): Likewise.
	(gimple_omp_taskreg_child_fn): Likewise.
	(gimple_omp_taskreg_child_fn_ptr): Likewise.
	(gimple_omp_taskreg_set_child_fn): Likewise.
	(gimple_omp_taskreg_data_arg): Likewise.
	(gimple_omp_taskreg_data_arg_ptr): Likewise.
	(gimple_omp_taskreg_set_data_arg): Likewise.
	(gimple_omp_task_copy_fn): Likewise.
	(gimple_omp_task_copy_fn_ptr): Likewise.
	(gimple_omp_task_set_copy_fn): Likewise.
	(gimple_omp_task_arg_size): Likewise.
	(gimple_omp_task_arg_size_ptr): Likewise.
	(gimple_omp_task_set_arg_size): Likewise.
	(gimple_omp_task_arg_align): Likewise.
	(gimple_omp_task_arg_align_ptr): Likewise.
	(gimple_omp_task_set_arg_align): Likewise.
	(gimple_omp_single_clauses): Likewise.
	(gimple_omp_single_clauses_ptr): Likewise.
	(gimple_omp_single_set_clauses): Likewise.
	(gimple_omp_target_clauses): Likewise.
	(gimple_omp_target_clauses_ptr): Likewise.
	(gimple_omp_target_set_clauses): Likewise.
	(gimple_omp_target_child_fn): Likewise.
	(gimple_omp_target_child_fn_ptr): Likewise.
	(gimple_omp_target_set_child_fn): Likewise.
	(gimple_omp_target_data_arg): Likewise.
	(gimple_omp_target_data_arg_ptr): Likewise.
	(gimple_omp_target_set_data_arg): Likewise.
	(gimple_omp_teams_clauses): Likewise.
	(gimple_omp_teams_clauses_ptr): Likewise.
	(gimple_omp_teams_set_clauses): Likewise.
	(gimple_omp_sections_clauses): Likewise.
	(gimple_omp_sections_clauses_ptr): Likewise.
	(gimple_omp_sections_set_clauses): Likewise.
	(gimple_omp_sections_control): Likewise.
	(gimple_omp_sections_control_ptr): Likewise.
	(gimple_omp_sections_set_control): Likewise.
	(gimple_omp_for_set_cond): Likewise.
	(gimple_omp_for_cond): Likewise.
	(gimple_omp_atomic_store_set_val): Likewise.
	(gimple_omp_atomic_store_val): Likewise.
	(gimple_omp_atomic_store_val_ptr): Likewise.
	(gimple_omp_atomic_load_set_lhs): Likewise.
	(gimple_omp_atomic_load_lhs): Likewise.
	(gimple_omp_atomic_load_lhs_ptr): Likewise.
	(gimple_omp_atomic_load_set_rhs): Likewise.
	(gimple_omp_atomic_load_rhs): Likewise.
	(gimple_omp_atomic_load_rhs_ptr): Likewise.
	(gimple_omp_continue_control_def): Likewise.
	(gimple_omp_continue_control_def_ptr): Likewise.
	(gimple_omp_continue_set_control_def): Likewise.
	(gimple_omp_continue_control_use): Likewise.
	(gimple_omp_continue_control_use_ptr): Likewise.
	(gimple_omp_continue_set_control_use): Likewise.
	(gimple_transaction_body_ptr): Likewise.
	(gimple_transaction_label): Likewise.
	(gimple_transaction_label_ptr): Likewise.
	(gimple_transaction_set_body): Likewise.
	(gimple_transaction_set_label): Likewise.

	* ipa-devirt.c (build_type_inheritance_graph): Likewise.
	* ipa-inline-analysis.c (inline_write_summary): Likewise.
	* ipa-ref.c (ipa_record_reference): Likewise.
	* ipa-reference.c (analyze_function): Likewise.
	(ipa_reference_write_optimization_summary): Likewise.
	* ipa.c (symtab_remove_unreachable_nodes): Likewise.
	(address_taken_from_non_vtable_p): Likewise.
	(comdat_can_be_unshared_p_1): Likewise.
	* lto-cgraph.c (lto_output_ref): Likewise.
	(add_references): Likewise.
	(compute_ltrans_boundary): Likewise.
	(output_symtab): Likewise.
	(input_ref): Likewise.
	(input_cgraph_1): Likewise.
	(output_cgraph_opt_summary): Likewise.
	* lto-streamer-out.c (lto_output): Likewise.
	(output_symbol_p): Likewise.
	* lto-streamer.h (lsei_next_function_in_partition): Likewise.
	(lsei_start_function_in_partition): Likewise.
	(lsei_next_variable_in_partition): Likewise.
	(lsei_start_variable_in_partition): Likewise.
	* symtab.c (insert_to_assembler_name_hash): Likewise.
	(unlink_from_assembler_name_hash): Likewise.
	(symtab_unregister_node): Likewise.
	(symtab_remove_node): Likewise.
	(dump_symtab_node): Likewise.
	(verify_symtab_base): Likewise.
	(verify_symtab_node): Likewise.
	(symtab_make_decl_local): Likewise.
	(symtab_alias_ultimate_target): Likewise.
	(symtab_resolve_alias): Likewise.
	(symtab_get_symbol_partitioning_class): Likewise.
	* tree-phinodes.c (allocate_phi_node): Likewise.
	(reserve_phi_args_for_new_edge): Likewise.
	(remove_phi_args): Likewise.
	* varpool.c (varpool_node_for_asm): Likewise.
	(varpool_remove_unreferenced_decls): Likewise.

gcc/lto/
	* lto-partition.c (add_references_to_partition): Update for
	removal of implicit pointer from the is-a.h API.
	(add_symbol_to_partition_1): Likewise.
	(contained_in_symbol): Likewise.
	(undo_partition): Likewise.
	(lto_balanced_map): Likewise.
	(promote_symbol): Likewise.
	* lto-symtab.c (lto_symtab_merge_symbols_1): Likewise.
	(lto_symtab_merge_symbols): Likewise.
	* lto.c (lto_wpa_write_files): Likewise.

From-SVN: r209719
2014-04-23 19:06:40 +00:00
Richard Biener b9ed2c2ce1 lto-streamer.h (LTO_major_version): Bump to 4.
2014-04-15  Richard Biener  <rguenther@suse.de>

	* lto-streamer.h (LTO_major_version): Bump to 4.

From-SVN: r209417
2014-04-15 13:25:44 +00:00
Jan Hubicka 9cf7975d8b lto-cgraph.c (asm_nodes_output): Make global.
* lto-cgraph.c (asm_nodes_output): Make global.
	* lto-wrapper.c (run_gcc): Pass down paralelizm to WPA.
	* gcc.c (AS_NEEDS_DASH_FOR_PIPED_INPUT): Allow WPA
	parameter
	(driver_handle_option): Handle OPT_fwpa.

From-SVN: r207516
2014-02-05 17:22:08 +00:00
Richard Biener 15b25b242b lto-streamer.h (LTO_major_version): Bump to 3.
2014-01-29  Richard Biener  <rguenther@suse.de>

	* lto-streamer.h (LTO_major_version): Bump to 3.
	(LTO_minor_version): Reset to 0.

From-SVN: r207238
2014-01-29 14:19:23 +00:00
Richard Sandiford 23a5b65a92 Update copyright years in gcc/
From-SVN: r206289
2014-01-02 22:23:26 +00:00
Oleg Endo 84562394e2 cgraph.h (cgraph_node_set_iterator, [...]): Remove typedef.
* gcc/cgraph.h (cgraph_node_set_iterator, varpool_node_set_iterator):
	Remove typedef.
	(cgraph_inline_failed_enum, cgraph_inline_failed_t): Remove typedef and
	rename to cgraph_inline_failed_t.
	* gcc/tree-ssa-alias.h (ao_ref_s, ao_ref): Remove typedef and rename
	to ao_ref.
	* gcc/reload.h (reg_equivs_s, reg_equivs_t): Remove typedef and rename
	to reg_equivs_t.
	* gcc/conditions.h (CC_STATUS): Remove typedef.
	* gcc/bitmap.h (bitmap_obstack): Remove typedef.
	(bitmap_element_def, bitmap_element): Remove typedef and rename to
	bitmap_element.
	(bitmap_head_def, bitmap_head): Remove typedef and rename to
	bitmap_head.
	(bitmap_iterator): Remove typedef.
	* gcc/target.h (cumulative_args_t, print_switch_type,
	secondary_reload_info): Remove typedef.
	* gcc/dwarf2out.h (dw_cfi_oprnd_struct, dw_cfi_oprnd): Remove
	dw_cfi_oprnd_struct alias.
	(dw_cfi_struct, dw_cfi_node): Remove typedef and rename to dw_cfi_node.
	(dw_fde_struct, dw_fde_node): Remove typedef and rename to dw_fde_node.
	(cfa_loc, dw_cfa_location): Remove typedef and rename to
	dw_cfa_location.
	(dw_vec_struct, dw_vec_const): Remove typedef and rename to
	dw_vec_const.
	(dw_val_struct, dw_val_node): Remove typedef and rename to dw_val_node.
	(dw_loc_descr_struct, dw_loc_descr_node): Remove typedef and rename to
	dw_loc_descr_node.
	* gcc/params.h (param_info, compiler_param): Remove typedef.
	* gcc/opts.h (cl_deferred_param): Remove typedef.
	* gcc/sreal.h (sreal): Remove typedef.
	* gcc/ddg.h (dep_type, dep_data_type): Remove typedef.
	* gcc/graphite-clast-to-gimple.h (cloog_prog_clast, bb_pbb_def): Remove
	typedef.
	* gcc/lto-streamer.h (lto_decl_stream_e_t, lto_encoder_entry,
	lto_symtab_encoder_iterator, res_pair): Remove typedef.
	* gcc/tree-affine.h (affine_tree_combination, aff_tree): Remove typedef
	and rename to aff_tree.
	* gcc/sched-int.h (region): Remove typedef.
	* gcc/diagnostic.h (diagnostic_info,
	diagnostic_classification_change_t): Remove typedef.
	* gcc/tree-ssa-loop.h (affine_iv_d): Remove typedef and rename to
	affine_iv.
	* gcc/sbitmap.h (sbitmap_iterator): Remove typedef.
	* gcc/ssa-iterators.h (immediate_use_iterator_d, imm_use_iterator):
	Remove typedef and rename to imm_use_iterator.
	(ssa_operand_iterator_d, ssa_op_iter): Remove typedef and rename to
	ssa_op_iter.
	* gcc/ggc-internal.h (ggc_statistics): Remove typedef.
	* gcc/cselib.h (cselib_val_struct, cselib_val): Remove typedef and
	rename to cselib_val.
	* gcc/tree-core.h (alias_pair): Remove typedef.
	(constructor_elt_d, constructor_elt): Remove typedef and rename to
	constructor_elt.
	(ssa_use_operand_d, ssa_use_operand_t): Remove typedef and rename to
	ssa_use_operand_t.
	* gcc/graphite-sese-to-poly.h (base_alias_pair): Remove typedef.
	* gcc/tree-data-ref.h (conflict_function): Remove typedef.
	* gcc/tree-inline.h (copy_body_data): Remove typedef.
	* gcc/ipa-inline.h (condition, size_time_entry, inline_param_summary_t,
	edge_growth_cache_entry): Remove typedef.
	* gcc/regrename.h (operand_rr_info, insn_rr_info): Remove typedef.
	* gcc/gimple-iterator.h (gimple_stmt_iterator_d, gimple_stmt_iterator):
	Remove typedef and rename to gimple_stmt_iterator.
	* gcc/basic-block.h (ce_if_block, ce_if_block_t): Remove typedef and
	rename to ce_if_block.
	(edge_iterator): Remove typedef.
	* gcc/ipa-prop.h (ipa_agg_jf_item, ipa_agg_jf_item_t): Remove typedef
	and rename to ipa_agg_jf_item.
	(ipa_agg_jump_function_t, ipa_param_descriptor_t, ipa_node_params_t,
	ipa_parm_adjustment_t): Remove typedef.
	(ipa_jump_func, ipa_jump_func_t): Remove typedef and rename to
	ipa_jump_func.
	(ipa_edge_args, ipa_edge_args_t): Remove typedef and rename to
	ipa_edge_args.
	* gcc/gcov-io.h (gcov_bucket_type): Remove typedef.
	(gcov_working_set_info, gcov_working_set_t): Remove typedef and rename
	to gcov_working_set_t.
	* gcc/ira-int.h (minmax_set_iterator, ira_allocno_iterator,
	ira_object_iterator, ira_allocno_object_iterator, ira_pref_iterator,
	ira_copy_iterator, ira_object_conflict_iterator): Remove typedef.
	* gcc/tree-iterator.h (tree_stmt_iterator): Remove typedef.
	* gcc/rtl.h (addr_diff_vec_flags, mem_attrs, reg_attrs,
	replace_label_data): Remove typedef.
	(rtunion_def, rtunion): Remove typedef and rename to rtunion.
	* gcc/hard-reg-set.h (hard_reg_set_iterator): Remove typedef.
	* gcc/sel-sched-ir.h (_list_iterator, sel_global_bb_info_def,
	sel_region_bb_info_def, succ_iterator): Remove typedef.
	(deps_where_def, deps_where_t): Remove typedef and rename to
	deps_where_t.
	* gcc/coretypes.h: Adapt forward declarations.
	* gcc/tree-scalar-evolution.h: Likewise.
	* gcc/tree-ssa-address.h: Likewise.
	* gcc/tree-ssa-operands.h: Likewise.
	* gcc/function.h: Likewise.
	* gcc/config/frv/frv-protos.h: Likewise.
	* gcc/targhooks.h: Likewise.
	* gcc/basic_block.h: Likewise.
	* gcc/rtl.def: Adapt documentation.
	* gcc/doc/tm.texi: Likewise.
	* gcc/ipa-cp.c: Adapt uses.
	* gcc/bitmap.c: Likewise.
	* gcc/dwarf2out.c: Likewise.
	* gcc/target.def: Likewise.
	* gcc/ipa-inline-analysis.c: Likewise.
	* gcc/dwarf2cfi.c: Likewise.
	* gcc/tree-ssa-loop-ivopts.c: Likewise.
	* gcc/lto-cgraph.c: Likewise.
	* gcc/config/frv/frv.c: Likewise.
	* gcc/ifcvt.c: Likewise.
	* gcc/ipa-prop.c: Likewise.

From-SVN: r205863
2013-12-10 16:48:44 +00:00
Oleg Endo 2c8326a568 asan.c: Remove struct tags when referring to class varpool_node.
* asan.c: Remove struct tags when referring to class varpool_node.
	* cgraph.h: Likewise.
	* cgraphbuild.c: Likewise.
	* cgraphunit.c: Likewise.
	* dbxout.c: Likewise.
	* dwarf2out.c: Likewise.
	* gimple-fold.c: Likewise.
	* ipa-devirt.c: Likewise.
	* ipa-ref-inline.h: Likewise.
	* ipa-ref.h: Likewise.
	* ipa-reference.c: Likewise.
	* ipa-utils.c: Likewise.
	* ipa.c: Likewise.
	* lto-cgraph.c: Likewise.
	* lto-streamer-out.c: Likewise.
	* lto-streamer.h: Likewise.
	* passes.c: Likewise.
	* toplev.c: Likewise.
	* tree-eh.c: Likewise.
	* tree-emutls.c: Likewise.
	* tree-pass.h: Likewise.
	* tree-ssa-structalias.c: Likewise.
	* tree-vectorizer.c: Likewise.
	* tree.c: Likewise.
	* varasm.c: Likewise.
	* varpool.c: Likewise.

	* cp/decl2.c: Remove struct tags when referring to class varpool_node.

	* lto/lto.c: Remove struct tags when referring to class varpool_node.
	* lto/lto-partition.c: Likewise.
	* lto/lto-symtab.c: Likewise.

From-SVN: r205733
2013-12-06 10:40:53 +00:00
Tobias Burnus 5f673c6a1c re PR debug/37132 (Debug: No DW_TAG_namelist emitted for NAMELISTS)
gcc/
2013-12-04  Tobias Burnus  <burnus@net-b.de>

        PR debug/37132
        * lto-streamer.h (LTO_tags): Add LTO_namelist_decl_ref.
        * tree.def (NAMELIST_DECL): Add.
        * tree.h (NAMELIST_DECL_ASSOCIATED_DECL): New macro.
        * tree.c (initialize_tree_contains_struct): Add asserts for it.
        * dwarf2out.c (gen_namelist_decl): New function.
        (gen_decl_die, dwarf2out_decl): Call it.
        (dwarf2out_imported_module_or_decl_1): Handle NAMELIST_DECL.
        * lto-streamer-in.c (lto_input_tree_ref): Handle NAMELIST_DECL.
        (lto_input_tree_ref, lto_input_tree_1): Update lto_tag_check_range
        call.
        * lto-streamer-out.c (lto_output_tree_ref): Handle
        * NAMELIST_DECL.

gcc/fortran
2013-12-04  Tobias Burnus  <burnus@net-b.de>

        PR debug/37132
        * trans-decl.c (generate_namelist_decl, create_module_nml_decl):
        New static functions.
        (gfc_generate_module_vars, generate_local_vars): Call them.
        (gfc_trans_use_stmts): Handle namelists for debug genertion.

From-SVN: r205679
2013-12-04 20:59:42 +01:00
Bernd Schmidt 38f4f02fd6 Remove all_lto_gen_passes, replace with plain function calls
* cgraphunit.c (ipa_passes): Don't execute all_lto_gen_passes.
	* lto-streamer-out.c (lto_output, produce_asm_for_decls): No longer
	static.
	(pass_data_ipa_lto_gimple_out, pass_ipa_lto_gimple_out,
	make_pass_ipa_lto_gimple_out, pass_data_ipa_lto_finish_out,
	pass_ipa_lto_finish_out, make_pass_ipa_lto_finish_out): Remove.
	* lto-streamer.h (lto_output, produce_asm_for_decls): Declare.
	* pass-manager.h (GCC_PASS_LISTS, class pass_manager):
	Remove all_lto_gen_passes.
	* passes.c (pass_manager::dump_passes): Remove its use.
	(pass_manager::register_pass): Likewise.
	(ipa_read_summaries, ipa_read_optimization_summaries): Likewise.
	(pass_manager::pass_manager): Don't initialize or use it.
	(write_lto): New static function.
	(ipa_write_summaries_1, ipa_write_optimization_summaries): Use it
	instead of using all_lto_gen_passes.
	* passes.def (all_lto_gen_passes, pass_ipa_lto_gimple_out,
	pass_ipa_lto_finish_out): Delete.
	* tree-pass.h (make_pass_ipa_lto_gimple_out,
	make_pass_ipa_lto_finish_out): Don't declare.

From-SVN: r204984
2013-11-18 22:16:37 +00:00
David Malcolm 5e20cdc96e Automated part of renaming of symtab_node_base to symtab_node.
gcc/

	Patch autogenerated by rename_symtab.py from
	https://github.com/davidmalcolm/gcc-refactoring-scripts
	revision 58bb219cc090b2f4516a9297d868c245495ee622
	with ChangeLog entry fixed up by hand.

	* cgraph.c (x_cgraph_nodes_queue): Rename symtab_node_base to
	symtab_node.
	(cgraph_node_for_asm): Likewise.
	* cgraph.h (symtab_node_base): Likewise.
	(cgraph_node): Likewise.
	(varpool_node): Likewise.
	(is_a_helper <cgraph_node>::test): Likewise.
	(is_a_helper <varpool_node>::test): Likewise.
	(symtab_nodes): Likewise.
	(symtab_register_node): Likewise.
	(symtab_unregister_node): Likewise.
	(symtab_remove_node): Likewise.
	(symtab_get_node): Likewise.
	(symtab_node_for_asm): Likewise.
	(symtab_node_asm_name): Likewise.
	(symtab_node_name): Likewise.
	(symtab_insert_node_to_hashtable): Likewise.
	(symtab_add_to_same_comdat_group): Likewise.
	(symtab_dissolve_same_comdat_group_list): Likewise.
	(dump_symtab_node): Likewise.
	(debug_symtab_node): Likewise.
	(dump_symtab_base): Likewise.
	(verify_symtab_node): Likewise.
	(verify_symtab_base): Likewise.
	(symtab_used_from_object_file_p): Likewise.
	(symtab_alias_ultimate_target): Likewise.
	(symtab_resolve_alias): Likewise.
	(fixup_same_cpp_alias_visibility): Likewise.
	(symtab_for_node_and_aliases): Likewise.
	(symtab_nonoverwritable_alias): Likewise.
	(availability symtab_node_availability): Likewise.
	(symtab_semantically_equivalent_p): Likewise.
	(fixup_same_cpp_alias_visibility): Likewise.
	(symtab_prevail_in_asm_name_hash): Likewise.
	(cgraph): Likewise.
	(varpool): Likewise.
	(varpool_first_variable): Likewise.
	(varpool_next_variable): Likewise.
	(varpool_first_static_initializer): Likewise.
	(varpool_next_static_initializer): Likewise.
	(varpool_first_defined_variable): Likewise.
	(varpool_next_defined_variable): Likewise.
	(cgraph_first_defined_function): Likewise.
	(cgraph_next_defined_function): Likewise.
	(cgraph_first_function): Likewise.
	(cgraph_next_function): Likewise.
	(cgraph_first_function_with_gimple_body): Likewise.
	(cgraph_next_function_with_gimple_body): Likewise.
	(symtab_alias_target): Likewise.
	(symtab_real_symbol_p): Likewise.
	(symtab_can_be_discarded): Likewise.
	* cgraphbuild.c (mark_address): Likewise.
	(mark_load): Likewise.
	(mark_store): Likewise.
	* cgraphunit.c (decide_is_symbol_needed): Likewise.
	(first): Likewise.
	(enqueue_node): Likewise.
	(referred_to_p): Likewise.
	(cgraph_process_same_body_aliases): Likewise.
	(analyze_functions): Likewise.
	(handle_alias_pairs): Likewise.
	(output_weakrefs): Likewise.
	(compile): Likewise.
	* gimple-fold.c (can_refer_decl_in_current_unit_p): Likewise.
	* ipa-inline-analysis.c (inline_write_summary): Likewise.
	* ipa-prop.c (remove_described_reference): Likewise.
	(try_decrement_rdesc_refcount): Likewise.
	(ipa_edge_duplication_hook): Likewise.
	* ipa-ref.c (ipa_record_reference): Likewise.
	(ipa_maybe_record_reference): Likewise.
	(ipa_clone_ref): Likewise.
	(ipa_clone_references): Likewise.
	(ipa_clone_referring): Likewise.
	(ipa_find_reference): Likewise.
	(ipa_remove_stmt_references): Likewise.
	(ipa_clear_stmts_in_references): Likewise.
	* ipa-ref.h (symtab_node_base): Likewise.
	(ipa_ref): Likewise.
	(ipa_record_reference): Likewise.
	(ipa_maybe_record_reference): Likewise.
	(ipa_clone_references): Likewise.
	(ipa_clone_referring): Likewise.
	(ipa_clone_ref): Likewise.
	(ipa_find_reference): Likewise.
	(ipa_remove_stmt_references): Likewise.
	(ipa_clear_stmts_in_references): Likewise.
	* ipa-reference.c (ipa_reference_write_optimization_summary):
	Likewise.
	* ipa.c (enqueue_node): Likewise.
	(process_references): Likewise.
	(walk_polymorphic_call_targets): Likewise.
	(symtab_remove_unreachable_nodes): Likewise.
	(address_taken_from_non_vtable_p): Likewise.
	(comdat_can_be_unshared_p_1): Likewise.
	(comdat_can_be_unshared_p): Likewise.
	(can_replace_by_local_alias): Likewise.
	(function_and_variable_visibility): Likewise.
	* is-a.h: Likewise (within example in comment).
	* lto-cgraph.c (input_cgraph_opt_summary): Likewise.
	(lto_symtab_encoder_encode): Likewise.
	(lto_symtab_encoder_delete_node): Likewise.
	(lto_symtab_encoder_in_partition_p): Likewise.
	(lto_set_symtab_encoder_in_partition): Likewise.
	(output_refs): Likewise.
	(compute_ltrans_boundary): Likewise.
	(output_symtab): Likewise.
	(input_node): Likewise.
	(input_ref): Likewise.
	(input_edge): Likewise.
	(input_cgraph_1): Likewise.
	(input_refs): Likewise.
	(output_cgraph_opt_summary): Likewise.
	(input_node_opt_summary): Likewise.
	(input_cgraph_opt_section): Likewise.
	* lto-section-in.c (lto_free_function_in_decl_state_for_node):
	Likewise.
	* lto-streamer-out.c (lto_output): Likewise.
	(output_symbol_p): Likewise.
	(produce_symtab): Likewise.
	* lto-streamer.h (lto_encoder_entry): Likewise.
	(lto_free_function_in_decl_state_for_node): Likewise.
	(lto_symtab_encoder_encode): Likewise.
	(lto_symtab_encoder_delete_node): Likewise.
	(lto_symtab_encoder_in_partition_p): Likewise.
	(lto_set_symtab_encoder_in_partition): Likewise.
	(lto_symtab_encoder_lookup): Likewise.
	(lsei_node): Likewise.
	(lto_symtab_encoder_deref): Likewise.
	* symtab.c (symtab_hash): Likewise.
	(assembler_name_hash): Likewise.
	(symtab_nodes): Likewise.
	(hash_node): Likewise.
	(eq_node): Likewise.
	(hash_node_by_assembler_name): Likewise.
	(eq_assembler_name): Likewise.
	(insert_to_assembler_name_hash): Likewise.
	(unlink_from_assembler_name_hash): Likewise.
	(symtab_prevail_in_asm_name_hash): Likewise.
	(symtab_register_node): Likewise.
	(symtab_insert_node_to_hashtable): Likewise.
	(symtab_unregister_node): Likewise.
	(symtab_get_node): Likewise.
	(symtab_remove_node): Likewise.
	(symtab_initialize_asm_name_hash): Likewise.
	(symtab_node_for_asm): Likewise.
	(symtab_add_to_same_comdat_group): Likewise.
	(symtab_dissolve_same_comdat_group_list): Likewise.
	(symtab_node_asm_name): Likewise.
	(symtab_node_name): Likewise.
	(dump_symtab_base): Likewise.
	(dump_symtab_node): Likewise.
	(dump_symtab): Likewise.
	(debug_symtab_node): Likewise.
	(verify_symtab_base): Likewise.
	(verify_symtab_node): Likewise.
	(verify_symtab): Likewise.
	(symtab_used_from_object_file_p): Likewise.
	(symtab_node_availability): Likewise.
	(symtab_alias_ultimate_target): Likewise.
	(fixup_same_cpp_alias_visibility): Likewise.
	(symtab_resolve_alias): Likewise.
	(symtab_for_node_and_aliases): Likewise.
	(symtab_for_node_and_aliases): Likewise.
	(symtab_nonoverwritable_alias_1): Likewise.
	(symtab_nonoverwritable_alias): Likewise.
	(symtab_semantically_equivalent_p): Likewise.
	* value-prof.c (init_node_map): Likewise.
	* varasm.c (find_decl): Likewise.
	* varpool.c (varpool_node_for_asm): Likewise.
	(varpool_remove_unreferenced_decls): Likewise.

gcc/c-family/

	Patch autogenerated by rename_symtab.py from
	https://github.com/davidmalcolm/gcc-refactoring-scripts
	revision 58bb219cc090b2f4516a9297d868c245495ee622

	* c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
	symtab_node_base to symtab_node.

gcc/lto/

	Patch autogenerated by rename_symtab.py from
	https://github.com/davidmalcolm/gcc-refactoring-scripts
	revision 58bb219cc090b2f4516a9297d868c245495ee622

	* lto-partition.c (add_symbol_to_partition): Rename
	symtab_node_base to symtab_node.
	(get_symbol_class): Likewise.
	(symbol_partitioned_p): Likewise.
	(add_references_to_partition): Likewise.
	(add_symbol_to_partition_1): Likewise.
	(contained_in_symbol): Likewise.
	(add_symbol_to_partition): Likewise.
	(lto_1_to_1_map): Likewise.
	(lto_max_map): Likewise.
	(lto_balanced_map): Likewise.
	(privatize_symbol_name): Likewise.
	(promote_symbol): Likewise.
	(may_need_named_section_p): Likewise.
	(rename_statics): Likewise.
	(lto_promote_statics_nonwpa): Likewise.
	* lto-symtab.c (lto_symtab_merge): Likewise.
	(lto_symtab_resolve_replaceable_p): Likewise.
	(lto_symtab_symbol_p): Likewise.
	(lto_symtab_resolve_can_prevail_p): Likewise.
	(lto_symtab_resolve_symbols): Likewise.
	(lto_symtab_merge_decls_2): Likewise.
	(lto_symtab_merge_decls_1): Likewise.
	(lto_symtab_merge_decls): Likewise.
	(lto_symtab_merge_symbols_1): Likewise.
	(lto_symtab_merge_symbols): Likewise.
	(lto_symtab_prevailing_decl): Likewise.
	* lto.c (lto_wpa_write_files): Likewise.
	(read_cgraph_and_symbols): Likewise.
	(do_whole_program_analysis): Likewise.

From-SVN: r204279
2013-10-31 21:26:14 +00:00
Andrew MacLeod 8e9055ae62 tree-outof-ssa.h: Remove include files.
* tree-outof-ssa.h: Remove include files.
	* tree-outof-ssa.c: Add required include files from tree-outof-ssa.h.
	* expr.c: Likewise.
	* tree-ssa-coalesce.c: Likewise.
	* cfgexpand.c: Likewise.
	* tree-ssa-ter.c: Likewise.
	* ipa-prop.h: Remove gimple.h and tree-core.h from include list.
	* lto-streamer.h: Likewise.
	* cgraphbuild.c: Add gimple.h to include list.
	* data-streamer-in.c: Likewise.
	* ipa-cp.c: Likewise.
	* tree-streamer.c: Likewise.
	* lto-compress.c: Likewise.
	* ipa-reference.c: Likewise.
	* data-streamer-out.c: Likewise.
	* lto-cgraph.c: Likewise.
	* cgraphclones.c: Likewise.
	* ipa-utils.c: Likewise.
	* data-streamer.c: Likewise.
	* ipa-split.c: Likewise.
	* lto-section-in.c: Likewise.
	* tree-streamer-out.c: Likewise.
	* ipa-prop.c: Likewise.
	* tree-streamer-in.c: Likewise.
	* symtab.c: Likewise.
	* opts-global.c: Likewise.
	* lto-opts.c: Likewise.
	* lto-section-out.c: Likewise.
	* lto-streamer.c: Likewise.
	* rtl.h: Add tree-core.h to include list.
	* expr.h: Remove tree-core.h from include list.
	* gimple.h: Likewise.
	* ipa-utils.h: Likewise.
	* streamer-hooks.h: Likewise.
	* streamer-hooks.c: Include input.h.

	* lto/lto-object.c: Add gimple.h to include list.
	* lto/lto-partition.c: Likewise.

From-SVN: r204158
2013-10-29 12:55:50 +00:00
Diego Novillo 4d64880731 Re-factor inclusion of tree.h.
This moves tree.h out of every header. This exposes dependencies of
tree.h in files that should probably not need it after tree and gimple
are separated.

After this change, no header should include tree.h directly. It should
only be included by a .c file. Unfortunately, I did not find an
automatic way of forcing this.

Tested on x86_64 with all languages enabled and using
contrib/config-list.mk.

2013-10-21  Diego Novillo  <dnovillo@google.com>

	* asan.c: Include tree.h
	* bb-reorder.c: Likewise.
	* cfgcleanup.c: Likewise.
	* cfgloopmanip.c: Likewise.
	* data-streamer-in.c: Likewise.
	* data-streamer-out.c: Likewise.
	* data-streamer.c: Likewise.
	* dwarf2cfi.c: 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-scop-detection.c: Likewise.
	* graphite-sese-to-poly.c: Likewise.
	* graphite.c: Likewise.
	* ipa-devirt.c: Likewise.
	* ipa-profile.c: Likewise.
	* ipa.c: Likewise.
	* ira.c: Likewise.
	* loop-init.c: Likewise.
	* loop-unroll.c: Likewise.
	* lower-subreg.c: Likewise.
	* lto/lto-object.c: Likewise.
	* recog.c: Likewise.
	* reginfo.c: Likewise.
	* tree-loop-distribution.c: Likewise.
	* tree-parloops.c: Likewise.
	* tree-ssa-strlen.c: Likewise.
	* tree-streamer.c: Likewise.
	* value-prof.c: Likewise.
	* target-globals.c: Likewise.
	* expr.h: Include tree-core.h instead of tree.h.
	* gimple.h: Likewise.
	* ipa-prop.h: Likewise.
	* ipa-utils.h: Likewise.
	* lto-streamer.h: Likewise.
	* streamer-hooks.h: Likewise.
	* ipa-reference.h: Include cgraph.h instead of tree.h.
	* cgraph.h: Include basic-block.h instead of tree.h.
	* tree-streamer.h: Do not include tree.h.
	* genattrtab.c (write_header): Generate inclusion of
	tree.h.
	* genautomata.c (main): Likewise.
	* genemit.c: Likewise.
	* genopinit.c: Likewise.
	* genoutput.c (output_prologue): Likewise.
	* genpeep.c: Likewise.

testsuite/ChangeLog

	* g++.dg/plugin/selfassign.c: Include tree.h.
	* gcc.dg/plugin/finish_unit_plugin.c: Likewise.
	* gcc.dg/plugin/ggcplug.c: Likewise.
	* gcc.dg/plugin/one_time_plugin.c: Likewise.
	* gcc.dg/plugin/selfassign.c: Likewise.
	* gcc.dg/plugin/start_unit_plugin.c: Likewise.

From-SVN: r203908
2013-10-21 15:36:37 -04:00
Richard Biener 35f32ad4a7 lto-streamer.h (lto_global_var_decls): Remove.
2013-09-06  Richard Biener  <rguenther@suse.de>

	* lto-streamer.h (lto_global_var_decls): Remove.
	* Makefile.in (OBJS): Remove lto-symtab.o.
	(lto-symtab.o): Remove.
	(GTFILES): Remove lto-symtab.c
	* lto-symtab.c: Move to lto/

	lto/
	* lto-symtab.c: Move from gcc/
	* lto.h: Include vec.h.
	(lto_global_var_decls): Declare.
	* lto.c (lto_global_var_decls): Move definition here.
	* Make-lang.in (LTO_OBJS): Add lto-symtab.o.
	(lto-symtab.o): Add.
	* config-lang.in (gtfiles): Add lto.h.

From-SVN: r202313
2013-09-06 09:06:25 +00:00
Jan Hubicka 5e5812126c cgraph.c (cgraph_get_body): Update call of lto_input_function_body.
* cgraph.c (cgraph_get_body): Update call of lto_input_function_body.
	* gimple-streamer-in.c (input_gimple_stmt): Move sanity check to ...
	* tree-cfg.c (verify_gimple_label): ... here.
	* ipa-utils.c: Include lto-streamer.h, ipa-inline.h
	(ipa_merge_profiles): New function.
	* lto-streamer-in.c (lto_read_body): Take node instead of fn_decl.
	(lto_input_function_body): Likewise.
	* ipa-utils.h (ipa_merge_profiles): Declare.
	* lto-streamer.h (lto_input_function_body): Update prototype.
	(emit_label_in_global_context_p): Remove.
	* lto-symtab.c: Include ipa-utils.h
	(lto_cgraph_replace_node): Use ipa_merge_profiles.

From-SVN: r202131
2013-08-31 13:47:20 +00:00
Jan Hubicka 82e9d6426c lto-symtab.c (lto_cgraph_replace_node): Free decl_in_state.
* lto-symtab.c (lto_cgraph_replace_node): Free decl_in_state.
	* cgraph.c (cgraph_release_function_body): Free decl_in_state.
	* lto-section-in.c (lto_free_function_in_decl_state): New function.
	(lto_free_function_in_decl_state_for_node): New function.

From-SVN: r202094
2013-08-30 07:33:56 +00:00
Richard Biener 7c5848b899 pointer-set.h (struct pointer_set_t): Move here from pointer-set.c.
2013-06-24  Richard Biener  <rguenther@suse.de>

	* pointer-set.h (struct pointer_set_t): Move here from
	pointer-set.c.
	(pointer_set_lookup): Declare.
	(class pointer_map): New template class implementing a
	generic pointer to T map.
	(pointer_map<T>::pointer_map, pointer_map<T>::~pointer_map,
	pointer_map<T>::contains, pointer_map<T>::insert,
	pointer_map<T>::traverse): New functions.
	* pointer-set.c (struct pointer_set_t): Moved to pointer-set.h.
	(pointer_set_lookup): New function.
	(pointer_set_contains): Use pointer_set_lookup.
	(pointer_set_insert): Likewise.
	(insert_aux): Remove.
	(struct pointer_map_t): Embed a pointer_set_t.
	(pointer_map_create): Adjust.
	(pointer_map_destroy): Likewise.
	(pointer_map_contains): Likewise.
	(pointer_map_insert): Likewise.
	(pointer_map_traverse): Likewise.
	* tree-streamer.h (struct streamer_tree_cache_d): Use a
	pointer_map<unsigned> instead of a pointer_map_t.
	* tree-streamer.c (streamer_tree_cache_insert_1): Adjust.
	(streamer_tree_cache_lookup): Likewise.
	(streamer_tree_cache_create): Likewise.
	(streamer_tree_cache_delete): Likewise.
	* lto-streamer.h (struct lto_tree_ref_encoder): Use a
	pointer_map<unsigned> instead of a pointer_map_t.
	(lto_init_tree_ref_encoder): Adjust.
	(lto_destroy_tree_ref_encoder): Likewise.
	* lto-section-out.c (lto_output_decl_index): Likewise.
	(lto_record_function_out_decl_state): Likewise.
	* dominance.c (iterate_fix_dominators): Use pointer_map<int>.

From-SVN: r200367
2013-06-24 12:17:16 +00:00
Richard Biener d579fcda92 Makefile.in (LTO_STREAMER_H): Add pointer-set.h dependency.
2013-06-18  Richard Biener  <rguenther@suse.de>

	* Makefile.in (LTO_STREAMER_H): Add pointer-set.h dependency.
	* lto-streamer.h: Include pointer-set.h.
	(struct lto_decl_slot): Remove.
	(struct lto_tree_ref_encoder): Make tree_hash_table a pointer-map.
	Remove next_index entry.
	(lto_hash_decl_slot_node, lto_eq_decl_slot_node,
	lto_hash_type_slot_node, lto_eq_type_slot_node): Remove.
	(lto_init_tree_ref_encoder): Adjust.
	(lto_destroy_tree_ref_encoder): Likewise.
	* lto-section-out.c (lto_hash_decl_slot_node, lto_eq_decl_slot_node,
	lto_hash_type_slot_node, lto_eq_type_slot_node): Remove.
	(lto_output_decl_index): Adjust.
	(lto_new_out_decl_state): Likewise.
	(lto_record_function_out_decl_state): Likewise.
	* lto-streamer-out.c (copy_function): Likewise.

From-SVN: r200171
2013-06-18 14:39:57 +00:00
Richard Biener ee03e71d47 lto-streamer.h (enum LTO_tags): Add LTO_tree_scc.
2013-06-17  Richard Biener  <rguenther@suse.de>

	* lto-streamer.h (enum LTO_tags): Add LTO_tree_scc.
	(lto_input_scc): Declare.
	(lto_input_tree_1): Likewise.
	(struct lto_stats_d): Add num_tree_bodies_output and
	num_pickle_refs_output.
	* lto-streamer-in.c (lto_read_body): Use streamer_tree_cache_get_tree.
	(lto_read_tree_1): Split out from ...
	(lto_read_tree): ... this.
	(lto_input_scc): New function.
	(lto_input_tree_1): Split out from ...
	(lto_input_tree): ... this.  Handle LTO_tree_scc.
	(lto_data_in_create): Create the streamer cache without hashes.
	* lto-streamer-out.c (create_output_block): Create the streamer
	cache with hashes when not doing WPA.
	(lto_write_tree_1): Split out from ...
	(lto_write_tree): ... this.
	(get_symbol_initial_value): New function.
	(lto_output_tree_1): Split out from ...
	(lto_output_tree): ... this.  Write trees as series of SCCs
	using a DFS walk via DFS_write_tree.
	(struct sccs, struct scc_entry): New types.
	(next_dfs_num, sccstack, sccstate, sccstate_obstack): New globals.
	(DFS_write_tree_body): New function.
	(DFS_write_tree): Likewise.
	(hash_tree): Likewise.
	(scc_entry_compare): Likewise.
	(hash_scc): Likewise.
	(tree_is_indexable): DEBUG_EXPR_DECLs are local entities.
	* tree-streamer-in.c (lto_input_ts_list_tree_pointers): Stream
	TREE_CHAIN as regular reference.
	(streamer_read_integer_cst): Remove.
	(streamer_get_pickled_tree): Adjust.
	* tree-streamer-out.c (streamer_write_chain): Disable streaming
	of DECL_EXTERNALs in BLOCK_VARS for now.
	(write_ts_list_tree_pointers): Stream TREE_CHAIN as regular
	reference.
	* tree-streamer.c (streamer_tree_cache_add_to_node_array):
	Add hash value argument and record that if hashes are recorded
	in the cache.
	(streamer_tree_cache_insert_1): Adjust.
	(streamer_tree_cache_insert): Likewise.
	(streamer_tree_cache_insert_at): Rename to ...
	(streamer_tree_cache_replace_tree): ... this and adjust.
	(streamer_tree_cache_append): Adjust.
	(record_common_node): Likewise.
	(streamer_tree_cache_create): Add argument whether to
	record hash values together with trees.
	(streamer_tree_cache_delete): Adjust.
	* tree-streamer.h (struct streamer_tree_cache_d): Add
	vector of hashes.
	(streamer_read_integer_cst): Remove.
	(streamer_tree_cache_insert): Adjust.
	(streamer_tree_cache_append): Likewise.
	(streamer_tree_cache_insert_at): Rename to ...
	(streamer_tree_cache_replace_tree): ... this and adjust.
	(streamer_tree_cache_create): Add argument whether to record hashes.
	(streamer_tree_cache_get): Rename to ...
	(streamer_tree_cache_get_tree): ... this.
	(streamer_tree_cache_get_hash): New function.
	* tree.c (cache_integer_cst): New function.
	* tree.h (cache_integer_cst): Declare.
	(ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move here from cp/cp-tree.h.
	* lto-symtab.c (lto_varpool_replace_node): Only release
	DECL_INITIAL of non-prevailing decls.
	* varpool.c (varpool_remove_initializer): Do not release
	DECL_INITIAL when we are still in CGRAPH_LTO_STREAMING.

	cp/
	* cp-tree.h (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move to tree.h.

	lto/
	* Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency.
	* lto.c: Include data-streamer.h.
	(lto_read_in_decl_state): Use streamer_tree_cache_get_tree.
	(gimple_type_leader_entry_s, gimple_type_leader,
	gimple_lookup_type_leader): Remove.
	(gtc_visit): Simplify.
	(gimple_types_compatible_p): Likewise.
	(gimple_register_type_1): Likewise.  Merge into ...
	(gimple_register_type): ... this.  Keep it as legacy for
	statistics purposes for now.
	(fixup_integer_cst): Remove.
	(LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and
	rename to ...
	(MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars,
	maybe_remember_with_vars_*): ... these.
	(uniquify_nodes): Remove.
	(lto_fixup_prevailing_type): New function.
	(struct tree_scc, struct tree_scc_hasher): New type and hasher.
	(tree_scc_hash, tree_scc_hash_obstack): New globals.
	(num_merged_types, num_prevailing_types, num_not_merged_types,
	num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read,
	total_scc_size_merged, num_sccs_merged, num_scc_compares,
	num_scc_compare_collisions): New global counters.
	(compare_tree_sccs_1): New function.
	(compare_tree_sccs): Likewise.
	(unify_scc): Likewise.
	(lto_read_decls): Stream in tree SCCs and unify them on the
	way in.  Finalize prevailing SCC tree members.
	(read_cgraph_and_symbols): Do not initialize or free gimple_type_leader.
	Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother
	to ggc-collect during merging.
	(print_lto_report_1): Adjust for new merging code.

From-SVN: r200151
2013-06-17 15:08:24 +00:00
Jan Hubicka bbf9ad070d lto-symtab.c (lto_symtab_merge_symbols): Populate symtab hashtable.
* lto-symtab.c (lto_symtab_merge_symbols): Populate symtab hashtable.
	* cgraph.h (varpool_create_empty_node): Declare.
	* lto-cgraph.c (input_node, input_varpool_node): Forcingly create
	duplicated nodes.
	* symtab.c (symtab_unregister_node): Be lax about missin entries
	in node hash.
	(symtab_get_node): Update comment.
	* varpool.c (varpool_create_empty_node): Break out from ...
	(varpool_node_for_decl): ... here.
	* lto-streamer.h (lto_file_decl_data): Add RESOLUTION_MAP.

	* lto.c (register_resolution): Take lto_file_data argument.
	(lto_register_var_decl_in_symtab,
	lto_register_function_decl_in_symtab): Update.
	(read_cgraph_and_symbols): Update resolution_map handling.

From-SVN: r199990
2013-06-12 09:12:47 +00:00
Richard Biener 15d16c8aeb lto-streamer.h (enum LTO_tags): Move LTO_tree_pickle_reference after LTO_null.
2013-06-06  Richard Biener  <rguenther@suse.de>

	* lto-streamer.h (enum LTO_tags): Move LTO_tree_pickle_reference
	after LTO_null.
	(lto_tag_is_tree_code_p): Adjust.
	(lto_tag_is_gimple_code_p): Likewise.
	(lto_gimple_code_to_tag): Likewise.
	(lto_tag_to_gimple_code): Likewise.
	(lto_tree_code_to_tag): Likewise.
	(lto_tag_to_tree_code): Likewise.
	* data-streamer.h (streamer_write_hwi_in_range): Use
	uhwi streaming to stream the normalized range.
	(streamer_read_hwi_in_range): Likewise.

From-SVN: r199732
2013-06-06 12:55:52 +00:00
Jan Hubicka 40a7fe1e38 lto-symtab.c (lto_symtab_merge_cgraph_nodes_1): Rename to ...
* lto-symtab.c (lto_symtab_merge_cgraph_nodes_1): Rename to ...
	(lto_symtab_merge_symbols_1): ... this one.
	(lto_symtab_merge_cgraph_nodes): Rename to ...
	(lto_symtab_merge_symbols): ... this one; simplify.
	* cgraph.c (same_body_aliases_done): Rename to ...
	(cpp_implicit_aliases_done): ... this one.
	(cgraph_create_function_alias): Update.
	(cgraph_same_body_alias): Update.
	(dump_cgraph_node): Remove alias dumping; simplify
	thunk dumping.
	(verify_edge_corresponds_to_fndecl): Simplify.
	* cgraph.h (symtab_node_base): Add cpp_implicit_alias,
	alias_target.
	(cgraph_node): Remove same_body_alias.
	(varpool_node): Remove alias_of and extra_name_alias.
	(same_body_aliases_done): Rename to ..
	(cpp_implicit_aliases_done): ... this one.
	(symtab_alias_ultimate_target): Add default parameter.
	(symtab_resolve_alias): New function.
	(fixup_same_cpp_alias_visibility): Declare.
	(cgraph_function_node): Add default parameter.
	(cgraph_node_asm_name): Likewise.
	(cgraph_function_or_thunk_node): Add default parameter; do
	not ICE when it is NULL.
	(varpool_variable_node): Likewise.
	* tree-emutls.c (create_emultls_var): Update.
	(ipa_lower_emutls): Update.
	* cgraphunit.c (cgraph_decide_is_function_needed): Update.
	(cgraph_reset_node): Reset alias info.
	(cgraph_finalize_function): Update.
	(fixup_same_cpp_alias_visibility): Move to symtab.c.
	(analyze_function): Simplify.
	(cgraph_process_same_body_aliases): Simplify.
	(analyze_functions): Fixup same body aliases.
	(handle_alias_pairs): Simplify.
	(assemble_thunk): Update.
	(assemble_thunks_and_aliases): Update.
	(output_weakrefs): Rewrite.
	* lto-cgraph.c (lto_output_node): Rewrite alias handling.
	(lto_output_varpool_node): Likewise.
	(compute_ltrans_boundary): Remve assert.
	(get_alias_symbol): New functoin.
	(input_node): Rewrite alias handling.
	(input_varpool_node): Likewise.
	* ipa-pure-const.c (propagate_pure_const): Fix formating.
	* ipa.c (process_references): Handle weakrefs correctly.
	(symtab_remove_unreachable_nodes): Likewise.
	* trans-mem.c (get_cg_data): Update.
	(ipa_tm_create_version_alias): Update.
	(ipa_tm_execute): Update.
	* symtab.c (dump_symtab_base): Dump aliases.
	(verify_symtab_base): Verify aliases.
	(symtab_node_availability): New function.
	(symtab_alias_ultimate_target): Simplify.
	(fixup_same_cpp_alias_visibility): Move here from cgraphunit.c;
	handle all the fixup cases.
	(symtab_resolve_alias): New function.
	* passes.c (ipa_write_summaries): Handle weakrefs.
	* varpool.c (varpool_analyze_node): Simplify.
	(assemble_aliases): Update.
	(varpool_create_variable_alias): Simplify.
	(varpool_extra_name_alias): Simplify.
	* lto-streamer.h (lto_symtab_merge_cgraph_nodes): Rename to...
	(lto_symtab_merge_symbols): ... this one.

	* decl2.c (cp_write_global_declarations): Replace same_body_alias
	by symbol.cpp_implicit_alias.

	* lto.c (read_cgraph_and_symbols): Simplify dumping; Replace
	lto_symtab_merge_cgraph_nodes by lto_symtab_merge_symbols.
	(do_whole_program_analysis): Update dumping.

From-SVN: r199577
2013-06-01 13:08:53 +00:00
Lawrence Crowl 4a8fb1a1de This patch is the main part of a consolodation of the hash_table patches to the...
This patch is the main part of a consolodation of the hash_table
patches to the cxx-conversion branch for files not under gcc/config.

Update various hash tables from htab_t to hash_table.
Modify types and calls to match.

* tree-parloops.c'reduction
* tree-parloops.c'name_to_copy

Fold reduction_info_hash and reduction_info_eq into new struct
reduction_hasher.  Fold name_to_copy_elt_eq and name_to_copy_elt_hash
into new struct name_to_copy_hasher.

* trans-mem.c'tm_log

Fold tm_log_hash, tm_log_eq, tm_log_free into new struct log_entry_hasher.

* trans-mem.c'tm_memopt_value_numbers

Fold tm_memop_hash, tm_memop_eq into new struct tm_memop_hasher.

* tree-ssa-strlen.c'decl_to_stridxlist_htab

Fold decl_to_stridxlist_hash into new struct stridxlist_hasher.

* tree-ssa-loop-ivopts.c'ivopts_data::inv_expr_tab

Fold htab_inv_expr_hash and htab_inv_expr_eq into new struct
iv_inv_expr_hasher.

* tree-ssa-uncprop.c'equiv

Equiv renamed to val_ssa_equiv because of name ambiguity with local variables.

Fold equiv_hash, equiv_eq and equiv_free into new struct val_ssa_equiv_hasher.

Renamed variables equiv_hash_elt to an_equiv_elt because of name ambiguity
with struct type.  Changed equiv_hash_elt_p to an_equiv_elt_p to match.

* tree-ssa-phiopt.c'seen_ssa_names

Fold name_to_bb_hash and name_to_bb_eq into new struct ssa_names_hasher.

* tree-ssa-structalias.c'pointer_equiv_class_table
* tree-ssa-structalias.c'location_equiv_class_table

Fold equiv_class_label_hash and equiv_class_label_eq into new
struct equiv_class_hasher.

* tree-ssa-structalias.c'shared_bitmap_table

Fold shared_bitmap_hash and shared_bitmap_eq into new struct
shared_bitmap_hasher.

* tree-ssa-live.c'var_map_base_init::tree_to_index

New struct tree_int_map_hasher.

* tree-sra.c'candidates

Fold uid_decl_map_hash and uid_decl_map_eq into new struct
uid_decl_hasher.  This change moves the definitions from tree-ssa.c
into tree-sra.c and removes the declarations from tree-flow.h

tree-browser.c

Remove stale declaration of removed TB_parent_eq.
Fix template parameter for base class to match value_type.

gimple.h

Use gimplify_hasher::hash rather than gimple_tree_hash in the
  assertion check.
Change return values to match return type. (I.e. no conversions.)

* graphite-clast-to-gimple.c'ivs_params::newivs_index
* graphite-clast-to-gimple.c'ivs_params::params_index
* graphite-clast-to-gimple.c'print_generated_program::params_index
* graphite-clast-to-gimple.c'gloog::newivs_index
* graphite-clast-to-gimple.c'gloog::params_index
* graphite.c graphite_transform_loops::bb_pbb_mapping
* sese.c copy_bb_and_scalar_dependences::rename_map

Move hash table declarations to a new graphite-htab.h, because they
are used in few places.

Remove unused:

htab_t scop::original_pddrs
SCOP_ORIGINAL_PDDRS

Remove unused:

insert_loop_close_phis
insert_guard_phis
debug_ivtype_map
ivtype_map_elt_info
new_ivtype_map_elt

* gimplify.c'gimplify_ctx::temp_htab

Move struct gimple_temp_hash_elt and struct gimplify_ctx to a new
gimplify-ctx.h, because they are used few places.

* cselib.c'cselib_hash_table
* gcse.c'pre_ldst_table
* gimple-ssa-strength-reduction.c'base_cand_map
* haifa-sched.c'delay_htab
* haifa-sched.c'delay_htab_i2
* ira-color.c'allocno_hard_regs_htab
* ira-costs.c'cost_classes_htab
* loop-invariant.c'merge_identical_invariants::eq
* loop-iv.c'bivs
* loop-unroll.c'opt_info::insns_to_split
* loop-unroll.c'opt_info::insns_with_var_to_expand
* passes.c'name_to_pass_map
* plugin.c'event_tab
* postreload-gcse.c'expr_table
* store-motion.c'store_motion_mems_table
* tree-cfg.c'discriminator_per_locus
* tree-scalar-evolution.c'resolve_mixers::cache
* tree-ssa-dom.c'avail_exprs

Remove unused:
dse.c bitmap clear_alias_sets
dse.c bitmap disqualified_clear_alias_sets
dse.c alloc_pool clear_alias_mode_pool
dse.c dse_step2_spill
dse.c dse_step5_spill
graphds.h htab_t graph::indices

* attribs.c'scoped_attributes::attribute_hash
* bitmap.c'bitmap_desc_hash
* dwarf2cfi.c'trace_index
* dwarf2out.c'break_out_includes::cu_hash_table
* dwarf2out.c'copy_decls_for_unworthy_types::decl_table
* dwarf2out.c'optimize_external_refs::map
* dwarf2out.c'output_comp_unit::extern_map
* dwarf2out.c'output_comdat_type_unit::extern_map
* dwarf2out.c'output_macinfo::macinfo_htab
* dwarf2out.c'optimize_location_lists::htab
* dwarf2out.c'dwarf2out_finish::comdat_type_table
* except.c'ehspec_hash_type
* except.c'assign_filter_values::ttypes
* except.c'assign_filter_values::ehspec
* except.c'sjlj_assign_call_site_values::ar_hash
* except.c'convert_to_eh_region_ranges::ar_hash
* trans-mem.c'tm_new_mem_hash
* tree-browser.c'TB_up_ht
* tree-eh.c'finally_tree

Move the declaration of hash_table <alloc_pool_hasher> alloc_pool_hash
in alloc-pool.c to after the method definitions for its parameter
class.

* ggc-common.c'loc_hash
* ggc-common.c'ptr_hash

Add a new hash_table method elements_with_deleted to meet the needs of
gcc-common.c.

Correct many methods with parameter types compare_type to the correct
value_type.  (Correct code was unlikely to notice the change, but
incorrect code will.)

* tree-complex.c'complex_variable_components
* tree-parloops.c'eliminate_local_variables_stmt::decl_address
* tree-parloops.c'separate_decls_in_region::decl_copies

Move hash table declarations to a new tree-hasher.h, to resolve
compilation dependences and because they are used in few places.

* lto-streamer.h'output_block::string_hash_table
* lto-streamer-in.c'file_name_hash_table
* lto-streamer.c'tree_htab

The struct string_slot moves from data-streamer.h to lto-streamer.h to
resolve compilation dependences.

Tested on x86_64.


Index: gcc/ChangeLog

2013-04-25  Lawrence Crowl  <crowl@google.com>

	* Makefile.in: Update as needed below.

	* alloc-pool.c (static hash_table <alloc_pool_hasher> alloc_pool_hash):
	Move declaration to after the type's method definitons.

	* attribs.c (htab_t scoped_attributes::attribute_hash):
	Change type to hash_table.  Update dependent calls and types.

	* bitmap.c (htab_t bitmap_desc_hash):
	Change type to hash_table.  Update dependent calls and types.

	* cselib.c (htab_t cselib_hash_table):
	Change type to hash_table.  Update dependent calls and types.

	* data-streamer.h (struct string_slot): Move to lto-streamer.h.
	(hash_string_slot_node): Move implementation into lto-streamer.h
	struct string_slot_hasher.
	(eq_string_slot_node): Likewise.

	* data-streamer-out.c: Update output_block::string_hash_table
	dependent calls and types.

	* dwarf2cfi.c (htab_t trace_index):
	Change type to hash_table.  Update dependent calls and types.

	* dwarf2out.c (htab_t break_out_includes::cu_hash_table):
	Change type to hash_table.  Update dependent calls and types.
	(htab_t copy_decls_for_unworthy_types::decl_table): Likewise.
	(htab_t optimize_external_refs::map): Likewise.
	(htab_t output_comp_unit::extern_map): Likewise.
	(htab_t output_comdat_type_unit::extern_map): Likewise.
	(htab_t output_macinfo::macinfo_htab): Likewise.
	(htab_t optimize_location_lists::htab): Likewise.
	(htab_t dwarf2out_finish::comdat_type_table): Likewise.

	* except.c (htab_t ehspec_hash_type):
	Change type to hash_table.  Update dependent calls and types.
	(assign_filter_values::ttypes): Likewise.
	(assign_filter_values::ehspec): Likewise.
	(sjlj_assign_call_site_values::ar_hash): Likewise.
	(convert_to_eh_region_ranges::ar_hash): Likewise.

	* gcse.c (htab_t pre_ldst_table):
	Change type to hash_table.  Update dependent calls and types.

	* ggc-common.c (htab_t saving_htab):
	Change type to hash_table.  Update dependent calls and types.
	(htab_t loc_hash): Likewise.
	(htab_t ptr_hash): Likewise.
	(call_count): Rename ggc_call_count.
	(call_alloc): Rename ggc_call_alloc.
	(loc_descriptor): Rename make_loc_descriptor.
	(add_statistics): Rename ggc_add_statistics.

	* ggc-common.c (saving_htab):
	Change type to hash_table.  Update dependent calls and types.

	* gimple.h (struct gimplify_ctx): Move to gimplify-ctx.h.
	(push_gimplify_context): Likewise.
	(pop_gimplify_context): Likewise.
	(struct gimple_temp_hash_elt): Added.
	(struct gimplify_hasher): Likewise.
	(struct gimplify_ctx.temp_htab):
	Change type to hash_table.  Update dependent calls and types.

	* gimple-fold.c: Include gimplify-ctx.h.

	* gimple-ssa-strength-reduction.c (htab_t base_cand_map):
	Change type to hash_table.  Update dependent calls and types.
	(base_cand_dump_callback): Rename to ssa_base_cand_dump_callback to
	avoid potential global name collision.

	* gimplify.c: Include gimplify-ctx.h.
	(struct gimple_temp_hash_elt): Move to gimplify-ctx.h.
	(htab_t gimplify_ctx::temp_htab):
	Update dependent calls and types for new type hash_table.
	(gimple_tree_hash): Move into gimplify_hasher in gimplify-ctx.h.
	(gimple_tree_eq): Move into gimplify_hasher in gimplify-ctx.h.

	* gimplify-ctx.h: New.
	(struct gimple_temp_hash_elt): Move from gimplify.c.
	(class gimplify_hasher): New.
	(struct gimplify_ctx): Move from gimple.h.
	(htab_t gimplify_ctx::temp_htab):
	Change type to hash_table.  Update dependent calls and types.

	* graphite-clast-to-gimple.c: Include graphite-htab.h.
	(htab_t ivs_params::newivs_index):
	Change type to hash_table.  Update dependent calls and types.
	(htab_t ivs_params::params_index): Likewise.
	(htab_t print_generated_program::params_index): Likewise.
	(htab_t gloog::newivs_index): Likewise.
	(htab_t gloog::params_index): Likewise.

	* graphite.c: Include graphite-htab.h.
	4htab_t graphite_transform_loops::bb_pbb_mapping):
	Change type to hash_table.  Update dependent calls and types.

	* graphite-clast-to-gimple.h: (extern gloog) Move to graphite-htab.h.
	(bb_pbb_map_hash): Fold into bb_pbb_htab_type in graphite-htab.h.
	(eq_bb_pbb_map): Fold into bb_pbb_htab_type in graphite-htab.h.

	* graphite-dependences.c: Include graphite-htab.h.
	(loop_is_parallel_p): Change hash table type of parameter.

	* graphite-htab.h: New.
	(typedef hash_table <bb_pbb_hasher> bb_pbb_htab_type): New.
	(extern find_pbb_via_hash): Move from graphite-poly.h.
	(extern loop_is_parallel_p): Move from graphite-poly.h.
	(extern get_loop_body_pbbs): Move from graphite-poly.h.

	* graphite-poly.h (extern find_pbb_via_hash): Move to graphite-htab.h.
	(extern loop_is_parallel_p): Move to graphite-htab.h.
	(extern get_loop_body_pbbs): Move to graphite-htab.h.

	* haifa-sched.c (htab_t delay_htab):
	Change type to hash_table.  Update dependent calls and types.
	(htab_t delay_htab_i2): Likewise.

	* ira-color.c (htab_t allocno_hard_regs_htab):
	Change type to hash_table.  Update dependent calls and types.

	* ira-costs.c (htab_t cost_classes_htab):
	Change type to hash_table.  Update dependent calls and types.

	* loop-invariant.c (htab_t merge_identical_invariants::eq):
	Change type to hash_table.  Update dependent calls and types.

	* loop-iv.c (htab_t bivs):
	Change type to hash_table.  Update dependent calls and types.

	* loop-unroll.c (htab_t opt_info::insns_to_split):
	Change type to hash_table.  Update dependent calls and types.
	(htab_t opt_info::insns_with_var_to_expand): Likewise.

	* lto-streamer.h (struct string_slot): Move from data-streamer.h
	(struct string_slot_hasher): New.
	(htab_t output_block::string_hash_table):
	Change type to hash_table.  Update dependent calls and types.

	* lto-streamer-in.c (freeing_string_slot_hasher): New.
	(htab_t file_name_hash_table):
	Change type to hash_table.  Update dependent calls and types.

	* lto-streamer-out.c: Update output_block::string_hash_table dependent
	calls and types.

	* lto-streamer.c (htab_t tree_htab):
	Change type to hash_table.  Update dependent calls and types.

	* omp-low.c: Include gimplify-ctx.h.

	* passes.c (htab_t name_to_pass_map):
	Change type to hash_table.  Update dependent calls and types.
	(pass_traverse): Rename to passes_pass_traverse.

	* plugin.c (htab_t event_tab):
	Change type to hash_table.  Update dependent calls and types.

	* postreload-gcse.c (htab_t expr_table):
	Change type to hash_table.  Update dependent calls and types.
	(dump_hash_table_entry): Rename dump_expr_hash_table_entry.

	* sese.c (debug_rename_map_1): Make extern.
	(htab_t copy_bb_and_scalar_dependences::rename_map):
	Change type to hash_table.  Update dependent calls and types.

	* sese.h (extern debug_rename_map): Move to .c file.

	* store-motion.c (htab_t store_motion_mems_table):
	Change type to hash_table.  Update dependent calls and types.

	* trans-mem.c (htab_t tm_new_mem_hash):
	Change type to hash_table.  Update dependent calls and types.

	* tree-browser.c (htab_t TB_up_ht):
	Change type to hash_table.  Update dependent calls and types.

	* tree-cfg.c (htab_t discriminator_per_locus):
	Change type to hash_table.  Update dependent calls and types.

	* tree-complex.c: Include tree-hasher.h
	(htab_t complex_variable_components):
	Change type to hash_table.  Update dependent calls and types.

	* tree-eh.c (htab_t finally_tree):
	Change type to hash_table.  Update dependent calls and types.

	* tree-flow.h (extern int_tree_map_hash): Moved into tree-hasher
	struct int_tree_hasher.
	(extern int_tree_map_eq): Likewise.
	(uid_decl_map_hash): Removed.
	(extern decl_tree_map_eq): Likewise.

	* tree-hasher.h: New.
	(struct int_tree_hasher): New.
	(typedef int_tree_htab_type): New.

	* tree-inline.c: Include gimplify-ctx.h.

	* tree-mudflap.c: Include gimplify-ctx.h.

	* tree-parloops.c: Include tree-hasher.h.
	(htab_t eliminate_local_variables_stmt::decl_address):
	Change type to hash_table.  Update dependent calls and types.
	(htab_t separate_decls_in_region::decl_copies): Likewise.

	* tree-scalar-evolution.c (htab_t resolve_mixers::cache):
	Change type to hash_table.  Update dependent calls and types.

	* tree-sra.c (candidates):
	Change type to hash_table.  Update dependent calls and types.

	* tree-ssa.c (int_tree_map_eq): Moved into struct int_tree_hasher
	in tree-flow.h.
	(int_tree_map_hash): Likewise.

	* tree-ssa-dom.c (htab_t avail_exprs):
	Change type to hash_table.  Update dependent calls and types.

	* tree-ssa-live.c (var_map_base_init::tree_to_index):
	Change type to hash_table.  Update dependent calls and types.

	* tree-ssa-loop-ivopts.c (struct ivopts_data.inv_expr_tab):
	Change type to hash_table.  Update dependent calls and types.

	* tree-ssa-phiopt.c (seen_ssa_names):
	Change type to hash_table.  Update dependent calls and types.

	* tree-ssa-strlen.c (decl_to_stridxlist_htab):
	Change type to hash_table.  Update dependent calls and types.

	* tree-ssa-uncprop.c (equiv):
	Change type to hash_table.  Update dependent calls and types.

From-SVN: r198329
2013-04-26 00:28:35 +00:00
Jan Hubicka 0208f7dab0 lto-cgraph.c (output_profile_summary, [...]): Use gcov streaming; stream hot bb threshold to ltrans.
* lto-cgraph.c (output_profile_summary, input_profile_summary): Use
	gcov streaming; stream hot bb threshold to ltrans.
	* predict.c (get_hot_bb_threshold): Break out from ....
	(maybe_hot_count_p): ... here.
	(set_hot_bb_threshold): New function.
	* lto-section-in.c (lto_section_name): Add profile.
	* profile.h (get_hot_bb_threshold, set_hot_bb_threshold): Declare.
	* ipa.c: Include hash-table.h, tree-inline.h, profile.h, lto-streamer.h
	and data-streamer.h
	(histogram_entry): New structure.
	(histogram, histogram_pool): New global vars.
	(histogram_hash): New structure.
	(histogram_hash::hash): New method.
	(histogram_hash::equal): Likewise.
	(account_time_size): New function.
	(cmp_counts): New function.
	(dump_histogram): New function.
	(ipa_profile_generate_summary): New function.
	(ipa_profile_write_summary): New function.
	(ipa_profile_read_summary): New function.
	(ipa_profile): Decide on threshold.
	(pass_ipa_profile): Add ipa_profile_write_summary and ipa_profile_read_summary.
	* Makefile.in (ipa.o): Update dependencies.
	* lto-streamer.h (LTO_section_ipa_profile): New section.

From-SVN: r197243
2013-03-29 18:07:34 +00:00
Richard Biener e45cde9826 re PR middle-end/56231 (warning traces have bogus line information when using LTO)
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
2013-02-08 12:55:13 +00:00
Richard Sandiford d1e082c2c2 Update copyright years in gcc/
From-SVN: r195098
2013-01-10 20:38:27 +00:00
Richard Biener 9713d329fa lto-streamer.h (LTO_minor_version): Bump to 2.
2013-01-07  Richard Biener  <rguenther@suse.de>

	* lto-streamer.h (LTO_minor_version): Bump to 2.

From-SVN: r194973
2013-01-07 15:28:14 +00:00
Jakub Jelinek 90d04a445c Update Copyright years for files modified in 2011 and/or 2012.
From-SVN: r194903
2013-01-04 13:49:55 +01:00