Commit Graph

136 Commits

Author SHA1 Message Date
Martin Jambor b2b4005150 Merge of HSA
2016-01-19  Martin Jambor  <mjambor@suse.cz>
	    Martin Liska  <mliska@suse.cz>
	    Michael Matz <matz@suse.de>

libgomp/
	* plugin/Makefrag.am: Add HSA plugin requirements.
	* plugin/configfrag.ac (HSA_RUNTIME_INCLUDE): New variable.
	(HSA_RUNTIME_LIB): Likewise.
	(HSA_RUNTIME_CPPFLAGS): Likewise.
	(HSA_RUNTIME_INCLUDE): New substitution.
	(HSA_RUNTIME_LIB): Likewise.
	(HSA_RUNTIME_LDFLAGS): Likewise.
	(hsa-runtime): New configure option.
	(hsa-runtime-include): Likewise.
	(hsa-runtime-lib): Likewise.
	(PLUGIN_HSA): New substitution variable.
	Fill HSA_RUNTIME_INCLUDE and HSA_RUNTIME_LIB according to the new
	configure options.
	(PLUGIN_HSA_CPPFLAGS): Likewise.
	(PLUGIN_HSA_LDFLAGS): Likewise.
	(PLUGIN_HSA_LIBS): Likewise.
	Check that we have access to HSA run-time.
	* libgomp-plugin.h (offload_target_type): New element
	OFFLOAD_TARGET_TYPE_HSA.
	* libgomp.h (gomp_target_task): New fields firstprivate_copies and
	args.
	(bool gomp_create_target_task): Updated.
	(gomp_device_descr): Extra parameter of run_func and async_run_func,
	new field can_run_func.
	* libgomp_g.h (GOMP_target_ext): Update prototype.
	* oacc-host.c (host_run): Added a new parameter args.
	* target.c (calculate_firstprivate_requirements): New function.
	(copy_firstprivate_data): Likewise.
	(gomp_target_fallback_firstprivate): Use them.
	(gomp_target_unshare_firstprivate): New function.
	(gomp_get_target_fn_addr): Allow returning NULL for shared memory
	devices.
	(GOMP_target): Do host fallback for all shared memory devices.  Do not
	pass any args to plugins.
	(GOMP_target_ext): Introduce device-specific argument parameter args.
	Allow host fallback if device shares memory.  Do not remap data if
	device has shared memory.
	(gomp_target_task_fn): Likewise.  Also treat shared memory devices
	like host fallback for mappings.
	(GOMP_target_data): Treat shared memory devices like host fallback.
	(GOMP_target_data_ext): Likewise.
	(GOMP_target_update): Likewise.
	(GOMP_target_update_ext): Likewise.  Also pass NULL as args to
	gomp_create_target_task.
	(GOMP_target_enter_exit_data): Likewise.
	(omp_target_alloc): Treat shared memory devices like host fallback.
	(omp_target_free): Likewise.
	(omp_target_is_present): Likewise.
	(omp_target_memcpy): Likewise.
	(omp_target_memcpy_rect): Likewise.
	(omp_target_associate_ptr): Likewise.
	(gomp_load_plugin_for_device): Also load can_run.
	* task.c (GOMP_PLUGIN_target_task_completion): Free
	firstprivate_copies.
	(gomp_create_target_task): Accept new argument args and store it to
	ttask.
	* plugin/plugin-hsa.c: New file.

gcc/
	* Makefile.in (OBJS): Add new source files.
	(GTFILES): Add hsa.c.
	* common.opt (disable_hsa): New variable.
	(-Whsa): New warning.
	* config.in (ENABLE_HSA): New.
	* configure.ac: Treat hsa differently from other accelerators.
	(OFFLOAD_TARGETS): Define ENABLE_OFFLOADING according to
	$enable_offloading.
	(ENABLE_HSA): Define ENABLE_HSA according to $enable_hsa.
	* doc/install.texi (Configuration): Document --with-hsa-runtime,
	--with-hsa-runtime-include, --with-hsa-runtime-lib and
	--with-hsa-kmt-lib.
	* doc/invoke.texi (-Whsa): Document.
	(hsa-gen-debug-stores): Likewise.
	* lto-wrapper.c (compile_images_for_offload_targets): Do not attempt
	to invoke offload compiler for hsa acclerator.
	* opts.c (common_handle_option): Determine whether HSA offloading
	should be performed.
	* params.def (PARAM_HSA_GEN_DEBUG_STORES): New parameter.
	* builtin-types.def (BT_FN_VOID_UINT_PTR_INT_PTR): New.
	(BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_INT_INT): Removed.
	(BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_PTR): New.
	* gimple-low.c (lower_stmt): Also handle GIMPLE_OMP_GRID_BODY.
	* gimple-pretty-print.c (dump_gimple_omp_for): Also handle
	GF_OMP_FOR_KIND_GRID_LOOP.
	(dump_gimple_omp_block): Also handle GIMPLE_OMP_GRID_BODY.
	(pp_gimple_stmt_1): Likewise.
	* gimple-walk.c (walk_gimple_stmt): Likewise.
	* gimple.c (gimple_build_omp_grid_body): New function.
	(gimple_copy): Also handle GIMPLE_OMP_GRID_BODY.
	* gimple.def (GIMPLE_OMP_GRID_BODY): New.
	* gimple.h (enum gf_mask): Added GF_OMP_PARALLEL_GRID_PHONY,
	GF_OMP_FOR_KIND_GRID_LOOP, GF_OMP_FOR_GRID_PHONY and
	GF_OMP_TEAMS_GRID_PHONY.
	(gimple_statement_omp_single_layout): Updated comments.
	(gimple_build_omp_grid_body): New function.
	(gimple_has_substatements): Also handle GIMPLE_OMP_GRID_BODY.
	(gimple_omp_for_grid_phony): New function.
	(gimple_omp_for_set_grid_phony): Likewise.
	(gimple_omp_parallel_grid_phony): Likewise.
	(gimple_omp_parallel_set_grid_phony): Likewise.
	(gimple_omp_teams_grid_phony): Likewise.
	(gimple_omp_teams_set_grid_phony): Likewise.
	(gimple_return_set_retbnd): Also handle GIMPLE_OMP_GRID_BODY.
	* omp-builtins.def (BUILT_IN_GOMP_OFFLOAD_REGISTER): New.
	(BUILT_IN_GOMP_OFFLOAD_UNREGISTER): Likewise.
	(BUILT_IN_GOMP_TARGET): Updated type.
	* omp-low.c: Include symbol-summary.h, hsa.h and params.h.
	(adjust_for_condition): New function.
	(get_omp_for_step_from_incr): Likewise.
	(extract_omp_for_data): Moved parts to adjust_for_condition and
	get_omp_for_step_from_incr.
	(build_outer_var_ref): Handle GIMPLE_OMP_GRID_BODY.
	(fixup_child_record_type): Bail out if receiver_decl is NULL.
	(scan_sharing_clauses): Handle OMP_CLAUSE__GRIDDIM_.
	(scan_omp_parallel): Do not create child functions for phony
	constructs.
	(check_omp_nesting_restrictions): Handle GIMPLE_OMP_GRID_BODY.
	(scan_omp_1_op): Checking assert we are not remapping to
	ERROR_MARK.  Also also handle GIMPLE_OMP_GRID_BODY.
	(parallel_needs_hsa_kernel_p): New function.
	(expand_parallel_call): Register apprpriate parallel child
	functions as HSA kernels.
	(grid_launch_attributes_trees): New type.
	(grid_attr_trees): New variable.
	(grid_create_kernel_launch_attr_types): New function.
	(grid_insert_store_range_dim): Likewise.
	(grid_get_kernel_launch_attributes): Likewise.
	(get_target_argument_identifier_1): Likewise.
	(get_target_argument_identifier): Likewise.
	(get_target_argument_value): Likewise.
	(push_target_argument_according_to_value): Likewise.
	(get_target_arguments): Likewise.
	(expand_omp_target): Call get_target_arguments instead of looking
	up for teams and thread limit.
	(grid_expand_omp_for_loop): New function.
	(grid_arg_decl_map): New type.
	(grid_remap_kernel_arg_accesses): New function.
	(grid_expand_target_kernel_body): New function.
	(expand_omp): Call it.
	(lower_omp_for): Do not emit phony constructs.
	(lower_omp_taskreg): Do not emit phony constructs but create for them
	a temporary variable receiver_decl.
	(lower_omp_taskreg): Do not emit phony constructs.
	(lower_omp_teams): Likewise.
	(lower_omp_grid_body): New function.
	(lower_omp_1): Call it.
	(grid_reg_assignment_to_local_var_p): New function.
	(grid_seq_only_contains_local_assignments): Likewise.
	(grid_find_single_omp_among_assignments_1): Likewise.
	(grid_find_single_omp_among_assignments): Likewise.
	(grid_find_ungridifiable_statement): Likewise.
	(grid_target_follows_gridifiable_pattern): Likewise.
	(grid_remap_prebody_decls): Likewise.
	(grid_copy_leading_local_assignments): Likewise.
	(grid_process_kernel_body_copy): Likewise.
	(grid_attempt_target_gridification): Likewise.
	(grid_gridify_all_targets_stmt): Likewise.
	(grid_gridify_all_targets): Likewise.
	(execute_lower_omp): Call grid_gridify_all_targets.
	(make_gimple_omp_edges): Handle GIMPLE_OMP_GRID_BODY.
	* tree-core.h (omp_clause_code): Added OMP_CLAUSE__GRIDDIM_.
	(tree_omp_clause): Added union field dimension.
	* tree-pretty-print.c (dump_omp_clause): Handle OMP_CLAUSE__GRIDDIM_.
	* tree.c (omp_clause_num_ops): Added number of arguments of
	OMP_CLAUSE__GRIDDIM_.
	(omp_clause_code_name): Added name of OMP_CLAUSE__GRIDDIM_.
	(walk_tree_1): Handle OMP_CLAUSE__GRIDDIM_.
	* tree.h (OMP_CLAUSE_GRIDDIM_DIMENSION): New.
	(OMP_CLAUSE_SET_GRIDDIM_DIMENSION): Likewise.
	(OMP_CLAUSE_GRIDDIM_SIZE): Likewise.
	(OMP_CLAUSE_GRIDDIM_GROUP): Likewise.
	* passes.def: Schedule pass_ipa_hsa and pass_gen_hsail.
	* tree-pass.h (make_pass_gen_hsail): Declare.
	(make_pass_ipa_hsa): Likewise.
	* ipa-hsa.c: New file.
	* lto-section-in.c (lto_section_name): Add hsa section name.
	* lto-streamer.h (lto_section_type): Add hsa section.
	* timevar.def (TV_IPA_HSA): New.
        * hsa-brig-format.h: New file.
	* hsa-brig.c: New file.
	* hsa-dump.c: Likewise.
	* hsa-gen.c: Likewise.
	* hsa.c: Likewise.
	* hsa.h: Likewise.
	* toplev.c (compile_file): Call hsa_output_brig.
	* hsa-regalloc.c: New file.

gcc/fortran/
	* types.def (BT_FN_VOID_UINT_PTR_INT_PTR): New.
	(BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_INT_INT): Removed.
	(BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_PTR): New.

gcc/lto/
	* lto-partition.c: Include "hsa.h"
	(add_symbol_to_partition_1): Put hsa implementations into the
	same partition as host implementations.

liboffloadmic/
	* plugin/libgomp-plugin-intelmic.cpp (GOMP_OFFLOAD_async_run): New
	unused parameter.
	(GOMP_OFFLOAD_run): Likewise.

include/
	* gomp-constants.h (GOMP_DEVICE_HSA): New macro.
	(GOMP_VERSION_HSA): Likewise.
	(GOMP_TARGET_ARG_DEVICE_MASK): Likewise.
	(GOMP_TARGET_ARG_DEVICE_ALL): Likewise.
	(GOMP_TARGET_ARG_SUBSEQUENT_PARAM): Likewise.
	(GOMP_TARGET_ARG_ID_MASK): Likewise.
	(GOMP_TARGET_ARG_NUM_TEAMS): Likewise.
	(GOMP_TARGET_ARG_THREAD_LIMIT): Likewise.
	(GOMP_TARGET_ARG_VALUE_SHIFT): Likewise.
	(GOMP_TARGET_ARG_HSA_KERNEL_ATTRIBUTES): Likewise.

From-SVN: r232549
2016-01-19 11:35:10 +01:00
Jakub Jelinek 818ab71a41 Update copyright years.
From-SVN: r232055
2016-01-04 15:30:50 +01:00
Jan Hubicka ca83487662 cgraph.c (cgraph_node::get_untransformed_body): Pass compressed flag to lto_get_section_data.
* cgraph.c (cgraph_node::get_untransformed_body): Pass compressed
	flag to lto_get_section_data.
	* varpool.c (varpool_node::get_constructor): Likewise.
	* lto-section-in.c (lto_get_section_data): Add new flag decompress.
	(lto_free_section_data): Likewise.
	(lto_get_raw_section_data): New function.
	(lto_free_raw_section_data): New function.
	(copy_function_or_variable): Copy sections w/o decompressing.
	(lto_output_decl_state_refs): Picke compressed bit.
	* lto-streamer.h (lto_in_decl_state): New flag compressed.
	(lto_out_decl_state): Likewise.
	(lto_get_section_data, lto_free_section_data): Update prototypes
	(lto_get_raw_section_data, lto_free_raw_section_data): Declare.
	(lto_write_raw_data): Declare.
	(lto_begin_section): Remove FIXME.
	(lto_write_raw_data): New function.
	(lto_write_stream): Remove FIXME.
	(lto_new_out_decl_state): Set compressed flag.

	* lto.c (lto_read_in_decl_state): Unpickle compressed bit.

From-SVN: r231593
2015-12-13 02:12:15 +00:00
Richard Biener 9276b0f797 lto-streamer.h (lto_simple_header_with_strings): Remove main_size field already in lto_simple_header.
2015-12-11  Richard Biener  <rguenther@suse.de>

	* lto-streamer.h (lto_simple_header_with_strings): Remove
	main_size field already in lto_simple_header.

From-SVN: r231555
2015-12-11 10:53:53 +00:00
Jan Hubicka 6b9ac1796e re PR lto/61886 (LTO breaks fread with _FORTIFY_SOURCE=2)
PR ipa/61886
	* lto-streamer.h (lto_symtab_merge_decls, lto_symtab_merge_symbols,
	lto_symtab_prevailing_decl): MOve to lto-symtab.h.
	* lto-streamer-out.c (DFS::DFS_write_tree_body): Check that
	DECL_ABSTRACT_ORIGIN is not error_mark_node.

	* lto-symtab.c: Include lto-symtab.h.
	(lto_cgraph_replace_node): Do not merge profiles here.
	(lto_symtab_merge_p): New function.
	(lto_symtab_merge_decls_2): Honor lto_symtab_merge_p.
	(lto_symtab_merge_symbols_1): Turn unmerged decls into transparent
	aliases.
	(lto_symtab_merge_symbols): Do not clear node->aux; we no longer use it.
	(lto_symtab_prevailing_decl): Move to lto-symtab.h; rewrite.
	* lto.c: Include lto-symtab.h
	* lto-symtab.h: New.

From-SVN: r231438
2015-12-09 02:15:05 +00:00
Richard Biener a9dfad6dff re PR lto/67568 (lto-streamer-in.c sanitizer runtime error: load of value 255, which is not a valid value for type 'bool')
2015-09-15  Richard Biener  <rguenther@suse.de>

	PR lto/67568
	* lto-streamer.h (lto_location_cache::current_sysp): Properly
	initialize.
	* lto-streamer-out.c (clear_line_info): Likewise.

From-SVN: r227779
2015-09-15 08:00:30 +00:00
Richard Biener 6c1bc27c5f lto-streamer.h (lto_location_cache::cached_location::sysp): Add.
2015-08-31  Richard Biener  <rguenther@suse.de>

	* lto-streamer.h (lto_location_cache::cached_location::sysp): Add.
	(lto_location_cache::current_sysp): Likewise.
	(output_block::current_sysp): Likewise.
	* lto-streamer-in.c (lto_location_cache::cmp_loc): Compare sysp.
	(lto_location_cache::apply_location_cache): Properly record
	system header locations.
	(lto_location_cache::input_location): Input whether a file
	is a system header.
	* lto-streamer-out.c (lto_output_location): Stream whether a file
	is a system header.

From-SVN: r227338
2015-08-31 11:47:30 +00:00
Andrew MacLeod f51ade332a lto-streamer.h: Don't include target.h and alloc-pool.h.
2015-07-09  Andrew MacLeod  <amacleod@redhat.com>

	* lto-streamer.h: Don't include target.h and alloc-pool.h.
	* builtins.c: Adjust includes.
	* gimple.c: Likewise.
	* ipa-icf.c: Likewise.
	* lto-opts.c: Likewise.
	* ipa-reference.c: Likewise.
	* lto-section-out.c: Likewise.
	* lto-streamer-in.c: Likewise.
	* lto-streamer-out.c: Likewise.
	* opts-global.c: Likewise.
	* symtab.c: Likewise.
	* tree-chkp.c: Likewise.
	* tree-ssa-live.c: Likewise.
	* tree-streamer-in.c: Likewise.
	* tree-streamer-out.c: Likewise.
	* config/darwin.c: Likewise.
	* config/i386/winnt.c: Likewise.

cp
2015-07-09  Andrew MacLeod  <amacleod@redhat.com>

	* cp-ubsan.c: Don't include alloc-pool.h or lto-streamer.h.

lto
2015-07-09  Andrew MacLeod  <amacleod@redhat.com>
	* lto-lang.c: Adjust includes of target.h, alloc-pool.h and
	lto-streamer.h.
	* lto-object.c: Likewise.
	* lto-partition.c: Likewise.
	* lto-symtab.c: Likewise.

From-SVN: r225612
2015-07-09 14:24:20 +00:00
Richard Biener 2dcaddb8d7 lto-streamer.h (LTO_major_version): Bump to 5.
2015-06-29  Richard Biener  <rguenther@suse.de>

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

From-SVN: r225113
2015-06-29 08:44:56 +00:00
Richard Sandiford ca752f3929 hash-traits.h (ggc_hasher): Rename to...
gcc/
	* hash-traits.h (ggc_hasher): Rename to...
	(ggc_remover): ...this and remove typedefs.
	(ggc_cache_hasher): Update accordingly.  Add typedefs.
	(ggc_ptr_hash): New class.
	* hash-table.h: Update comment.
	* cfgloop.h (loop_exit_hasher): Inherit from ggc_ptr_hash rather than
	ggc_hasher.
	* cgraph.h (section_name_hasher, cgraph_edge_hasher): Likewise.
	(tree_descriptor_hasher): Likewise.
	* cgraph.c (function_version_hasher): Likewise.
	* dwarf2out.c (indirect_string_hasher, dwarf_file_hasher): Likewise.
	(decl_die_hasher, block_die_hasher, decl_loc_hasher): Likewise.
	(dw_loc_list_hasher, addr_hasher): Likewise.
	* function.h (used_type_hasher): Likewise.
	* function.c (temp_address_hasher): Likewise.
	* gimple-ssa.h (tm_restart_hasher, ssa_name_hasher): Likewise.
	* libfuncs.h (libfunc_hasher): Likewise.
	* lto-streamer.h (decl_state_hasher): Likewise.
	* optabs.c (libfunc_decl_hasher): Likewise.
	* tree-scalar-evolution.c (scev_info_hasher): Likewise.
	* varasm.c (section_hasher, object_block_hasher): Likewise.
	(const_rtx_desc_hasher): Likewise.
	* config/darwin.c (indirection_hasher, cfstring_hasher): Likewise.
	* config/rs6000/rs6000.c (toc_hasher, builtin_hasher): Likewise.

gcc/c-family/
	* c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
	ggc_hasher.

gcc/cp/
	* constexpr.c (constexpr_fundef_hasher): Inherit from ggc_ptr_hash
	rather than ggc_hasher.
	(constexpr_call_hasher): Likewise.
	* cp-tree.h (cxx_int_tree_map_hasher, named_label_hasher): Likewise.
	* decl.c (typename_hasher): Likewise.
	* mangle.c (conv_type_hasher): Likewise.
	* pt.c (spec_hasher): Likewise.
	* tree.c (cplus_array_hasher, list_hasher): Likewise.
	* typeck2.c (abstract_type_hasher): Likewise.

gcc/fortran/
	* trans-decl.c (module_hasher): Likewise.
	* trans.h (module_decl_hasher): Likewise.

gcc/java/
	* java-tree.h (treetreehasher): Inherit from ggc_ptr_hash
	rather than ggc_hasher.
	(ict_hasher, type_assertion_hasher): Likewise.

gcc/objc/
	* objc-act.c (objc_string_hasher): Inherit from ggc_ptr_hash
	rather than ggc_hasher.

From-SVN: r224959
2015-06-25 17:06:36 +00:00
Richard Sandiford 8d67ee553d hash-table.h: Update comments.
gcc/
	* hash-table.h: Update comments.
	* hash-traits.h (pointer_hash): Don't inherit from typed_noop_remove.
	(nofree_ptr_hash): New class.
	* asan.c (asan_mem_ref_hasher): Inherit from nofree_ptr_hash rather
	than typed_noop_remove.  Remove redudant typedefs.
	* attribs.c (attribute_hasher): Likewise.
	* cfg.c (bb_copy_hasher): Likewise.
	* cselib.c (cselib_hasher): Likewise.
	* dse.c (invariant_group_base_hasher): Likewise.
	* dwarf2cfi.c (trace_info_hasher): Likewise.
	* dwarf2out.c (macinfo_entry_hasher): Likewise.
	(comdat_type_hasher, loc_list_hasher): Likewise.
	* gcse.c (pre_ldst_expr_hasher): Likewise.
	* genmatch.c (id_base): Likewise.
	* genrecog.c (test_pattern_hasher): Likewise.
	* gimple-ssa-strength-reduction.c (cand_chain_hasher): Likewise.
	* haifa-sched.c (delay_i1_hasher): Likewise.
	* hard-reg-set.h (simplifiable_subregs_hasher): Likewise.
	* ipa-icf.h (congruence_class_group_hash): Likewise.
	* ipa-profile.c (histogram_hash): Likewise.
	* ira-color.c (allocno_hard_regs_hasher): Likewise.
	* lto-streamer.h (string_slot_hasher): Likewise.
	* lto-streamer.c (tree_entry_hasher): Likewise.
	* plugin.c (event_hasher): Likewise.
	* postreload-gcse.c (expr_hasher): Likewise.
	* store-motion.c (st_expr_hasher): Likewise.
	* tree-sra.c (uid_decl_hasher): Likewise.
	* tree-ssa-coalesce.c (coalesce_pair_hasher): Likewise.
	(ssa_name_var_hash): Likewise.
	* tree-ssa-live.c (tree_int_map_hasher): Likewise.
	* tree-ssa-loop-im.c (mem_ref_hasher): Likewise.
	* tree-ssa-pre.c (pre_expr_d): Likewise.
	* tree-ssa-sccvn.c (vn_nary_op_hasher): Likewise.
	* vtable-verify.h (registration_hasher): Likewise.
	* vtable-verify.c (vtbl_map_hasher): Likewise.
	* config/arm/arm.c (libcall_hasher): Likewise.
	* config/i386/winnt.c (wrapped_symbol_hasher): Likewise.
	* config/ia64/ia64.c (bundle_state_hasher): Likewise.
	* config/sol2.c (comdat_entry_hasher): Likewise.
	* fold-const.c (fold): Use nofree_ptr_hash instead of pointer_hash.
	(print_fold_checksum, fold_checksum_tree): Likewise.
	(debug_fold_checksum, fold_build1_stat_loc): Likewise.
	(fold_build2_stat_loc, fold_build3_stat_loc): Likewise.
	(fold_build_call_array_loc): Likewise.
	* tree-ssa-ccp.c (gimple_htab): Likewise.
	* tree-browser.c (tree_upper_hasher): Inherit from nofree_ptr_hash
	rather than pointer_type.

gcc/c/
	* c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
	instead of pointer_hash.
	(detect_field_duplicates): Likewise.

gcc/cp/
	* class.c (fixed_type_or_null_ref_ht): Inherit from nofree_ptr_hash
	rather than pointer_hash.
	(fixed_type_or_null): Use nofree_ptr_hash instead of pointer_hash.
	* semantics.c (nrv_data): Likewise.
	* tree.c (verify_stmt_tree_r, verify_stmt_tree): Likewise.

gcc/java/
	* jcf-io.c (charstar_hash): Inherit from nofree_ptr_hash rather
	than typed_noop_remove.  Remove redudant typedefs.

gcc/lto/
	* lto.c (tree_scc_hasher): Inherit from nofree_ptr_hash rather
	than typed_noop_remove.  Remove redudant typedefs.

gcc/objc/
	* objc-act.c (decl_name_hash): Inherit from nofree_ptr_hash rather
	than typed_noop_remove.  Remove redudant typedefs.

libcc1/
	* plugin.cc (string_hasher): Inherit from nofree_ptr_hash rather
	than typed_noop_remove.  Remove redudant typedefs.
	(plugin_context): Use nofree_ptr_hash rather than pointer_hash.
	(plugin_context::mark): Likewise.

From-SVN: r224957
2015-06-25 17:06:13 +00:00
Andrew MacLeod 13fdf2e2d5 coretypes.h: Include hash-table.h and hash-set.h for host files.
2015-06-08  Andrew MacLeod  <amacleod@redhat.com>

	* coretypes.h: Include hash-table.h and hash-set.h for host files.
	* ggc.h: Don't include statistics.h>
	* hash-map.h: Remove all includes.
	* hash-set.h: Likewise.
	* hash-table.h: Add statistics.h, inchash.h and hash-map-traits.h to
	the include list. Remove <new>.
	* inchash.h: Remove all includes.
	* mem-stats.h: Likewise.
	* vec.h: No special processing for generators or ggc.  
	* alias.c : Adjust include files.
	* alloc-pool.c : Likewise.
	* alloc-pool.h : Likewise.
	* asan.c : Likewise.
	* attribs.c : Likewise.
	* auto-inc-dec.c : Likewise.
	* auto-profile.c : Likewise.
	* bb-reorder.c : Likewise.
	* bitmap.c : Likewise.
	* bitmap.h : Likewise.
	* bt-load.c : Likewise.
	* builtins.c : Likewise.
	* caller-save.c : Likewise.
	* calls.c : Likewise.
	* ccmp.c : Likewise.
	* cfg.c : Likewise.
	* cfganal.c : Likewise.
	* cfgbuild.c : Likewise.
	* cfgcleanup.c : Likewise.
	* cfgexpand.c : Likewise.
	* cfghooks.c : Likewise.
	* cfgloop.c : Likewise.
	* cfgloop.h : Likewise.
	* cfgloopanal.c : Likewise.
	* cfgloopmanip.c : Likewise.
	* cfgrtl.c : Likewise.
	* cgraph.c : Likewise.
	* cgraphbuild.c : Likewise.
	* cgraphclones.c : Likewise.
	* cgraphunit.c : Likewise.
	* cilk-common.c : Likewise.
	* combine-stack-adj.c : Likewise.
	* combine.c : Likewise.
	* compare-elim.c : Likewise.
	* context.c : Likewise.
	* convert.c : Likewise.
	* coverage.c : Likewise.
	* cppbuiltin.c : Likewise.
	* cprop.c : Likewise.
	* cse.c : Likewise.
	* cselib.c : Likewise.
	* data-streamer-in.c : Likewise.
	* data-streamer-out.c : Likewise.
	* data-streamer.c : Likewise.
	* data-streamer.h : Likewise.
	* dbxout.c : Likewise.
	* dce.c : Likewise.
	* ddg.c : Likewise.
	* debug.c : Likewise.
	* df-core.c : Likewise.
	* df-problems.c : Likewise.
	* df-scan.c : Likewise.
	* df.h : Likewise.
	* dfp.c : Likewise.
	* dojump.c : Likewise.
	* dominance.c : Likewise.
	* domwalk.c : Likewise.
	* double-int.c : Likewise.
	* dse.c : Likewise.
	* dumpfile.c : Likewise.
	* dwarf2asm.c : Likewise.
	* dwarf2cfi.c : Likewise.
	* dwarf2out.c : Likewise.
	* emit-rtl.c : Likewise.
	* et-forest.c : Likewise.
	* except.c : Likewise.
	* except.h : Likewise.
	* explow.c : Likewise.
	* expmed.c : Likewise.
	* expr.c : Likewise.
	* final.c : Likewise.
	* fixed-value.c : Likewise.
	* fold-const.c : Likewise.
	* function.c : Likewise.
	* fwprop.c : Likewise.
	* gcc-plugin.h : Likewise.
	* gcc.c : Likewise.
	* gcse-common.c : Likewise.
	* gcse.c : Likewise.
	* genattrtab.c : Likewise.
	* genautomata.c : Likewise.
	* genconditions.c : Likewise.
	* genemit.c : Likewise.
	* generic-match-head.c : Likewise.
	* genextract.c : Likewise.
	* gengtype-state.c : Likewise.
	* gengtype.c : Likewise.
	* genhooks.c : Likewise.
	* genmatch.c : Likewise.
	* genmodes.c : Likewise.
	* genrecog.c : Likewise.
	* gensupport.c : Likewise.
	* ggc-common.c : Likewise.
	* ggc-internal.h : Likewise.
	* ggc-none.c : Likewise.
	* ggc-page.c : Likewise.
	* gimple-builder.c : Likewise.
	* gimple-expr.c : Likewise.
	* gimple-fold.c : Likewise.
	* gimple-iterator.c : Likewise.
	* gimple-low.c : Likewise.
	* gimple-match-head.c : Likewise.
	* gimple-pretty-print.c : Likewise.
	* gimple-ssa-isolate-paths.c : Likewise.
	* gimple-ssa-strength-reduction.c : Likewise.
	* gimple-ssa.h : Likewise.
	* gimple-streamer-in.c : Likewise.
	* gimple-streamer-out.c : Likewise.
	* gimple-streamer.h : Likewise.
	* gimple-walk.c : Likewise.
	* gimple.c : Likewise.
	* gimplify-me.c : Likewise.
	* gimplify.c : Likewise.
	* godump.c : Likewise.
	* graph.c : Likewise.
	* graphds.c : Likewise.
	* graphite-blocking.c : Likewise.
	* graphite-dependences.c : Likewise.
	* graphite-interchange.c : Likewise.
	* graphite-isl-ast-to-gimple.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.
	* haifa-sched.c : Likewise.
	* hard-reg-set.h : Likewise.
	* hw-doloop.c : Likewise.
	* ifcvt.c : Likewise.
	* inchash.c : Likewise.
	* incpath.c : Likewise.
	* init-regs.c : Likewise.
	* input.c : Likewise.
	* internal-fn.c : Likewise.
	* ipa-chkp.c : Likewise.
	* ipa-comdats.c : Likewise.
	* ipa-cp.c : Likewise.
	* ipa-devirt.c : Likewise.
	* ipa-icf-gimple.c : Likewise.
	* ipa-icf.c : Likewise.
	* ipa-inline-analysis.c : Likewise.
	* ipa-inline-transform.c : Likewise.
	* ipa-inline.c : Likewise.
	* ipa-polymorphic-call.c : Likewise.
	* ipa-profile.c : Likewise.
	* ipa-prop.c : Likewise.
	* ipa-pure-const.c : Likewise.
	* ipa-ref.c : Likewise.
	* ipa-reference.c : Likewise.
	* ipa-split.c : Likewise.
	* ipa-utils.c : Likewise.
	* ipa-visibility.c : Likewise.
	* ipa.c : Likewise.
	* ira-build.c : Likewise.
	* ira-color.c : Likewise.
	* ira-conflicts.c : Likewise.
	* ira-costs.c : Likewise.
	* ira-emit.c : Likewise.
	* ira-lives.c : Likewise.
	* ira.c : Likewise.
	* jump.c : Likewise.
	* langhooks.c : Likewise.
	* lcm.c : Likewise.
	* libfuncs.h : Likewise.
	* lists.c : Likewise.
	* loop-doloop.c : Likewise.
	* loop-init.c : Likewise.
	* loop-invariant.c : Likewise.
	* loop-iv.c : Likewise.
	* loop-unroll.c : Likewise.
	* lower-subreg.c : Likewise.
	* lra-assigns.c : Likewise.
	* lra-coalesce.c : Likewise.
	* lra-constraints.c : Likewise.
	* lra-eliminations.c : Likewise.
	* lra-lives.c : Likewise.
	* lra-remat.c : Likewise.
	* lra-spills.c : Likewise.
	* lra.c : Likewise.
	* lto-cgraph.c : Likewise.
	* lto-compress.c : Likewise.
	* lto-opts.c : Likewise.
	* lto-section-in.c : Likewise.
	* lto-section-out.c : Likewise.
	* lto-streamer-in.c : Likewise.
	* lto-streamer-out.c : Likewise.
	* lto-streamer.c : Likewise.
	* lto-streamer.h : Likewise.
	* mcf.c : Likewise.
	* mode-switching.c : Likewise.
	* modulo-sched.c : Likewise.
	* omega.c : Likewise.
	* omp-low.c : Likewise.
	* optabs.c : Likewise.
	* opts-global.c : Likewise.
	* opts.h : Likewise.
	* passes.c : Likewise.
	* plugin.c : Likewise.
	* postreload-gcse.c : Likewise.
	* postreload.c : Likewise.
	* predict.c : Likewise.
	* print-rtl.c : Likewise.
	* print-tree.c : Likewise.
	* profile.c : Likewise.
	* read-md.c : Likewise.
	* read-md.h : Likewise.
	* read-rtl.c : Likewise.
	* real.c : Likewise.
	* realmpfr.c : Likewise.
	* recog.c : Likewise.
	* ree.c : Likewise.
	* reg-stack.c : Likewise.
	* regcprop.c : Likewise.
	* reginfo.c : Likewise.
	* regrename.c : Likewise.
	* regstat.c : Likewise.
	* reload.c : Likewise.
	* reload1.c : Likewise.
	* reorg.c : Likewise.
	* resource.c : Likewise.
	* rtl-chkp.c : Likewise.
	* rtl.c : Likewise.
	* rtl.h : Likewise.
	* rtlanal.c : Likewise.
	* rtlhash.c : Likewise.
	* rtlhash.h : Likewise.
	* rtlhooks.c : Likewise.
	* sanopt.c : Likewise.
	* sched-deps.c : Likewise.
	* sched-ebb.c : Likewise.
	* sched-rgn.c : Likewise.
	* sched-vis.c : Likewise.
	* sdbout.c : Likewise.
	* sel-sched-dump.c : Likewise.
	* sel-sched-ir.c : Likewise.
	* sel-sched-ir.h : Likewise.
	* sel-sched.c : Likewise.
	* sese.c : Likewise.
	* shrink-wrap.c : Likewise.
	* shrink-wrap.h : Likewise.
	* simplify-rtx.c : Likewise.
	* stack-ptr-mod.c : Likewise.
	* statistics.c : Likewise.
	* stmt.c : Likewise.
	* stor-layout.c : Likewise.
	* store-motion.c : Likewise.
	* stringpool.c : Likewise.
	* symtab.c : Likewise.
	* target-globals.c : Likewise.
	* targhooks.c : Likewise.
	* tlink.c : Likewise.
	* toplev.c : Likewise.
	* tracer.c : Likewise.
	* trans-mem.c : Likewise.
	* tree-affine.c : Likewise.
	* tree-affine.h : Likewise.
	* tree-browser.c : Likewise.
	* tree-call-cdce.c : Likewise.
	* tree-cfg.c : Likewise.
	* tree-cfgcleanup.c : Likewise.
	* tree-chkp-opt.c : Likewise.
	* tree-chkp.c : Likewise.
	* tree-chrec.c : Likewise.
	* tree-complex.c : Likewise.
	* tree-data-ref.c : Likewise.
	* tree-dfa.c : Likewise.
	* tree-diagnostic.c : Likewise.
	* tree-dump.c : Likewise.
	* tree-eh.c : Likewise.
	* tree-eh.h : Likewise.
	* tree-emutls.c : Likewise.
	* tree-hasher.h : Likewise.
	* tree-if-conv.c : Likewise.
	* tree-inline.c : Likewise.
	* tree-inline.h : Likewise.
	* tree-into-ssa.c : Likewise.
	* tree-iterator.c : Likewise.
	* tree-loop-distribution.c : Likewise.
	* tree-nested.c : Likewise.
	* tree-nrv.c : Likewise.
	* tree-object-size.c : Likewise.
	* tree-outof-ssa.c : Likewise.
	* tree-parloops.c : Likewise.
	* tree-phinodes.c : Likewise.
	* tree-predcom.c : Likewise.
	* tree-pretty-print.c : Likewise.
	* tree-profile.c : Likewise.
	* tree-scalar-evolution.c : Likewise.
	* tree-sra.c : Likewise.
	* tree-ssa-address.c : Likewise.
	* tree-ssa-alias.c : Likewise.
	* tree-ssa-ccp.c : Likewise.
	* tree-ssa-coalesce.c : Likewise.
	* tree-ssa-copy.c : Likewise.
	* tree-ssa-copyrename.c : Likewise.
	* tree-ssa-dce.c : Likewise.
	* tree-ssa-dom.c : Likewise.
	* tree-ssa-dse.c : Likewise.
	* tree-ssa-forwprop.c : Likewise.
	* tree-ssa-ifcombine.c : Likewise.
	* tree-ssa-live.c : Likewise.
	* tree-ssa-loop-ch.c : Likewise.
	* tree-ssa-loop-im.c : Likewise.
	* tree-ssa-loop-ivcanon.c : Likewise.
	* tree-ssa-loop-ivopts.c : Likewise.
	* tree-ssa-loop-manip.c : Likewise.
	* tree-ssa-loop-niter.c : Likewise.
	* tree-ssa-loop-prefetch.c : Likewise.
	* tree-ssa-loop-unswitch.c : Likewise.
	* tree-ssa-loop.c : Likewise.
	* tree-ssa-math-opts.c : Likewise.
	* tree-ssa-operands.c : Likewise.
	* tree-ssa-phiopt.c : Likewise.
	* tree-ssa-phiprop.c : Likewise.
	* tree-ssa-pre.c : Likewise.
	* tree-ssa-propagate.c : Likewise.
	* tree-ssa-reassoc.c : Likewise.
	* tree-ssa-sccvn.c : Likewise.
	* tree-ssa-scopedtables.c : Likewise.
	* tree-ssa-sink.c : Likewise.
	* tree-ssa-strlen.c : Likewise.
	* tree-ssa-structalias.c : Likewise.
	* tree-ssa-tail-merge.c : Likewise.
	* tree-ssa-ter.c : Likewise.
	* tree-ssa-threadedge.c : Likewise.
	* tree-ssa-threadupdate.c : Likewise.
	* tree-ssa-uncprop.c : Likewise.
	* tree-ssa-uninit.c : Likewise.
	* tree-ssa.c : Likewise.
	* tree-ssanames.c : Likewise.
	* tree-stdarg.c : Likewise.
	* tree-streamer-in.c : Likewise.
	* tree-streamer-out.c : Likewise.
	* tree-streamer.c : Likewise.
	* tree-streamer.h : Likewise.
	* tree-switch-conversion.c : Likewise.
	* tree-tailcall.c : Likewise.
	* tree-vect-data-refs.c : Likewise.
	* tree-vect-generic.c : Likewise.
	* tree-vect-loop-manip.c : Likewise.
	* tree-vect-loop.c : Likewise.
	* tree-vect-patterns.c : Likewise.
	* tree-vect-slp.c : Likewise.
	* tree-vect-stmts.c : Likewise.
	* tree-vectorizer.c : Likewise.
	* tree-vectorizer.h : Likewise.
	* tree-vrp.c : Likewise.
	* tree.c : Likewise.
	* tsan.c : Likewise.
	* ubsan.c : Likewise.
	* valtrack.c : Likewise.
	* valtrack.h : Likewise.
	* value-prof.c : Likewise.
	* var-tracking.c : Likewise.
	* varasm.c : Likewise.
	* varpool.c : Likewise.
	* vec.c: Likewise.
	* vmsdbgout.c : Likewise.
	* vtable-verify.c : Likewise.
	* vtable-verify.h : Likewise.
	* web.c : Likewise.
	* wide-int.cc : Likewise.
	* xcoffout.c : Likewise.
	* config/aarch64/aarch64-builtins.c : Likewise.
	* config/aarch64/aarch64.c : Likewise.
	* config/aarch64/cortex-a57-fma-steering.c : Likewise.
	* config/alpha/alpha.c : Likewise.
	* config/arc/arc.c : Likewise.
	* config/arm/aarch-common.c : Likewise.
	* config/arm/arm-builtins.c : Likewise.
	* config/arm/arm-c.c : Likewise.
	* config/arm/arm.c : Likewise.
	* config/avr/avr-c.c : Likewise.
	* config/avr/avr-log.c : Likewise.
	* config/avr/avr.c : Likewise.
	* config/bfin/bfin.c : Likewise.
	* config/c6x/c6x.c : Likewise.
	* config/cr16/cr16.c : Likewise.
	* config/cris/cris.c : Likewise.
	* config/darwin-c.c : Likewise.
	* config/darwin.c : Likewise.
	* config/default-c.c : Likewise.
	* config/epiphany/epiphany.c : Likewise.
	* config/epiphany/mode-switch-use.c : Likewise.
	* config/epiphany/resolve-sw-modes.c : Likewise.
	* config/fr30/fr30.c : Likewise.
	* config/frv/frv.c : Likewise.
	* config/ft32/ft32.c : Likewise.
	* config/glibc-c.c : Likewise.
	* config/h8300/h8300.c : Likewise.
	* config/i386/i386-c.c : Likewise.
	* config/i386/i386.c : Likewise.
	* config/i386/msformat-c.c : Likewise.
	* config/i386/winnt-cxx.c : Likewise.
	* config/i386/winnt-stubs.c : Likewise.
	* config/i386/winnt.c : Likewise.
	* config/ia64/ia64-c.c : Likewise.
	* config/ia64/ia64.c : Likewise.
	* config/iq2000/iq2000.c : Likewise.
	* config/lm32/lm32.c : Likewise.
	* config/m32c/m32c-pragma.c : Likewise.
	* config/m32c/m32c.c : Likewise.
	* config/m32r/m32r.c : Likewise.
	* config/m68k/m68k.c : Likewise.
	* config/mcore/mcore.c : Likewise.
	* config/mep/mep-pragma.c : Likewise.
	* config/mep/mep.c : Likewise.
	* config/microblaze/microblaze-c.c : Likewise.
	* config/microblaze/microblaze.c : Likewise.
	* config/mips/mips.c : Likewise.
	* config/mmix/mmix.c : Likewise.
	* config/mn10300/mn10300.c : Likewise.
	* config/moxie/moxie.c : Likewise.
	* config/msp430/msp430-c.c : Likewise.
	* config/msp430/msp430.c : Likewise.
	* config/nds32/nds32-cost.c : Likewise.
	* config/nds32/nds32-fp-as-gp.c : Likewise.
	* config/nds32/nds32-intrinsic.c : Likewise.
	* config/nds32/nds32-isr.c : Likewise.
	* config/nds32/nds32-md-auxiliary.c : Likewise.
	* config/nds32/nds32-memory-manipulation.c : Likewise.
	* config/nds32/nds32-pipelines-auxiliary.c : Likewise.
	* config/nds32/nds32-predicates.c : Likewise.
	* config/nds32/nds32.c : Likewise.
	* config/nios2/nios2.c : Likewise.
	* config/nvptx/nvptx.c : Likewise.
	* config/pa/pa.c : Likewise.
	* config/pdp11/pdp11.c : Likewise.
	* config/rl78/rl78-c.c : Likewise.
	* config/rl78/rl78.c : Likewise.
	* config/rs6000/rs6000-c.c : Likewise.
	* config/rs6000/rs6000.c : Likewise.
	* config/rx/rx.c : Likewise.
	* config/s390/s390-c.c : Likewise.
	* config/s390/s390.c : Likewise.
	* config/sh/sh-c.c : Likewise.
	* config/sh/sh-mem.cc : Likewise.
	* config/sh/sh.c : Likewise.
	* config/sh/sh_optimize_sett_clrt.cc : Likewise.
	* config/sh/sh_treg_combine.cc : Likewise.
	* config/sol2-c.c : Likewise.
	* config/sol2-cxx.c : Likewise.
	* config/sol2-stubs.c : Likewise.
	* config/sol2.c : Likewise.
	* config/sparc/sparc-c.c : Likewise.
	* config/sparc/sparc.c : Likewise.
	* config/spu/spu-c.c : Likewise.
	* config/spu/spu.c : Likewise.
	* config/stormy16/stormy16.c : Likewise.
	* config/tilegx/mul-tables.c : Likewise.
	* config/tilegx/tilegx-c.c : Likewise.
	* config/tilegx/tilegx.c : Likewise.
	* config/tilepro/mul-tables.c : Likewise.
	* config/tilepro/tilepro-c.c : Likewise.
	* config/tilepro/tilepro.c : Likewise.
	* config/v850/v850-c.c : Likewise.
	* config/v850/v850.c : Likewise.
	* config/vax/vax.c : Likewise.
	* config/visium/visium.c : Likewise.
	* config/vms/vms-c.c : Likewise.
	* config/vms/vms.c : Likewise.
	* config/vxworks.c : Likewise.
	* config/winnt-c.c : Likewise.
	* config/xtensa/xtensa.c : Likewise.

ada
2015-06-08  Andrew MacLeod  <amacleod@redhat.com>

	* gcc-interface/cuintp.c : Adjust include files.
	* gcc-interface/decl.c : Likewise.
	* gcc-interface/misc.c : Likewise.
	* gcc-interface/targtyps.c : Likewise.
	* gcc-interface/trans.c : Likewise.
	* gcc-interface/utils.c : Likewise.
	* gcc-interface/utils2.c : Likewise.
	
c
2015-06-08  Andrew MacLeod  <amacleod@redhat.com>

	* c-array-notation.c : Adjust include files.
	* c-aux-info.c : Likewise.
	* c-convert.c : Likewise.
	* c-decl.c : Likewise.
	* c-errors.c : Likewise.
	* c-lang.c : Likewise.
	* c-lang.h : Likewise.
	* c-objc-common.c : Likewise.
	* c-parser.c : Likewise.
	* c-typeck.c : Likewise.

cfamily
2015-06-08  Andrew MacLeod  <amacleod@redhat.com>

	* array-notation-common.c : Adjust include files.
	* c-ada-spec.c : Likewise.
	* c-cilkplus.c : Likewise.
	* c-common.c : Likewise.
	* c-common.h : Likewise.
	* c-cppbuiltin.c : Likewise.
	* c-dump.c : Likewise.
	* c-format.c : Likewise.
	* c-gimplify.c : Likewise.
	* c-indentation.c : Likewise.
	* c-lex.c : Likewise.
	* c-omp.c : Likewise.
	* c-opts.c : Likewise.
	* c-pch.c : Likewise.
	* c-ppoutput.c : Likewise.
	* c-pragma.c : Likewise.
	* c-pretty-print.c : Likewise.
	* c-semantics.c : Likewise.
	* c-ubsan.c : Likewise.
	* cilk.c : Likewise.
	* stub-objc.c : Likewise.

cp
2015-06-08  Andrew MacLeod  <amacleod@redhat.com>

	* call.c : Adjust include files.
	* class.c : Likewise.
	* constexpr.c : Likewise.
	* cp-array-notation.c : Likewise.
	* cp-cilkplus.c : Likewise.
	* cp-gimplify.c : Likewise.
	* cp-lang.c : Likewise.
	* cp-objcp-common.c : Likewise.
	* cp-tree.h : Likewise.
	* cp-ubsan.c : Likewise.
	* cvt.c : Likewise.
	* decl.c : Likewise.
	* decl2.c : Likewise.
	* dump.c : Likewise.
	* error.c : Likewise.
	* except.c : Likewise.
	* expr.c : Likewise.
	* friend.c : Likewise.
	* init.c : Likewise.
	* lambda.c : Likewise.
	* lex.c : Likewise.
	* mangle.c : Likewise.
	* method.c : Likewise.
	* name-lookup.c : Likewise.
	* optimize.c : Likewise.
	* parser.c : Likewise.
	* pt.c : Likewise.
	* ptree.c : Likewise.
	* repo.c : Likewise.
	* rtti.c : Likewise.
	* search.c : Likewise.
	* semantics.c : Likewise.
	* tree.c : Likewise.
	* typeck.c : Likewise.
	* typeck2.c : Likewise.
	* vtable-class-hierarchy.c : Likewise.

fortran
2015-06-08  Andrew MacLeod  <amacleod@redhat.com>

	* convert.c : Adjust include files.
	* cpp.c : Likewise.
	* decl.c : Likewise.
	* f95-lang.c : Likewise.
	* gfortran.h : Likewise.
	* iresolve.c : Likewise.
	* match.c : Likewise.
	* module.c : Likewise.
	* openmp.c : Likewise.
	* options.c : Likewise.
	* target-memory.c : Likewise.
	* trans-array.c : Likewise.
	* trans-common.c : Likewise.
	* trans-const.c : Likewise.
	* trans-decl.c : Likewise.
	* trans-expr.c : Likewise.
	* trans-intrinsic.c : Likewise.
	* trans-io.c : Likewise.
	* trans-openmp.c : Likewise.
	* trans-stmt.c : Likewise.
	* trans-types.c : Likewise.
	* trans.c : Likewise.


go
2015-06-08  Andrew MacLeod  <amacleod@redhat.com>

	* go-backend.c : Adjust include files.
	* go-gcc.cc : Likewise.
	* go-lang.c : Likewise.

java
2015-06-08  Andrew MacLeod  <amacleod@redhat.com>

	* boehm.c : Adjust include files.
	* builtins.c : Likewise.
	* class.c : Likewise.
	* constants.c : Likewise.
	* decl.c : Likewise.
	* except.c : Likewise.
	* expr.c : Likewise.
	* java-gimplify.c : Likewise.
	* java-tree.h : Likewise.
	* jcf-dump.c : Likewise.
	* jcf-io.c : Likewise.
	* jcf-parse.c : Likewise.
	* jcf-reader.c : Likewise.
	* jvgenmain.c : Likewise.
	* lang.c : Likewise.
	* mangle.c : Likewise.
	* mangle_name.c : Likewise.
	* resource.c : Likewise.
	* typeck.c : Likewise.
	* verify-glue.c : Likewise.
	* verify-impl.c : Likewise.

jit
2015-06-08  Andrew MacLeod  <amacleod@redhat.com>

	* dummy-frontend.c : Adjust include files.
	* jit-common.h : Likewise.
	* jit-playback.c : Likewise.

lto
2015-06-08  Andrew MacLeod  <amacleod@redhat.com>

	* lto-lang.c : Adjust include files.
	* lto-object.c : Likewise.
	* lto-partition.c : Likewise.
	* lto-partition.h : Likewise.
	* lto-symtab.c : Likewise.
	* lto.c : Likewise.
	* lto.h : Likewise.

objc
2015-06-08  Andrew MacLeod  <amacleod@redhat.com>

	* objc-act.c : Adjust include files.
	* objc-encoding.c : Likewise.
	* objc-gnu-runtime-abi-01.c : Likewise.
	* objc-lang.c : Likewise.
	* objc-map.c : Likewise.
	* objc-next-runtime-abi-01.c : Likewise.
	* objc-next-runtime-abi-02.c : Likewise.
	* objc-runtime-shared-support.c : Likewise.

objcp
2015-06-08  Andrew MacLeod  <amacleod@redhat.com>

	* objcp-decl.c : Adjust include files.
	* objcp-lang.c : Likewise.

From-SVN: r224250
2015-06-08 21:06:50 +00:00
Trevor Saunders 67f58944a7 remove need for store_values_directly
This switches all hash_table users to use the layout that stores
elements of type value_type in the hash table instead of the one storing
value_type *.  Since it becomes unused support for the value_type *
layout is removed.

gcc/

	* hash-table.h: Remove version of hash_table that stored value_type *.
	* asan.c, attribs.c, bitmap.c, cfg.c, cgraph.h, config/arm/arm.c,
	config/i386/winnt.c, config/ia64/ia64.c, config/mips/mips.c,
	config/sol2.c, coverage.c, cselib.c, dse.c, dwarf2cfi.c,
	dwarf2out.c, except.c, gcse.c, genmatch.c, ggc-common.c,
	gimple-ssa-strength-reduction.c, gimplify.c, haifa-sched.c,
	hard-reg-set.h, hash-map.h, hash-set.h, ipa-devirt.c, ipa-icf.h,
	ipa-profile.c, ira-color.c, ira-costs.c, loop-invariant.c,
	loop-iv.c, loop-unroll.c, lto-streamer.h, plugin.c, postreload-gcse.c,
	reginfo.c, statistics.c, store-motion.c, trans-mem.c, tree-cfg.c,
	tree-eh.c, tree-hasher.h, tree-into-ssa.c, tree-parloops.c,
	tree-sra.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-structalias.c, tree-ssa-tail-merge.c,
	tree-ssa-threadupdate.c, tree-vectorizer.c, tree-vectorizer.h,
	valtrack.h, var-tracking.c, vtable-verify.c, vtable-verify.h: Adjust.

libcc1/

	* plugin.cc: Adjust for hash_table changes.

gcc/java/

	* jcf-io.c: Adjust for hash_table changes.

gcc/lto/

	* lto.c: Adjust for hash_table changes.

gcc/objc/

	* objc-act.c: Adjust for hash_table changes.

From-SVN: r222213
2015-04-18 18:13:18 +00:00
Jan Hubicka 50cfd44e5d lto-streamer.h (class lto_location_cache): Turn loc_cache into auto_vec.
* lto-streamer.h (class lto_location_cache): Turn loc_cache into
	auto_vec.

From-SVN: r221722
2015-03-27 09:03:15 +00:00
Jan Hubicka eaeec5ecfa re PR lto/65536 (LTO line number information garbled)
PR lto/65536
	* lto-streamer.h (class lto_location_cache): New.
	(struct data_in): Add location_cache.
	(lto_input_location): Update prototype.
	(stream_input_location_now): New.
	* streamer-hooks.h (struct streamer_hooks): Make input_location to take
	pointer to location.
	(stream_input_location): Update.
	* ipa-devirt.c: Include streamer-hooks.h and lto-streamer.h
	(warn_odr): Apply location cache before warning.
	(lto_input_location): Update prototype.
	* gimple-streamer-in.c (input_phi, input_gimple_stmt):
	Use stream_input_location_now.
	* lto/lto.c (unify_scc): Revert location cache when unification
	suceeded.
	(lto_read_decls): Accept location cache after sucess;
	apply location cache before calling debug hooks.
	* lto-streamer-in.c (lto_location_cache::current_cache): New static
	variable.
	(lto_location_cache::cmp_loc): New function.
	(lto_location_cache::apply_location_cache): New function.
	(lto_location_cache::accept_location_cache): New function.
	(lto_location_cache::revert_location_cache): New function.
	(lto_location_cache::input_location): New function.
	(lto_input_location): Do location caching.
	(stream_input_location_now): New function.
	(input_eh_region, input_struct_function_base): Use
	stream_input_location_now.
	(lto_data_in_create): use new.
	(lto_data_in_delete): Use delete.
	* tree-streamer-in.c (unpack_ts_block_value_fields,
	unpack_ts_omp_clause_value_fields, streamer_read_tree_bitfields,
	lto_input_ts_exp_tree_pointers): Update for cached location api.

From-SVN: r221720
2015-03-27 06:58:59 +00:00
Jakub Jelinek db847fa8f2 passes.c (ipa_write_summaries_1): Call lto_output_init_mode_table.
* passes.c (ipa_write_summaries_1): Call lto_output_init_mode_table.
	(ipa_write_optimization_summaries): Likewise.
	* tree-streamer.h: Include data-streamer.h.
	(streamer_mode_table): Declare extern variable.
	(bp_pack_machine_mode, bp_unpack_machine_mode): New inline functions.
	* lto-streamer-out.c (lto_output_init_mode_table,
	lto_write_mode_table): New functions.
	(produce_asm_for_decls): Call lto_write_mode_table when streaming
	offloading LTO.
	* lto-section-in.c (lto_section_name): Add "mode_table" entry.
	(lto_create_simple_input_block): Add mode_table argument to the
	lto_input_block constructors.
	* ipa-prop.c (ipa_prop_read_section, read_replacements_section):
	Likewise.
	* data-streamer-in.c (string_for_index): Likewise.
	* ipa-inline-analysis.c (inline_read_section): Likewise.
	* ipa-icf.c (sem_item_optimizer::read_section): Likewise.
	* lto-cgraph.c (input_cgraph_opt_section): Likewise.
	* lto-streamer-in.c (lto_read_body_or_constructor,
	lto_input_toplevel_asms): Likewise.
	(lto_input_mode_table): New function.
	* tree-streamer-out.c (pack_ts_fixed_cst_value_fields,
	pack_ts_decl_common_value_fields, pack_ts_type_common_value_fields):
	Use bp_pack_machine_mode.
	* real.h (struct real_format): Add name field.
	* lto-streamer.h (enum lto_section_type): Add LTO_section_mode_table.
	(class lto_input_block): Add mode_table member.
	(lto_input_block::lto_input_block): Add mode_table_ argument,
	initialize mode_table.
	(struct lto_file_decl_data): Add mode_table field.
	(lto_input_mode_table, lto_output_init_mode_table): New prototypes.
	* tree-streamer-in.c (unpack_ts_fixed_cst_value_fields,
	unpack_ts_decl_common_value_fields,
	unpack_ts_type_common_value_fields): Call bp_unpack_machine_mode.
	* tree-streamer.c (streamer_mode_table): New variable.
	* real.c (ieee_single_format, mips_single_format,
	motorola_single_format, spu_single_format, ieee_double_format,
	mips_double_format, motorola_double_format,
	ieee_extended_motorola_format, ieee_extended_intel_96_format,
	ieee_extended_intel_128_format, ieee_extended_intel_96_round_53_format,
	ibm_extended_format, mips_extended_format, ieee_quad_format,
	mips_quad_format, vax_f_format, vax_d_format, vax_g_format,
	decimal_single_format, decimal_double_format, decimal_quad_format,
	ieee_half_format, arm_half_format, real_internal_format): Add name
	field.
	* config/pdp11/pdp11.c (pdp11_f_format, pdp11_d_format): Likewise.
lto/
	* lto.c (lto_mode_identity_table): New variable.
	(lto_read_decls): Add mode_table argument to the lto_input_block
	constructor.
	(lto_file_finalize): Initialize mode_table.
	(lto_init): Initialize lto_mode_identity_table.

From-SVN: r221005
2015-02-26 13:26:11 +01:00
Ilya Verbin 837bac8cb6 cgraphunit.c (ipa_passes): Remove argument from ipa_write_summaries.
gcc/
	* cgraphunit.c (ipa_passes): Remove argument from ipa_write_summaries.
	* lto-cgraph.c (select_what_to_stream): Remove argument, use
	lto_stream_offload_p instead.
	* lto-streamer.h (select_what_to_stream): Remove argument.
	* passes.c (ipa_write_summaries): Likewise.
	* tree-pass.h (ipa_write_summaries): Likewise.
gcc/lto/
	* lto-partition.c (lto_promote_cross_file_statics): Remove argument
	from select_what_to_stream.

From-SVN: r219605
2015-01-14 15:15:21 +00:00
Bernd Schmidt 1b34e6e250 re PR middle-end/64412 (ICE in offload compiler: in extract_insn, at recog.c:2327)
PR middle-end/64412
	* lto-streamer.h (lto_stream_offload_p): New declaration.
	* lto-streamer.c (lto_stream_offload_p): New variable.
	* cgraphunit.c (ipa_passes): Set lto_stream_offload_p
	at the same time as section_name_prefix.
	* lto-streamer-out.c (hash_tree): Don't hash TREE_TARGET_OPTION
	if lto_stream_offload_p.
	* tree-streamer-out.c (streamer_pack_tree_bitfields): Don't
	stream TREE_TARGET_OPTION if lto_stream_offload_p.
	(write_ts_function_decl_tree_pointers): Don't
	stream DECL_FUNCTION_SPECIFIC_TARGET if lto_stream_offload_p.
	* tree-streamer-in.c (unpack_value_fields): Don't stream
	TREE_TARGET_OPTION in if ACCEL_COMPILER.
	(lto_input_ts_function_decl_tree_pointers): Don't stream
	DECL_FUNCTION_SPECIFIC_TARGET in if ACCEL_COMPILER.
	* lto-opts.c (lto_write_options): Use lto_stream_offload_p
	instead of section_name_prefix string comparisons.
lto/
	* lto.c (read_cgraph_and_symbols): Set lto_stream_offload_p
	if ACCEL_COMPILER.

Co-Authored-By: Jakub Jelinek <jakub@redhat.com>

From-SVN: r219410
2015-01-09 22:38:00 +01:00
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