Commit Graph

1475 Commits

Author SHA1 Message Date
Jan Hubicka 5ce039dfe9 class.c (fixup_type_variants): Do not copy TYPE_METHODS
* class.c (fixup_type_variants): Do not copy TYPE_METHODS
	(one_inheriting_sig): Assert tat we always set TYPE_METHODS of main variant.
	* semantics.c (finish_member_declaration): Likewise.
	* method.c (lazily_declare_fn): Allways add method to main variant list.

	* dwarf2out.c (gen_member_die): Sanity check that we access TYPE_MAIN_VARIANT
	for TYPE_METHODS.
	* function.c (use_register_for_decl): Look for TYPE_MAIN_VARIANT when checking
	TYPE_METHODS.
	* tree.c (free_lang_data_in_type): See TYPE_METHODS to error_mark_node
	if non-null.
	(build_distinct_type_copy): Clear TYPE_METHODS.
	(verify_type_variant): Verify that TYPE_METHODS is NULL for variants.
	(verify_type): Allow TYPE_METHODS to be error_mark_node.
	* tree.def: Update docs of YTPE_STUB_DECL and TYPE_METHODS.

From-SVN: r223021
2015-05-11 22:24:33 +00:00
Jan Hubicka 3eb92a3d25 * tree.c (verify_type_variant): Check TYPE_VALUES_RAW and TYPE_PRECISION
From-SVN: r222991
2015-05-11 02:51:51 +00:00
Jan Hubicka 15296d46de tree.c (free_lang_data_in_type): Free TREE_PURPOSE of TYPE_ARG_TYPES list.
* tree.c (free_lang_data_in_type): Free TREE_PURPOSE of
	TYPE_ARG_TYPES list.
	(verify_type): Permit non-NULL TREE_PURPOSE in non-LTO builds.
	* tree.def (FUNCTION_TYPE): Document TREE_PURPOSE in TYPE_ARG_TYPES

From-SVN: r222984
2015-05-10 21:03:15 +00:00
Jan Hubicka 9a22098d4d * tree.c (verify_type): Verify TYPE_BINFO and TYPE_VALUES_RAW.
From-SVN: r222980
2015-05-10 14:13:32 +00:00
David Malcolm 21c0a521e4 Fix indentation issues seen by -Wmisleading-indentation
gcc/ChangeLog:
	* auto-profile.c (afdo_find_equiv_class): Fix indentation so
	that it reflects the block structure.
	(afdo_propagate_edge): Likewise.
	(afdo_calculate_branch_prob): Likewise.
	(afdo_annotate_cfg): Likewise.
	* cfgcleanup.c (equal_different_set_p): Likewise.
	(try_crossjump_to_edge): Likewise.
	* cgraph.c (cgraph_node::verify_node): Likewise.
	* cgraphunit.c (expand_all_functions): Likewise.
	* config/i386/i386.c (ix86_expand_copysign): Likewise.
	(exact_dependency_1): Likewise.
	* dwarf2asm.c (dw2_output_indirect_constants): Likewise.
	* dwarf2out.c (tree_add_const_value_attribute_for_decl): Likewise.
	* gensupport.c (process_define_subst): Likewise.
	* lto-wrapper.c (merge_and_complain): Likewise.
	* tree-if-conv.c (if_convertible_bb_p): Likewise.
	* tree-ssa-loop-prefetch.c (find_or_create_group): Likewise.
	* tree-ssa-tail-merge.c (gsi_advance_fw_nondebug_nonlocal): Likewise.
	* tree-vect-data-refs.c (vect_grouped_load_supported): Likewise.
	* tree-vect-loop.c (vectorizable_reduction): Likewise.
	* tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
	* tree-vect-stmts.c (vectorizable_shift): Likewise.
	* tree-vrp.c (vrp_finalize): Likewise.
	* tree.c (variably_modified_type_p): Likewise.

gcc/cp/ChangeLog:
	* parser.c (cp_parser_asm_definition): Only test for
        error_mark_node if "outputs" was just set.
	(cp_parser_asm_definition): Likewise for "inputs".

gcc/fortran/ChangeLog:
	* expr.c (check_inquiry): Fix indentation so that it reflects the
	block structure.
	* interface.c (compare_parameter): Likewise.
	* parse.c (parse_oacc_structured_block): Likewise.
	* target-memory.c (expr_to_char): Likewise.
	* trans-types.c (gfc_init_kinds): Likewise.

libcpp/ChangeLog:
	* pch.c (cpp_valid_state): Fix indentation so that it reflects the
	block structure.

From-SVN: r222823
2015-05-05 19:41:11 +00:00
Jan Hubicka 417402b80e tree.c (verify_type): Check various uses of TYPE_MAXVAL...
* tree.c (verify_type): Check various uses of TYPE_MAXVAL;
	fix overactive TYPE_MIN_VALUE check and add FIXME for type
	compatibility problems.

From-SVN: r222792
2015-05-05 01:42:07 +00:00
Jan Hubicka 30a9f69b59 * tree.c (verify_type): Check various uses of TYPE_MINVAL.
From-SVN: r222753
2015-05-04 00:14:47 +00:00
Jan Hubicka 32496fdde1 ipa-devirt.c (odr_subtypes_equivalent_p): Compare TYPE_NAME only for aggregate types.
* ipa-devirt.c (odr_subtypes_equivalent_p): Compare TYPE_NAME only
	for aggregate types.
	(register_odr_type): Be ready for MAIN_VARIANT of ODR type
	type to be non_ODR.
	* tree.c (need_assembler_name_p): Compute mangled name for
	non-fundamental types and integer types.

From-SVN: r222609
2015-04-30 04:43:32 +00:00
Jan Hubicka fd2bbdfd97 tree.c (build_common_builtin_nodes): Do not build __builtin_alloca_with_align as equivalent of library alloca.
* tree.c (build_common_builtin_nodes): Do not build
	__builtin_alloca_with_align as equivalent of library alloca.

From-SVN: r222607
2015-04-30 02:58:43 +00:00
Jan Hubicka b0845a1e51 dwarf2out.c (gen_type_die_with_usage): Call verify_type.
* dwarf2out.c (gen_type_die_with_usage): Call verify_type.
	* ipa-chkp.c (chkp_copy_function_type_adding_bounds): Do not produce
	bugus variants.
	* tree.c: Include print-tree.h and ipa-utils.h
	(free_lang_data_in_type): Clear TYPE_VFIELD leaked by C FE.
	(free_lang_data_in_cgraph): Call verify_type.
	(verify_type_variant): New function.
	(verify_type): New function.
	* tree.h (verify_type): Declare.

	* lto.c (lto_fixup_state): Call verify_type.

From-SVN: r222606
2015-04-30 02:45:54 +00:00
Jason Merrill c6f044f766 re PR c++/50800 (Internal compiler error in finish_member_declarations, possibly related to may_alias attribute)
PR c++/50800
gcc/
	* tree.c (build_reference_type_for_mode): Don't pass can_alias_all
	down when building TYPE_CANONICAL.
	(build_pointer_type_for_mode): Likewise.
gcc/cp/
	* typeck.c (structural_comptypes): Don't check TYPE_REF_CAN_ALIAS_ALL.

From-SVN: r222419
2015-04-24 15:11:45 -04:00
Jan Hubicka 0b5751c240 tree.h (attribute_value_equal): Declare.
* tree.h (attribute_value_equal): Declare.
	* tree.c (attribute_value_equal): Export.

From-SVN: r222380
2015-04-23 16:23:26 +00:00
Tom de Vries cef3bed654 Disable lang_hooks.gimplify_expr in free_lang_data
2015-04-17  Tom de Vries  <tom@codesourcery.com>

	* tree.c (free_lang_data): Disable lang_hooks.gimplify_expr.

From-SVN: r222169
2015-04-17 09:26:24 +00:00
Jan Hubicka 36ceb0e3cc tree.c (need_assembler_name_p): Artificial types have no ODR names.
* tree.c (need_assembler_name_p): Artificial types have no ODR
	names.
	* ipa-devirt.c (warn_odr): Do not try to apply ODR cache when
	no caching is done.
	* lto.c (lto_read_decls): Move code registering odr types out
	of TYPE_CANONICAL conditional and also register polymorphic types.

From-SVN: r221797
2015-03-31 17:03:16 +00:00
Jan Hubicka a7384b1b02 re PR lto/65316 (LTO: Uninitialized memory / ICE with -g -fno-lto-odr-type-merging: in types_same_for_odr, at ipa-devirt.c:465)
PR ipa/65316
	* tree.c (free_lang_data_in_type): Be sure to keep BINFO_VTABLE
	when outputting debug.

From-SVN: r221258
2015-03-07 20:33:58 +00:00
Jan Hubicka 190bbd0b03 cgraph.h (symtab_node::has_aliases_p): Simplify.
* cgraph.h (symtab_node::has_aliases_p): Simplify.
	(symtab_node::call_for_symbol_and_aliases): Use has_aliases_p
	* tree.c (lookup_binfo_at_offset): Make static.
	(get_binfo_at_offset): Do not shadow offset; add explanatory
	comment.

From-SVN: r220718
2015-02-15 22:30:16 +00:00
Jan Hubicka e23f28927f re PR ipa/60871 (internal compiler error: in possible_polymorphic_call_targets, at ipa-devirt.c:1510)
PR ipa/60871
	PR ipa/64139
	* tree.c (lookup_binfo_at_offset): New function.
	(get_binfo_at_offset): Use it.

	* g++.dg/torture/pr64139.C: New testcase.
	* g++.dg/torture/pr60871.C: Likewise.

From-SVN: r220185
2015-01-27 19:39:37 +00:00
Thomas Schwinge 41dbbb3789 Merge current set of OpenACC changes from gomp-4_0-branch.
contrib/
	* gcc_update (files_and_dependencies): Update rules for new
	libgomp/plugin/Makefrag.am and libgomp/plugin/configfrag.ac files.
	gcc/
	* builtin-types.def (BT_FN_VOID_INT_INT_VAR)
	(BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR_INT_INT_VAR)
	(BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR):
	New function types.
	* builtins.c: Include "gomp-constants.h".
	(expand_builtin_acc_on_device): New function.
	(expand_builtin, is_inexpensive_builtin): Handle
	BUILT_IN_ACC_ON_DEVICE.
	* builtins.def (DEF_GOACC_BUILTIN, DEF_GOACC_BUILTIN_COMPILER):
	New macros.
	* cgraph.c (cgraph_node::create): Consider flag_openacc next to
	flag_openmp.
	* config.gcc <nvptx-*> (tm_file): Add nvptx/offload.h.
	<*-intelmic-* | *-intelmicemul-*> (tm_file): Add
	i386/intelmic-offload.h.
	* gcc.c (LINK_COMMAND_SPEC, GOMP_SELF_SPECS): For -fopenacc, link
	to libgomp and its dependencies.
	* config/arc/arc.h (LINK_COMMAND_SPEC): Likewise.
	* config/darwin.h (LINK_COMMAND_SPEC_A): Likewise.
	* config/i386/mingw32.h (GOMP_SELF_SPECS): Likewise.
	* config/ia64/hpux.h (LIB_SPEC): Likewise.
	* config/pa/pa-hpux11.h (LIB_SPEC): Likewise.
	* config/pa/pa64-hpux.h (LIB_SPEC): Likewise.
	* doc/generic.texi: Update for OpenACC changes.
	* doc/gimple.texi: Likewise.
	* doc/invoke.texi: Likewise.
	* doc/sourcebuild.texi: Likewise.
	* gimple-pretty-print.c (dump_gimple_omp_for): Handle
	GF_OMP_FOR_KIND_OACC_LOOP.
	(dump_gimple_omp_target): Handle GF_OMP_TARGET_KIND_OACC_KERNELS,
	GF_OMP_TARGET_KIND_OACC_PARALLEL, GF_OMP_TARGET_KIND_OACC_DATA,
	GF_OMP_TARGET_KIND_OACC_UPDATE,
	GF_OMP_TARGET_KIND_OACC_ENTER_EXIT_DATA.
	Dump more data.
	* gimple.c: Update comments for OpenACC changes.
	* gimple.def: Likewise.
	* gimple.h: Likewise.
	(enum gf_mask): Add GF_OMP_FOR_KIND_OACC_LOOP,
	GF_OMP_TARGET_KIND_OACC_PARALLEL, GF_OMP_TARGET_KIND_OACC_KERNELS,
	GF_OMP_TARGET_KIND_OACC_DATA, GF_OMP_TARGET_KIND_OACC_UPDATE,
	GF_OMP_TARGET_KIND_OACC_ENTER_EXIT_DATA.
	(gimple_omp_for_cond, gimple_omp_for_set_cond): Sort in the
	appropriate place.
	(is_gimple_omp_oacc, is_gimple_omp_offloaded): New functions.
	* gimplify.c: Include "gomp-constants.h".
	Update comments for OpenACC changes.
	(is_gimple_stmt): Handle OACC_PARALLEL, OACC_KERNELS, OACC_DATA,
	OACC_HOST_DATA, OACC_DECLARE, OACC_UPDATE, OACC_ENTER_DATA,
	OACC_EXIT_DATA, OACC_CACHE, OACC_LOOP.
	(gimplify_scan_omp_clauses, gimplify_adjust_omp_clauses): Handle
	OMP_CLAUSE__CACHE_, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
	OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
	OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_GANG, OMP_CLAUSE_WORKER,
	OMP_CLAUSE_VECTOR, OMP_CLAUSE_DEVICE_RESIDENT,
	OMP_CLAUSE_USE_DEVICE, OMP_CLAUSE_INDEPENDENT, OMP_CLAUSE_AUTO,
	OMP_CLAUSE_SEQ.
	(gimplify_adjust_omp_clauses_1, gimplify_adjust_omp_clauses): Use
	GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.  Use
	OMP_CLAUSE_SET_MAP_KIND.
	(gimplify_oacc_cache): New function.
	(gimplify_omp_for): Handle OACC_LOOP.
	(gimplify_omp_workshare): Handle OACC_KERNELS, OACC_PARALLEL,
	OACC_DATA.
	(gimplify_omp_target_update): Handle OACC_ENTER_DATA,
	OACC_EXIT_DATA, OACC_UPDATE.
	(gimplify_expr): Handle OACC_LOOP, OACC_CACHE, OACC_HOST_DATA,
	OACC_DECLARE, OACC_KERNELS, OACC_PARALLEL, OACC_DATA,
	OACC_ENTER_DATA, OACC_EXIT_DATA, OACC_UPDATE.
	(gimplify_body): Consider flag_openacc next to flag_openmp.
	* lto-streamer-out.c: Include "gomp-constants.h".
	* omp-builtins.def (BUILT_IN_ACC_GET_DEVICE_TYPE)
	(BUILT_IN_GOACC_DATA_START, BUILT_IN_GOACC_DATA_END)
	(BUILT_IN_GOACC_ENTER_EXIT_DATA, BUILT_IN_GOACC_PARALLEL)
	(BUILT_IN_GOACC_UPDATE, BUILT_IN_GOACC_WAIT)
	(BUILT_IN_GOACC_GET_THREAD_NUM, BUILT_IN_GOACC_GET_NUM_THREADS)
	(BUILT_IN_ACC_ON_DEVICE): New builtins.
	* omp-low.c: Include "gomp-constants.h".
	Update comments for OpenACC changes.
	(struct omp_context): Add reduction_map, gwv_below, gwv_this
	members.
	(extract_omp_for_data, use_pointer_for_field, install_var_field)
	(new_omp_context, delete_omp_context, scan_sharing_clauses)
	(create_omp_child_function, scan_omp_for, scan_omp_target)
	(check_omp_nesting_restrictions, lower_reduction_clauses)
	(build_omp_regions_1, diagnose_sb_0, make_gimple_omp_edges):
	Update for OpenACC changes.
	(scan_sharing_clauses): Handle OMP_CLAUSE_NUM_GANGS:
	OMP_CLAUSE_NUM_WORKERS: OMP_CLAUSE_VECTOR_LENGTH,
	OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT, OMP_CLAUSE_GANG,
	OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, OMP_CLAUSE_DEVICE_RESIDENT,
	OMP_CLAUSE_USE_DEVICE, OMP_CLAUSE__CACHE_, OMP_CLAUSE_INDEPENDENT,
	OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ.  Use GOMP_MAP_* instead of
	OMP_CLAUSE_MAP_*.
	(expand_omp_for_static_nochunk, expand_omp_for_static_chunk):
	Handle GF_OMP_FOR_KIND_OACC_LOOP.
	(expand_omp_target, lower_omp_target): Handle
	GF_OMP_TARGET_KIND_OACC_PARALLEL, GF_OMP_TARGET_KIND_OACC_KERNELS,
	GF_OMP_TARGET_KIND_OACC_UPDATE,
	GF_OMP_TARGET_KIND_OACC_ENTER_EXIT_DATA,
	GF_OMP_TARGET_KIND_OACC_DATA.
	(pass_expand_omp::execute, execute_lower_omp)
	(pass_diagnose_omp_blocks::gate): Consider flag_openacc next to
	flag_openmp.
	(offload_symbol_decl): New variable.
	(oacc_get_reduction_array_id, oacc_max_threads)
	(get_offload_symbol_decl, get_base_type, lookup_oacc_reduction)
	(maybe_lookup_oacc_reduction, enclosing_target_ctx)
	(oacc_loop_or_target_p, oacc_lower_reduction_var_helper)
	(oacc_gimple_assign, oacc_initialize_reduction_data)
	(oacc_finalize_reduction_data, oacc_process_reduction_data): New
	functions.
	(is_targetreg_ctx): Remove function.
	* tree-core.h (enum omp_clause_code): Add OMP_CLAUSE__CACHE_,
	OMP_CLAUSE_DEVICE_RESIDENT, OMP_CLAUSE_USE_DEVICE,
	OMP_CLAUSE_GANG, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
	OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_INDEPENDENT,
	OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, OMP_CLAUSE_NUM_GANGS,
	OMP_CLAUSE_NUM_WORKERS, OMP_CLAUSE_VECTOR_LENGTH.
	* tree.c (omp_clause_code_name, walk_tree_1): Update accordingly.
	* tree.h (OMP_CLAUSE_GANG_EXPR, OMP_CLAUSE_GANG_STATIC_EXPR)
	(OMP_CLAUSE_ASYNC_EXPR, OMP_CLAUSE_WAIT_EXPR)
	(OMP_CLAUSE_VECTOR_EXPR, OMP_CLAUSE_WORKER_EXPR)
	(OMP_CLAUSE_NUM_GANGS_EXPR, OMP_CLAUSE_NUM_WORKERS_EXPR)
	(OMP_CLAUSE_VECTOR_LENGTH_EXPR): New macros.
	* tree-core.h: Update comments for OpenACC changes.
	(enum omp_clause_map_kind): Remove.
	(struct tree_omp_clause): Change type of map_kind member from enum
	omp_clause_map_kind to unsigned char.
	* tree-inline.c: Update comments for OpenACC changes.
	* tree-nested.c: Likewise.  Include "gomp-constants.h".
	(convert_nonlocal_reference_stmt, convert_local_reference_stmt)
	(convert_tramp_reference_stmt, convert_gimple_call): Update for
	OpenACC changes.  Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.  Use
	OMP_CLAUSE_SET_MAP_KIND.
	* tree-pretty-print.c: Include "gomp-constants.h".
	(dump_omp_clause): Handle OMP_CLAUSE_DEVICE_RESIDENT,
	OMP_CLAUSE_USE_DEVICE, OMP_CLAUSE__CACHE_, OMP_CLAUSE_GANG,
	OMP_CLAUSE_ASYNC, OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ,
	OMP_CLAUSE_WAIT, OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR,
	OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
	OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_INDEPENDENT.  Use GOMP_MAP_*
	instead of OMP_CLAUSE_MAP_*.
	(dump_generic_node): Handle OACC_PARALLEL, OACC_KERNELS,
	OACC_DATA, OACC_HOST_DATA, OACC_DECLARE, OACC_UPDATE,
	OACC_ENTER_DATA, OACC_EXIT_DATA, OACC_CACHE, OACC_LOOP.
	* tree-streamer-in.c: Include "gomp-constants.h".
	(unpack_ts_omp_clause_value_fields) Use GOMP_MAP_* instead of
	OMP_CLAUSE_MAP_*.  Use OMP_CLAUSE_SET_MAP_KIND.
	* tree-streamer-out.c: Include "gomp-constants.h".
	(pack_ts_omp_clause_value_fields): Use GOMP_MAP_* instead of
	OMP_CLAUSE_MAP_*.
	* tree.def (OACC_PARALLEL, OACC_KERNELS, OACC_DATA)
	(OACC_HOST_DATA, OACC_LOOP, OACC_CACHE, OACC_DECLARE)
	(OACC_ENTER_DATA, OACC_EXIT_DATA, OACC_UPDATE): New tree codes.
	* tree.c (omp_clause_num_ops): Update accordingly.
	* tree.h (OMP_BODY, OMP_CLAUSES, OMP_LOOP_CHECK, OMP_CLAUSE_SIZE):
	Likewise.
	(OACC_PARALLEL_BODY, OACC_PARALLEL_CLAUSES, OACC_KERNELS_BODY)
	(OACC_KERNELS_CLAUSES, OACC_DATA_BODY, OACC_DATA_CLAUSES)
	(OACC_HOST_DATA_BODY, OACC_HOST_DATA_CLAUSES, OACC_CACHE_CLAUSES)
	(OACC_DECLARE_CLAUSES, OACC_ENTER_DATA_CLAUSES)
	(OACC_EXIT_DATA_CLAUSES, OACC_UPDATE_CLAUSES)
	(OACC_KERNELS_COMBINED, OACC_PARALLEL_COMBINED): New macros.
	* tree.h (OMP_CLAUSE_MAP_KIND): Cast it to enum gomp_map_kind.
	(OMP_CLAUSE_SET_MAP_KIND): New macro.
	* varpool.c (varpool_node::get_create): Consider flag_openacc next
	to flag_openmp.
	* config/i386/intelmic-offload.h: New file.
	* config/nvptx/offload.h: Likewise.
	gcc/ada/
	* gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8)
	(DEF_FUNCTION_TYPE_VAR_12): New macros.
	gcc/c-family/
	* c.opt (fopenacc): New option.
	* c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
	* c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
	New macros.
	* c-common.h (c_finish_oacc_wait): New prototype.
	* c-omp.c: Include "omp-low.h" and "gomp-constants.h".
	(c_finish_oacc_wait): New function.
	* c-pragma.c (oacc_pragmas): New variable.
	(c_pp_lookup_pragma, init_pragma): Handle it.
	* c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
	PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
	PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
	PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
	(enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
	PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
	PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
	PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
	PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
	PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
	PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
	PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
	PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
	PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
	PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
	PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
	PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
	PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
	PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
	PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
	PRAGMA_OACC_CLAUSE_WORKER.
	gcc/c/
	* c-parser.c: Include "gomp-constants.h".
	(c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
	omp_clause_map_kind.  Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
	Use OMP_CLAUSE_SET_MAP_KIND.
	(c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
	PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
	(c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
	PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
	PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
	(c_parser_omp_clause_name): Handle "auto", "async", "copy",
	"copyout", "create", "delete", "deviceptr", "gang", "host",
	"num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
	"present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
	"present_or_create", "pcreate", "seq", "self", "vector",
	"vector_length", "wait", "worker".
	(OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
	(OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
	(OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
	(OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
	(c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
	(c_parser_oacc_wait_list, c_parser_oacc_data_clause)
	(c_parser_oacc_data_clause_deviceptr)
	(c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
	(c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
	(c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
	(c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
	(c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
	(c_parser_oacc_parallel, c_parser_oacc_update)
	(c_parser_oacc_wait): New functions.
	* c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
	(c_finish_oacc_data): New prototypes.
	* c-typeck.c: Include "gomp-constants.h".
	(handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR.  Use
	GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.  Use
	OMP_CLAUSE_SET_MAP_KIND.
	(c_finish_oacc_parallel, c_finish_oacc_kernels)
	(c_finish_oacc_data): New functions.
	(c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
	OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
	OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
	OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
	OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
	GOMP_MAP_FORCE_DEVICEPTR.
	gcc/cp/
	* parser.c: Include "gomp-constants.h".
	(cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
	omp_clause_map_kind.  Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
	Use OMP_CLAUSE_SET_MAP_KIND.
	(cp_parser_omp_construct, cp_parser_pragma): Handle
	PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA,
	PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL,
	PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
	(cp_parser_omp_clause_name): Handle "async", "copy", "copyout",
	"create", "delete", "deviceptr", "host", "num_gangs",
	"num_workers", "present", "present_or_copy", "pcopy",
	"present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
	"present_or_create", "pcreate", "vector_length", "wait".
	(OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK)
	(OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
	(OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
	(OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
	(cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_.
	(cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr)
	(cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list)
	(cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs)
	(cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async)
	(cp_parser_oacc_all_clauses, cp_parser_oacc_cache)
	(cp_parser_oacc_data, cp_parser_oacc_enter_exit_data)
	(cp_parser_oacc_kernels, cp_parser_oacc_loop)
	(cp_parser_oacc_parallel, cp_parser_oacc_update)
	(cp_parser_oacc_wait): New functions.
	* cp-tree.h (finish_oacc_data, finish_oacc_kernels)
	(finish_oacc_parallel): New prototypes.
	* semantics.c: Include "gomp-constants.h".
	(handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR.  Use
	GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.  Use
	OMP_CLAUSE_SET_MAP_KIND.
	(finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
	OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_.
	Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
	(finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
	functions.
	gcc/fortran/
	* lang.opt (fopenacc): New option.
	* cpp.c (cpp_define_builtins): Conditionally define _OPENACC.
	* dump-parse-tree.c (show_omp_node): Split part of it into...
	(show_omp_clauses): ... this new function.
	(show_omp_node, show_code_node): Handle EXEC_OACC_PARALLEL_LOOP,
	EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS_LOOP, EXEC_OACC_KERNELS,
	EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP,
	EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE,
	EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA.
	(show_namespace): Update for OpenACC.
	* f95-lang.c (DEF_FUNCTION_TYPE_VAR_2, DEF_FUNCTION_TYPE_VAR_8)
	(DEF_FUNCTION_TYPE_VAR_12, DEF_GOACC_BUILTIN)
	(DEF_GOACC_BUILTIN_COMPILER): New macros.
	* types.def (BT_FN_VOID_INT_INT_VAR)
	(BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR_INT_INT_VAR)
	(BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR):
	New function types.
	* gfortran.h (gfc_statement): Add ST_OACC_PARALLEL_LOOP,
	ST_OACC_END_PARALLEL_LOOP, ST_OACC_PARALLEL, ST_OACC_END_PARALLEL,
	ST_OACC_KERNELS, ST_OACC_END_KERNELS, ST_OACC_DATA,
	ST_OACC_END_DATA, ST_OACC_HOST_DATA, ST_OACC_END_HOST_DATA,
	ST_OACC_LOOP, ST_OACC_END_LOOP, ST_OACC_DECLARE, ST_OACC_UPDATE,
	ST_OACC_WAIT, ST_OACC_CACHE, ST_OACC_KERNELS_LOOP,
	ST_OACC_END_KERNELS_LOOP, ST_OACC_ENTER_DATA, ST_OACC_EXIT_DATA,
	ST_OACC_ROUTINE.
	(struct gfc_expr_list): New data type.
	(gfc_get_expr_list): New macro.
	(gfc_omp_map_op): Add OMP_MAP_FORCE_ALLOC, OMP_MAP_FORCE_DEALLOC,
	OMP_MAP_FORCE_TO, OMP_MAP_FORCE_FROM, OMP_MAP_FORCE_TOFROM,
	OMP_MAP_FORCE_PRESENT, OMP_MAP_FORCE_DEVICEPTR.
	(OMP_LIST_FIRST, OMP_LIST_DEVICE_RESIDENT, OMP_LIST_USE_DEVICE)
	(OMP_LIST_CACHE): New enumerators.
	(struct gfc_omp_clauses): Add async_expr, gang_expr, worker_expr,
	vector_expr, num_gangs_expr, num_workers_expr, vector_length_expr,
	wait_list, tile_list, async, gang, worker, vector, seq,
	independent, wait, par_auto, gang_static, and loc members.
	(struct gfc_namespace): Add oacc_declare_clauses member.
	(gfc_exec_op): Add EXEC_OACC_KERNELS_LOOP,
	EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS,
	EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP,
	EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE,
	EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA.
	(gfc_free_expr_list, gfc_resolve_oacc_directive)
	(gfc_resolve_oacc_declare, gfc_resolve_oacc_parallel_loop_blocks)
	(gfc_resolve_oacc_blocks): New prototypes.
	* match.c (match_exit_cycle): Handle EXEC_OACC_LOOP and
	EXEC_OACC_PARALLEL_LOOP.
	* match.h (gfc_match_oacc_cache, gfc_match_oacc_wait)
	(gfc_match_oacc_update, gfc_match_oacc_declare)
	(gfc_match_oacc_loop, gfc_match_oacc_host_data)
	(gfc_match_oacc_data, gfc_match_oacc_kernels)
	(gfc_match_oacc_kernels_loop, gfc_match_oacc_parallel)
	(gfc_match_oacc_parallel_loop, gfc_match_oacc_enter_data)
	(gfc_match_oacc_exit_data, gfc_match_oacc_routine): New
	prototypes.
	* openmp.c: Include "diagnostic.h" and "gomp-constants.h".
	(gfc_free_omp_clauses): Update for members added to struct
	gfc_omp_clauses.
	(gfc_match_omp_clauses): Change mask paramter to uint64_t.  Add
	openacc parameter.
	(resolve_omp_clauses): Add openacc parameter.  Update for OpenACC.
	(struct fortran_omp_context): Add is_openmp member.
	(gfc_resolve_omp_parallel_blocks): Initialize it.
	(gfc_resolve_do_iterator): Update for OpenACC.
	(gfc_resolve_omp_directive): Call
	resolve_omp_directive_inside_oacc_region.
	(OMP_CLAUSE_PRIVATE, OMP_CLAUSE_FIRSTPRIVATE)
	(OMP_CLAUSE_LASTPRIVATE, OMP_CLAUSE_COPYPRIVATE)
	(OMP_CLAUSE_SHARED, OMP_CLAUSE_COPYIN, OMP_CLAUSE_REDUCTION)
	(OMP_CLAUSE_IF, OMP_CLAUSE_NUM_THREADS, OMP_CLAUSE_SCHEDULE)
	(OMP_CLAUSE_DEFAULT, OMP_CLAUSE_ORDERED, OMP_CLAUSE_COLLAPSE)
	(OMP_CLAUSE_UNTIED, OMP_CLAUSE_FINAL, OMP_CLAUSE_MERGEABLE)
	(OMP_CLAUSE_ALIGNED, OMP_CLAUSE_DEPEND, OMP_CLAUSE_INBRANCH)
	(OMP_CLAUSE_LINEAR, OMP_CLAUSE_NOTINBRANCH, OMP_CLAUSE_PROC_BIND)
	(OMP_CLAUSE_SAFELEN, OMP_CLAUSE_SIMDLEN, OMP_CLAUSE_UNIFORM)
	(OMP_CLAUSE_DEVICE, OMP_CLAUSE_MAP, OMP_CLAUSE_TO)
	(OMP_CLAUSE_FROM, OMP_CLAUSE_NUM_TEAMS, OMP_CLAUSE_THREAD_LIMIT)
	(OMP_CLAUSE_DIST_SCHEDULE): Use uint64_t.
	(OMP_CLAUSE_ASYNC, OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS)
	(OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_COPY, OMP_CLAUSE_COPYOUT)
	(OMP_CLAUSE_CREATE, OMP_CLAUSE_PRESENT)
	(OMP_CLAUSE_PRESENT_OR_COPY, OMP_CLAUSE_PRESENT_OR_COPYIN)
	(OMP_CLAUSE_PRESENT_OR_COPYOUT, OMP_CLAUSE_PRESENT_OR_CREATE)
	(OMP_CLAUSE_DEVICEPTR, OMP_CLAUSE_GANG, OMP_CLAUSE_WORKER)
	(OMP_CLAUSE_VECTOR, OMP_CLAUSE_SEQ, OMP_CLAUSE_INDEPENDENT)
	(OMP_CLAUSE_USE_DEVICE, OMP_CLAUSE_DEVICE_RESIDENT)
	(OMP_CLAUSE_HOST_SELF, OMP_CLAUSE_OACC_DEVICE, OMP_CLAUSE_WAIT)
	(OMP_CLAUSE_DELETE, OMP_CLAUSE_AUTO, OMP_CLAUSE_TILE): New macros.
	(gfc_match_omp_clauses): Handle those.
	(OACC_PARALLEL_CLAUSES, OACC_KERNELS_CLAUSES, OACC_DATA_CLAUSES)
	(OACC_LOOP_CLAUSES, OACC_PARALLEL_LOOP_CLAUSES)
	(OACC_KERNELS_LOOP_CLAUSES, OACC_HOST_DATA_CLAUSES)
	(OACC_DECLARE_CLAUSES, OACC_UPDATE_CLAUSES)
	(OACC_ENTER_DATA_CLAUSES, OACC_EXIT_DATA_CLAUSES)
	(OACC_WAIT_CLAUSES): New macros.
	(gfc_free_expr_list, match_oacc_expr_list, match_oacc_clause_gang)
	(gfc_match_omp_map_clause, gfc_match_oacc_parallel_loop)
	(gfc_match_oacc_parallel, gfc_match_oacc_kernels_loop)
	(gfc_match_oacc_kernels, gfc_match_oacc_data)
	(gfc_match_oacc_host_data, gfc_match_oacc_loop)
	(gfc_match_oacc_declare, gfc_match_oacc_update)
	(gfc_match_oacc_enter_data, gfc_match_oacc_exit_data)
	(gfc_match_oacc_wait, gfc_match_oacc_cache)
	(gfc_match_oacc_routine, oacc_is_loop)
	(resolve_oacc_scalar_int_expr, resolve_oacc_positive_int_expr)
	(check_symbol_not_pointer, check_array_not_assumed)
	(resolve_oacc_data_clauses, resolve_oacc_deviceptr_clause)
	(oacc_compatible_clauses, oacc_is_parallel, oacc_is_kernels)
	(omp_code_to_statement, oacc_code_to_statement)
	(resolve_oacc_directive_inside_omp_region)
	(resolve_omp_directive_inside_oacc_region)
	(resolve_oacc_nested_loops, resolve_oacc_params_in_parallel)
	(resolve_oacc_loop_blocks, gfc_resolve_oacc_blocks)
	(resolve_oacc_loop, resolve_oacc_cache, gfc_resolve_oacc_declare)
	(gfc_resolve_oacc_directive): New functions.
	* parse.c (next_free): Update for OpenACC.  Move some code into...
	(verify_token_free): ... this new function.
	(next_fixed): Update for OpenACC.  Move some code into...
	(verify_token_fixed): ... this new function.
	(case_executable): Add ST_OACC_UPDATE, ST_OACC_WAIT,
	ST_OACC_CACHE, ST_OACC_ENTER_DATA, and ST_OACC_EXIT_DATA.
	(case_exec_markers): Add ST_OACC_PARALLEL_LOOP, ST_OACC_PARALLEL,
	ST_OACC_KERNELS, ST_OACC_DATA, ST_OACC_HOST_DATA, ST_OACC_LOOP,
	ST_OACC_KERNELS_LOOP.
	(case_decl): Add ST_OACC_ROUTINE.
	(push_state, parse_critical_block, parse_progunit): Update for
	OpenACC.
	(gfc_ascii_statement): Handle ST_OACC_PARALLEL_LOOP,
	ST_OACC_END_PARALLEL_LOOP, ST_OACC_PARALLEL, ST_OACC_END_PARALLEL,
	ST_OACC_KERNELS, ST_OACC_END_KERNELS, ST_OACC_KERNELS_LOOP,
	ST_OACC_END_KERNELS_LOOP, ST_OACC_DATA, ST_OACC_END_DATA,
	ST_OACC_HOST_DATA, ST_OACC_END_HOST_DATA, ST_OACC_LOOP,
	ST_OACC_END_LOOP, ST_OACC_DECLARE, ST_OACC_UPDATE, ST_OACC_WAIT,
	ST_OACC_CACHE, ST_OACC_ENTER_DATA, ST_OACC_EXIT_DATA,
	ST_OACC_ROUTINE.
	(verify_st_order, parse_spec): Handle ST_OACC_DECLARE.
	(parse_executable): Handle ST_OACC_PARALLEL_LOOP,
	ST_OACC_KERNELS_LOOP, ST_OACC_LOOP, ST_OACC_PARALLEL,
	ST_OACC_KERNELS, ST_OACC_DATA, ST_OACC_HOST_DATA.
	(decode_oacc_directive, parse_oacc_structured_block)
	(parse_oacc_loop, is_oacc): New functions.
	* parse.h (struct gfc_state_data): Add oacc_declare_clauses
	member.
	(is_oacc): New prototype.
	* resolve.c (gfc_resolve_blocks, gfc_resolve_code): Handle
	EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_PARALLEL,
	EXEC_OACC_KERNELS_LOOP, EXEC_OACC_KERNELS, EXEC_OACC_DATA,
	EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP, EXEC_OACC_UPDATE,
	EXEC_OACC_WAIT, EXEC_OACC_CACHE, EXEC_OACC_ENTER_DATA,
	EXEC_OACC_EXIT_DATA.
	(resolve_codes): Call gfc_resolve_oacc_declare.
	* scanner.c (openacc_flag, openacc_locus): New variables.
	(skip_free_comments): Update for OpenACC.  Move some code into...
	(skip_omp_attribute): ... this new function.
	(skip_oacc_attribute): New function.
	(skip_fixed_comments, gfc_next_char_literal): Update for OpenACC.
	* st.c (gfc_free_statement): Handle EXEC_OACC_PARALLEL_LOOP,
	EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS_LOOP, EXEC_OACC_KERNELS,
	EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP,
	EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE,
	EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA.
	* trans-decl.c (gfc_generate_function_code): Update for OpenACC.
	* trans-openmp.c: Include "gomp-constants.h".
	(gfc_omp_finish_clause, gfc_trans_omp_clauses): Use GOMP_MAP_*
	instead of OMP_CLAUSE_MAP_*.  Use OMP_CLAUSE_SET_MAP_KIND.
	(gfc_trans_omp_clauses): Handle OMP_LIST_USE_DEVICE,
	OMP_LIST_DEVICE_RESIDENT, OMP_LIST_CACHE, and OMP_MAP_FORCE_ALLOC,
	OMP_MAP_FORCE_DEALLOC, OMP_MAP_FORCE_TO, OMP_MAP_FORCE_FROM,
	OMP_MAP_FORCE_TOFROM, OMP_MAP_FORCE_PRESENT,
	OMP_MAP_FORCE_DEVICEPTR, and gfc_omp_clauses' async, seq,
	independent, wait_list, num_gangs_expr, num_workers_expr,
	vector_length_expr, vector, vector_expr, worker, worker_expr,
	gang, gang_expr members.
	(gfc_trans_omp_do): Handle EXEC_OACC_LOOP.
	(gfc_convert_expr_to_tree, gfc_trans_oacc_construct)
	(gfc_trans_oacc_executable_directive)
	(gfc_trans_oacc_wait_directive, gfc_trans_oacc_combined_directive)
	(gfc_trans_oacc_declare, gfc_trans_oacc_directive): New functions.
	* trans-stmt.c (gfc_trans_block_construct): Update for OpenACC.
	* trans-stmt.h (gfc_trans_oacc_directive, gfc_trans_oacc_declare):
	New prototypes.
	* trans.c (tranc_code): Handle EXEC_OACC_CACHE, EXEC_OACC_WAIT,
	EXEC_OACC_UPDATE, EXEC_OACC_LOOP, EXEC_OACC_HOST_DATA,
	EXEC_OACC_DATA, EXEC_OACC_KERNELS, EXEC_OACC_KERNELS_LOOP,
	EXEC_OACC_PARALLEL, EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_ENTER_DATA,
	EXEC_OACC_EXIT_DATA.
	* gfortran.texi: Update for OpenACC.
	* intrinsic.texi: Likewise.
	* invoke.texi: Likewise.
	gcc/lto/
	* lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
	New macros.
	* lto.c: Include "gomp-constants.h".
	gcc/testsuite/
	* lib/target-supports.exp (check_effective_target_fopenacc): New
	procedure.
	* g++.dg/goacc-gomp/goacc-gomp.exp: New file.
	* g++.dg/goacc/goacc.exp: Likewise.
	* gcc.dg/goacc-gomp/goacc-gomp.exp: Likewise.
	* gcc.dg/goacc/goacc.exp: Likewise.
	* gfortran.dg/goacc/goacc.exp: Likewise.
	* c-c++-common/cpp/openacc-define-1.c: New file.
	* c-c++-common/cpp/openacc-define-2.c: Likewise.
	* c-c++-common/cpp/openacc-define-3.c: Likewise.
	* c-c++-common/goacc-gomp/nesting-1.c: Likewise.
	* c-c++-common/goacc-gomp/nesting-fail-1.c: Likewise.
	* c-c++-common/goacc/acc_on_device-2-off.c: Likewise.
	* c-c++-common/goacc/acc_on_device-2.c: Likewise.
	* c-c++-common/goacc/asyncwait-1.c: Likewise.
	* c-c++-common/goacc/cache-1.c: Likewise.
	* c-c++-common/goacc/clauses-fail.c: Likewise.
	* c-c++-common/goacc/collapse-1.c: Likewise.
	* c-c++-common/goacc/data-1.c: Likewise.
	* c-c++-common/goacc/data-2.c: Likewise.
	* c-c++-common/goacc/data-clause-duplicate-1.c: Likewise.
	* c-c++-common/goacc/deviceptr-1.c: Likewise.
	* c-c++-common/goacc/deviceptr-2.c: Likewise.
	* c-c++-common/goacc/deviceptr-3.c: Likewise.
	* c-c++-common/goacc/if-clause-1.c: Likewise.
	* c-c++-common/goacc/if-clause-2.c: Likewise.
	* c-c++-common/goacc/kernels-1.c: Likewise.
	* c-c++-common/goacc/loop-1.c: Likewise.
	* c-c++-common/goacc/loop-private-1.c: Likewise.
	* c-c++-common/goacc/nesting-1.c: Likewise.
	* c-c++-common/goacc/nesting-data-1.c: Likewise.
	* c-c++-common/goacc/nesting-fail-1.c: Likewise.
	* c-c++-common/goacc/parallel-1.c: Likewise.
	* c-c++-common/goacc/pcopy.c: Likewise.
	* c-c++-common/goacc/pcopyin.c: Likewise.
	* c-c++-common/goacc/pcopyout.c: Likewise.
	* c-c++-common/goacc/pcreate.c: Likewise.
	* c-c++-common/goacc/pragma_context.c: Likewise.
	* c-c++-common/goacc/present-1.c: Likewise.
	* c-c++-common/goacc/reduction-1.c: Likewise.
	* c-c++-common/goacc/reduction-2.c: Likewise.
	* c-c++-common/goacc/reduction-3.c: Likewise.
	* c-c++-common/goacc/reduction-4.c: Likewise.
	* c-c++-common/goacc/sb-1.c: Likewise.
	* c-c++-common/goacc/sb-2.c: Likewise.
	* c-c++-common/goacc/sb-3.c: Likewise.
	* c-c++-common/goacc/update-1.c: Likewise.
	* gcc.dg/goacc/acc_on_device-1.c: Likewise.
	* gfortran.dg/goacc/acc_on_device-1.f95: Likewise.
	* gfortran.dg/goacc/acc_on_device-2-off.f95: Likewise.
	* gfortran.dg/goacc/acc_on_device-2.f95: Likewise.
	* gfortran.dg/goacc/assumed.f95: Likewise.
	* gfortran.dg/goacc/asyncwait-1.f95: Likewise.
	* gfortran.dg/goacc/asyncwait-2.f95: Likewise.
	* gfortran.dg/goacc/asyncwait-3.f95: Likewise.
	* gfortran.dg/goacc/asyncwait-4.f95: Likewise.
	* gfortran.dg/goacc/branch.f95: Likewise.
	* gfortran.dg/goacc/cache-1.f95: Likewise.
	* gfortran.dg/goacc/coarray.f95: Likewise.
	* gfortran.dg/goacc/continuation-free-form.f95: Likewise.
	* gfortran.dg/goacc/cray.f95: Likewise.
	* gfortran.dg/goacc/critical.f95: Likewise.
	* gfortran.dg/goacc/data-clauses.f95: Likewise.
	* gfortran.dg/goacc/data-tree.f95: Likewise.
	* gfortran.dg/goacc/declare-1.f95: Likewise.
	* gfortran.dg/goacc/enter-exit-data.f95: Likewise.
	* gfortran.dg/goacc/fixed-1.f: Likewise.
	* gfortran.dg/goacc/fixed-2.f: Likewise.
	* gfortran.dg/goacc/fixed-3.f: Likewise.
	* gfortran.dg/goacc/fixed-4.f: Likewise.
	* gfortran.dg/goacc/host_data-tree.f95: Likewise.
	* gfortran.dg/goacc/if.f95: Likewise.
	* gfortran.dg/goacc/kernels-tree.f95: Likewise.
	* gfortran.dg/goacc/list.f95: Likewise.
	* gfortran.dg/goacc/literal.f95: Likewise.
	* gfortran.dg/goacc/loop-1.f95: Likewise.
	* gfortran.dg/goacc/loop-2.f95: Likewise.
	* gfortran.dg/goacc/loop-3.f95: Likewise.
	* gfortran.dg/goacc/loop-tree-1.f90: Likewise.
	* gfortran.dg/goacc/omp.f95: Likewise.
	* gfortran.dg/goacc/parallel-kernels-clauses.f95: Likewise.
	* gfortran.dg/goacc/parallel-kernels-regions.f95: Likewise.
	* gfortran.dg/goacc/parallel-tree.f95: Likewise.
	* gfortran.dg/goacc/parameter.f95: Likewise.
	* gfortran.dg/goacc/private-1.f95: Likewise.
	* gfortran.dg/goacc/private-2.f95: Likewise.
	* gfortran.dg/goacc/private-3.f95: Likewise.
	* gfortran.dg/goacc/pure-elemental-procedures.f95: Likewise.
	* gfortran.dg/goacc/reduction-2.f95: Likewise.
	* gfortran.dg/goacc/reduction.f95: Likewise.
	* gfortran.dg/goacc/routine-1.f90: Likewise.
	* gfortran.dg/goacc/routine-2.f90: Likewise.
	* gfortran.dg/goacc/sentinel-free-form.f95: Likewise.
	* gfortran.dg/goacc/several-directives.f95: Likewise.
	* gfortran.dg/goacc/sie.f95: Likewise.
	* gfortran.dg/goacc/subarrays.f95: Likewise.
	* gfortran.dg/gomp/map-1.f90: Likewise.
	* gfortran.dg/openacc-define-1.f90: Likewise.
	* gfortran.dg/openacc-define-2.f90: Likewise.
	* gfortran.dg/openacc-define-3.f90: Likewise.
	* g++.dg/gomp/block-1.C: Update for changed compiler output.
	* g++.dg/gomp/block-2.C: Likewise.
	* g++.dg/gomp/block-3.C: Likewise.
	* g++.dg/gomp/block-5.C: Likewise.
	* g++.dg/gomp/target-1.C: Likewise.
	* g++.dg/gomp/target-2.C: Likewise.
	* g++.dg/gomp/taskgroup-1.C: Likewise.
	* g++.dg/gomp/teams-1.C: Likewise.
	* gcc.dg/cilk-plus/jump-openmp.c: Likewise.
	* gcc.dg/cilk-plus/jump.c: Likewise.
	* gcc.dg/gomp/block-1.c: Likewise.
	* gcc.dg/gomp/block-10.c: Likewise.
	* gcc.dg/gomp/block-2.c: Likewise.
	* gcc.dg/gomp/block-3.c: Likewise.
	* gcc.dg/gomp/block-4.c: Likewise.
	* gcc.dg/gomp/block-5.c: Likewise.
	* gcc.dg/gomp/block-6.c: Likewise.
	* gcc.dg/gomp/block-7.c: Likewise.
	* gcc.dg/gomp/block-8.c: Likewise.
	* gcc.dg/gomp/block-9.c: Likewise.
	* gcc.dg/gomp/target-1.c: Likewise.
	* gcc.dg/gomp/target-2.c: Likewise.
	* gcc.dg/gomp/taskgroup-1.c: Likewise.
	* gcc.dg/gomp/teams-1.c: Likewise.
	include/
	* gomp-constants.h: New file.
	libgomp/
	* Makefile.am (search_path): Add $(top_srcdir)/../include.
	(libgomp_la_SOURCES): Add splay-tree.c, libgomp-plugin.c,
	oacc-parallel.c, oacc-host.c, oacc-init.c, oacc-mem.c,
	oacc-async.c, oacc-plugin.c, oacc-cuda.c.
	[USE_FORTRAN] (libgomp_la_SOURCES): Add openacc.f90.
	Include $(top_srcdir)/plugin/Makefrag.am.
	(nodist_libsubinclude_HEADERS): Add openacc.h.
	[USE_FORTRAN] (nodist_finclude_HEADERS): Add openacc_lib.h,
	openacc.f90, openacc.mod, openacc_kinds.mod.
	(omp_lib.mod): Generalize into...
	(%.mod): ... this new rule.
	(openacc_kinds.mod, openacc.mod): New rules.
	* plugin/configfrag.ac: New file.
	* configure.ac: Move plugin/offloading support into it.  Include
	it.  Instantiate testsuite/libgomp-test-support.pt.exp.
	* plugin/Makefrag.am: New file.
	* testsuite/Makefile.am (OFFLOAD_TARGETS)
	(OFFLOAD_ADDITIONAL_OPTIONS, OFFLOAD_ADDITIONAL_LIB_PATHS): Don't
	export.
	(libgomp-test-support.exp): New rule.
	(all-local): Depend on it.
	* Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.
	* config.h.in: Likewise.
	* configure: Likewise.
	* configure.tgt: Harden shell syntax.
	* env.c: Include "oacc-int.h".
	(parse_acc_device_type): New function.
	(gomp_debug_var, goacc_device_type, goacc_device_num): New
	variables.
	(initialize_env): Initialize those.  Call
	goacc_runtime_initialize.
	* error.c (gomp_vdebug, gomp_debug, gomp_vfatal): New functions.
	(gomp_fatal): Call gomp_vfatal.
	* libgomp.h: Include "libgomp-plugin.h" and <stdarg.h>.
	(gomp_debug_var, goacc_device_type, goacc_device_num, gomp_vdebug)
	(gomp_debug, gomp_verror, gomp_vfatal, gomp_init_targets_once)
	(splay_tree_node, splay_tree, splay_tree_key)
	(struct target_mem_desc, struct splay_tree_key_s)
	(struct gomp_memory_mapping, struct acc_dispatch_t)
	(struct gomp_device_descr, gomp_acc_insert_pointer)
	(gomp_acc_remove_pointer, target_mem_desc, gomp_copy_from_async)
	(gomp_unmap_vars, gomp_init_device, gomp_init_tables)
	(gomp_free_memmap, gomp_fini_device): New declarations.
	(gomp_vdebug, gomp_debug): New macros.
	Include "splay-tree.h".
	* libgomp.map (OACC_2.0): New symbol version.  Use for
	acc_get_num_devices, acc_get_num_devices_h_, acc_set_device_type,
	acc_set_device_type_h_, acc_get_device_type,
	acc_get_device_type_h_, acc_set_device_num, acc_set_device_num_h_,
	acc_get_device_num, acc_get_device_num_h_, acc_async_test,
	acc_async_test_h_, acc_async_test_all, acc_async_test_all_h_,
	acc_wait, acc_wait_h_, acc_wait_async, acc_wait_async_h_,
	acc_wait_all, acc_wait_all_h_, acc_wait_all_async,
	acc_wait_all_async_h_, acc_init, acc_init_h_, acc_shutdown,
	acc_shutdown_h_, acc_on_device, acc_on_device_h_, acc_malloc,
	acc_free, acc_copyin, acc_copyin_32_h_, acc_copyin_64_h_,
	acc_copyin_array_h_, acc_present_or_copyin,
	acc_present_or_copyin_32_h_, acc_present_or_copyin_64_h_,
	acc_present_or_copyin_array_h_, acc_create, acc_create_32_h_,
	acc_create_64_h_, acc_create_array_h_, acc_present_or_create,
	acc_present_or_create_32_h_, acc_present_or_create_64_h_,
	acc_present_or_create_array_h_, acc_copyout, acc_copyout_32_h_,
	acc_copyout_64_h_, acc_copyout_array_h_, acc_delete,
	acc_delete_32_h_, acc_delete_64_h_, acc_delete_array_h_,
	acc_update_device, acc_update_device_32_h_,
	acc_update_device_64_h_, acc_update_device_array_h_,
	acc_update_self, acc_update_self_32_h_, acc_update_self_64_h_,
	acc_update_self_array_h_, acc_map_data, acc_unmap_data,
	acc_deviceptr, acc_hostptr, acc_is_present, acc_is_present_32_h_,
	acc_is_present_64_h_, acc_is_present_array_h_,
	acc_memcpy_to_device, acc_memcpy_from_device,
	acc_get_current_cuda_device, acc_get_current_cuda_context,
	acc_get_cuda_stream, acc_set_cuda_stream.
	(GOACC_2.0): New symbol version.  Use for GOACC_data_end,
	GOACC_data_start, GOACC_enter_exit_data, GOACC_parallel,
	GOACC_update, GOACC_wait, GOACC_get_thread_num,
	GOACC_get_num_threads.
	(GOMP_PLUGIN_1.0): New symbol version.  Use for
	GOMP_PLUGIN_malloc, GOMP_PLUGIN_malloc_cleared,
	GOMP_PLUGIN_realloc, GOMP_PLUGIN_debug, GOMP_PLUGIN_error,
	GOMP_PLUGIN_fatal, GOMP_PLUGIN_async_unmap_vars,
	GOMP_PLUGIN_acc_thread.
	* libgomp.texi: Update for OpenACC changes, and GOMP_DEBUG
	environment variable.
	* libgomp_g.h (GOACC_data_start, GOACC_data_end)
	(GOACC_enter_exit_data, GOACC_parallel, GOACC_update, GOACC_wait)
	(GOACC_get_num_threads, GOACC_get_thread_num): New declarations.
	* splay-tree.h (splay_tree_lookup, splay_tree_insert)
	(splay_tree_remove): New declarations.
	(rotate_left, rotate_right, splay_tree_splay, splay_tree_insert)
	(splay_tree_remove, splay_tree_lookup): Move into...
	* splay-tree.c: ... this new file.
	* target.c: Include "oacc-plugin.h", "oacc-int.h", <assert.h>.
	(splay_tree_node, splay_tree, splay_tree_key)
	(struct target_mem_desc, struct splay_tree_key_s)
	(struct gomp_device_descr): Don't declare.
	(num_devices_openmp): New variable.
	(gomp_get_num_devices ): Use it.
	(gomp_init_targets_once): New function.
	(gomp_get_num_devices ): Use it.
	(get_kind, gomp_copy_from_async, gomp_free_memmap)
	(gomp_fini_device, gomp_register_image_for_device): New functions.
	(gomp_map_vars): Add devaddrs parameter.
	(gomp_update): Add mm parameter.
	(gomp_init_device): Move most of it into...
	(gomp_init_tables): ... this new function.
	(gomp_register_images_for_device): Remove function.
	(splay_compare, gomp_map_vars, gomp_unmap_vars, gomp_init_device):
	Make them hidden instead of static.
	(gomp_map_vars_existing, gomp_map_vars, gomp_unmap_vars)
	(gomp_update, gomp_init_device, GOMP_target, GOMP_target_data)
	(GOMP_target_end_data, GOMP_target_update)
	(gomp_load_plugin_for_device, gomp_target_init): Update for
	OpenACC changes.
	* oacc-async.c: New file.
	* oacc-cuda.c: Likewise.
	* oacc-host.c: Likewise.
	* oacc-init.c: Likewise.
	* oacc-int.h: Likewise.
	* oacc-mem.c: Likewise.
	* oacc-parallel.c: Likewise.
	* oacc-plugin.c: Likewise.
	* oacc-plugin.h: Likewise.
	* oacc-ptx.h: Likewise.
	* openacc.f90: Likewise.
	* openacc.h: Likewise.
	* openacc_lib.h: Likewise.
	* plugin/plugin-host.c: Likewise.
	* plugin/plugin-nvptx.c: Likewise.
	* libgomp-plugin.c: Likewise.
	* libgomp-plugin.h: Likewise.
	* libgomp_target.h: Remove file after merging content into the
	former file.  Update all users.
	* testsuite/lib/libgomp.exp: Load libgomp-test-support.exp.
	(offload_targets_s, offload_targets_s_openacc): New variables.
	(check_effective_target_openacc_nvidia_accel_present)
	(check_effective_target_openacc_nvidia_accel_selected): New
	procedures.
	(libgomp_init): Update for OpenACC changes.
	* testsuite/libgomp-test-support.exp.in: New file.
	* testsuite/libgomp.oacc-c++/c++.exp: Likewise.
	* testsuite/libgomp.oacc-c/c.exp: Likewise.
	* testsuite/libgomp.oacc-fortran/fortran.exp: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/abort-1.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/abort-2.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/abort-3.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/abort-4.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/acc_on_device-1.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/asyncwait-1.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/cache-1.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/clauses-1.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/clauses-2.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/collapse-1.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/collapse-2.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/collapse-3.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/collapse-4.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/context-1.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/context-2.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/context-3.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/context-4.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/data-1.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/data-2.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/data-3.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/data-already-1.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/data-already-2.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/data-already-3.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/data-already-4.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/data-already-5.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/data-already-6.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/data-already-7.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/data-already-8.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/deviceptr-1.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/if-1.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/kernels-1.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/kernels-empty.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-1.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-10.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-11.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-12.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-13.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-14.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-15.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-16.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-17.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-18.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-19.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-2.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-20.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-21.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-22.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-23.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-24.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-25.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-26.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-27.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-28.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-29.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-3.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-30.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-31.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-32.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-33.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-34.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-35.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-36.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-37.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-38.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-39.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-4.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-40.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-41.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-42.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-43.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-44.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-45.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-46.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-47.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-48.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-49.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-5.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-50.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-51.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-52.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-53.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-54.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-55.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-56.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-57.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-58.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-59.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-6.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-60.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-61.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-62.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-63.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-64.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-65.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-66.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-67.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-68.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-69.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-7.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-70.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-71.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-72.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-73.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-74.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-75.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-76.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-77.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-78.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-79.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-80.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-81.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-82.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-83.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-84.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-85.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-86.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-87.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-88.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-89.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-9.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-90.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-91.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-92.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/nested-1.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/nested-2.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/offset-1.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/parallel-1.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/parallel-empty.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/pointer-align-1.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/present-1.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/present-2.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/reduction-1.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/reduction-2.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/reduction-3.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/reduction-4.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/reduction-5.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/reduction-initial-1.c:
	Likewise.
	* testsuite/libgomp.oacc-c-c++-common/subr.h: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/subr.ptx: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/timer.h: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/update-1-2.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/update-1.c: Likewise.
	* testsuite/libgomp.oacc-fortran/abort-1.f90: Likewise.
	* testsuite/libgomp.oacc-fortran/abort-2.f90: Likewise.
	* testsuite/libgomp.oacc-fortran/acc_on_device-1-1.f90: Likewise.
	* testsuite/libgomp.oacc-fortran/acc_on_device-1-2.f: Likewise.
	* testsuite/libgomp.oacc-fortran/acc_on_device-1-3.f: Likewise.
	* testsuite/libgomp.oacc-fortran/asyncwait-1.f90: Likewise.
	* testsuite/libgomp.oacc-fortran/asyncwait-2.f90: Likewise.
	* testsuite/libgomp.oacc-fortran/asyncwait-3.f90: Likewise.
	* testsuite/libgomp.oacc-fortran/collapse-1.f90: Likewise.
	* testsuite/libgomp.oacc-fortran/collapse-2.f90: Likewise.
	* testsuite/libgomp.oacc-fortran/collapse-3.f90: Likewise.
	* testsuite/libgomp.oacc-fortran/collapse-4.f90: Likewise.
	* testsuite/libgomp.oacc-fortran/collapse-5.f90: Likewise.
	* testsuite/libgomp.oacc-fortran/collapse-6.f90: Likewise.
	* testsuite/libgomp.oacc-fortran/collapse-7.f90: Likewise.
	* testsuite/libgomp.oacc-fortran/collapse-8.f90: Likewise.
	* testsuite/libgomp.oacc-fortran/data-1.f90: Likewise.
	* testsuite/libgomp.oacc-fortran/data-2.f90: Likewise.
	* testsuite/libgomp.oacc-fortran/data-3.f90: Likewise.
	* testsuite/libgomp.oacc-fortran/data-4-2.f90: Likewise.
	* testsuite/libgomp.oacc-fortran/data-4.f90: Likewise.
	* testsuite/libgomp.oacc-fortran/data-already-1.f: Likewise.
	* testsuite/libgomp.oacc-fortran/data-already-2.f: Likewise.
	* testsuite/libgomp.oacc-fortran/data-already-3.f: Likewise.
	* testsuite/libgomp.oacc-fortran/data-already-4.f: Likewise.
	* testsuite/libgomp.oacc-fortran/data-already-5.f: Likewise.
	* testsuite/libgomp.oacc-fortran/data-already-6.f: Likewise.
	* testsuite/libgomp.oacc-fortran/data-already-7.f: Likewise.
	* testsuite/libgomp.oacc-fortran/data-already-8.f: Likewise.
	* testsuite/libgomp.oacc-fortran/lib-1.f90: Likewise.
	* testsuite/libgomp.oacc-fortran/lib-10.f90: Likewise.
	* testsuite/libgomp.oacc-fortran/lib-2.f: Likewise.
	* testsuite/libgomp.oacc-fortran/lib-3.f: Likewise.
	* testsuite/libgomp.oacc-fortran/lib-4.f90: Likewise.
	* testsuite/libgomp.oacc-fortran/lib-5.f90: Likewise.
	* testsuite/libgomp.oacc-fortran/lib-6.f90: Likewise.
	* testsuite/libgomp.oacc-fortran/lib-7.f90: Likewise.
	* testsuite/libgomp.oacc-fortran/lib-8.f90: Likewise.
	* testsuite/libgomp.oacc-fortran/map-1.f90: Likewise.
	* testsuite/libgomp.oacc-fortran/openacc_version-1.f: Likewise.
	* testsuite/libgomp.oacc-fortran/openacc_version-2.f90: Likewise.
	* testsuite/libgomp.oacc-fortran/pointer-align-1.f90: Likewise.
	* testsuite/libgomp.oacc-fortran/pset-1.f90: Likewise.
	* testsuite/libgomp.oacc-fortran/reduction-1.f90: Likewise.
	* testsuite/libgomp.oacc-fortran/reduction-2.f90: Likewise.
	* testsuite/libgomp.oacc-fortran/reduction-3.f90: Likewise.
	* testsuite/libgomp.oacc-fortran/reduction-4.f90: Likewise.
	* testsuite/libgomp.oacc-fortran/reduction-5.f90: Likewise.
	* testsuite/libgomp.oacc-fortran/reduction-6.f90: Likewise.
	* testsuite/libgomp.oacc-fortran/routine-1.f90: Likewise.
	* testsuite/libgomp.oacc-fortran/routine-2.f90: Likewise.
	* testsuite/libgomp.oacc-fortran/routine-3.f90: Likewise.
	* testsuite/libgomp.oacc-fortran/routine-4.f90: Likewise.
	* testsuite/libgomp.oacc-fortran/subarrays-1.f90: Likewise.
	* testsuite/libgomp.oacc-fortran/subarrays-2.f90: Likewise.
	liboffloadmic/
	* plugin/libgomp-plugin-intelmic.cpp (GOMP_OFFLOAD_get_name)
	(GOMP_OFFLOAD_get_caps, GOMP_OFFLOAD_fini_device): New functions.

Co-Authored-By: Bernd Schmidt <bernds@codesourcery.com>
Co-Authored-By: Cesar Philippidis <cesar@codesourcery.com>
Co-Authored-By: Dmitry Bocharnikov <dmitry.b@samsung.com>
Co-Authored-By: Evgeny Gavrin <e.gavrin@samsung.com>
Co-Authored-By: Ilmir Usmanov <i.usmanov@samsung.com>
Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
Co-Authored-By: James Norris <jnorris@codesourcery.com>
Co-Authored-By: Julian Brown <julian@codesourcery.com>
Co-Authored-By: Nathan Sidwell <nathan@codesourcery.com>
Co-Authored-By: Tobias Burnus <burnus@net-b.de>
Co-Authored-By: Tom de Vries <tom@codesourcery.com>

From-SVN: r219682
2015-01-15 21:11:12 +01:00
Prathamesh Kulkarni 36566b39c3 dojump.h: New header file.
2015-10-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>

	* dojump.h: New header file.
	* explow.h: Likewise.
	* expr.h: Remove includes.
	Move expmed.c prototypes to expmed.h.
	Move dojump.c prototypes to dojump.h.
	Move alias.c prototypes to alias.h.
	Move explow.c prototypes to explow.h.
	Move calls.c prototypes to calls.h.
	Move emit-rtl.c prototypes to emit-rtl.h.
	Move varasm.c prototypes to varasm.h.
	Move stmt.c prototypes to stmt.h.
	(saved_pending_stack_adjust): Move to dojump.h.
	(adjust_address): Move to explow.h.
	(adjust_address_nv): Move to emit-rtl.h.
	(adjust_bitfield_address): Likewise.
	(adjust_bitfield_address_size): Likewise.
	(adjust_bitfield_address_nv): Likewise.
	(adjust_automodify_address_nv): Likewise.
	* explow.c (expr_size): Move to expr.c.
	(int_expr_size): Likewise.
	(tree_expr_size): Likewise.
	Include calls.h dojump.h emit-rtl.h explow.h expmed.h
	fixed-value.h hashtab.h statistics.h stmt.h varasm.h.
	* genemit.c (main): Generate includes statistics.h, real.h, fixed-value.h,
	insn-config.h, expmed.h, dojump.h, explow.h, emit-rtl.h, stmt.h.
	* genopinit.c (main): Generate includes hashtab.h, hard-reg-set.h, function.h,
	statistics.h, real.h, fixed-value.h, expmed.h, dojump.h, explow.h, emit-rtl.h,
	stmt.h.
	* genoutput.c (main): Generate includes hashtab.h, statistics.h, real.h,
	fixed-value.h, expmed.h, dojump.h, explow.h, emit-rtl.h, stmt.h.
	* genemit.c (open_base_files): Generate includes flags.h, statistics.h, real.h,
	fixed-value.h, tree.h, expmed.h, dojump.h, explow.h, calls.h, emit-rtl.h, varasm.h,
	stmt.h.
	* config/tilepro/gen-mul-tables.cc: Generate includes hashtab.h, hash-set.h, vec.h,
	machmode.h, tm.h, hard-reg-set.h, input.h, function.h, rtl.h, flags.h, statistics.h,
	double-int.h, real.h, fixed-value.h, alias.h, wide-int.h, inchash.h, tree.h,
	insn-config.h, expmed.h, dojump.h, explow.h, calls.h, emit-rtl.h, varasm.h, stmt.h.
	* config/tilegx/mul-tables.c: Include alias.h calls.h dojump.h
	double-int.h emit-rtl.h explow.h expmed.h fixed-value.h flags.h
	function.h hard-reg-set.h hash-set.h hashtab.h inchash.h input.h
	insn-config.h machmode.h real.h rtl.h statistics.h stmt.h symtab.h
	tm.h tree.h varasm.h vec.h wide-int.h.
	* rtlhooks.c: Include alias.h calls.h dojump.h double-int.h emit-rtl.h
	explow.h expmed.h fixed-value.h flags.h function.h hard-reg-set.h
	hash-set.h hashtab.h inchash.h input.h insn-config.h machmode.h
	real.h statistics.h stmt.h tree.h varasm.h vec.h wide-int.h.
	* cfgloopanal.c: Include alias.h calls.h dojump.h double-int.h emit-rtl.h
	explow.h expmed.h fixed-value.h flags.h inchash.h insn-config.h
	real.h statistics.h stmt.h tree.h varasm.h wide-int.h.
	* loop-iv.c: Likewise.
	* lra-assigns.c: Include alias.h calls.h dojump.h double-int.h emit-rtl.h
	explow.h expmed.h fixed-value.h flags.h inchash.h real.h
	statistics.h stmt.h tree.h varasm.h wide-int.h.
	* lra-constraints.c: Likewise.
	* lra-eliminations.c: Likewise.
	* lra-lives.c: Likewise.
	* lra-remat.c: Likewise.
	* bt-load.c: Include alias.h calls.h dojump.h double-int.h emit-rtl.h
	explow.h expmed.h fixed-value.h inchash.h insn-config.h real.h
	statistics.h stmt.h tree.h varasm.h wide-int.h.
	* hw-doloop.c: Likewise.
	* ira-color.c: Likewise.
	* ira-emit.c: Likewise.
	* loop-doloop.c: Likewise.
	* loop-invariant.c: Likewise.
	* reload.c: Include alias.h calls.h dojump.h double-int.h emit-rtl.h
	explow.h expmed.h fixed-value.h inchash.h real.h rtl.h
	statistics.h stmt.h tree.h varasm.h wide-int.h.
	* caller-save.c: Include alias.h calls.h dojump.h double-int.h emit-rtl.h
	explow.h expmed.h fixed-value.h inchash.h real.h statistics.h
	stmt.h tree.h varasm.h wide-int.h.
	* combine-stack-adj.c: Likewise.
	* cse.c: Likewise.
	* ddg.c: Likewise.
	* ifcvt.c: Likewise.
	* ira-costs.c: Likewise.
	* jump.c: Likewise.
	* lra-coalesce.c: Likewise.
	* lra-spills.c: Likewise.
	* profile.c: Include alias.h calls.h dojump.h double-int.h emit-rtl.h
	explow.h expmed.h fixed-value.h insn-config.h real.h statistics.h
	stmt.h varasm.h wide-int.h.
	* lra.c: Include alias.h calls.h dojump.h double-int.h emit-rtl.h
	explow.h expmed.h fixed-value.h real.h statistics.h stmt.h
	varasm.h.
	* config/sh/sh_treg_combine.cc: Include alias.h calls.h dojump.h
	double-int.h explow.h expmed.h fixed-value.h flags.h real.h
	statistics.h stmt.h varasm.h wide-int.h.
	* reorg.c: Include alias.h calls.h dojump.h double-int.h explow.h
	expmed.h fixed-value.h inchash.h real.h statistics.h stmt.h tree.h
	varasm.h wide-int.h.
	* reload1.c: Include alias.h calls.h dojump.h double-int.h explow.h
	expmed.h fixed-value.h real.h rtl.h statistics.h stmt.h varasm.h.
	* config/tilegx/tilegx.c: Include alias.h dojump.h double-int.h
	emit-rtl.h explow.h expmed.h fixed-value.h flags.h real.h
	statistics.h stmt.h.
	* config/tilepro/tilepro.c: Likewise.
	* config/mmix/mmix.c: Include alias.h dojump.h double-int.h emit-rtl.h
	explow.h expmed.h fixed-value.h real.h statistics.h stmt.h.
	* config/pdp11/pdp11.c: Likewise.
	* config/xtensa/xtensa.c: Likewise.
	* config/lm32/lm32.c: Include alias.h dojump.h double-int.h emit-rtl.h
	explow.h expmed.h fixed-value.h real.h statistics.h stmt.h
	varasm.h.
	* tree-chkp.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h
	fixed-value.h flags.h function.h hard-reg-set.h hashtab.h
	insn-config.h real.h rtl.h statistics.h stmt.h tm.h.
	* cilk-common.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h
	fixed-value.h flags.h function.h hard-reg-set.h hashtab.h
	insn-config.h real.h rtl.h statistics.h stmt.h tm.h varasm.h.
	* rtl-chkp.c: Likewise.
	* tree-chkp-opt.c: Likewise.
	* config/arm/arm-builtins.c: Include calls.h dojump.h emit-rtl.h explow.h
	expmed.h fixed-value.h flags.h function.h hard-reg-set.h hashtab.h
	insn-config.h real.h statistics.h stmt.h varasm.h.
	* ipa-icf.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h
	fixed-value.h flags.h hashtab.h insn-config.h real.h rtl.h
	statistics.h stmt.h.
	* tree-vect-data-refs.c: Likewise.
	* graphite-sese-to-poly.c: Include calls.h dojump.h emit-rtl.h explow.h
	expmed.h fixed-value.h flags.h hashtab.h insn-config.h real.h
	rtl.h statistics.h stmt.h varasm.h.
	* internal-fn.c: Likewise.
	* ipa-icf-gimple.c: Likewise.
	* lto-section-out.c: Likewise.
	* tree-data-ref.c: Likewise.
	* tree-nested.c: Likewise.
	* tree-outof-ssa.c: Likewise.
	* tree-predcom.c: Likewise.
	* tree-pretty-print.c: Likewise.
	* tree-scalar-evolution.c: Likewise.
	* tree-ssa-strlen.c: Likewise.
	* tree-vect-loop.c: Likewise.
	* tree-vect-patterns.c: Likewise.
	* tree-vect-slp.c: Likewise.
	* tree-vect-stmts.c: Likewise.
	* tsan.c: Likewise.
	* targhooks.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h
	fixed-value.h flags.h hashtab.h insn-config.h real.h statistics.h
	stmt.h.
	* config/sh/sh-mem.cc: Include calls.h dojump.h emit-rtl.h explow.h
	expmed.h fixed-value.h flags.h hashtab.h insn-config.h real.h
	statistics.h stmt.h varasm.h.
	* loop-unroll.c: Likewise.
	* ubsan.c: Likewise.
	* tree-ssa-loop-prefetch.c: Include calls.h dojump.h emit-rtl.h explow.h
	expmed.h fixed-value.h flags.h hashtab.h real.h rtl.h statistics.h
	stmt.h varasm.h.
	* dse.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h
	fixed-value.h function.h hashtab.h statistics.h stmt.h varasm.h.
	* tree-switch-conversion.c: Include calls.h dojump.h emit-rtl.h explow.h
	expmed.h fixed-value.h hashtab.h insn-config.h real.h rtl.h
	statistics.h stmt.h.
	* generic-match-head.c: Include calls.h dojump.h emit-rtl.h explow.h
	expmed.h fixed-value.h hashtab.h insn-config.h real.h rtl.h
	statistics.h stmt.h varasm.h.
	* gimple-match-head.c: Likewise.
	* lto-cgraph.c: Likewise.
	* lto-section-in.c: Likewise.
	* lto-streamer-in.c: Likewise.
	* lto-streamer-out.c: Likewise.
	* tree-affine.c: Likewise.
	* tree-cfg.c: Likewise.
	* tree-cfgcleanup.c: Likewise.
	* tree-if-conv.c: Likewise.
	* tree-into-ssa.c: Likewise.
	* tree-ssa-alias.c: Likewise.
	* tree-ssa-copyrename.c: Likewise.
	* tree-ssa-dse.c: Likewise.
	* tree-ssa-forwprop.c: Likewise.
	* tree-ssa-live.c: Likewise.
	* tree-ssa-math-opts.c: Likewise.
	* tree-ssa-pre.c: Likewise.
	* tree-ssa-sccvn.c: Likewise.
	* tree-tailcall.c: Likewise.
	* tree-vect-generic.c: Likewise.
	* tree-sra.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h
	fixed-value.h hashtab.h insn-config.h real.h rtl.h stmt.h varasm.h.
	* stor-layout.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h
	fixed-value.h hashtab.h insn-config.h real.h statistics.h stmt.h.
	* varasm.c: Likewise.
	* coverage.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h
	fixed-value.h hashtab.h insn-config.h real.h statistics.h stmt.h
	varasm.h.
	* init-regs.c: Likewise.
	* ira.c: Likewise.
	* omp-low.c: Likewise.
	* stack-ptr-mod.c: Likewise.
	* tree-ssa-reassoc.c: Likewise.
	* tree-complex.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h
	fixed-value.h hashtab.h insn-config.h rtl.h statistics.h stmt.h
	varasm.h.
	* dwarf2cfi.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h
	fixed-value.h hashtab.h insn-config.h statistics.h stmt.h varasm.h.
	* shrink-wrap.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h
	fixed-value.h hashtab.h real.h rtl.h statistics.h stmt.h.
	* recog.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h
	fixed-value.h hashtab.h real.h rtl.h statistics.h stmt.h varasm.h.
	* tree-ssa-phiopt.c: Likewise.
	* config/darwin.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h
	fixed-value.h hashtab.h real.h statistics.h stmt.h.
	* config/fr30/fr30.c: Likewise.
	* config/frv/frv.c: Likewise.
	* expr.c: Likewise.
	* final.c: Likewise.
	* optabs.c: Likewise.
	* passes.c: Likewise.
	* simplify-rtx.c: Likewise.
	* stmt.c: Likewise.
	* toplev.c: Likewise.
	* var-tracking.c: Likewise.
	* gcse.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h
	fixed-value.h hashtab.h real.h statistics.h stmt.h varasm.h.
	* lower-subreg.c: Likewise.
	* postreload-gcse.c: Likewise.
	* ree.c: Likewise.
	* reginfo.c: Likewise.
	* store-motion.c: Likewise.
	* combine.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h
	fixed-value.h hashtab.h real.h stmt.h varasm.h.
	* emit-rtl.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h
	fixed-value.h hashtab.h statistics.h stmt.h.
	* dojump.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h
	fixed-value.h hashtab.h statistics.h stmt.h varasm.h.
	* except.c: Likewise.
	* explow.c: Likewise.
	* tree-dfa.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h
	fixed-value.h insn-config.h real.h rtl.h statistics.h stmt.h
	varasm.h.
	* gimple-fold.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h
	fixed-value.h insn-config.h real.h rtl.h statistics.h varasm.h.
	* tree-ssa-structalias.c: Likewise.
	* cfgexpand.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h
	fixed-value.h insn-config.h real.h statistics.h.
	* calls.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h
	fixed-value.h insn-config.h real.h statistics.h stmt.h.
	* bb-reorder.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h
	fixed-value.h insn-config.h real.h statistics.h stmt.h varasm.h.
	* cfgbuild.c: Likewise.
	* function.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h
	fixed-value.h real.h rtl.h statistics.h stmt.h.
	* cfgrtl.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h
	fixed-value.h real.h rtl.h statistics.h stmt.h varasm.h.
	* dbxout.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h
	fixed-value.h real.h statistics.h stmt.h.
	* auto-inc-dec.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h
	fixed-value.h real.h statistics.h stmt.h varasm.h.
	* cprop.c: Likewise.
	* modulo-sched.c: Likewise.
	* postreload.c: Likewise.
	* ccmp.c: Include calls.h dojump.h emit-rtl.h explow.h fixed-value.h
	flags.h function.h hard-reg-set.h hashtab.h insn-config.h real.h
	statistics.h stmt.h varasm.h.
	* gimple-ssa-strength-reduction.c: Include calls.h dojump.h emit-rtl.h
	explow.h fixed-value.h flags.h hashtab.h insn-config.h real.h
	rtl.h statistics.h stmt.h varasm.h.
	* tree-ssa-loop-ivopts.c: Include calls.h dojump.h emit-rtl.h explow.h
	fixed-value.h flags.h hashtab.h real.h rtl.h statistics.h stmt.h
	varasm.h.
	* expmed.c: Include calls.h dojump.h emit-rtl.h explow.h fixed-value.h
	function.h hard-reg-set.h hashtab.h real.h statistics.h stmt.h
	varasm.h.
	* target-globals.c: Include calls.h dojump.h emit-rtl.h explow.h
	fixed-value.h function.h hashtab.h real.h statistics.h stmt.h
	varasm.h.
	* tree-ssa-address.c: Include calls.h dojump.h emit-rtl.h explow.h
	fixed-value.h hashtab.h real.h statistics.h stmt.h varasm.h.
	* cfgcleanup.c: Include calls.h dojump.h explow.h expmed.h fixed-value.h
	function.h real.h statistics.h stmt.h varasm.h.
	* alias.c: Include calls.h dojump.h explow.h expmed.h fixed-value.h
	insn-config.h real.h statistics.h stmt.h.
	* dwarf2out.c: Include calls.h dojump.h explow.h expmed.h fixed-value.h
	statistics.h stmt.h.
	* config/nvptx/nvptx.c: Include dojump.h emit-rtl.h explow.h expmed.h
	fixed-value.h flags.h hard-reg-set.h insn-config.h real.h
	statistics.h stmt.h varasm.h.
	* gimplify.c: Include dojump.h emit-rtl.h explow.h expmed.h fixed-value.h
	flags.h hashtab.h insn-config.h real.h rtl.h statistics.h.
	* asan.c: Include dojump.h emit-rtl.h explow.h expmed.h fixed-value.h
	flags.h hashtab.h insn-config.h real.h rtl.h statistics.h stmt.h.
	* ipa-devirt.c: Include dojump.h emit-rtl.h explow.h expmed.h
	fixed-value.h flags.h hashtab.h insn-config.h real.h rtl.h
	statistics.h stmt.h varasm.h.
	* ipa-polymorphic-call.c: Likewise.
	* config/aarch64/aarch64.c: Include dojump.h emit-rtl.h explow.h expmed.h
	fixed-value.h flags.h hashtab.h insn-config.h real.h statistics.h
	stmt.h.
	* config/c6x/c6x.c: Likewise.
	* config/aarch64/aarch64-builtins.c: Include dojump.h emit-rtl.h explow.h
	expmed.h fixed-value.h flags.h hashtab.h insn-config.h real.h
	statistics.h stmt.h varasm.h.
	* ipa-prop.c: Include dojump.h emit-rtl.h explow.h expmed.h fixed-value.h
	hashtab.h insn-config.h real.h rtl.h statistics.h stmt.h varasm.h.
	* ipa-split.c: Likewise.
	* tree-eh.c: Likewise.
	* tree-ssa-dce.c: Likewise.
	* tree-ssa-loop-niter.c: Likewise.
	* tree-vrp.c: Likewise.
	* config/nds32/nds32-cost.c: Include dojump.h emit-rtl.h explow.h
	expmed.h fixed-value.h hashtab.h insn-config.h real.h statistics.h
	stmt.h.
	* 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/cris/cris.c: Include dojump.h emit-rtl.h explow.h expmed.h
	fixed-value.h hashtab.h real.h statistics.h.
	* config/alpha/alpha.c: Include dojump.h emit-rtl.h explow.h expmed.h
	fixed-value.h hashtab.h real.h statistics.h stmt.h.
	* config/arm/arm.c: Likewise.
	* config/avr/avr.c: Likewise.
	* config/bfin/bfin.c: Likewise.
	* config/h8300/h8300.c: Likewise.
	* config/i386/i386.c: Likewise.
	* config/ia64/ia64.c: Likewise.
	* config/iq2000/iq2000.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.c: Likewise.
	* config/mips/mips.c: Likewise.
	* config/mn10300/mn10300.c: Likewise.
	* config/moxie/moxie.c: Likewise.
	* config/pa/pa.c: Likewise.
	* config/rl78/rl78.c: Likewise.
	* config/rx/rx.c: Likewise.
	* config/s390/s390.c: Likewise.
	* config/sh/sh.c: Likewise.
	* config/sparc/sparc.c: Likewise.
	* config/spu/spu.c: Likewise.
	* config/stormy16/stormy16.c: Likewise.
	* config/v850/v850.c: Likewise.
	* config/vax/vax.c: Likewise.
	* config/cr16/cr16.c: Include dojump.h emit-rtl.h explow.h expmed.h
	fixed-value.h hashtab.h real.h statistics.h stmt.h varasm.h.
	* config/msp430/msp430.c: Likewise.
	* predict.c: Likewise.
	* value-prof.c: Likewise.
	* config/epiphany/epiphany.c: Include dojump.h emit-rtl.h explow.h
	expmed.h fixed-value.h hashtab.h statistics.h stmt.h.
	* config/microblaze/microblaze.c: Likewise.
	* config/nios2/nios2.c: Likewise.
	* config/rs6000/rs6000.c: Likewise.
	* tree.c: Include dojump.h emit-rtl.h explow.h expmed.h fixed-value.h
	insn-config.h real.h rtl.h statistics.h stmt.h.
	* cgraph.c: Include dojump.h emit-rtl.h explow.h expmed.h fixed-value.h
	insn-config.h real.h statistics.h stmt.h.
	* fold-const.c: Include dojump.h emit-rtl.h explow.h expmed.h
	fixed-value.h insn-config.h real.h statistics.h stmt.h varasm.h.
	* tree-inline.c: Include dojump.h emit-rtl.h explow.h expmed.h
	fixed-value.h real.h rtl.h statistics.h stmt.h varasm.h.
	* builtins.c: Include dojump.h emit-rtl.h explow.h expmed.h fixed-value.h
	real.h statistics.h stmt.h.
	* config/arc/arc.c: Include dojump.h emit-rtl.h explow.h expmed.h
	fixed-value.h statistics.h stmt.h.
	* config/visium/visium.c: Include dojump.h emit-rtl.h explow.h expmed.h
	stmt.h.

java/	
	* builtins.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h
	fixed-value.h function.h hard-reg-set.h hashtab.h insn-config.h
	real.h statistics.h stmt.h varasm.h.

From-SVN: r219655
2015-01-15 13:28:42 +00:00
Michael Collison 40e2396121 genattrtab.c (write_header): Include hash-set.h...
2015-01-09  Michael Collison  <michael.collison@linaro.org>
	
	* genattrtab.c (write_header): Include hash-set.h, machmode.h,
	vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
	fold-const.h, wide-int.h, and inchash.h when generating
	insn-attrtab.c.
	* genautomata.c (main) : Include hash-set.h, macInclude hash-set.h, machmode.h,
	vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
	fold-const.h, wide-int.h, and inchash.h when generating
	insn-automata.c.
	* genemit.c (main): Include hash-set.h, machmode.h,
	vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
	fold-const.h, wide-int.h, and inchash.h when generating
	insn-emit.c.
	* gengtype.c (open_base_files): Include hash-set.h, machmode.h,
	vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
	fold-const.h, wide-int.h, and inchash.h when generating
	gtype-desc.c.
	* genopinit.c (main): Include hash-set.h, machmode.h,
	vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
	fold-const.h, wide-int.h, and inchash.h when generating
	insn-opinit.c.
	* genoutput.c (output_prologue): Include hash-set.h, machmode.h,
	vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
	fold-const.h, wide-int.h, and inchash.h when generating
	insn-output.c.
	* genpeep.c (main): Include hash-set.h, machmode.h,
	vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
	fold-const.h, wide-int.h, and inchash.h when generating
	insn-peep.c.
	* genpreds.c (write_insn_preds_c): Include hash-set.h, machmode.h,
	vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
	fold-const.h, wide-int.h, and inchash.h when generating
	insn-preds.c.
	* optc-save-gen-awk: Include hash-set.h, machmode.h,
	vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
	fold-const.h, wide-int.h, and inchash.h when generating
	options-save.c.
	* opth-gen.awk: Change include guard from GCC_C_COMMON_H to GCC_C_COMMON_C
	when generating options.h.
	* ada/gcc-interface/cuintp.c: Include hash-set.h, machmode.h,
	vec.h, double-int.h, input.h, alias.h, symtab.h,
	fold-const.h, wide-int.h, and inchash.h due to
	flattening of tree.h.
	* ada/gcc-interface/decl.c: ditto.
	* ada/gcc-interface/misc.c: ditto.
	* ada/gcc-interface/targtyps.c: Include hash-set.h, machmode.h,
	vec.h, double-int.h, input.h, alias.h, symtab.h, options.h,
	fold-const.h, wide-int.h, and inchash.h due to
	flattening of tree.h.
	* ada/gcc-interface/trans.c: Include hash-set.h, machmode.h,
	vec.h, double-int.h, input.h, alias.h, symtab.h, real.h,
	fold-const.h, wide-int.h, inchash.h due to
	flattening of tree.h.
	* ada/gcc-interface/utils.c: Include hash-set.h, machmode.h,
	vec.h, double-int.h, input.h, alias.h, symtab.h,
	fold-const.h, wide-int.h, and inchash.h due to
	flattening of tree.h.
	* ada/gcc-interface/utils2.c: ditto.
	* alias.c: Include hash-set.h, machmode.h,
	vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
	fold-const.h, wide-int.h, and inchash.h due to
	flattening of tree.h.
	* asan.c: ditto.
	* attribs.c: ditto.
	* auto-inc-dec.c: ditto.
	* auto-profile.c: ditto
	* bb-reorder.c: ditto.
	* bt-load.c: Include symtab.h due to flattening of tree.h.
	* builtins.c: Include hash-set.h, machmode.h,
	vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
	fold-const.h, wide-int.h, and inchash.h due to
	flattening of tree.h.
	* c/c-array-notation.c: ditto.
	* c/c-aux-info.c: ditto.
	* c/c-convert.c: ditto.
	* c/c-decl.c: ditto.
	* c/c-errors.c: ditto.
	* c/c-lang.c: dittoxs.
	* c/c-objc-common.c: ditto.
	* c/c-parser.c: ditto.
	* c/c-typeck.c: Include hash-set.h, machmode.h,
	vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
	fold-const.h, wide-int.h, inchash.h, real.h and
	fixed-value.h due to flattening of tree.h.
	* calls.c: Include hash-set.h, machmode.h,
	vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
	fold-const.h, wide-int.h, and inchash.h due to
	flattening of tree.h.
	* ccmp.c: ditto.
	* c-family/array-notation-common.c: ditto.
	* c-family/c-ada-spec.c: ditto.
	* c-family/c-cilkplus.c: ditto.
	* c-family/c-common.c: Include input.h due to flattening of tree.h.
	Define macro GCC_C_COMMON_C.
	* c-family/c-common.h: Flatten tree.h header files into c-common.h.
	Remove include of tree-core.h.
	* c-family/c-cppbuiltin.c: Include hash-set.h, machmode.h,
	vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
	fold-const.h, wide-int.h, and inchash.h due to
	flattening of tree.h.
	* c-family/c-dump.c: ditto.
	* c-family/c-format.c: Flatten tree.h header files into c-common.h.
	* c-family/c-cppbuiltin.c: Include hash-set.h, machmode.h,
	vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
	fold-const.h, wide-int.h, and inchash.h due to
	flattening of tree.h.
	* c-family/c-dump.c: Include hash-set.h, machmode.h,
	vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
	fold-const.h, wide-int.h, and inchash.h due to
	flattening of tree.h.
	* c-family/c-format.c: Include hash-set.h, machmode.h,
	vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
	fold-const.h, wide-int.h, inchash.h and real.h due to
	flattening of tree.h.
	* c-family/c-gimplify.c: Include hash-set.h, machmode.h,
	vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
	fold-const.h, wide-int.h, and inchash.h due to
	flattening of tree.h.
	* c-family/cilk.c: ditto.
	* c-family/c-lex.c: ditto.
	* c-family/c-omp.c: ditto.
	* c-family/c-opts.c: ditto.
	* c-family/c-pch.c: ditto.
	* c-family/c-ppoutput.c: ditto.
	* c-family/c-pragma.c: ditto.
	* c-family/c-pretty-print.c: ditto.
	* c-family/c-semantics.c: ditto.
	* c-family/c-ubsan.c: ditto.
	* c-family/stub-objc.c: ditto.
	* cfgbuild.c: ditto.
	* cfg.c: ditto.
	* cfgcleanup.c: ditto.
	* cfgexpand.c: ditto.
	* cfghooks.c: ditto.
	* cfgloop.c: Include symtab.h, fold-const.h, and
	inchash.h due to flattening of tree.h.
	* cfgloopmanip.c: ditto.
	* cfgrtl.c:  Include hash-set.h, machmode.h,
	vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
	fold-const.h, wide-int.h, and inchash.h due to
	flattening of tree.h.
	* cgraphbuild.c: ditto.
	* cgraph.c: ditto.
	* cgraphclones.c: ditto.
	* cgraphunit.c: ditto.
	* cilk-common.c: ditto.
	* combine.c: ditto.
	* combine-stack-adj.c: Include symbol.h due to flattening of tree.h.
	* config/aarch64/aarch64-builtins.c:  Include hash-set.h, machmode.h,
	vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
	fold-const.h, wide-int.h, and inchash.h due to
	flattening of tree.h.
	* config/aarch64/aarch64.c: ditto.
	* config/alpha/alpha.c: ditto.
	* config/arc/arc.c: ditto.
	* config/arm/aarch-common.c: ditto.
	* config/arm/arm-builtins.c: ditto.
	* config/arm/arm.c: ditto.
	* config/arm/arm-c.c: ditto.
	* config/avr/avr.c: ditto.
	* config/avr/avr-c.c: ditto.
	* config/avr/avr-log.c: ditto.
	* config/bfin/bfin.c: ditto.
	* config/c6x/c6x.c: ditto.
	* config/cr16/cr16.c: ditto.
	* config/cris/cris.c: ditto.
	* config/darwin.c: ditto.
	* config/darwin-c.c: ditto.
	* config/default-c.c: ditto.
	* config/epiphany/epiphany.c: ditto.
	* config/fr30/fr30.c: ditto.
	* config/frv/frv.c: ditto.
	* config/glibc-c.c: ditto.
	* config/h8300/h8300.c: ditto.
	* config/i386/i386.c: ditto.
	* config/i386/i386-c.c: ditto.
	* config/i386/msformat.c: ditto.
	* config/i386/winnt.c: ditto.
	* config/i386/winnt-cxx.c: ditto.
	* config/i386/winnt-stubs.c: ditto.
	* config/ia64/ia64.c: ditto.
	* config/ia64/ia64-c.c: ditto.
	* config/iq2000/iq2000.c: ditto.
	* config/lm32/lm32.c: Include symtab.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* config/m32c/m32c.c: Include hash-set.h, machmode.h,
	vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
	fold-const.h, wide-int.h, and inchash.h due to
	flattening of tree.h.
	* config/m32c/m32c-pragma.c: ditto.
	* config/m32c/m32cr.c: ditto.
	* config/m68/m68k.c: ditto.
	* config/mcore/mcore.c: ditto.
	* config/mep/mep.c: ditto.
	* config/mep/mep-pragma.c: ditto.
	* config/microblaze/microblaze.c: ditto.
	* config/microblaze/microblaze-c.c: ditto.
	* config/mips/mips.c: ditto.
	* config/mmix/mmix.c: Include symtab.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* config/mn10300/mn10300.c: Include hash-set.h, machmode.h,
	vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
	fold-const.h, wide-int.h, and inchash.h due to
	flattening of tree.h.
	* config/moxie/moxie.c: ditto.
	* config/msp430/msp430.c: ditto.
	* config/msp430/msp430-c.c: ditto.
	* config/nds32/nds32.c: ditto.
	* config/nds32/nds32-cost.c: ditto.
	* config/nds32/nds32-fp-as-gp.c: ditto.
	* config/nds32/nds32-intrinsic.c: ditto.
	* config/nds32/nds32-isr.c: ditto.
	* config/nds32/nds32-md-auxillary.c: ditto.
	* config/nds32/nds32-memory-manipulationx.c: ditto.
	* config/nds32/nds32-pipelines-auxillary.c: ditto.
	* config/nds32/nds32-predicates.c: ditto.
	* config/nios2/nios2.c: ditto.
	* config/nvptx/nvptx.c: ditto.
	* config/pa/pa.c: ditto.
	* config/pdp11/pdp11x.c: Include symtab.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* config/rl78/rl78.c: Include hash-set.h, machmode.h,
	vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
	fold-const.h, wide-int.h, and inchash.h due to
	flattening of tree.h.
	* config/rl78/rl78-cx.c: ditto.
	* config/rs6000/rs6000.c: ditto.
	* config/rs6000/rs6000-c.c: ditto.
	* config/rx/rx.c: ditto.
	* config/s390/s390.c: ditto.
	* config/sh/sh.c: ditto.
	* config/sh/sc.c: ditto.
	* config/sh/sh-mem.cc: ditto.
	* config/sh/sh_treg_combine.cc: Include symtab.h, inchash.h and tree.h
	due to flattening of tree.h.
	Remove include of tree-core.h.
	* config/sol2.c: Include hash-set.h, machmode.h,
	vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
	fold-const.h, wide-int.h, and inchash.h due to
	flattening of tree.h.
	* config/sol2-c.c: ditto.
	* config/sol2-cxx.c: ditto.
	* config/sol2-stubs.c: ditto.
	* config/sparc/sparc.c: ditto.
	* config/sparc/sparc-cx.c: ditto.
	* config/spu/spu.c: ditto.
	* config/spu/spu-c.c: ditto
	* config/storym16/stormy16.c: ditto.
	* config/tilegx/tilegx.c: Include symtab.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* config/tilepro/gen-mul-tables.cc: Include symtab.h in generated file.
	* config/tilegx/tilegx-c.c: Include hash-set.h, machmode.h,
	vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
	fold-const.h, wide-int.h, and inchash.h due to
	flattening of tree.h.
	* config/tilepro/tilepro.c: Include symtab.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* config/tilepro/tilepro-c.c: Include hash-set.h, machmode.h,
	vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
	fold-const.h, wide-int.h, and inchash.h due to
	flattening of tree.h.
	* config/v850/v850.c: ditto.
	* config/v850/v850-c.c: ditto.
	* config/vax/vax.c: ditto.
	* config/vms/vms.c: ditto.
	* config/vms/vms-c.c: ditto.
	* config/vxworks.c: ditto.
	* config/winnt-c.c: ditto.
	* config/xtensa/xtensa.c: Include symtab.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* convert.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, options.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* coverage.c: ditto.
	* cp/call.c: ditto.
	* cp/class.c: ditto.
	* cp/constexpr.c: ditto.
	* cp/cp-array-notation.c: ditto.
	* cp/cp-gimplify.c: ditto.
	* cp/cp-lang.c: ditto.
	* cp/cp-objcp-common.c: ditto.
	* cp/cvt.c: ditto.
	* cp/decl2.c: ditto.
	* cp/decl.c: ditto.
	* cp/dump.c: ditto.
	* cp/error.c: ditto.
	* cp/except.c: ditto.
	* cp/expr.c: ditto.
	* cp/friend.c: ditto.
	* cp/init.c: ditto.
	* cp/lambda.c: ditto.
	* cp/lex.c: ditto.
	* cp/mangle.c: ditto.
	* cp/name-lookup.c: ditto.
	* cp/optimize.c: ditto.
	* cp/parser.c: ditto.
	* cp/pt.c: ditto.
	* cp/ptree.c: ditto.
	* cp/repo.c: ditto.
	* cp/rtti.c: ditto.
	* cp/search.c: ditto.
	* cp/semantics.c: ditto.
	* cp/tree.c: ditto.
	* cp/typeck2.c: ditto.
	* cp/typeck.c: ditto.
	* cppbuiltin.c: ditto.
	* cprop.c: ditto.
	* cse.c: Add include of symtab.h due to flattening of tree.h.
	* cselib.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, options.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* data-streamer.c: ditto.
	* data-streamer-in.c: ditto.
	* data-streamer-out.c: ditto.
	* dbxout.c: ditto.
	* dce.c: ditto.
	* ddg.c: Add include of symtab.h due to flattening of tree.h.
	* debug.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, options.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* dfp.c: ditto.
	* df-scan.c: ditto.
	* dojump.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, options.h, fold-const.h,
	wide-int.h, inchash.h and real.h due to flattening of tree.h.
	* double-int.c: ditto.
	* dse.c: ditto.
	* dumpfile.c: ditto.
	* dwarf2asm.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h,
	wide-int.h, inchash.h and real.h due to flattening of tree.h.
	* dwarf2cfi.c: ditto.
	* dwarf2out.c: ditto.
	* emit-rtl.c: ditto.
	* except.c: ditto.
	* explow.c: ditto.
	* expmed.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* expr.c: ditto.
	* final.c: ditto.
	* fixed-value.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h,
	wide-int.h, inchash.h and fixed-value.h due to flattening of tree.h.
	* fold-const.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	Relocate inline function convert_to_ptrofftype_loc from tree.h.
	Relocate inline function fold_build_pointer_plus_loc from tree.h.
	Relocate inline function fold_build_pointer_plus_hwi_loc from tree.h.
	* fold-const.h: Relocate macro convert_to_ptrofftype from tree.h.
	Relocate macro fold_build_pointer_plus to relocate from tree.h.h.
	Relocate macro fold_build_pointer_plus_hwi from tree.h.
	Add prototype for convert_to_ptrofftype_loc relocated from tree.h.
	Add prototype for fold_build_pointer_plus_loc relocated from tree.h.
	Add prototype for fold_build_pointer_plus_hwi_loc relocated from tree.h.
	* fortran/convert.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, options.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* fortran/cpp.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* fortran/decl.c: ditto.
	* fortran/f95.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, options.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* fortran/iresolve.c: ditto.
	* fortran/match.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* fortran/module.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, options.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* fortran/options.c: ditto.
	* fortran/target-memory.c: Include hash-set.h, vec.h,
	double-int.h, input.h, alias.h, symtab.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* fortran/trans-array.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, options.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* fortran/trans.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, options.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* fortran/trans-common.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* fortran/trans-const.c: ditto.
	* fortran/trans-decl.c: ditto.
	* fortran/trans-expr.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, options.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* fortran/trans-intrinsic.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h,
	wide-int.h, inchash.h and real.h due to flattening of tree.h.
	* fortran/trans-io.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, options.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* fortran/trans-openmp.c: ditto.
	* fortran/trans-stmt.c: ditto.
	* fortran/trans-types.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h,
	wide-int.h, inchash.h and real.h due to flattening of tree.h.
	* function.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* gcc-plugin.h: Include statistics.h, double-int.h, real.h, fixed-value.h,
	alias.h, flags.h, and symtab.h due to flattening of tree.h
	* gcse.c: ditto.
	* generic-match-head.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, options.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* ggc-page.c:  Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* gimple-builder.c: ditto.
	* gimple.c: ditto.
	* gimple-expr.c: ditto.
	* gimple-fold.c: ditto.
	* gimple-iterator.c: ditto.
	* gimple-low.c: ditto.
	* gimple-match-head.c: ditto.
	* gimple-pretty-print.c: ditto.
	* generic-ssa-isolate-paths.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, options.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* gimple-ssa-strength-reduction.c: ditto.
	* gimple-streamer-in.c: ditto.
	* gimple-streamer-out.c: ditto.
	* gimple-walk.c:  Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* gimplify.c:  Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, options.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* gimplify-me.c: ditto.
	* go/go-gcc.cc: ditto.
	* go/go-lang.c: ditto.
	* go/gdump.c: ditto.
	* graphite-blocking.c: ditto.
	* graphite.c: ditto.
	* graphite-dependencies.c: ditto.
	* graphite-interchange.c: ditto.
	* graphite-isl-ast-to-gimple.c: ditto.
	* graphite-optimize-isl.c: ditto.
	* graphite-poly.c: ditto.
	* graphite-scop-detection.c: ditto.
	* graphite-sese-to-poly.c: ditto.
	* hw-doloop.c: Include symtab.h due to flattening of tree.h.
	* ifcvt.c: ditto.
	* init-regs.c:  Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* internal-fc.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h,options.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* ipa.c: ditto.
	* ipa-chkp.c: ditto.
	* ipa-comdats.c:  Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* ipa-cp.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h,options.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* ipa-devirt.c:  Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* ipa-icf.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h,options.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* ipa-icf-gimple.c: ditto.
	* ipa-inline-analysis.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* ipa-inline.c: ditto.
	* ipa-inline-transform.c: ditto.
	* ipa-polymorhpic-call.c: ditto.
	* ipa-profile.c: ditto.
	* ipa-prop.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, options.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* ipa-pure-const.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* ipa-ref.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, options.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* ipa-reference.c: ditto.
	* ipa-split.c: ditto.
	* ipa-utils.c: ditto.
	* ipa-visbility.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* ira.c: ditto.
	* ira-color.c: Include hash-set.h due to flattening of tree.h.
	* ira-costs.c: ditto.
	* ira-emit.c: ditto.
	* java/boehm.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, options.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* java/builtins.c: ditto.
	* java/class.c: ditto.
	* java/constants.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, options.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* java/decl.c: ditto.
	* java/except.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* java/expr.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h,
	wide-int.h,inchash.h and real.h due to flattening of tree.h.
	* java/gimplify.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, options.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* java/jcf-dump.c: ditto.
	* java/jcf-io.c: ditto.
	* java/jcf-parse.c: ditto.
	* java/jvgenmain.c: ditto.
	* java/lang.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* java/mangle.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, options.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* java/mangle_name.c: ditto.
	* java/resource.c: ditto.
	* java/typeck.c: ditto.
	* java/verify-glue.c: ditto.
	* java/verify-impl.c: ditto.
	* jump.c: Include symtab.h due to flattening of tree.h.
	* langhooks.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* loop-doloop.c: Include symtab.h due to flattening of tree.h.
	* loop-init.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* loop-invariant.c: Include symtab.h due to flattening of tree.h.
	* loop-iv.c: ditto.
	* loop-unroll.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* lower-subreg.c: ditto.
	* lra-assigns.c: Include symtab.h due to flattening of tree.h.
	* lra.c: Include symtab.h, fold-const.h, wide-int.h and inchash.h
	due to flattening of tree.h.
	* lra-coalesce.c: Include symtab.h due to flattening of tree.h.
	* lra-constraints.c: ditto.
	* lra-eliminations.c: ditto.
	* lra-livesc: ditto.
	* lra-remat.c: ditto.
	* lra-spills.c: ditto.
	* lto/lto.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, options, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* lto/lto-lang.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* lto/lto-object.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, options, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* lto/lto-partition.c: ditto.
	* lto/lto-symtab.c: ditto.
	* lto-cgraph.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* lto-compress.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, options, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* lto-opts.c: ditto.
	* lto-section-in.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* lto-section-out.c: ditto.
	* lto-streamer.c: ditto.
	* lto-streamer-in.c: ditto.
	* lto-streamer-out.c: ditto.
	* modulo-sched.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and
	inchash.h due to flattening of tree.h.
	* objc/objc-act.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, options, fold-const.h,
	wide-int.h, and inchash.h due to flattening of tree.h.
	* objc/objc-encoding.c: ditto.
	* objc/objc-gnu-runtime-abi-01.c: ditto.
	* objc/objc-lang.c: ditto.
	* objc/objc-map.c: ditto.
	* objc/objc-next-runtime-abi-01.c: ditto.
	* objc/objc-next-runtime-abi-02.c: ditto.
	* objc/objc-runtime-shared-support.c: ditto.
	* objcp/objcp-decl.c: ditto.
	* objcp/objcp-lang.c: ditto.
	* omega.c: ditto.
	* omega-low.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and
	inchash.h due to flattening of tree.h.
	* optabs.c: ditto.
	* opts-global.c: ditto.
	* passes.c: ditto.
	* plugin.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and
	inchash.h due to flattening of tree.h.
	* postreload.c: Include symtab.h due to flattening of tree.h.
	* postreload-gcse.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and
	inchash.h due to flattening of tree.h.
	* predict.c: ditto.
	* print-rtl.c: ditto.
	* print-tree.c: ditto.
	* profile.c: Include symtab.h, fold-const.h
	and inchash.h due to flattening of tree.h.
	* real.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and
	inchash.h due to flattening of tree.h.
	* realmpfr.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and
	inchash.h due to flattening of tree.h.
	* recog.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and
	inchash.h due to flattening of tree.h.
	* ree.c: ditto.
	* reginfo.c: ditto.
	* reg-stack.c: ditto.
	* reload1.c: Include symtab.h, fold-const.h, wide-int.h
	and inchash.h due to flattening of tree.h.
	* reload.c: Include symtab.h due to flattening of tree.h.
	* reorg.c: ditto.
	* rtlanal.c: Include symtab.h, fold-const.h, wide-int.h
	and inchash.h due to flattening of tree.h.
	* rtl-chkp.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and
	inchash.h due to flattening of tree.h.
	* rtlhooks.c: Include symtab.h due to flattening of tree.h.
	* sanopt.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and
	inchash.h due to flattening of tree.h.
	* sched-deps.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and
	inchash.h due to flattening of tree.h.
	* sched-vis.c: ditto.
	* sdbout.c: ditto.
	* sel-sched.c: Include symtab.h, fold-const.h, wide-int.h
	and inchash.h due to flattening of tree.h.
	* sel-sched-ir.c: ditto.
	* sese.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and
	inchash.h due to flattening of tree.h.
	* shrink-wrap.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and
	inchash.h due to flattening of tree.h.
	* simplify-rtx.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and
	inchash.h due to flattening of tree.h.
	* stack-ptr-mod.c: ditto.
	* stmt.c: ditto.
	* store-motion.c: ditto.
	* store-layout.c: ditto.
	* stringpool.c: ditto.
	* symtab.c: ditto.
	* target-globals.c: ditto.
	* targhooks.c: ditto.
	* toplev.c: ditto.
	* tracer.c: ditto.
	* trans-mem.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and
	inchash.h due to flattening of tree.h.
	* tree-affine.c: ditto.
	* tree-browser.c: ditto.
	* tree.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and
	inchash.h due to flattening of tree.h.
	* tree-call-cdce.c: Include symtab.h, alias.h, double-int.h,
	fold-const.h, wide-int.h, inchash.h and real.h due to
	flattening of tree.h.
	* tree-cfg.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and
	inchash.h due to flattening of tree.h.
	* tree-cfgcleanup.c: ditto.
	* tree-chkp.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and
	inchash.h due to flattening of tree.h.
	* tree-chkp-opt.c: ditto.
	* tree-chrec.c: ditto.
	* tree-chkp-opt.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h and
	real.h due to flattening of tree.h.
	* tree-core.h: Flatten header file by removing all #include statements.
	* tree-data-ref.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and
	inchash.h due to flattening of tree.h.
	* tree-dfa.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h and
	real.h due to flattening of tree.h.
	* tree-diagnostic.c: ditto.
	* tree-dump.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h, real.h and
	fixed-value.h due to flattening of tree.h.
	* tree-dfa.c: ditto.
	* tree-eh.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h and
	real.h due to flattening of tree.h.
	* tree-emutls.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and
	inchash.h due to flattening of tree.h.
	* tree.h: Flatten header files by removing all includes except tree-core.h.
	Remove inline function convert_to_ptrofftype_loc to relocate to fold-const.c.
	Remove macro convert_to_ptrofftype to relocate to fold-const.h.
	Remove inline function fold_build_pointer_plus_loc to relocate to fold-const.c.
	Remove macro fold_build_pointer_plus to relocate to fold-const.h.
	Remove inline function fold_build_pointer_plus_hwi_loc to relocate to fold-const.c.
	Remove macro fold_build_pointer_plus_hwi to relocate to fold-const.h.
	* tree-if-conv.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h, real.h and
	fixed-value.h due to flattening of tree.h.
	* tree-inline.c: ditto.
	* tree-into-ssa.c: ditto.
	* tree-iterator.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and
	inchash.h due to flattening of tree.h.
	* tree-loop-distribution.c: ditto.
	* tree-nested.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h
	due to flattening of tree.h.
	* tree-nrv.c: ditto.
	* tree-object-size.c: ditto.
	* tree-outof-ssa.c: ditto.
	* tree-parloops.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and
	inchash.h due to flattening of tree.h.
	* tree-phinodes.c: ditto.
	* tree-predcom.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h
	due to flattening of tree.h.
	* tree-pretty-print.c: ditto.
	* tree-profile.c: double-int.h, input.h, alias.h, symtab.h,
	fold-const.h, wide-int.h and inchash.h due to flattening of tree.h.
	* tree-scalar-evolution.c: Include hash-set.h, machmode.h, vec.h,
	double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h,
	wide-int.h and inchash.h due to flattening of tree.h.
	* tree-sra.c: Include  vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and
	inchash.h due to flattening of tree.h.
	* tree-ssa-alias.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h
	due to flattening of tree.h.
	* tree-ssa.c: ditto.
	* tree-ssa-ccp.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h
	and real.h due to flattening of tree.h.
	* tree-ssa-coalesce.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h
	due to flattening of tree.h.
	* tree-ssa-copy.c: ditto.
	* tree-ssa-copyrename.c: ditto.
	* tree-ssa-dce.c: ditto.
	* tree-ssa-dom.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h
	and real.h due to flattening of tree.h.
	* tree-ssa-dse.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h
	due to flattening of tree.h.
	* tree-ssa-forwprop.c: ditto.
	* tree-ssa-ifcombine.c: ditto.
	* tree-ssa-live.c: ditto.
	* tree-ssa-loop.c: ditto.
	* tree-ssa-loop-ch.c: ditto.
	* tree-ssa-loop-im.c: ditto.
	* tree-ssa-loop-ivcanon.c: ditto.
	* tree-ssa-loop-ivopts.c: ditto.
	* tree-ssa-loop-manip.c: ditto.
	* tree-ssa-loop-niter.c: ditto.
	* tree-ssa-loop-prefetch.c: ditto.
	* tree-ssa-loop-unswitch.c: ditto.
	* tree-ssa-loop-math-opts.c: ditto.
	* tree-ssanames.c: ditto.
	* tree-ssa-operands.c: ditto.
	* tree-ssa-phiopt.c: ditto.
	* tree-ssa-phiprop.c: ditto.
	* tree-ssa-pre.c: ditto.
	* tree-ssa-propagate.c: ditto.
	* tree-ssa-reassoc.c: ditto.
	* tree-ssa-sccvn.c: ditto.
	* tree-ssa-sink.c: ditto.
	* tree-ssa-strlen.c: Include hash-set.h, machmode.h, vec.h,
	double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h,
	wide-int.h and inchash.h due to flattening of tree.h.
	* tree-ssa-structalias.c: double-int.h, input.h, alias.h, symtab.h,
	fold-const.h, wide-int.h and inchash.h due to flattening of tree.h.
	* tree-ssa-tail-merge.c: Include hash-set.h, machmode.h, vec.h,
	double-int.h, input.h, alias.h, symtab.h, fold-const.h,
	wide-int.h and inchash.h due to flattening of tree.h.
	* tree-ssa-ter.c: ditto.
	* tree-ssa-threadedge.c: ditto.
	* tree-ssa-threadupdate.c: Include hash-set.h, machmode.h, vec.h,
	double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h,
	wide-int.h and inchash.h due to flattening of tree.h.
	* tree-ssa-uncprop.c: Include hash-set.h, machmode.h, vec.h,
	double-int.h, input.h, alias.h, symtab.h, fold-const.h,
	wide-int.h and inchash.h due to flattening of tree.h.
	* tree-ssa-uninit.c: ditto.
	* tree-stdarg.c: Include vec.h, double-int.h, input.h, alias.h,
	symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening
	of tree.h.
	* tree-streamer.c: Include vec.h, double-int.h, input.h, alias.h,
	symtab.h, options.h, fold-const.h, wide-int.h and
	inchash.h due to flattening of tree.h.
	* tree-streamer-in.c: Include hash-set.h, machmode.h, vec.h,
	double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h,
	wide-int.h, inchash.h, real.h and fixed-value.h due to flattening
	of tree.h.
	* tree-streamer-out.c: dittoo.
	* tree-switch-conversion.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h
	due to flattening of tree.h.
	* tree-tailcall.c: ditto.
	* tree-vect-data-refs.c: ditto.
	* tree-vect-generic.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h,
	alias.h, symtab.h, options.h, fold-const.h, wide-int.h and inchash.h
	due to flattening of tree.h.
	* tree-vect-loop.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h
	due to flattening of tree.h.
	* tree-vect-loop-manip.c: ditto.
	* tree-vectorizer.c: ditto.
	* tree-vect-patterns.c: ditto.
	* tree-vect-slp.c: ditto.
	* tree-vect-stmts.c: ditto.
	* tree-vrp.c: ditto.
	* tsan.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h and inchash.h
	due to flattening of tree.h.
	* ubsan.c: ditto.
	* value-prof.c.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h
	due to flattening of tree.h.
	* varasm.c: ditto.
	* varpool.c: ditto.
	* var-tracking.c: ditto.
	* vmsdbgout.c: ditto.
	* vtable-verify.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h and inchash.h
	due to flattening of tree.h.
	* wide-int.cc: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h
	due to flattening of tree.h.
	* xcoffout.c: ditto.
	* libcc1/plugin.cc: Include hash-set.h, machmode.h, vec.h, double-int.h,
	input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h and inchash.h
	due to flattening of tree.h.

From-SVN: r219402
2015-01-09 20:18:42 +00:00
Jakub Jelinek bd84df1879 re PR sanitizer/64336 (Template functions are not instrumented at -O0 and -Og)
PR sanitizer/64336
	* tree.c (build2_stat): Fix up initialization of TREE_READONLY
	and TREE_THIS_VOLATILE for MEM_REFs.
	(build5_stat): Fix up initialization of TREE_READONLY and
	TREE_THIS_VOLATILE for TARGET_MEM_REFs.

From-SVN: r219339
2015-01-08 10:20:24 +01:00
Jakub Jelinek 5624e564d2 Update copyright years.
From-SVN: r219188
2015-01-05 13:33:28 +01:00
Jan Hubicka bebecd51b6 re PR lto/64043 (ICE (segfault) with LTO: in tree_check/tree.h:2758 get_binfo_at_offset/tree.c:11914)
PR lto/64043
	* tree.c (virtual_method_call_p): Return false when OTR type has
	no BINFO.
	* g++.dg/lto/pr64043_0.C: New testcase.

From-SVN: r218727
2014-12-15 03:41:41 +00:00
Richard Biener a6a0570f15 builtins.c (fold_builtin_fpclassify): Change to take array of arguments instead of CALL_EXPR tree.
2014-12-03  Richard Biener  <rguenther@suse.de>

	* builtins.c (fold_builtin_fpclassify): Change to take
	array of arguments instead of CALL_EXPR tree.
	(MAX_ARGS_TO_FOLD_BUILTIN): Remove.
	(fold_builtin_n): Dispatch to fold_builtin_varargs.
	(fold_call_expr): Always use fold_builtin_n.
	(fold_builtin_call_array): Change to not build the unfolded call,
	always use fold_builtin_n.
	(fold_builtin_varargs): Change to take array of arguments instead
	of CALL_EXPR tree.
	(fold_call_stmt): Always use fold_builtin_n.
	* tree.c (build_call_expr_loc_array): Use fold_build_call_array_loc.
	* fold-const.c (fold_build_call_array_loc): Build the call
	if fold_builtin_call_array returned NULL_TREE.
	* gimple-fold.c (gimple_fold_stmt_to_constant_1): Do not build
	a CALL_EXPR and use fold_builtin_call_array instead of
	fold_call_expr.

	cp/
	* constexpr.c (cxx_eval_builtin_function_call): Use
	fold_build_call_array_loc.

From-SVN: r218311
2014-12-03 13:10:39 +00:00
Richard Biener 31a46aa7d4 re PR middle-end/64111 (ICE: conversion of register to a different size)
2014-12-01  Richard Biener  <rguenther@suse.de>

	PR middle-end/64111
	* tree.c (int_cst_hasher::hash): Use TYPE_UID instead of
	htab_hash_pointer to not break PCH.

From-SVN: r218212
2014-12-01 13:42:45 +00:00
Ilya Verbin f0d78df9de cgraphunit.c (ipa_passes): Handle flag_generate_offload.
gcc/
	* cgraphunit.c (ipa_passes): Handle flag_generate_offload.
	(symbol_table::compile): Set flag_generate_offload if there is something
	to offload.
	* common.opt (flag_generate_offload): New Variable declaration.
	* dwarf2out.c (dwarf2out_finish): Handle flag_generate_offload.
	* ipa-inline-analysis.c (inline_generate_summary): Do not skip if
	flag_generate_offload is set.
	* lto-streamer.c (gate_lto_out): Handle flag_generate_offload.
	* passes.c (ipa_write_summaries): Do not skip if flag_generate_offload
	is set.
	* toplev.c (compile_file): Emit LTO marker if offload info has been
	previously emitted.  Do not emit lto_slim marker if
	flag_generate_offload is without flag_generate_lto.
	* tree.c (free_lang_data): Do not skip if flag_generate_offload is set.

From-SVN: r218147
2014-11-28 12:23:55 +00:00
Trevor Saunders d242408fda convert many if_marked htab to hash_table
ada/

	* gcc-interface/decl.c, gcc-interface/utils.c: replace htab with
	hash_table.

cp/

	* cp-objcp-common.c: Use hash_table instead of htab.

gcc/

	* config/i386/i386.c, function.c, trans-mem.c, tree-core.h,
	tree.c, tree.h, ubsan.c, varasm.c: Use hash_table instead of htab.

From-SVN: r217867
2014-11-20 15:10:19 +00:00
Trevor Saunders aebf76a2d6 implement a replacement for if_marked
gcc/ChangeLog:

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

	* doc/gty.texi: Document the new cache gty attribute.
	* gengtype.c (finish_cache_funcs): New function.
	(write_roots): Call gt_clear_cache on global variables with the cache
	gty attribute.
	* ggc-common.c (ggc_mark_roots): Call gt_clear_caches.
	* ggc.h (gt_clear_caches): New declaration.
	* hash-table.h (struct ggc_cache_hasher): New hasher for caches in gc
	memory.
	(gt_cleare_cache): New function.
	* emit-rtl.c, rtl.h, tree.c: Use hash_table instead of htab.

From-SVN: r217866
2014-11-20 15:10:11 +00:00
Jan Hubicka 1be0e58d30 tree.c (free_lang_data_in_type): If BINFO has no important information in it, set it to NULL.
* tree.c (free_lang_data_in_type): If BINFO has no important
	information in it, set it to NULL.
	(get_binfo_at_offset): Do not walk fields, only bases.
	* ipa-utils.h (polymorphic_type_binfo_p): Be ready for BINFO_TYPE
	to be NULL.
	* ipa-polymorphic-call.c (record_known_type): Likewise.

From-SVN: r217824
2014-11-20 06:15:03 +00:00
David Malcolm 538dd0b78f Merger of git branch "gimple-classes-v2-option-3"
gcc/ChangeLog:
	Merger of git branch "gimple-classes-v2-option-3".

	* ChangeLog.gimple-classes: New.

	* coretypes.h (struct gcond): Add forward decl.
	(struct gdebug): Likewise.
	(struct ggoto): Likewise.
	(struct glabel): Likewise.
	(struct gswitch): Likewise.
	(struct gassign): Likewise.
	(struct gasm): Likewise.
	(struct gcall): Likewise.
	(struct gtransaction): Likewise.
	(struct greturn): Likewise.
	(struct gbind): Likewise.
	(struct gcatch): Likewise.
	(struct geh_filter): Likewise.
	(struct geh_mnt): Likewise.
	(struct geh_else): Likewise.
	(struct gresx): Likewise.
	(struct geh_dispatch): Likewise.
	(struct gphi): Likewise.
	(struct gtry): Likewise.
	(struct gomp_atomic_load): Likewise.
	(struct gomp_atomic_store): Likewise.
	(struct gomp_continue): Likewise.
	(struct gomp_critical): Likewise.
	(struct gomp_for): Likewise.
	(struct gomp_parallel): Likewise.
	(struct gomp_task): Likewise.
	(struct gomp_sections): Likewise.
	(struct gomp_single): Likewise.
	(struct gomp_target): Likewise.
	(struct gomp_teams): Likewise.

	* doc/gimple.texi (Class hierarchy of GIMPLE statements): Update
	for renaming of gimple subclasses.

	* gdbhooks.py: Update.

	* gimple-iterator.c (gsi_for_phi): New.
	(gsi_start_phis): Strengthen return type from gimple_stmt_iterator
	to gphi_iterator.
	* gimple-iterator.h (struct gphi_iterator): New subclass of
	gimple_stmt_iterator.
	(gsi_for_phi): New prototype.
	(gsi_start_phis): Strengthen return type from gimple_stmt_iterator
	to gphi_iterator.
	(gsi_next_nonvirtual_phi): Strengthen param from
	gimple_stmt_iterator * to gphi_iterator *, and local "phi" from
	gimple to gphi *.

	* gsstruct.def: Update for renamings of classes.

	* gimple.c (gimple_build_return): Strengthen return type from
	gimple to greturn *.
	(gimple_call_reset_alias_info): Strengthen param to gcall *.
	(gimple_build_call_1): Strengthen return type from gimple to
	gcall *.
	(gimple_build_call_vec): Likewise.
	(gimple_build_call): Likewise.
	(gimple_build_call_valist): Likewise.
	(gimple_build_call_internal_1): Likewise.
	(gimple_build_call_internal): Likewise.
	(gimple_build_call_internal_vec): Likewise.
	(gimple_build_call_from_tree): Likewise.
	(gimple_build_assign_stat): Strengthen return type from gimple to
	gassign *.
	(gimple_build_assign_with_ops): Likewise.
	(gimple_build_assign_with_ops): Likewise.
	(gimple_build_cond): Strengthen return type from gimple to
	gcond *.
	(gimple_build_cond_from_tree): Likewise.
	(gimple_cond_set_condition_from_tree): Require a gcond *.
	(gimple_build_label): Strengthen return type from gimple to
	glabel *.
	(gimple_build_goto): Strengthen return type from gimple to
	ggoto *.
	(gimple_build_bind): Strengthen return type from gimple to
	gbind *.
	(gimple_build_asm_1): Strengthen return type from gimple to
	gasm *.
	(gimple_build_asm_vec): Likewise.
	(gimple_build_catch): Strengthen return type from gimple to
	gcatch *.
	(gimple_build_eh_filter): Strengthen return type from gimple to
	geh_filter *.
	(gimple_build_eh_must_not_throw): Strengthen return type from
	gimple to geh_mnt *.
	(gimple_build_eh_else): Strengthen return type from gimple to
	geh_else *.
	(gimple_build_try): Update for renaming of gimple_statement_try to
	gtry.
	(gimple_build_resx): Strengthen return type from gimple to
	gresx *.
	(gimple_build_switch_nlabels): Strengthen return type from gimple
	to gswitch *.
	(gimple_build_switch): Likewise.
	(gimple_build_eh_dispatch): Strengthen return type from gimple to
	geh_dispatch *.
	(gimple_build_debug_bind_stat): Strengthen return type from gimple
	to gdebug *.
	(gimple_build_debug_source_bind_stat): Strengthen return type from
	gimple to gdebug *.
	(gimple_build_omp_critical): Strengthen return type from gimple to
	gomp_critical *.
	(gimple_build_omp_for): Strengthen return type from gimple to
	gomp_for *.
	(gimple_build_omp_parallel): Strengthen return type from gimple to
	gomp_parallel *.
	(gimple_build_omp_task): Strengthen return type from gimple to
	gomp_task *.
	(gimple_build_omp_continue): Strengthen return type from gimple to
	gomp_continue *.
	(gimple_build_omp_sections): Strengthen return type from gimple to
	gomp_sections *.
	(gimple_build_omp_single): Strengthen return type from gimple to
	gomp_single *.
	(gimple_build_omp_target): Strengthen return type from gimple to
	gomp_target *.
	(gimple_build_omp_teams): Strengthen return type from gimple to
	gomp_teams *.
	(gimple_build_omp_atomic_load): Strengthen return type from gimple
	to gomp_atomic_load *.
	(gimple_build_omp_atomic_store): Strengthen return type from gimple
	to gomp_atomic_store *.
	(gimple_build_transaction): Strengthen return type from gimple
	to gtransaction *.
	(empty_stmt_p): Replace check for GIMPLE_BIND with a dyn_cast.
	(gimple_call_fnspec): Require a const gcall *.
	(gimple_call_arg_flags): Likewise.
	(gimple_call_return_flags): Likewise.
	(gimple_set_bb): Add a checked cast.
	(gimple_copy): Within the cases, add locals of the appropriate
	subclass and use in place of "stmt" and "copy" for typesafety.
	(gimple_has_side_effects): Add a checked cast.
	(gimple_could_trap_p_1): Likewise.
	(gimple_call_copy_skip_args): Require a gcall *, and return one.
	(gimple_asm_clobbers_memory_p): Require a const gasm *.
	(infer_nonnull_range): Replace a check for GIMPLE_RETURN with a
	dyn_cast, introducing local "return_stmt" and using ti in place
	of "stmt".

	* gimple.h (gimple_vec): Eliminate this typedef.
	(struct gimple_statement_call): Rename to...
	(struct gcall): ...this.
	(struct gimple_statement_bind): Rename to...
	(struct gbind): ...this.
	(struct gimple_statement_catch): Rename to...
	(struct gcatch): ...this.
	(struct gimple_statement_eh_filter): Rename to...
	(struct geh_filter): ...this.
	(struct gimple_statement_eh_else): Rename to...
	(struct geh_else): ...this.
	(struct gimple_statement_eh_mnt): Rename to...
	(struct geh_mnt): ...this.
	(struct gimple_statement_phi): Rename to...
	(struct gphi): ...this.
	(struct gimple_statement_resx): Rename to...
	(struct gresx): ...this.
	(struct gimple_statement_eh_dispatch): Rename to...
	(struct geh_dispatch): ...this.
	(struct gimple_statement_try): Rename to...
	(struct gtry): ...this.
	(struct gimple_statement_asm): Rename to...
	(struct gasm): ...this.
	(struct gimple_statement_omp_critical): Rename to...
	(struct gomp_critical): ...this.
	(struct gimple_statement_omp_for): Rename to...
	(struct gomp_for): ...this.
	(struct gimple_statement_omp_parallel): Rename to...
	(struct gomp_parallel): ...this.
	(struct gimple_statement_omp_target): Rename to...
	(struct gomp_target): ...this.
	(struct gimple_statement_omp_task): Rename to...
	(struct gomp_task): ...this.
	(struct gimple_statement_omp_sections): Rename to...
	(struct gomp_sections): ...this.
	(struct gimple_statement_omp_continue): Rename to...
	(struct gomp_continue): ...this.
	(struct gimple_statement_omp_single): Rename to...
	(struct gomp_single): ...this.
	(struct gimple_statement_omp_teams): Rename to...
	(struct gomp_teams): ...this.
	(struct gimple_statement_omp_atomic_load): Rename to...
	(struct gomp_atomic_load): ...this.
	(struct gimple_statement_omp_atomic_store :): Rename to...
	(struct gomp_atomic_store :): ...this.
	(struct gimple_statement_transaction): Rename to...
	(struct gtransaction): ...this.
	(struct gcond): New subclass.
	(struct gdebug): New subclass.
	(struct ggoto): New subclass.
	(struct glabel): New subclass.
	(struct gswitch): New subclass.
	(struct gassign): New subclass.
	(struct greturn): New subclass.
	(is_a_helper <gimple_statement_asm *>::test): Rename to...
	(is_a_helper <gasm *>::test): ...this.
	(is_a_helper <gimple_statement_bind *>::test): Rename to...
	(is_a_helper <gbind *>::test): ...this.
	(is_a_helper <gassign *>::test): New.
	(is_a_helper <gimple_statement_call *>::test): Rename to...
	(is_a_helper <gcall *>::test): ...this.
	(is_a_helper <gimple_statement_catch *>::test): Rename to...
	(is_a_helper <gcatch *>::test): ...this.
	(is_a_helper <gimple_statement_resx *>::test): Rename to...
	(is_a_helper <gresx *>::test): ...this.
	(is_a_helper <gcond *>::test): New.
	(is_a_helper <gdebug *>::test): New.
	(is_a_helper <ggoto *>::test): New.
	(is_a_helper <glabel *>::test): New.
	(is_a_helper <gimple_statement_eh_dispatch *>::test): Rename to...
	(is_a_helper <geh_dispatch *>::test): ...this.
	(is_a_helper <gimple_statement_eh_else *>::test): Rename to...
	(is_a_helper <geh_else *>::test): ...this.
	(is_a_helper <gimple_statement_eh_filter *>::test): Rename to...
	(is_a_helper <geh_filter *>::test): ...this.
	(is_a_helper <gimple_statement_eh_mnt *>::test): Rename to...
	(is_a_helper <geh_mnt *>::test): ...this.
	(is_a_helper <gimple_statement_omp_atomic_load *>::test): Rename to...
	(is_a_helper <gomp_atomic_load *>::test): ...this.
	(is_a_helper <gimple_statement_omp_atomic_store *>::test): Rename to...
	(is_a_helper <gomp_atomic_store *>::test): ...this.
	(is_a_helper <gimple_statement_omp_continue *>::test): Rename to...
	(is_a_helper <gomp_continue *>::test): ...this.
	(is_a_helper <gimple_statement_omp_critical *>::test): Rename to...
	(is_a_helper <gomp_critical *>::test): ...this.
	(is_a_helper <gimple_statement_omp_for *>::test): Rename to...
	(is_a_helper <gomp_for *>::test): ...this.
	(is_a_helper <gimple_statement_omp_parallel *>::test): Rename to...
	(is_a_helper <gomp_parallel *>::test): ...this.
	(is_a_helper <gimple_statement_omp_target *>::test): Rename to...
	(is_a_helper <gomp_target *>::test): ...this.
	(is_a_helper <gimple_statement_omp_sections *>::test): Rename to...
	(is_a_helper <gomp_sections *>::test): ...this.
	(is_a_helper <gimple_statement_omp_single *>::test): Rename to...
	(is_a_helper <gomp_single *>::test): ...this.
	(is_a_helper <gimple_statement_omp_teams *>::test): Rename to...
	(is_a_helper <gomp_teams *>::test): ...this.
	(is_a_helper <gimple_statement_omp_task *>::test): Rename to...
	(is_a_helper <gomp_task *>::test): ...this.
	(is_a_helper <gimple_statement_phi *>::test): Rename to...
	(is_a_helper <gphi *>::test): ...this.
	(is_a_helper <gimple_statement_transaction *>::test): Rename to...
	(is_a_helper <gtransaction *>::test): ...this.
	(is_a_helper <greturn *>::test): New.
	(is_a_helper <gswitch *>::test): New.
	(is_a_helper <gimple_statement_try *>::test): Rename to...
	(is_a_helper <gtry *>::test): ...this.
	(is_a_helper <const gimple_statement_asm *>::test): Rename to...
	(is_a_helper <const gasm *>::test): ...this.
	(is_a_helper <const gimple_statement_bind *>::test): Rename to...
	(is_a_helper <const gbind *>::test): ...this.
	(is_a_helper <const gimple_statement_call *>::test): Rename to...
	(is_a_helper <const gcall *>::test): ...this.
	(is_a_helper <const gimple_statement_catch *>::test): Rename to...
	(is_a_helper <const gcatch *>::test): ...this.
	(is_a_helper <const gimple_statement_resx *>::test): Rename to...
	(is_a_helper <const gresx *>::test): ...this.
	(is_a_helper <const gimple_statement_eh_dispatch *>::test): Rename to...
	(is_a_helper <const geh_dispatch *>::test): ...this.
	(is_a_helper <const gimple_statement_eh_filter *>::test): Rename to...
	(is_a_helper <const geh_filter *>::test): ...this.
	(is_a_helper <const gimple_statement_omp_atomic_load *>::test):
	Rename to...
	(is_a_helper <const gomp_atomic_load *>::test): ...this.
	(is_a_helper <const gimple_statement_omp_atomic_store *>::test):
	Rename to...
	(is_a_helper <const gomp_atomic_store *>::test): ...this.
	(is_a_helper <const gimple_statement_omp_continue *>::test):
	Rename to...
	(is_a_helper <const gomp_continue *>::test): ...this.
	(is_a_helper <const gimple_statement_omp_critical *>::test):
	Rename to...
	(is_a_helper <const gomp_critical *>::test): ...this.
	(is_a_helper <const gimple_statement_omp_for *>::test): Rename to...
	(is_a_helper <const gomp_for *>::test): ...this.
	(is_a_helper <const gimple_statement_omp_parallel *>::test):
	Rename to...
	(is_a_helper <const gomp_parallel *>::test): ...this.
	(is_a_helper <const gimple_statement_omp_target *>::test): Rename to...
	(is_a_helper <const gomp_target *>::test): ...this.
	(is_a_helper <const gimple_statement_omp_sections *>::test):
	Rename to...
	(is_a_helper <const gomp_sections *>::test): ...this.
	(is_a_helper <const gimple_statement_omp_single *>::test): Rename to...
	(is_a_helper <const gomp_single *>::test): ...this.
	(is_a_helper <const gimple_statement_omp_teams *>::test): Rename to...
	(is_a_helper <const gomp_teams *>::test): ...this.
	(is_a_helper <const gimple_statement_omp_task *>::test): Rename to...
	(is_a_helper <const gomp_task *>::test): ...this.
	(is_a_helper <const gimple_statement_phi *>::test): Rename to...
	(is_a_helper <const gphi *>::test): ...this.
	(is_a_helper <const gimple_statement_transaction *>::test): Rename to...
	(is_a_helper <const gtransaction *>::test): ...this.
	(gimple_build_return): Strengthen return type to greturn *.
	(gimple_call_reset_alias_info): Require a gcall *.
	(gimple_build_call_vec): Return a gcall *.
	(gimple_build_call): Likewise.
	(gimple_build_call_valist): Likewise.
	(gimple_build_call_internal): Likewise.
	(gimple_build_call_internal_vec): Likewise.
	(gimple_build_call_from_tree): Likewise.
	(gimple_build_assign_stat): Return a gassign *.
	(gimple_build_assign_with_ops): Likewise.
	(gimple_build_cond): Return a gcond *.
	(gimple_build_cond_from_tree): Likewise.
	(gimple_cond_set_condition_from_tree): Require a gcond *.
	(gimple_build_label): Return a glabel *.
	(gimple_build_goto): Return a ggoto *.
	(gimple_build_bind): Return a gbind *.
	(gimple_build_asm_vec): Return a gasm *.
	(gimple_build_catch): Return a gcatch *.
	(gimple_build_eh_filter): Return a geh_filter *.
	(gimple_build_eh_must_not_throw): Return a geh_mnt *.
	(gimple_build_eh_else): Return a geh_else *.
	(gimple_build_try): Return a gtry *.
	(gimple_build_resx): Return a gresx *.
	(gimple_build_switch_nlabels): Return a gswitch *.
	(gimple_build_switch): Return a gswitch *.
	(gimple_build_eh_dispatch): Return a geh_dispatch *.
	(gimple_build_debug_bind_stat): Return a gdebug *.
	(gimple_build_debug_source_bind_stat): Return a gdebug *.
	(gimple_build_omp_critical): Return a gomp_critical *.
	(gimple_build_omp_for): Return a gomp_for *.
	(gimple_build_omp_parallel): Return a gomp_parallel *.
	(gimple_build_omp_task): Return a gomp_task *.
	(gimple_build_omp_continue): Return a gomp_continue *.
	(gimple_build_omp_sections): Return a gomp_sections *.
	(gimple_build_omp_single): Return a gomp_single *.
	(gimple_build_omp_target): Return a gomp_target *.
	(gimple_build_omp_teams): Return a gomp_teams *.
	(gimple_build_omp_atomic_load): Return a gomp_atomic_load *.
	(gimple_build_omp_atomic_store): Return a gomp_atomic_store *.
	(gimple_build_transaction): Return a gtransaction *.
	(gimple_call_arg_flags): Require a const gcall *.
	(gimple_call_return_flags): Likewise.
	(gimple_call_copy_skip_args): Require and return a gcall *.
	(gimple_asm_clobbers_memory_p): Require a const gasm *.
	(gimple_seq_first_stmt_as_a_bind): New.
	(gimple_assign_nontemporal_move_p): Require a const gassign *
	rather than a const_gimple.
	(gimple_call_internal_fn): Update for renaming to gcall.
	(gimple_call_fntype): Likewise.
	(gimple_call_set_fntype): Require a gcall * rather than a gimple.
	(gimple_call_set_fn): Likewise.
	(gimple_call_set_internal_fn): Likewise.
	(gimple_call_set_chain): Likewise.
	(gimple_call_set_tail): Likewise.
	(gimple_call_tail_p): Likewise.
	(gimple_call_set_return_slot_opt): Likewise.
	(gimple_call_return_slot_opt_p): Likewise.
	(gimple_call_set_from_thunk): Likewise.
	(gimple_call_from_thunk_p): Likewise.
	(gimple_call_set_va_arg_pack): Likewise.
	(gimple_call_va_arg_pack_p): Likewise.
	(gimple_call_set_nothrow): Likewise.
	(gimple_call_nothrow_p): Likewise.
	(gimple_call_set_alloca_for_var): Likewise.
	(gimple_call_alloca_for_var_p): Likewise.
	(gimple_call_use_set): Likewise.
	(gimple_call_clobber_set): Likewise.
	(gimple_call_return_type): Require a const gcall * rather than a
	const_gimple.
	(gimple_call_chain_ptr): Likewise.
	(gimple_call_copy_flags): Require a pair of gcall *.
	(gimple_cond_set_code): Require a gcond * rather than a gimple
	(gimple_cond_set_lhs): Likewise.
	(gimple_cond_set_rhs): Likewise.
	(gimple_cond_set_true_label): Likewise.
	(gimple_cond_set_false_label): Likewise.
	(gimple_cond_make_false): Likewise.
	(gimple_cond_make_true): Likewise.
	(gimple_cond_lhs_ptr): Require a const gcond * rather than a
	const_gimple.
	(gimple_cond_rhs_ptr): Likewise.
	(gimple_cond_true_label): Likewise.
	(gimple_cond_false_label): Likewise.
	(gimple_cond_true_p): Likewise.
	(gimple_cond_false_p): Likewise.
	(gimple_cond_set_condition): Likewise.
	(gimple_label_label): Require a const glabel *.
	(gimple_label_set_label): Require a glabel *.
	(gimple_goto_set_dest): Require a ggoto *.
	(gimple_bind_vars): Require a const gbind *.
	(gimple_bind_block): Likewise.
	(gimple_bind_set_vars): Require a gbind *.
	(gimple_bind_append_vars): Likewise.
	(gimple_bind_body_ptr): Likewise.
	(gimple_bind_body): Likewise.
	(gimple_bind_set_body): Likewise.
	(gimple_bind_add_stmt): Likewise.
	(gimple_bind_add_seq): Likewise.
	(gimple_bind_set_block): Likewise.
	(gimple_asm_ninputs): Require a const gasm *.
	(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_clobber_op): Likewise.
	(gimple_asm_label_op): Likewise.
	(gimple_asm_string): Likewise.
	(gimple_asm_volatile_p): Likewise.
	(gimple_asm_input_p): Likewise.
	(gimple_asm_set_input_op): Require a gasm *.
	(gimple_asm_set_output_op): Likewise.
	(gimple_asm_set_clobber_op): Likewise.
	(gimple_asm_set_label_op): Likewise.
	(gimple_asm_set_volatile): Likewise.
	(gimple_asm_set_input): Likewise.
	(gimple_catch_types): Require a const gcatch *.
	(gimple_catch_types_ptr): Require a gcatch *.
	(gimple_catch_handler_ptr): Likewise.
	(gimple_catch_handler): Likewise.
	(gimple_catch_set_types): Likewise.
	(gimple_catch_set_handler): Likewise.
	(gimple_eh_filter_types): Update for renaming of subclass to
	geh_filter.
	(gimple_eh_filter_types_ptr): Likewise.
	(gimple_eh_filter_failure_ptr): Likewise.
	(gimple_eh_filter_set_types): Require a geh_filter *.
	(gimple_eh_filter_set_failure): Likewise.
	(gimple_eh_must_not_throw_fndecl): Require a geh_mnt *.
	(gimple_eh_must_not_throw_set_fndecl): Likewise.
	(gimple_eh_else_n_body_ptr): Require a geh_else *.
	(gimple_eh_else_n_body): Likewise.
	(gimple_eh_else_e_body_ptr): Likewise.
	(gimple_eh_else_e_body): Likewise.
	(gimple_eh_else_set_n_body): Likewise.
	(gimple_eh_else_set_e_body): Likewise.
	(gimple_try_set_kind): Require a gtry *.
	(gimple_try_set_catch_is_cleanup): Likewise.
	(gimple_try_set_eval): Likewise.
	(gimple_try_set_cleanup): Likewise.
	(gimple_try_eval_ptr): Update for renaming of subclass to gtry.
	(gimple_try_cleanup_ptr): Likewise.
	(gimple_phi_capacity): Update for renaming of subclass to gphi.
	(gimple_phi_num_args): Likewise.
	(gimple_phi_result): Likewise.
	(gimple_phi_result_ptr): Likewise.
	(gimple_phi_arg): Likewise.
	(gimple_phi_set_result): Require a gphi *.
	(gimple_phi_set_arg): Likewise.
	(gimple_phi_arg_def_ptr): Likewise.
	(gimple_phi_arg_edge): Likewise.
	(gimple_phi_arg_location): Likewise.
	(gimple_phi_arg_location_from_edge): Likewise.
	(gimple_phi_arg_set_location): Likewise.
	(gimple_phi_arg_has_location): Likewise.
	(gimple_resx_region): Require a const gresx *.
	(gimple_resx_set_region): Require a gresx *.
	(gimple_eh_dispatch_region): Require a const geh_dispatch *.
	(gimple_eh_dispatch_set_region): Require a geh_dispatch *.
	(gimple_switch_num_labels): Require a const gswitch *.
	(gimple_switch_set_num_labels): Likewise.
	(gimple_switch_index): Likewise.
	(gimple_switch_index_ptr): Likewise.
	(gimple_switch_label): Likewise.
	(gimple_switch_default_label): Likewise.
	(gimple_switch_set_index): Require a gswitch *.
	(gimple_switch_set_label): Likewise.
	(gimple_switch_set_default_label): Likewise.
	(gimple_omp_critical_name): Require a const gomp_critical *.
	(gimple_omp_critical_name_ptr): Require a gomp_critical *.
	(gimple_omp_critical_set_name): Likewise.
	(gimple_omp_for_set_kind): Require a gomp_for *.
	(gimple_omp_for_set_combined_p): Likewise.
	(gimple_omp_for_set_combined_into_p): Likewise.
	(gimple_omp_for_clauses): Update for renaming of subclass to
	gomp_for.
	(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): Likewise.
	(gimple_omp_for_set_pre_body): Likewise.
	(gimple_omp_parallel_clauses): Update for renaming of subclass to
	gomp_parallel.
	(gimple_omp_parallel_clauses_ptr): Require a gomp_parallel *.
	(gimple_omp_parallel_set_clauses): Likewise.
	(gimple_omp_parallel_child_fn_ptr): Likewise.
	(gimple_omp_parallel_set_child_fn): Likewise.
	(gimple_omp_parallel_data_arg_ptr): Likewise.
	(gimple_omp_parallel_set_data_arg): Likewise.
	(gimple_omp_parallel_child_fn): Require a const gomp_parallel *.
	(gimple_omp_parallel_data_arg): Likewise.
	(gimple_omp_task_clauses): Update for renaming of subclass to
	gomp_task.
	(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): Whitespace fixes.
	(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): Update for renaming of subclass to
	gomp_task.
	(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): Update for renaming of subclass to
	gomp_single.
	(gimple_omp_single_clauses_ptr): Likewise.
	(gimple_omp_single_set_clauses): Likewise.
	(gimple_omp_target_clauses): Update for renaming of subclass to
	gomp_target.
	(gimple_omp_target_clauses_ptr): Likewise.
	(gimple_omp_target_set_clauses): Require a gomp_target *.
	(gimple_omp_target_set_kind): Likewise.
	(gimple_omp_target_child_fn_ptr): Likewise.
	(gimple_omp_target_set_child_fn): Likewise.
	(gimple_omp_target_data_arg_ptr): Likewise.
	(gimple_omp_target_set_data_arg): Likewise.
	(gimple_omp_target_child_fn): Require a const gomp_target *.
	(gimple_omp_target_data_arg): Likewise.
	(gimple_omp_teams_clauses): Update for renaming of subclass to
	gomp_teams.
	(gimple_omp_teams_clauses_ptr): Likewise.
	(gimple_omp_teams_set_clauses): Require a gomp_teams *.
	(gimple_omp_sections_clauses): Update for renaming of subclass to
	gomp_sections.
	(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): Require a gomp_atomic_store *.
	(gimple_omp_atomic_store_val_ptr): Likewise.
	(gimple_omp_atomic_load_set_lhs): Likewise.
	(gimple_omp_atomic_store_val): Require a const gomp_atomic_store *.
	(gimple_omp_atomic_load_lhs): Likewise.
	(gimple_omp_atomic_load_rhs): Likewise.
	(gimple_omp_atomic_load_lhs_ptr): Require a gomp_atomic_load *.
	(gimple_omp_atomic_load_set_rhs): Likewise.
	(gimple_omp_atomic_load_rhs_ptr): Likewise.
	(gimple_omp_continue_control_def): Require a const gomp_continue *.
	(gimple_omp_continue_control_use): Likewise.
	(gimple_omp_continue_control_def_ptr): Require a gomp_continue *.
	(gimple_omp_continue_set_control_def): Likewise.
	(gimple_omp_continue_control_use_ptr): Likewise.
	(gimple_omp_continue_set_control_use): Likewise.
	(gimple_transaction_body_ptr): Require a gtransaction *.
	(gimple_transaction_body): Likewise.
	(gimple_transaction_label_ptr): Likewise.
	(gimple_transaction_label): Require a const gtransaction *.
	(gimple_transaction_subcode): Likewise.
	(gimple_transaction_set_body): Require a gtransaction *.
	(gimple_transaction_set_label): Likewise.
	(gimple_transaction_set_subcode): Likewise.
	(gimple_return_retval_ptr): Require a const greturn *.
	(gimple_return_retval): Likewise.
	(gimple_return_set_retval): Require a greturn *.
	(gimple_expr_type): Introduce local "call_stmt" and use in place of
	"stmt" for typesafety.

	* asan.c: Use gimple subclasses.
	* auto-profile.c: Likewise.
	* builtins.c: Likewise.
	* builtins.h: Likewise.
	* cfgexpand.c: Likewise.
	* cfgloop.c: Likewise.
	* cfgloopmanip.c: Likewise.
	* cgraph.c: Likewise.
	* cgraph.h: Likewise.
	* cgraphbuild.c: Likewise.
	* cgraphclones.c: Likewise.
	* cgraphunit.c: Likewise.
	* expr.h: Likewise.
	* gimple-builder.c: Likewise.
	* gimple-builder.h: Likewise.
	* gimple-fold.c: Likewise.
	* gimple-low.c: Likewise.
	* gimple-pretty-print.c: Likewise.
	* gimple-ssa-isolate-paths.c: Likewise.
	* gimple-ssa-strength-reduction.c: Likewise.
	* gimple-streamer-in.c: Likewise.
	* gimple-streamer-out.c: Likewise.
	* gimple-walk.c: Likewise.
	* gimplify-me.c: Likewise.
	* gimplify.c: Likewise.
	* gimplify.h: Likewise.
	* graphite-scop-detection.c: Likewise.
	* graphite-sese-to-poly.c: Likewise.
	* internal-fn.c: Likewise.
	* internal-fn.def:: Likewise.
	* internal-fn.h: Likewise.
	* ipa-icf-gimple.c: Likewise.
	* ipa-icf-gimple.h: Likewise.
	* ipa-icf.c: Likewise.
	* ipa-inline-analysis.c: Likewise.
	* ipa-prop.c: Likewise.
	* ipa-prop.h: Likewise.
	* ipa-pure-const.c: Likewise.
	* ipa-split.c: Likewise.
	* lto-streamer-in.c: Likewise.
	* lto-streamer-out.c: Likewise.
	* omp-low.c: Likewise.
	* predict.c: Likewise.
	* sanopt.c: Likewise.
	* sese.c: Likewise.
	* ssa-iterators.h: Likewise.
	* stmt.c: Likewise.
	* trans-mem.c: Likewise.
	* tree-call-cdce.c: Likewise.
	* tree-cfg.c: Likewise.
	* tree-cfg.h: Likewise.
	* tree-cfgcleanup.c: Likewise.
	* tree-chkp.c: Likewise.
	* tree-chkp.h: Likewise.
	* tree-complex.c: Likewise.
	* tree-data-ref.c: Likewise.
	* tree-dfa.c: Likewise.
	* tree-eh.c: Likewise.
	* tree-eh.h: Likewise.
	* tree-emutls.c: Likewise.
	* tree-if-conv.c: Likewise.
	* tree-inline.c: Likewise.
	* tree-inline.h: Likewise.
	* tree-into-ssa.c: Likewise.
	* tree-into-ssa.h: Likewise.
	* tree-loop-distribution.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-phinodes.h: Likewise.
	* tree-predcom.c: Likewise.
	* tree-profile.c: Likewise.
	* tree-scalar-evolution.c: Likewise.
	* tree-scalar-evolution.h
	* tree-sra.cn_function):
	* tree-ssa-alias.c: Likewise.
	* tree-ssa-alias.h: 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-forwprop.c: Likewise.
	* tree-ssa-ifcombine.c: Likewise.
	* tree-ssa-live.c: Likewise.
	* tree-ssa-loop-im.c: Likewise.
	* tree-ssa-loop-ivcanon.c: Likewise.
	* tree-ssa-loop-ivopts.c: Likewise.
	* tree-ssa-loop-manip.c: Likewise.
	* tree-ssa-loop-niter.c: Likewise.
	* tree-ssa-loop-prefetch.c: Likewise.
	* tree-ssa-loop-unswitch.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-propagate.h: Likewise.
	* tree-ssa-reassoc.c: Likewise.
	* tree-ssa-sccvn.c: Likewise.
	* tree-ssa-sccvn.h: Likewise.
	* tree-ssa-sink.c: Likewise.
	* tree-ssa-strlen.c
	* tree-ssa-structalias.c
	* tree-ssa-tail-merge.c: Likewise.
	* tree-ssa-ter.c: Likewise.
	* tree-ssa-threadedge.c: Likewise.
	* tree-ssa-threadedge.h: Likewise.
	* tree-ssa-threadupdate.c: Likewise.
	* tree-ssa-uncprop.c: Likewise.
	* tree-ssa-uninit.c: Likewise.
	* tree-ssa.c: Likewise.
	* tree-stdarg.c: 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.h: Likewise.
	* tree-vrp.c: Likewise.
	* tree.c: Likewise.
	* ubsan.c: Likewise.
	* value-prof.c: Likewise.
	* value-prof.h: Likewise.
	* vtable-verify.c: Likewise.

gcc/c-family/ChangeLog:
	Merger of git branch "gimple-classes-v2-option-3".
	* ChangeLog.gimple-classes: New.
	* c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
	from being just a vec<gimple> to a vec<gbind *>.

gcc/java/ChangeLog:
	Merger of git branch "gimple-classes-v2-option-3".
	* ChangeLog.gimple-classes: New.
	* java-gimplify.c (java_gimplify_block): Strengthen local "outer"
	from gimple to gbind *.

From-SVN: r217787
2014-11-19 17:00:54 +00:00
Jason Merrill 59f1d0db7a * tree.c (warn_deprecated_use): Show declaration with inform.
From-SVN: r217714
2014-11-18 08:36:38 -05:00
Marc Glisse 092404511f tree.c (element_mode, [...]): New functions.
2014-11-18  Marc Glisse  <marc.glisse@inria.fr>

	* tree.c (element_mode, integer_truep): New functions.
	* tree.h (element_mode, integer_truep): Declare them.
	* fold-const.c (negate_expr_p, fold_negate_expr, combine_comparisons,
	fold_cond_expr_with_comparison, fold_real_zero_addition_p,
	fold_comparison, fold_ternary_loc, tree_call_nonnegative_warnv_p,
	fold_strip_sign_ops): Use element_mode.
	(fold_binary_loc): Use element_mode and element_precision.
	* match.pd: Use integer_truep, element_mode, element_precision,
	VECTOR_TYPE_P and build_one_cst. Extend some transformations to
	vectors. Simplify A/-A.

From-SVN: r217702
2014-11-18 10:26:31 +00:00
Jan Hubicka 88436c83a4 tree.c (free_lang_data_in_decl): Set DECL_FUNCTION_SPECIFIC_OPTIMIZATION to optimization_default_node.
* tree.c (free_lang_data_in_decl): Set DECL_FUNCTION_SPECIFIC_OPTIMIZATION
	to optimization_default_node.

From-SVN: r217671
2014-11-17 19:35:57 +00:00
Jan Hubicka 72a4a8b0bc tree.c (free_lang_data_in_decl): Annotate all functio nbodies with DECL_FUNCTION_SPECIFIC_TARGET.
* tree.c (free_lang_data_in_decl): Annotate all functio nbodies with
	DECL_FUNCTION_SPECIFIC_TARGET.
	* i386.c (ix86_set_current_function): Handle explicit default options.

	* lto.c (lto_read_decls): Do not rebuild DECL_FUNCTION_SPECIFIC_TARGET.

From-SVN: r217659
2014-11-17 16:48:29 +00:00
Jan Hubicka 54e774c010 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: r217571
2014-11-14 15:47:53 +00:00
Marek Polacek 5b98e88f0c * tree.c (build_common_builtin_nodes): Remove doubled ECF_LEAF.
From-SVN: r217543
2014-11-14 08:55:11 +00:00
Teresa Johnson 37e10165c1 re PR tree-optimization/63841 (Incorrect strlen optimization after complete unroll)
2014-11-13  Teresa Johnson  <tejohnson@google.com>

gcc:
	PR tree-optimization/63841
	* tree.c (initializer_zerop): A clobber does not zero initialize.

gcc/testsuite:
	PR tree-optimization/63841
	* g++.dg/tree-ssa/pr63841.C: New test.

From-SVN: r217505
2014-11-13 15:36:48 +00:00
Richard Biener cc7b5acf37 match.pd: Implement patterns from associate_plusminus and factor in differences from the...
2014-11-11  Richard Biener  <rguenther@suse.de>

	* match.pd: Implement patterns from associate_plusminus
	and factor in differences from the fold-const.c implementation.
	* fold-const.c (fold_binary_loc): Remove patterns here.
	* tree-ssa-forwprop.c (associate_plusminus): Remove.
	(pass_forwprop::execute): Don't call it.
	* tree.c (tree_nop_conversion_p): New function, factored
	from tree_nop_conversion.
	* tree.h (tree_nop_conversion_p): Declare.

From-SVN: r217349
2014-11-11 13:23:26 +00:00
Ilya Enkovich d5e254e19c ipa-chkp.c: New.
gcc/

2014-11-05  Ilya Enkovich  <ilya.enkovich@intel.com>

	* ipa-chkp.c: New.
	* ipa-chkp.h: New.
	* tree-chkp.c: New.
	* tree-chkp.h: New.
	* tree-chkp-opt.c: New.
	* rtl-chkp.c: New.
	* rtl-chkp.h: New.
	* Makefile.in (OBJS): Add ipa-chkp.o, rtl-chkp.o, tree-chkp.o
	tree-chkp-opt.o.
	(GTFILES): Add tree-chkp.c.
	* mode-classes.def (MODE_POINTER_BOUNDS): New.
	* tree.def (POINTER_BOUNDS_TYPE): New.
	* genmodes.c (complete_mode): Support MODE_POINTER_BOUNDS.
	(POINTER_BOUNDS_MODE): New.
	(make_pointer_bounds_mode): New.
	* machmode.h (POINTER_BOUNDS_MODE_P): New.
	* stor-layout.c (int_mode_for_mode): Support MODE_POINTER_BOUNDS.
	(layout_type): Support POINTER_BOUNDS_TYPE.
	* tree-pretty-print.c (dump_generic_node): Support POINTER_BOUNDS_TYPE.
	* tree-core.h (tree_index): Add TI_POINTER_BOUNDS_TYPE.
	* tree.c (build_int_cst_wide): Support POINTER_BOUNDS_TYPE.
	(type_contains_placeholder_1): Likewise.
	(build_common_tree_nodes): Initialize
	pointer_bounds_type_node.
	* tree.h (POINTER_BOUNDS_TYPE_P): New.
	(pointer_bounds_type_node): New.
	(POINTER_BOUNDS_P): New.
	(BOUNDED_TYPE_P): New.
	(BOUNDED_P): New.
	(CALL_WITH_BOUNDS_P): New.
	* gimple.h (gf_mask): Add GF_CALL_WITH_BOUNDS.
	(gimple_call_with_bounds_p): New.
	(gimple_call_set_with_bounds): New.
	(gimple_return_retbnd): New.
	(gimple_return_set_retbnd): New
	* gimple.c (gimple_build_return): Increase number of ops
	for return statement.
	(gimple_build_call_from_tree): Propagate CALL_WITH_BOUNDS_P
	flag.
	* gimple-pretty-print.c (dump_gimple_return): Print second op.
	* rtl.h (CALL_EXPR_WITH_BOUNDS_P): New.
	* gimplify.c (gimplify_init_constructor): Avoid infinite
	loop during gimplification of bounds initializer.
	* calls.c: Include tree-chkp.h, rtl-chkp.h, bitmap.h.
	(special_function_p): Use original decl name when analyzing
	instrumentation clone.
	(arg_data): Add fields special_slot, pointer_arg and
	pointer_offset.
	(store_bounds): New.
	(emit_call_1): Propagate instrumentation flag for CALL.
	(initialize_argument_information): Compute pointer_arg,
	pointer_offset and special_slot for pointer bounds arguments.
	(finalize_must_preallocate): Preallocate when storing bounds
	in bounds table.
	(compute_argument_addresses): Skip pointer bounds.
	(expand_call): Store bounds into tables separately.  Return
	result joined with resulting bounds.
	* cfgexpand.c: Include tree-chkp.h, rtl-chkp.h.
	(expand_call_stmt): Propagate bounds flag for CALL_EXPR.
	(expand_return): Add returned bounds arg.  Handle returned bounds.
	(expand_gimple_stmt_1): Adjust to new expand_return signature.
	(gimple_expand_cfg): Reset rtx bounds map.
	* expr.c: Include tree-chkp.h, rtl-chkp.h.
	(expand_assignment): Handle returned bounds.
	(store_expr_with_bounds): New.  Replaces store_expr with new bounds
	target argument.  Handle bounds returned by calls.
	(store_expr): Now wraps store_expr_with_bounds.
	* expr.h (store_expr_with_bounds): New.
	* function.c: Include tree-chkp.h, rtl-chkp.h.
	(bounds_parm_data): New.
	(use_register_for_decl): Do not registerize decls used for bounds
	stores and loads.
	(assign_parms_augmented_arg_list): Add bounds of the result
	structure pointer as the second argument.
	(assign_parm_find_entry_rtl): Mark bounds are never passed on
	the stack.
	(assign_parm_is_stack_parm): Likewise.
	(assign_parm_load_bounds): New.
	(assign_bounds): New.
	(assign_parms): Load bounds and determine a location for
	returned bounds.
	(diddle_return_value_1): New.
	(diddle_return_value): Handle returned bounds.
	* function.h (rtl_data): Add field for returned bounds.
	* varasm.c: Include tree-chkp.h.
	(output_constant): Support POINTER_BOUNDS_TYPE.
	(output_constant_pool_2): Support MODE_POINTER_BOUNDS.
	(ultimate_transparent_alias_target): Move up.
	(make_decl_rtl): For instrumented function use
	name of the original decl.
	(assemble_start_function): Mark function as global
	in case it is instrumentation clone of the global
	function.
	(do_assemble_alias): Follow transparent alias chain
	for identifier.  Check if original alias is public.
	(maybe_assemble_visibility): Use visibility of the
	original function for instrumented version.
	(default_unique_section): Likewise.
	* emit-rtl.c (immed_double_const): Support MODE_POINTER_BOUNDS.
	(init_emit_once): Build pointer bounds zero constants.
	* explow.c (trunc_int_for_mode): Support MODE_POINTER_BOUNDS.
	* target.def (builtin_chkp_function): New.
	(chkp_bound_type): New.
	(chkp_bound_mode): New.
	(chkp_make_bounds_constant): New.
	(chkp_initialize_bounds): New.
	(load_bounds_for_arg): New.
	(store_bounds_for_arg): New.
	(load_returned_bounds): New.
	(store_returned_bounds): New.
	(chkp_function_value_bounds): New.
	(setup_incoming_vararg_bounds): New.
	(function_arg): Update hook description with new possible return
	value CONST_INT.
	* targhooks.h (default_load_bounds_for_arg): New.
	(default_store_bounds_for_arg): New.
	(default_load_returned_bounds): New.
	(default_store_returned_bounds): New.
	(default_chkp_bound_type): New.
	(default_chkp_bound_mode): New.
	(default_builtin_chkp_function): New.
	(default_chkp_function_value_bounds): New.
	(default_chkp_make_bounds_constant): New.
	(default_chkp_initialize_bounds): New.
	(default_setup_incoming_vararg_bounds): New.
	* targhooks.c (default_load_bounds_for_arg): New.
	(default_store_bounds_for_arg): New.
	(default_load_returned_bounds): New.
	(default_store_returned_bounds): New.
	(default_chkp_bound_type): New.
	(default_chkp_bound_mode); New.
	(default_builtin_chkp_function): New.
	(default_chkp_function_value_bounds): New.
	(default_chkp_make_bounds_constant): New.
	(default_chkp_initialize_bounds): New.
	(default_setup_incoming_vararg_bounds): New.
	* builtin-types.def (BT_BND): New.
	(BT_FN_PTR_CONST_PTR): New.
	(BT_FN_CONST_PTR_CONST_PTR): New.
	(BT_FN_BND_CONST_PTR): New.
	(BT_FN_CONST_PTR_BND): New.
	(BT_FN_PTR_CONST_PTR_SIZE): New.
	(BT_FN_PTR_CONST_PTR_CONST_PTR): New.
	(BT_FN_VOID_PTRPTR_CONST_PTR): New.
	(BT_FN_VOID_CONST_PTR_SIZE): New.
	(BT_FN_VOID_PTR_BND): New.
	(BT_FN_CONST_PTR_CONST_PTR_CONST_PTR): New.
	(BT_FN_BND_CONST_PTR_SIZE): New.
	(BT_FN_PTR_CONST_PTR_CONST_PTR_SIZE): New.
	(BT_FN_VOID_CONST_PTR_BND_CONST_PTR): New.
	* chkp-builtins.def: New.
	* builtins.def: include chkp-builtins.def.
	(DEF_CHKP_BUILTIN): New.
	* builtins.c: Include tree-chkp.h and rtl-chkp.h.
	(expand_builtin): Support BUILT_IN_CHKP_INIT_PTR_BOUNDS,
	BUILT_IN_CHKP_NULL_PTR_BOUNDS, BUILT_IN_CHKP_COPY_PTR_BOUNDS,
	BUILT_IN_CHKP_CHECK_PTR_LBOUNDS, BUILT_IN_CHKP_CHECK_PTR_UBOUNDS,
	BUILT_IN_CHKP_CHECK_PTR_BOUNDS, BUILT_IN_CHKP_SET_PTR_BOUNDS,
	BUILT_IN_CHKP_NARROW_PTR_BOUNDS, BUILT_IN_CHKP_STORE_PTR_BOUNDS,
	BUILT_IN_CHKP_GET_PTR_LBOUND, BUILT_IN_CHKP_GET_PTR_UBOUND,
	BUILT_IN_CHKP_BNDMK, BUILT_IN_CHKP_BNDSTX, BUILT_IN_CHKP_BNDCL,
	BUILT_IN_CHKP_BNDCU, BUILT_IN_CHKP_BNDLDX, BUILT_IN_CHKP_BNDRET,
	BUILT_IN_CHKP_INTERSECT, BUILT_IN_CHKP_NARROW,
	BUILT_IN_CHKP_EXTRACT_LOWER, BUILT_IN_CHKP_EXTRACT_UPPER.
	(std_expand_builtin_va_start): Init bounds for va_list.
	* cppbuiltin.c (define_builtin_macros_for_compilation_flags): Add
	__CHKP__ macro when Pointer Bounds Checker is on.
	* params.def (PARAM_CHKP_MAX_CTOR_SIZE): New.
	* passes.def (pass_ipa_chkp_versioning): New.
	(pass_early_local_passes): Renamed to pass_build_ssa_passes.
	(pass_fixup_cfg): Moved to pass_chkp_instrumentation_passes.
	(pass_chkp_instrumentation_passes): New.
	(pass_ipa_chkp_produce_thunks): New.
	(pass_local_optimization_passes): New.
	(pass_chkp_opt): New.
	* tree-pass.h (make_pass_ipa_chkp_versioning): New.
	(make_pass_ipa_chkp_produce_thunks): New.
	(make_pass_chkp): New.
	(make_pass_chkp_opt): New.
	(make_pass_early_local_passes): Renamed to ...
	(make_pass_build_ssa_passes): This.
	(make_pass_chkp_instrumentation_passes): New.
	(make_pass_local_optimization_passes): New.
	* passes.c (pass_manager::execute_early_local_passes): Execute
	early passes in three steps.
	(execute_all_early_local_passes): Renamed to ...
	(execute_build_ssa_passes): This.
	(pass_data_early_local_passes): Renamed to ...
	(pass_data_build_ssa_passes): This.
	(pass_early_local_passes): Renamed to ...
	(pass_build_ssa_passes): This.
	(pass_data_chkp_instrumentation_passes): New.
	(pass_chkp_instrumentation_passes): New.
	(pass_data_local_optimization_passes): New.
	(pass_local_optimization_passes): New.
	(make_pass_early_local_passes): Renamed to ...
	(make_pass_build_ssa_passes): This.
	(make_pass_chkp_instrumentation_passes): New.
	(make_pass_local_optimization_passes): New.
	* c-family/c.opt (fcheck-pointer-bounds): New.
	(fchkp-check-incomplete-type): New.
	(fchkp-zero-input-bounds-for-main): New.
	(fchkp-first-field-has-own-bounds): New.
	(fchkp-narrow-bounds): New.
	(fchkp-narrow-to-innermost-array): New.
	(fchkp-optimize): New.
	(fchkp-use-fast-string-functions): New.
	(fchkp-use-nochk-string-functions): New.
	(fchkp-use-static-bounds): New.
	(fchkp-use-static-const-bounds): New.
	(fchkp-treat-zero-dynamic-size-as-infinite): New.
	(fchkp-check-read): New.
	(fchkp-check-write): New.
	(fchkp-store-bounds): New.
	(fchkp-instrument-calls): New.
	(fchkp-instrument-marked-only): New.
	(Wchkp): New.
	* c-family/c-common.c (handle_bnd_variable_size_attribute): New.
	(handle_bnd_legacy): New.
	(handle_bnd_instrument): New.
	(c_common_attribute_table): Add bnd_variable_size, bnd_legacy
	and bnd_instrument.  Fix documentation.
	(c_common_format_attribute_table): Likewsie.
	* toplev.c: include tree-chkp.h.
	(process_options): Check Pointer Bounds Checker is supported.
	(compile_file): Add chkp_finish_file call.
	* ipa-cp.c (initialize_node_lattices): Use cgraph_local_p
	to handle instrumentation clones properly.
	(propagate_constants_accross_call): Do not propagate
	through instrumentation thunks.
	* ipa-pure-const.c (propagate_pure_const): Support
	IPA_REF_CHKP.
	* ipa-inline.c (early_inliner): Check edge has summary allocated.
	* ipa-split.c: Include tree-chkp.h.
	(find_retbnd): New.
	(split_part_set_ssa_name_p): New.
	(consider_split): Do not split retbnd and retval
	producers.
	(insert_bndret_call_after): new.
	(split_function): Propagate Pointer Bounds Checker
	instrumentation marks and handle returned bounds.
	* tree-ssa-sccvn.h (vn_reference_op_struct): Transform opcode
	into bit field and add with_bounds field.
	* tree-ssa-sccvn.c (copy_reference_ops_from_call): Set
	with_bounds field for instrumented calls.
	* tree-ssa-pre.c (create_component_ref_by_pieces_1): Restore
	CALL_WITH_BOUNDS_P flag for calls.
	* tree-ssa-ccp.c: Include tree-chkp.h.
	(insert_clobber_before_stack_restore): Handle
	BUILT_IN_CHKP_BNDRET calls.
	* tree-ssa-dce.c: Include tree-chkp.h.
	(propagate_necessity): For free call fed by alloc check
	bounds are also provided by the same alloc.
	(eliminate_unnecessary_stmts): Handle BUILT_IN_CHKP_BNDRET
	used by free calls.
	* tree-inline.c: Include tree-chkp.h.
	(declare_return_variable): Add arg holding
	returned bounds slot.  Create and initialize returned bounds var.
	(remap_gimple_stmt): Handle returned bounds.
	Return sequence of statements instead of a single statement.
	(insert_init_stmt): Add declaration.
	(remap_gimple_seq): Adjust to new remap_gimple_stmt signature.
	(copy_bb): Adjust to changed return type of remap_gimple_stmt.
	Properly handle bounds in va_arg_pack and va_arg_pack_len.
	(expand_call_inline): Handle returned bounds.  Add bounds copy
	for generated mem to mem assignments.
	* tree-inline.h (copy_body_data): Add fields retbnd and
	assign_stmts.
	* value-prof.c: Include tree-chkp.h.
	(gimple_ic): Support returned bounds.
	* ipa.c (cgraph_build_static_cdtor_1): Support contructors
	with "chkp ctor" and "bnd_legacy" attributes.
	(symtab_remove_unreachable_nodes): Keep initial values for
	pointer bounds to be used for checks eliminations.
	(process_references): Handle IPA_REF_CHKP.
	(walk_polymorphic_call_targets): Likewise.
	* ipa-visibility.c (cgraph_externally_visible_p): Mark
	instrumented 'main' as externally visible.
	(function_and_variable_visibility): Filter instrumentation
	thunks.
	* cgraph.h (cgraph_thunk_info): Add add_pointer_bounds_args
	field.
	(cgraph_node): Add instrumented_version, orig_decl and
	instrumentation_clone fields.
	(symtab_node::get_alias_target): Allow IPA_REF_CHKP reference.
	(varpool_node): Add need_bounds_init field.
	(cgraph_local_p): New.
	* cgraph.c: Include tree-chkp.h.
	(cgraph_node::remove): Fix instrumented_version
	of the referenced node if any.
	(cgraph_node::dump): Dump instrumentation_clone and
	instrumented_version fields.
	(cgraph_node::verify_node): Check correctness of IPA_REF_CHKP
	references and instrumentation thunks.
	(cgraph_can_remove_if_no_direct_calls_and_refs_p): Keep
	all not instrumented instrumentation clones alive.
	(cgraph_redirect_edge_call_stmt_to_callee): Support
	returned bounds.
	* cgraphbuild.c (rebuild_cgraph_edges): Rebuild IPA_REF_CHKP
	reference.
	(cgraph_rebuild_references): Likewise.
	* cgraphunit.c: Include tree-chkp.h.
	(assemble_thunks_and_aliases): Skip thunks calling instrumneted
	function version.
	(varpool_finalize_decl): Register statically initialized decls
	in Pointer Bounds Checker.
	(walk_polymorphic_call_targets): Do not mark generated call to
	__builtin_unreachable as with_bounds.
	(output_weakrefs): If there are both instrumented and original
	versions, output only one of them.
	(cgraph_node::expand_thunk): Set with_bounds flag
	for created call statement.
	* ipa-ref.h (ipa_ref_use): Add IPA_REF_CHKP.
	(ipa_ref): increase size of use field.
	* symtab.c (ipa_ref_use_name): Add element for IPA_REF_CHKP.
	* varpool.c (dump_varpool_node): Dump need_bounds_init field.
	(ctor_for_folding): Do not fold constant bounds vars.
	* lto-streamer.h (LTO_minor_version): Change minor version from
	0 to 1.
	* lto-cgraph.c (compute_ltrans_boundary): Keep initial values for
	pointer bounds.
	(lto_output_node): Output instrumentation_clone,
	thunk.add_pointer_bounds_args and orig_decl field.
	(lto_output_ref): Adjust to new ipa_ref::use field size.
	(input_overwrite_node): Read instrumentation_clone field.
	(input_node): Read thunk.add_pointer_bounds_args and orig_decl
	fields.
	(input_ref): Adjust to new ipa_ref::use field size.
	(input_cgraph_1): Compute instrumented_version fields and restore
	IDENTIFIER_TRANSPARENT_ALIAS chains.
	(lto_output_varpool_node): Output
	need_bounds_init value.
	(input_varpool_node): Read need_bounds_init value.
	* lto-partition.c (add_symbol_to_partition_1): Keep original
	and instrumented versions together.
	(privatize_symbol_name): Restore transparent alias chain if required.
	(add_references_to_partition): Add references to pointer bounds vars.
	* dbxout.c (dbxout_type): Ignore POINTER_BOUNDS_TYPE.
	* dwarf2out.c (gen_subprogram_die): Ignore bound args.
	(gen_type_die_with_usage): Skip pointer bounds.
	(dwarf2out_global_decl): Likewise.
	(is_base_type): Support POINTER_BOUNDS_TYPE.
	(gen_formal_types_die): Skip pointer bounds.
	(gen_decl_die): Likewise.
	* var-tracking.c (vt_add_function_parameters): Skip
	bounds parameters.
	* ipa-icf.c (sem_function::merge): Do not merge when instrumentation
	thunk still exists.
	(sem_variable::merge): Reset need_bounds_init flag.
	* doc/extend.texi: Document Pointer Bounds Checker built-in functions
	and attributes.
	* doc/tm.texi.in (TARGET_LOAD_BOUNDS_FOR_ARG): New.
	(TARGET_STORE_BOUNDS_FOR_ARG): New.
	(TARGET_LOAD_RETURNED_BOUNDS): New.
	(TARGET_STORE_RETURNED_BOUNDS): New.
	(TARGET_CHKP_FUNCTION_VALUE_BOUNDS): New.
	(TARGET_SETUP_INCOMING_VARARG_BOUNDS): New.
	(TARGET_BUILTIN_CHKP_FUNCTION): New.
	(TARGET_CHKP_BOUND_TYPE): New.
	(TARGET_CHKP_BOUND_MODE): New.
	(TARGET_CHKP_MAKE_BOUNDS_CONSTANT): New.
	(TARGET_CHKP_INITIALIZE_BOUNDS): New.
	* doc/tm.texi: Regenerated.
	* doc/rtl.texi (MODE_POINTER_BOUNDS): New.
	(BND32mode): New.
	(BND64mode): New.
	* doc/invoke.texi (-mmpx): New.
	(-mno-mpx): New.
	(chkp-max-ctor-size): New.
	* config/i386/constraints.md (w): New.
	(Ti): New.
	(Tb): New.
	* config/i386/i386-c.c (ix86_target_macros_internal): Add __MPX__.
	* config/i386/i386-modes.def (BND32): New.
	(BND64): New.
	* config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): New.
	* config/i386/i386.c: Include tree-chkp.h, rtl-chkp.h, tree-iterator.h.
	(regclass_map): Add bound registers.
	(dbx_register_map): Likewise.
	(dbx64_register_map): Likewise.
	(svr4_dbx_register_map): Likewise.
	(isa_opts): Add -mmpx.
	(PTA_MPX): New.
	(ix86_option_override_internal): Support MPX ISA.
	(ix86_conditional_register_usage): Support bound registers.
	(ix86_code_end): Add MPX bnd prefix.
	(output_set_got): Likewise.
	(print_reg): Avoid prefixes for bound registers.
	(ix86_print_operand): Add '!' (MPX bnd) print prefix support.
	(ix86_print_operand_punct_valid_p): Likewise.
	(ix86_print_operand_address): Support UNSPEC_BNDMK_ADDR and
	UNSPEC_BNDLDX_ADDR.
	(ix86_output_call_insn): Add MPX bnd prefix to branch instructions.
	(ix86_class_likely_spilled_p): Add bound regs support.
	(ix86_hard_regno_mode_ok): Likewise.
	(x86_order_regs_for_local_alloc): Likewise.
	(ix86_bnd_prefixed_insn_p): New.
	(ix86_builtins): Add
	IX86_BUILTIN_BNDMK, IX86_BUILTIN_BNDSTX,
	IX86_BUILTIN_BNDLDX, IX86_BUILTIN_BNDCL,
	IX86_BUILTIN_BNDCU, IX86_BUILTIN_BNDRET,
	IX86_BUILTIN_BNDNARROW, IX86_BUILTIN_BNDINT,
	IX86_BUILTIN_SIZEOF, IX86_BUILTIN_BNDLOWER,
	IX86_BUILTIN_BNDUPPER.
	(builtin_isa): Add leaf_p and nothrow_p fields.
	(def_builtin): Initialize leaf_p and nothrow_p.
	(ix86_add_new_builtins): Handle leaf_p and nothrow_p
	flags.
	(bdesc_mpx): New.
	(bdesc_mpx_const): New.
	(ix86_init_mpx_builtins): New.
	(ix86_init_builtins): Call ix86_init_mpx_builtins.
	(ix86_emit_cmove): New.
	(ix86_emit_move_max): New.
	(ix86_expand_builtin): Expand IX86_BUILTIN_BNDMK,
	IX86_BUILTIN_BNDSTX, IX86_BUILTIN_BNDLDX,
	IX86_BUILTIN_BNDCL, IX86_BUILTIN_BNDCU,
	IX86_BUILTIN_BNDRET, IX86_BUILTIN_BNDNARROW,
	IX86_BUILTIN_BNDINT, IX86_BUILTIN_SIZEOF,
	IX86_BUILTIN_BNDLOWER, IX86_BUILTIN_BNDUPPER.
	(ix86_function_value_bounds): New.
	(ix86_builtin_mpx_function): New.
	(ix86_get_arg_address_for_bt): New.
	(ix86_load_bounds): New.
	(ix86_store_bounds): New.
	(ix86_load_returned_bounds): New.
	(ix86_store_returned_bounds): New.
	(ix86_mpx_bound_mode): New.
	(ix86_make_bounds_constant): New.
	(ix86_initialize_bounds):
	(TARGET_LOAD_BOUNDS_FOR_ARG): New.
	(TARGET_STORE_BOUNDS_FOR_ARG): New.
	(TARGET_LOAD_RETURNED_BOUNDS): New.
	(TARGET_STORE_RETURNED_BOUNDS): New.
	(TARGET_CHKP_BOUND_MODE): New.
	(TARGET_BUILTIN_CHKP_FUNCTION): New.
	(TARGET_CHKP_FUNCTION_VALUE_BOUNDS): New.
	(TARGET_CHKP_MAKE_BOUNDS_CONSTANT): New.
	(TARGET_CHKP_INITIALIZE_BOUNDS): New.
	(ix86_option_override_internal): Do not
	support x32 with MPX.
	(init_cumulative_args): Init stdarg, bnd_regno, bnds_in_bt
	and force_bnd_pass.
	(function_arg_advance_32): Return number of used integer
	registers.
	(function_arg_advance_64): Likewise.
	(function_arg_advance_ms_64): Likewise.
	(ix86_function_arg_advance): Handle pointer bounds.
	(ix86_function_arg): Likewise.
	(ix86_function_value_regno_p): Mark fisrt bounds registers as
	possible function value.
	(ix86_function_value_1): Handle pointer bounds type/mode
	(ix86_return_in_memory): Likewise.
	(ix86_print_operand): Analyse insn to decide abounf "bnd" prefix.
	(ix86_expand_call): Generate returned bounds.
	(ix86_setup_incoming_vararg_bounds): New.
	(ix86_va_start): Initialize bounds for pointers in va_list.
	(TARGET_SETUP_INCOMING_VARARG_BOUNDS): New.
	* config/i386/i386.h (TARGET_MPX): New.
	(TARGET_MPX_P): New.
	(FIRST_PSEUDO_REGISTER): Fix to new value.
	(FIXED_REGISTERS): Add bound registers.
	(CALL_USED_REGISTERS): Likewise.
	(REG_ALLOC_ORDER): Likewise.
	(HARD_REGNO_NREGS): Likewise.
	(VALID_BND_REG_MODE): New.
	(FIRST_BND_REG): New.
	(LAST_BND_REG): New.
	(reg_class): Add BND_REGS.
	(REG_CLASS_NAMES): Likewise.
	(REG_CLASS_CONTENTS): Likewise.
	(BND_REGNO_P): New.
	(ANY_BND_REG_P): New.
	(BNDmode): New.
	(HI_REGISTER_NAMES): Add bound registers.
	(ix86_args): Add bnd_regno, bnds_in_bt,	force_bnd_pass and
	stdarg fields.
	* config/i386/i386.md (UNSPEC_BNDMK): New.
	(UNSPEC_BNDMK_ADDR): New.
	(UNSPEC_BNDSTX): New.
	(UNSPEC_BNDLDX): New.
	(UNSPEC_BNDLDX_ADDR): New.
	(UNSPEC_BNDCL): New.
	(UNSPEC_BNDCU): New.
	(UNSPEC_BNDCN): New.
	(UNSPEC_MPX_FENCE): New.
	(UNSPEC_SIZEOF): New.
	(BND0_REG): New.
	(BND1_REG): New.
	(type): Add mpxmov, mpxmk, mpxchk, mpxld, mpxst.
	(length_immediate): Support mpxmov, mpxmk, mpxchk, mpxld, mpxst.
	(prefix_rep): Check for bnd prefix.
	(prefix_0f): Support mpxmov, mpxmk, mpxchk, mpxld, mpxst.
	(length_nobnd): New.
	(length): Use length_nobnd when specified.
	(memory): Support mpxmov, mpxmk, mpxchk, mpxld, mpxst.
	(BND): New.
	(bnd_ptr): New.
	(BNDCHECK): New.
	(bndcheck): New.
	(*jcc_1): Add MPX bnd prefix.
	(*jcc_2): Likewise.
	(jump): Likewise.
	(*indirect_jump): Likewise.
	(*tablejump_1): Likewise.
	(simple_return_internal): Likewise.
	(simple_return_internal_long): Likewise.
	(simple_return_pop_internal): Likewise.
	(simple_return_indirect_internal): Likewise.
	(<mode>_mk): New.
	(*<mode>_mk): New.
	(mov<mode>): New.
	(*mov<mode>_internal_mpx): New.
	(<mode>_<bndcheck>): New.
	(*<mode>_<bndcheck>): New.
	(<mode>_ldx): New.
	(*<mode>_ldx): New.
	(<mode>_stx): New.
	(*<mode>_stx): New.
	move_size_reloc_<mode>): New.
	* config/i386/predicates.md (address_mpx_no_base_operand): New.
	(address_mpx_no_index_operand): New.
	(bnd_mem_operator): New.
	(symbol_operand): New.
	(x86_64_immediate_size_operand): New.
	* config/i386/i386.opt (mmpx): New.
	* config/i386/i386-builtin-types.def (BND): New.
	(ULONG): New.
	(BND_FTYPE_PCVOID_ULONG): New.
	(VOID_FTYPE_BND_PCVOID): New.
	(VOID_FTYPE_PCVOID_PCVOID_BND): New.
	(BND_FTYPE_PCVOID_PCVOID): New.
	(BND_FTYPE_PCVOID): New.
	(BND_FTYPE_BND_BND): New.
	(PVOID_FTYPE_PVOID_PVOID_ULONG): New.
	(PVOID_FTYPE_PCVOID_BND_ULONG): New.
	(ULONG_FTYPE_VOID): New.
	(PVOID_FTYPE_BND): New.

gcc/testsuite/

2014-11-05  Ilya Enkovich  <ilya.enkovich@intel.com>

	* gcc.target/i386/chkp-builtins-1.c: New.
	* gcc.target/i386/chkp-builtins-2.c: New.
	* gcc.target/i386/chkp-builtins-3.c: New.
	* gcc.target/i386/chkp-builtins-4.c: New.
	* gcc.target/i386/chkp-remove-bndint-1.c: New.
	* gcc.target/i386/chkp-remove-bndint-2.c: New.
	* gcc.target/i386/chkp-const-check-1.c: New.
	* gcc.target/i386/chkp-const-check-2.c: New.
	* gcc.target/i386/chkp-lifetime-1.c: New.
	* gcc.dg/pr37858.c: Replace early_local_cleanups pass name
	with build_ssa_passes.

From-SVN: r217125
2014-11-05 12:42:03 +00:00
Richard Sandiford ef4bddc299 decl.c, [...]: Remove redundant enum from machine_mode.
gcc/ada/
	* gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c,
	gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c:
	Remove redundant enum from machine_mode.

gcc/c-family/
	* c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
	enum from machine_mode.

gcc/c/
	* c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
	machine_mode.

gcc/cp/
	* constexpr.c: Remove redundant enum from machine_mode.

gcc/fortran/
	* trans-types.c, trans-types.h: Remove redundant enum from
	machine_mode.

gcc/go/
	* go-lang.c: Remove redundant enum from machine_mode.

gcc/java/
	* builtins.c, java-tree.h, typeck.c: Remove redundant enum from
	machine_mode.

gcc/lto/
	* lto-lang.c: Remove redundant enum from machine_mode.

gcc/
	* addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c,
	builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h,
	cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c,
	config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md,
	config/aarch64/aarch64.c, config/aarch64/aarch64.h,
	config/aarch64/aarch64.md, config/alpha/alpha-protos.h,
	config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c,
	config/arc/arc.h, config/arc/predicates.md,
	config/arm/aarch-common-protos.h, config/arm/aarch-common.c,
	config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h,
	config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md,
	config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c,
	config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c,
	config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md,
	config/cr16/cr16-protos.h, config/cr16/cr16.c,
	config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md,
	config/darwin-protos.h, config/darwin.c,
	config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c,
	config/epiphany/epiphany.md, config/fr30/fr30.c,
	config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md,
	config/h8300/h8300-protos.h, config/h8300/h8300.c,
	config/i386/i386-builtin-types.awk, config/i386/i386-protos.h,
	config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md,
	config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h,
	config/ia64/ia64.c, config/iq2000/iq2000-protos.h,
	config/iq2000/iq2000.c, config/iq2000/iq2000.md,
	config/lm32/lm32-protos.h, config/lm32/lm32.c,
	config/m32c/m32c-protos.h, config/m32c/m32c.c,
	config/m32r/m32r-protos.h, config/m32r/m32r.c,
	config/m68k/m68k-protos.h, config/m68k/m68k.c,
	config/mcore/mcore-protos.h, config/mcore/mcore.c,
	config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c,
	config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c,
	config/mips/mips-protos.h, config/mips/mips.c,
	config/mmix/mmix-protos.h, config/mmix/mmix.c,
	config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c,
	config/moxie/moxie.c, config/msp430/msp430-protos.h,
	config/msp430/msp430.c, config/nds32/nds32-cost.c,
	config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c,
	config/nds32/nds32-protos.h, config/nds32/nds32.c,
	config/nios2/nios2-protos.h, config/nios2/nios2.c,
	config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h,
	config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c,
	config/rs6000/altivec.md, config/rs6000/rs6000-c.c,
	config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c,
	config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c,
	config/s390/predicates.md, config/s390/s390-protos.h,
	config/s390/s390.c, config/s390/s390.h, config/s390/s390.md,
	config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c,
	config/sh/sh.md, config/sparc/predicates.md,
	config/sparc/sparc-protos.h, config/sparc/sparc.c,
	config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c,
	config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c,
	config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c,
	config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h,
	config/tilepro/tilepro.c, config/v850/v850-protos.h,
	config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h,
	config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h,
	config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h,
	dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi,
	doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c,
	dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h,
	except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c,
	fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h,
	fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c,
	genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c,
	graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c,
	internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c,
	ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h,
	libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c,
	loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c,
	lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c,
	lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h,
	output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h,
	recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c,
	regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h,
	rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c,
	sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c,
	simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def,
	targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c,
	tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c,
	tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c,
	tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c,
	tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c,
	tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c,
	tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c,
	tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c,
	tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c,
	tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c,
	var-tracking.c, varasm.c: Remove redundant enum from
	machine_mode.
gcc/
	* gengtype.c (main): Treat machine_mode as a scalar typedef.
	* genmodes.c (emit_insn_modes_h): Hide inline functions if
	USED_FOR_TARGET.

From-SVN: r216834
2014-10-29 12:02:45 +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
DJ Delorie 949bba26ff tree.c (build_common_tree_nodes): Don't even store the __int128 types if they're not supported.
* tree.c (build_common_tree_nodes): Don't even store the
__int128 types if they're not supported.

From-SVN: r216762
2014-10-27 14:54:42 -04:00
Andrew MacLeod 60393bbc61 ggcplug.c: Shuffle includes to include gcc-plugin.h earlier.
2014-10-27  Andrew MacLeod  <amacleod@redhat.com>

	* testsuite/gcc.dg/plugin/ggcplug.c: Shuffle includes to include
	gcc-plugin.h earlier.

2014-10-27  Andrew MacLeod  <amacleod@redhat.com>

	* c/c-typeck.c: Adjust include files.

2014-10-27  Andrew MacLeod  <amacleod@redhat.com>

	* c-family/c-gimplify.c: Adjust include files.

2014-10-27  Andrew MacLeod  <amacleod@redhat.com>

	* cp/cp-gimplify.c: Adjust include files.

2014-10-27  Andrew MacLeod  <amacleod@redhat.com>

	* go/go-gcc.cc: Adjust include files.
	* go/go-lang.c: Ditto.

2014-10-27  Andrew MacLeod  <amacleod@redhat.com>

	* java/java-gimplify.c: Adjust include files.

2014-10-27  Andrew MacLeod  <amacleod@redhat.com>

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

2014-10-27  Andrew MacLeod  <amacleod@redhat.com>

	* basic-block.h: Remove all includes.
	(enum profile_status_d, struct control_flow_graph): Move to cfg.h
	* cfg.h (profile_status_d, struct control_flow_graph): Relocate here.
	* Makefile.in (GTFILES): Add cfg.h to list.
	* cgraph.h (symbol_table::create_empty): Move to cgraph.c.
	* cgraph.c (symbol_table::create_empty): Relocate from cgraph.h.
	* genconditions.c (write_header): Add predict.h and basic-block.h to
	lits of includes.
	* genemit.c (main): Ditto.
	* genpreds.c (write_insn_preds_c): Ditto.
	* genrecog.c (write_header): Ditto.
	* gengtype.c (open_base_files): Add predict.h, basic-block.h, and cfg.h
	to list of includes.
	* alias.c: Adjust include files.
	* asan.c: Ditto.
	* auto-inc-dec.c: Ditto.
	* auto-profile.c: Ditto.
	* bb-reorder.c: Ditto.
	* bt-load.c: Ditto.
	* builtins.c: Ditto.
	* caller-save.c: Ditto.
	* calls.c: Ditto.
	* cfg.c: Ditto.
	* cfganal.c: Ditto.
	* cfgbuild.c: Ditto.
	* cfgcleanup.c: Ditto.
	* cfgexpand.c: Ditto.
	* cfghooks.c: Ditto.
	* cfgloop.c: Ditto.
	* cfgloopanal.c: Ditto.
	* cfgloopmanip.c: Ditto.
	* cfgrtl.c: Ditto.
	* cgraphbuild.c: Ditto.
	* cgraphclones.c: Ditto.
	* cgraphunit.c: Ditto.
	* combine-stack-adj.c: Ditto.
	* combine.c: Ditto.
	* compare-elim.c: Ditto.
	* coverage.c: Ditto.
	* cprop.c: Ditto.
	* cse.c: Ditto.
	* cselib.c: Ditto.
	* data-streamer-in.c: Ditto.
	* data-streamer-out.c: Ditto.
	* data-streamer.c: Ditto.
	* dce.c: Ditto.
	* ddg.c: Ditto.
	* ddg.h: Ditto.
	* df-core.c: Ditto.
	* df-problems.c: Ditto.
	* df-scan.c: Ditto.
	* df.h: Ditto.
	* dojump.c: Ditto.
	* dominance.c: Ditto.
	* domwalk.c: Ditto.
	* dse.c: Ditto.
	* dwarf2cfi.c: Ditto.
	* emit-rtl.c: Ditto.
	* et-forest.c: Ditto.
	* except.c: Ditto.
	* expmed.c: Ditto.
	* expr.c: Ditto.
	* final.c: Ditto.
	* fold-const.c: Ditto.
	* function.c: Ditto.
	* fwprop.c: Ditto.
	* gcc-plugin.h: Ditto.
	* gcse.c: Ditto.
	* generic-match-head.c: Ditto.
	* ggc-page.c: Ditto.
	* gimple-builder.c: Ditto.
	* gimple-expr.c: Ditto.
	* gimple-fold.c: Ditto.
	* gimple-iterator.c: Ditto.
	* gimple-low.c: Ditto.
	* gimple-match-head.c: Ditto.
	* gimple-pretty-print.c: Ditto.
	* gimple-ssa-isolate-paths.c: Ditto.
	* gimple-ssa-strength-reduction.c: Ditto.
	* gimple-streamer-in.c: Ditto.
	* gimple-streamer-out.c: Ditto.
	* gimple-streamer.h: Ditto.
	* gimple-walk.c: Ditto.
	* gimple.c: Ditto.
	* gimplify-me.c: Ditto.
	* gimplify.c: Ditto.
	* graph.c: Ditto.
	* graphite-blocking.c: Ditto.
	* graphite-clast-to-gimple.c: Ditto.
	* graphite-dependences.c: Ditto.
	* graphite-interchange.c: Ditto.
	* graphite-isl-ast-to-gimple.c: Ditto.
	* graphite-optimize-isl.c: Ditto.
	* graphite-poly.c: Ditto.
	* graphite-scop-detection.c: Ditto.
	* graphite-sese-to-poly.c: Ditto.
	* graphite.c: Ditto.
	* haifa-sched.c: Ditto.
	* hw-doloop.c: Ditto.
	* ifcvt.c: Ditto.
	* init-regs.c: Ditto.
	* internal-fn.c: Ditto.
	* ipa-cp.c: Ditto.
	* ipa-devirt.c: Ditto.
	* ipa-icf-gimple.c: Ditto.
	* ipa-icf.c: Ditto.
	* ipa-inline-analysis.c: Ditto.
	* ipa-inline.c: Ditto.
	* ipa-polymorphic-call.c: Ditto.
	* ipa-profile.c: Ditto.
	* ipa-prop.c: Ditto.
	* ipa-pure-const.c: Ditto.
	* ipa-reference.c: Ditto.
	* ipa-split.c: Ditto.
	* ipa-utils.c: Ditto.
	* ipa.c: Ditto.
	* ira-build.c: Ditto.
	* ira-color.c: Ditto.
	* ira-conflicts.c: Ditto.
	* ira-costs.c: Ditto.
	* ira-emit.c: Ditto.
	* ira-lives.c: Ditto.
	* ira.c: Ditto.
	* jump.c: Ditto.
	* lcm.c: Ditto.
	* loop-doloop.c: Ditto.
	* loop-init.c: Ditto.
	* loop-invariant.c: Ditto.
	* loop-iv.c: Ditto.
	* loop-unroll.c: Ditto.
	* lower-subreg.c: Ditto.
	* lra-assigns.c: Ditto.
	* lra-coalesce.c: Ditto.
	* lra-constraints.c: Ditto.
	* lra-eliminations.c: Ditto.
	* lra-lives.c: Ditto.
	* lra-spills.c: Ditto.
	* lra.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-in.c: Ditto.
	* lto-streamer-out.c: Ditto.
	* lto-streamer.c: Ditto.
	* mcf.c: Ditto.
	* mode-switching.c: Ditto.
	* modulo-sched.c: Ditto.
	* omp-low.c: Ditto.
	* optabs.c: Ditto.
	* opts-global.c: Ditto.
	* passes.c: Ditto.
	* postreload-gcse.c: Ditto.
	* postreload.c: Ditto.
	* predict.c: Ditto.
	* print-rtl.c: Ditto.
	* profile.c: Ditto.
	* recog.c: Ditto.
	* ree.c: Ditto.
	* reg-stack.c: Ditto.
	* regcprop.c: Ditto.
	* regcprop.h: Ditto.
	* reginfo.c: Ditto.
	* regrename.c: Ditto.
	* regstat.c: Ditto.
	* reload.c: Ditto.
	* reload1.c: Ditto.
	* reorg.c: Ditto.
	* resource.c: Ditto.
	* rtlanal.c: Ditto.
	* sched-deps.c: Ditto.
	* sched-ebb.c: Ditto.
	* sched-int.h: Ditto.
	* sched-rgn.c: Ditto.
	* sched-vis.c: Ditto.
	* sel-sched-dump.c: Ditto.
	* sel-sched-ir.c: Ditto.
	* sel-sched-ir.h: Ditto.
	* sel-sched.c: Ditto.
	* sese.c: Ditto.
	* shrink-wrap.c: Ditto.
	* stack-ptr-mod.c: Ditto.
	* stmt.c: Ditto.
	* store-motion.c: Ditto.
	* symtab.c: Ditto.
	* toplev.c: Ditto.
	* tracer.c: Ditto.
	* trans-mem.c: Ditto.
	* tree-affine.c: Ditto.
	* tree-call-cdce.c: Ditto.
	* tree-cfg.c: Ditto.
	* tree-cfgcleanup.c: Ditto.
	* tree-chrec.c: Ditto.
	* tree-complex.c: Ditto.
	* tree-data-ref.c: Ditto.
	* tree-dfa.c: Ditto.
	* tree-eh.c: Ditto.
	* tree-emutls.c: Ditto.
	* tree-if-conv.c: Ditto.
	* tree-inline.c: Ditto.
	* tree-into-ssa.c: Ditto.
	* tree-loop-distribution.c: Ditto.
	* tree-nested.c: Ditto.
	* tree-nrv.c: Ditto.
	* tree-object-size.c: Ditto.
	* tree-outof-ssa.c: Ditto.
	* tree-parloops.c: Ditto.
	* tree-phinodes.c: Ditto.
	* tree-predcom.c: Ditto.
	* tree-pretty-print.c: Ditto.
	* tree-profile.c: Ditto.
	* tree-scalar-evolution.c: Ditto.
	* tree-sra.c: Ditto.
	* tree-ssa-address.c: Ditto.
	* tree-ssa-alias.c: Ditto.
	* tree-ssa-ccp.c: Ditto.
	* tree-ssa-coalesce.c: Ditto.
	* tree-ssa-copy.c: Ditto.
	* tree-ssa-copyrename.c: Ditto.
	* tree-ssa-dce.c: Ditto.
	* tree-ssa-dom.c: Ditto.
	* tree-ssa-dse.c: Ditto.
	* tree-ssa-forwprop.c: Ditto.
	* tree-ssa-ifcombine.c: Ditto.
	* tree-ssa-live.c: Ditto.
	* tree-ssa-loop-ch.c: Ditto.
	* tree-ssa-loop-im.c: Ditto.
	* tree-ssa-loop-ivcanon.c: Ditto.
	* tree-ssa-loop-ivopts.c: Ditto.
	* tree-ssa-loop-manip.c: Ditto.
	* tree-ssa-loop-niter.c: Ditto.
	* tree-ssa-loop-prefetch.c: Ditto.
	* tree-ssa-loop-unswitch.c: Ditto.
	* tree-ssa-loop.c: Ditto.
	* tree-ssa-math-opts.c: Ditto.
	* tree-ssa-operands.c: Ditto.
	* tree-ssa-phiopt.c: Ditto.
	* tree-ssa-phiprop.c: Ditto.
	* tree-ssa-pre.c: Ditto.
	* tree-ssa-propagate.c: Ditto.
	* tree-ssa-reassoc.c: Ditto.
	* tree-ssa-sccvn.c: Ditto.
	* tree-ssa-sink.c: Ditto.
	* tree-ssa-strlen.c: Ditto.
	* tree-ssa-structalias.c: Ditto.
	* tree-ssa-tail-merge.c: Ditto.
	* tree-ssa-ter.c: Ditto.
	* tree-ssa-threadedge.c: Ditto.
	* tree-ssa-threadupdate.c: Ditto.
	* tree-ssa-uncprop.c: Ditto.
	* tree-ssa-uninit.c: Ditto.
	* tree-ssa.c: Ditto.
	* tree-ssanames.c: Ditto.
	* tree-stdarg.c: Ditto.
	* tree-streamer-in.c: Ditto.
	* tree-streamer-out.c: Ditto.
	* tree-streamer.c: Ditto.
	* tree-switch-conversion.c: Ditto.
	* tree-tailcall.c: Ditto.
	* tree-vect-data-refs.c: Ditto.
	* tree-vect-generic.c: Ditto.
	* tree-vect-loop-manip.c: Ditto.
	* tree-vect-loop.c: Ditto.
	* tree-vect-patterns.c: Ditto.
	* tree-vect-slp.c: Ditto.
	* tree-vect-stmts.c: Ditto.
	* tree-vectorizer.c: Ditto.
	* tree-vrp.c: Ditto.
	* tree.c: Ditto.
	* tsan.c: Ditto.
	* ubsan.c: Ditto.
	* valtrack.c: Ditto.
	* valtrack.h: Ditto.
	* value-prof.c: Ditto.
	* var-tracking.c: Ditto.
	* varasm.c: Ditto.
	* varpool.c: Ditto.
	* vtable-verify.c: Ditto.
	* web.c: Ditto.
	* config/aarch64/aarch64-builtins.c: Ditto.
	* config/aarch64/aarch64.c: Ditto.
	* config/alpha/alpha.c: Ditto.
	* config/arc/arc.c: Ditto.
	* config/arm/arm.c: Ditto.
	* config/avr/avr.c: Ditto.
	* config/bfin/bfin.c: Ditto.
	* config/c6x/c6x.c: Ditto.
	* config/cr16/cr16.c: Ditto.
	* config/cris/cris.c: Ditto.
	* config/darwin-c.c: Ditto.
	* config/darwin.c: Ditto.
	* config/epiphany/epiphany.c: Ditto.
	* config/epiphany/mode-switch-use.c: Ditto.
	* config/epiphany/resolve-sw-modes.c: Ditto.
	* config/fr30/fr30.c: Ditto.
	* config/frv/frv.c: Ditto.
	* config/h8300/h8300.c: Ditto.
	* config/i386/i386.c: Ditto.
	* config/i386/winnt.c: Ditto.
	* config/ia64/ia64.c: Ditto.
	* config/iq2000/iq2000.c: Ditto.
	* config/lm32/lm32.c: Ditto.
	* config/m32c/m32c.c: Ditto.
	* config/m32r/m32r.c: Ditto.
	* config/m68k/m68k.c: Ditto.
	* config/mcore/mcore.c: Ditto.
	* config/mep/mep.c: Ditto.
	* config/microblaze/microblaze.c: Ditto.
	* config/mips/mips.c: Ditto.
	* config/mmix/mmix.c: Ditto.
	* config/mn10300/mn10300.c: Ditto.
	* config/moxie/moxie.c: Ditto.
	* config/msp430/msp430.c: Ditto.
	* config/nds32/nds32-cost.c: Ditto.
	* config/nds32/nds32-fp-as-gp.c: Ditto.
	* config/nds32/nds32-intrinsic.c: Ditto.
	* config/nds32/nds32-isr.c: Ditto.
	* config/nds32/nds32-md-auxiliary.c: Ditto.
	* config/nds32/nds32-memory-manipulation.c: Ditto.
	* config/nds32/nds32-pipelines-auxiliary.c: Ditto.
	* config/nds32/nds32-predicates.c: Ditto.
	* config/nds32/nds32.c: Ditto.
	* config/nios2/nios2.c: Ditto.
	* config/pa/pa.c: Ditto.
	* config/pdp11/pdp11.c: Ditto.
	* config/rl78/rl78.c: Ditto.
	* config/rs6000/rs6000.c: Ditto.
	* config/rx/rx.c: Ditto.
	* config/s390/s390.c: Ditto.
	* config/sh/sh-mem.cc: Ditto.
	* config/sh/sh.c: Ditto.
	* config/sh/sh_optimize_sett_clrt.cc: Ditto.
	* config/sh/sh_treg_combine.cc: Ditto.
	* config/sparc/sparc.c: Ditto.
	* config/spu/spu.c: Ditto.
	* config/stormy16/stormy16.c: Ditto.
	* config/tilegx/tilegx.c: Ditto.
	* config/tilepro/tilepro.c: Ditto.
	* config/v850/v850.c: Ditto.
	* config/vax/vax.c: Ditto.
	* config/xtensa/xtensa.c: Ditto.

From-SVN: r216735
2014-10-27 12:41:01 +00:00
Richard Biener a342326069 fold-const.c (fold_comparison): Remove redundant constant folding and operand swapping.
2014-10-17  Richard Biener  <rguenther@suse.de>

	* fold-const.c (fold_comparison): Remove redundant constant
	folding and operand swapping.
	(fold_binary_loc): Do comparison operand swapping here.
	(fold_ternary_loc): Canonicalize operand order for
	commutative ternary operations.
	* tree.c (commutative_ternary_tree_code): Add DOT_PROD_EXPR
	and FMA_EXPR.

From-SVN: r216394
2014-10-17 11:32:12 +00:00
Andrew MacLeod 8368551493 function.h: Flatten file.
2014-10-16  Andrew MacLeod  <amacleod@redhat.com>

	* function.h: Flatten file.  Remove includes, adjust prototypes to 
	reflect only what is in function.h.
	(enum direction, struct args_size, struct locate_and_pad_arg_data,
	ADD_PARM_SIZE, SUB_PARM_SIZE, ARGS_SIZE_TREE, ARGS_SIZE_RTX): Relocate
	from expr.h.
	(ASLK_REDUCE_ALIGN, ASLK_RECORD_PAD): Relocate from rtl.h.
	(optimize_function_for_size_p, optimize_function_for_speed_p): Move
	prototypes to predict.h.
	(init_varasm_status): Move prototype to varasm.h.
	* expr.h: Adjust include files.
	(enum direction, struct args_size, struct locate_and_pad_arg_data,
	ADD_PARM_SIZE, SUB_PARM_SIZE, ARGS_SIZE_TREE, ARGS_SIZE_RTX): Move
	to function.h.
	(locate_and_pad_parm): Move prototype to function.h.
	* rtl.h: (assign_stack_local, ASLK_REDUCE_ALIGN, ASLK_RECORD_PAD,
	assign_stack_local_1, assign_stack_temp, assign_stack_temp_for_type,
	assign_temp, reposition_prologue_and_epilogue_notes,
	prologue_epilogue_contains, sibcall_epilogue_contains,
	update_temp_slot_address, maybe_copy_prologue_epilogue_insn,
	set_return_jump_label): Move prototypes to function.h.
	* predict.h (optimize_function_for_size_p,
	optimize_function_for_speed_p): Relocate prototypes from function.h.
	* shrink-wrap.h (emit_return_into_block, active_insn_between,
	convert_jumps_to_returns, emit_return_for_exit): Move prototypes to
	function.h.
	* varasm.h (init_varasm_status): Relocate prototype from function.h.
	* genattrtab.c (write_header): Add predict.h to include list.
	* genconditions.c (write_header): Add predict.h to include list.
	* genemit.c (main): Adjust header file includes.
	* gengtype.c (ifiles): Add flattened function.h header files.
	* genoutput.c (output_prologue): Add predict.h to include list.
	* genpreds.c (write_insn_preds_c): Adjust header file includes.
	* genrecog.c (write_header): Add flattened function.h header files.
	* alias.c: Adjust include files.
	* auto-inc-dec.c: Likewise.
	* basic-block.h: Likewise.
	* bb-reorder.c: Likewise.
	* bt-load.c: Likewise.
	* builtins.c: Likewise.
	* caller-save.c: Likewise.
	* calls.c: Likewise.
	* cfgbuild.c: Likewise.
	* cfgcleanup.c: Likewise.
	* cfgexpand.c: Likewise.
	* cfgloop.c: Likewise.
	* cfgloop.h: Likewise.
	* cfgrtl.c: Likewise.
	* cgraph.h: Likewise.
	* cgraphclones.c: Likewise.
	* cgraphunit.c: Likewise.
	* combine-stack-adj.c: Likewise.
	* combine.c: Likewise.
	* coverage.c: Likewise.
	* cprop.c: Likewise.
	* cse.c: Likewise.
	* cselib.c: Likewise.
	* dbxout.c: Likewise.
	* ddg.c: Likewise.
	* df-core.c: Likewise.
	* df-problems.c: Likewise.
	* df-scan.c: Likewise.
	* dojump.c: Likewise.
	* dwarf2cfi.c: Likewise.
	* dwarf2out.c: Likewise.
	* emit-rtl.c: Likewise.
	* except.c: Likewise.
	* explow.c: Likewise.
	* expr.c: Likewise.
	* final.c: Likewise.
	* function.c: Likewise.
	* gcse.c: Likewise.
	* gimple-fold.c: Likewise.
	* gimple-low.c: Likewise.
	* gimple-streamer.h: Likewise.
	* haifa-sched.c: Likewise.
	* ifcvt.c: Likewise.
	* ira.c: Likewise.
	* jump.c: Likewise.
	* lcm.c: Likewise.
	* loop-invariant.c: Likewise.
	* lra-assigns.c: Likewise.
	* lra-coalesce.c: Likewise.
	* lra-constraints.c: Likewise.
	* lra-eliminations.c: Likewise.
	* lra-lives.c: Likewise.
	* lra-spills.c: Likewise.
	* lra.c: Likewise.
	* lto-cgraph.c: Likewise.
	* lto-section-in.c: Likewise.
	* lto-section-out.c: Likewise.
	* lto-streamer-in.c: Likewise.
	* lto-streamer-out.c: Likewise.
	* mode-switching.c: Likewise.
	* modulo-sched.c: Likewise.
	* omp-low.c: Likewise.
	* optabs.c: Likewise.
	* passes.c: Likewise.
	* postreload-gcse.c: Likewise.
	* postreload.c: Likewise.
	* predict.c: Likewise.
	* profile.c: Likewise.
	* recog.c: Likewise.
	* ree.c: Likewise.
	* reg-stack.c: Likewise.
	* regcprop.c: Likewise.
	* reginfo.c: Likewise.
	* regrename.c: Likewise.
	* reload.c: Likewise.
	* reload1.c: Likewise.
	* reorg.c: Likewise.
	* resource.c: Likewise.
	* rtlanal.c: Likewise.
	* sched-deps.c: Likewise.
	* sched-ebb.c: Likewise.
	* sched-rgn.c: Likewise.
	* sel-sched-dump.c: Likewise.
	* sel-sched-ir.c: Likewise.
	* sel-sched.c: Likewise.
	* shrink-wrap.c: Likewise.
	* simplify-rtx.c: Likewise.
	* statistics.c: Likewise.
	* stmt.c: Likewise.
	* stor-layout.c: Likewise.
	* store-motion.c: Likewise.
	* symtab.c: Likewise.
	* targhooks.c: Likewise.
	* toplev.c: Likewise.
	* trans-mem.c: Likewise.
	* tree-cfg.c: Likewise.
	* tree-cfgcleanup.c: Likewise.
	* tree-dfa.c: Likewise.
	* tree-eh.c: Likewise.
	* tree-inline.c: Likewise.
	* tree-into-ssa.c: Likewise.
	* tree-nested.c: Likewise.
	* tree-nrv.c: Likewise.
	* tree-profile.c: Likewise.
	* tree-ssa-alias.c: Likewise.
	* tree-ssa-ccp.c: Likewise.
	* tree-ssa-copy.c: Likewise.
	* tree-ssa-copyrename.c: Likewise.
	* tree-ssa-dom.c: Likewise.
	* tree-ssa-operands.c: Likewise.
	* tree-ssa-propagate.c: Likewise.
	* tree-ssa-structalias.c: Likewise.
	* tree-ssa-tail-merge.c: Likewise.
	* tree-ssa-threadedge.c: Likewise.
	* tree-ssa-threadupdate.c: Likewise.
	* tree-ssa-uncprop.c: Likewise.
	* tree-ssa-uninit.c: Likewise.
	* tree-ssa.c: Likewise.
	* tree-stdarg.c: Likewise.
	* tree-tailcall.c: Likewise.
	* tree.c: Likewise.
	* tsan.c: Likewise.
	* valtrack.c: Likewise.
	* varasm.c: Likewise.
	* vmsdbgout.c: Likewise.
	* web.c: Likewise.
	* testsuite/g++.dg/plugin/pragma_plugin.c: Adjust include files.
	* config/aarch64/aarch64.c: Add flattened includes from function.h.
	* config/alpha/alpha.c: Likewise.
	* config/arc/arc.c: Likewise.
	* config/arm/arm.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: 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/h8300/h8300.c: Likewise.
	* config/i386/i386.c: Likewise.
	* config/ia64/ia64.c: Likewise.
	* config/iq2000/iq2000.c: Likewise.
	* config/lm32/lm32.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: 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: 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/pa/pa.c: Likewise.
	* config/pdp11/pdp11.c: Likewise.
	* config/rl78/rl78.c: Likewise.
	* config/rs6000/rs6000.c: Likewise.
	* config/rx/rx.c: Likewise.
	* config/s390/s390.c: Likewise.
	* config/score/score.c: Likewise.
	* config/sh/sh.c: Likewise.
	* config/sparc/sparc.c: Likewise.
	* config/spu/spu.c: Likewise.
	* config/stormy16/stormy16.c: Likewise.
	* config/tilegx/tilegx.c: Likewise.
	* config/tilepro/tilepro.c: Likewise.
	* config/v850/v850.c: Likewise.
	* config/vax/vax.c: Likewise.
	* config/xtensa/xtensa.c: Likewise.


2014-10-16  Andrew MacLeod  <amacleod@redhat.com>

	* ada/gcc-interface/misc.c: Adjust include files.

2014-10-16  Andrew MacLeod  <amacleod@redhat.com>

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

2014-10-16  Andrew MacLeod  <amacleod@redhat.com>

	* c-family/c-pragma.c: Adjust include files.
	* c-family/c-semantics.c: Likewise.

2014-10-16  Andrew MacLeod  <amacleod@redhat.com>

	* cp/cp-tree.h: Adjust include files.

2014-10-16  Andrew MacLeod  <amacleod@redhat.com>

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

2014-10-16  Andrew MacLeod  <amacleod@redhat.com>

	* java/class.c: Adjust include files.
	* java/resource.c: Likewise.

2014-10-16  Andrew MacLeod  <amacleod@redhat.com>

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

From-SVN: r216337
2014-10-16 16:37:19 +00:00
DJ Delorie 78a7c3172f machmode.h (int_n_data_t): New.
* machmode.h (int_n_data_t): New.
	(int_n_enabled_p): New.
	(int_n_data): New.
	* tree.c (int_n_enabled_p): New.
	(int_n_trees): New.
	(make_or_reuse_type): Check for all __intN types, not just
	__int128.
	(build_common_tree_nodes): Likewise.  Also fill in integer_typs[]
	entries.
	* tree.h (int128_integer_type_node): Remove.
	(int128_unsigned_type_node): Remove.
	(int_n_trees_t): New.
	(int_n_enabled_p): New.
	(int_n_trees): New.
	* toplev.c (standard_type_bitsize): New.
	(do_compile): Check which __intN types are enabled for the current
	run.
	* builtin-types.def (BT_INT128): Remove.
	(BT_UINT128): Remove.
	* machmode.def: Add macro to create __int128 for all targets.
	* stor-layout.c (mode_for_size): Support __intN types.
	(smallest_mode_for_size): Likewise.
	(initialize_sizetypes): Support __intN types.
	* genmodes.c (struct mode_data): Add int_n field.
	(blank_mode): Likewise.
	(INT_N): New.
	(make_int_n): New.
	(emit_insn_modes_h): Count __intN entries and define
	NUM_INT_N_ENTS.
	(emit_mode_int_n): New.
	(emit_insn_modes_c): Call it.
	* gimple.c (gimple_signed_or_unsigned_type): Check for all __intN
	types, not just __int128.
	* tree-core.h (integer_type_kind): Remove __int128-specific
	entries, reserve spots for __intN entries.

libstdc++-v3/
	* src/c++11/limits.cc: Add support for __intN types.
	* include/std/type_traits: Likewise.
	* include/std/limits: Likewise.
	* include/c_std/cstdlib: Likewise.
	* include/bits/cpp_type_traits.h: Likewise.
	* include/c_global/cstdlib: Likewise.

c-family/
	* c-pretty-print.c (pp_c_integer_constant): Check for all __intN
	types, not just __int128.
	* c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
	types, not just __int128.
	(cpp_atomic_builtins): Round pointer sizes up.
	(type_suffix): Use type precision, not specific types.
	* c-common.c (c_common_reswords): Remove __int128 special case.
	(c_common_type_for_size): Check for all __intN types, not just
	__int128.
	(c_common_type_for_mode): Likewise.
	(c_common_signed_or_unsigned_type): Likewise.
	(c_build_bitfield_integer_type): Likewise.
	(c_common_nodes_and_builtins): Likewise.
	(keyword_begins_type_specifier): Likewise.
	* c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
	__intN variants.

c/
	* c-parser.c (c_parse_init): Add RID entries for each __intN.
	(c_token_starts_typename): Check all __intN, not just __int128.
	(c_token_starts_declspecs): Likewise.
	(c_parser_declspecs): Likewise.
	(c_parser_attribute_any_word): Likewise.
	(c_parser_objc_selector): Likewise.
	* c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
	(struct c_declspecs): Add int_n_idx field to record *which* __intN
	is specified.
	* c-decl.c (declspecs_add_type): Check for all __intN, not just
	__int128.
	(finish_declspecs): Likewise.

testsuite/
	* g++.dg/abi/mangle64.C: New.

cp/
	* typeck.c (cp_common_type): Check for all __intN types, not just
	__int128.
	* decl.c (grokdeclarator): Likewise.
	* rtti.c (emit_support_tinfos): Check for all __intN types, not just
	__int128.
	* parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Check
	for all __intN types, not just __int128.
	(cp_parser_simple_type_specifier): Likewise.
	* mangle.c (integer_type_codes): Remove int128-specific codes.
	* cp-tree.h (cp_decl_specifier_seq): Add int_n_idx to store which
	__intN was specified.
	* lex.c (init_reswords): Reserve all __intN keywords.

lto/
	* lto-lang.c (lto_build_c_type_nodes): Check intN types for
	size-type as well.
	(lto_init): Initialize all intN types, not just int128.

From-SVN: r216220
2014-10-14 15:44:36 -04:00
Andreas Krebbel abdc17f814 [multiple changes]
2014-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>

	PR 63300/debug
	* tree.c (check_base_type): New.
	(check_qualified_type): Exploit new helper function above.
	* tree.h (check_base_type): New prototype.
	* dwarf2out.c (get_nearest_type_subqualifiers): New.
	(modified_type_die): Fix handling for qualifiers.  Qualifiers to
	"peel off" are now determined using get_nearest_type_subqualifiers.

2014-09-25  Mark Wielaard  <mjw@redhat.com>

	PR 63300/debug
	* gcc.dg/debug/dwarf2/stacked-qualified-types-1.c: New testcase.
	* gcc.dg/debug/dwarf2/stacked-qualified-types-2.c: Likewise.
	* gcc.dg/guality/pr63300-const-volatile.c: New testcase.

From-SVN: r215582
2014-09-25 07:37:36 +00:00
Aldy Hernandez 00de328a7a cgraph.h, [...]: Rename all instances of DECL_ABSTRACT to DECL_ABSTRACT_P.
* cgraph.h, dbxout.c, dwarfout2.c, gimple-fold.c,
    	lto-streamer-out.c, print-tree.c, symtab.c, tree-inline.c,
    	tree-streamer-in.c, tree-streamer-out.c, tree.c, tree.h,
    	varpool.c: Rename all instances of DECL_ABSTRACT to
    	DECL_ABSTRACT_P.

    cp/
    	* class.c, decl.c, optimize.c: Rename all instances of
    	DECL_ABSTRACT to DECL_ABSTRACT_P.

    lto/
    	* lto-symtab.c, lto.c: Rename all instances of DECL_ABSTRACT to
    	DECL_ABSTRACT_P.

From-SVN: r215567
2014-09-24 19:50:24 +00:00
Jan Hubicka 10b8fa2ed2 tree.h (int_bit_position): Turn into inline function; implement using wide int.
* tree.h (int_bit_position): Turn into inline function;
	implement using wide int.
	* tree.c (int_bit_position): Remove.

From-SVN: r215518
2014-09-23 16:08:16 +00:00
Jan Hubicka ca21928bb3 re PR lto/63286 (FAIL: g++.dg/lto/20101014-2 cp_lto_20101014-2_0.o assemble, * after r215196)
PR lto/63286
	* tree.c (need_assembler_name_p): Do not mangle variadic types.

From-SVN: r215403
2014-09-19 18:54:23 +00:00
Aldy Hernandez d39d05a75b dwarf2out.c (decl_ultimate_origin): Update comment.
* dwarf2out.c (decl_ultimate_origin): Update comment.
	* tree.c (block_ultimate_origin): Same.

From-SVN: r215396
2014-09-19 16:02:21 +00:00
Jan Hubicka f83fba1eb0 tree.c (need_assembler_name_p): Store C++ type mangling only for aggregates.
* tree.c (need_assembler_name_p): Store C++ type mangling only
	for aggregates.

From-SVN: r215238
2014-09-13 16:12:20 +00:00
Marek Polacek 8909b58efa tree.c (protected_set_expr_location): Don't check whether T is non-null here.
* tree.c (protected_set_expr_location): Don't check whether T is
	non-null here.

From-SVN: r215234
2014-09-13 05:59:47 +00:00
Marc Glisse d9a72d17e6 tree.c (integer_each_onep): New function.
2014-09-12  Marc Glisse  <marc.glisse@inria.fr>

gcc/
	* tree.c (integer_each_onep): New function.
	* tree.h (integer_each_onep): Declare it.
	* fold-const.c (fold_binary_loc): Use it for ~A + 1 to -A and
	-A - 1 to ~A.  Disable (X & 1) ^ 1, (X ^ 1) & 1 and ~X & 1 to
	(X & 1) == 0 for vector and complex.
gcc/testsuite/
	* gcc.dg/vec-andxor1.c: New file.

From-SVN: r215209
2014-09-12 10:42:47 +00:00
Jan Hubicka 1ee85ee19b common.opt (flto-odr-type-merging): New flag.
* common.opt (flto-odr-type-merging): New flag.
	* ipa-deivrt.c (hash_type_name): Use ODR names for hasing if availale.
	(types_same_for_odr): Likewise.
	(odr_subtypes_equivalent_p): Likewise.
	(add_type_duplicate): Do not walk type variants.
	(register_odr_type): New function.
	* ipa-utils.h (register_odr_type): Declare.
	(odr_type_p): New function.
	* langhooks.c (lhd_set_decl_assembler_name): Do not compute
	TYPE_DECLs
	* doc/invoke.texi (-flto-odr-type-merging): Document.
	* tree.c (need_assembler_name_p): Compute ODR names when asked
	for it.
	* tree.h (DECL_ASSEMBLER_NAME): Update comment.

	* lto.c (lto_read_decls): Register ODR types.

From-SVN: r215196
2014-09-11 23:16:42 +00:00
Aldy Hernandez 09f2f0aaa2 Revert mistakenly committed change.
From-SVN: r214917
2014-09-04 18:22:13 +00:00
Aldy Hernandez 60081a2b59 Merge remote-tracking branch 'origin/aldyh/debug-early' into debug-early
Conflicts:
	gcc/ChangeLog.debug-early
	gcc/dwarf2out.c

From-SVN: r214915
2014-09-04 18:08:42 +00:00
Aldy Hernandez 9de41e5786 Revert incorrect merging of debug-early branch.
From-SVN: r214914
2014-09-04 18:04:14 +00:00
Aldy Hernandez c5a3685015 Merge remote-tracking branch 'origin/aldyh/debug-early' into debug-early
Conflicts:
	gcc/ChangeLog.debug-early
	gcc/dwarf2out.c

From-SVN: r214912
2014-09-04 16:38:29 +00:00
Aldy Hernandez 989f386cf0 + * c/c-decl.c (write_global_declarations_1): Call global_decl() + with early=true.
+       * c/c-decl.c (write_global_declarations_1): Call global_decl()
+       with early=true.
+       (write_global_declarations_2): Call global_decl() with
+       early=false.
+       * dbxout.c (dbxout_global_decl): New argument.
+       * debug.c (do_nothing_debug_hooks): Use debug_nothing_tree_bool
+       for global_decl hook.
+       (debug_nothing_tree_bool): New.
+       (struct gcc_debug_hooks): New argument to global_decl.
+       * dwarf2out.c (output_die): Add misc debugging information.
+       (gen_variable_die): Do not reparent children.
+       (dwarf2out_global_decl): Add new documentation.  Add EARLY
+       argument.
+       (dwarf2out_decl): Make sure we don't generate new DIEs if we
+       already have a DIE.
+       * cp/name-lookup.c (do_namespace_alias): New argument to
+       global_decl debug hook.
+       * fortran/trans-decl.c (gfc_emit_parameter_debug_info): Same.
+       * godump.c (go_global_decl): Same.
+       * lto/lto-lang.c (lto_write_globals): Same.
+       * sdbout.c (sdbout_global_decl): Same.
+       * toplev.c (emit_debug_global_declarations): Same.
+       * vmsdbgout.c (vmsdbgout_global_decl): Same.
+       * tree.c (free_lang_data_in_decl): Do not call
+       dwarf2out_early_decl from here.

From-SVN: r214911
2014-09-04 16:38:21 +00:00
Aldy Hernandez 73179e4a24 dearly: Emit DIEs for decls early in the compilation process.
This is the original patch from Michael Matz, ported to a more recent
mainline.

From-SVN: r214906
2014-09-04 16:37:36 +00:00
Jakub Jelinek 9a771876d3 cilk-builtins.def (__cilkrts_cilk_for_32): New.
gcc/
	* cilk-builtins.def (__cilkrts_cilk_for_32): New.
	(__cilkrts_cilk_for_64): Likewise.
	* cilk-common.c (declare_cilk_for_builtin): New function.
	(cilk_init_builtins): Declare __cilkrts_cilk_for_32 and
	__cilkrts_cilk_for_64 bultins.
	* cilk.h (enum cilk_tree_index): Added CILK_TI_F_LOOP_32 and
	CILK_TI_F_LOOP_64.
	(cilk_for_32_fndecl): New define.
	(cilk_for_64_fndecl): Likewise.
	* gimple-pretty-print.c (dump_gimple_omp_for): Correct hadling of
	GF_OMP_FOR_KIND_CILKFOR cases; Added NE_EXPR case.
	* gimple.h (enum gf_mask): Added GF_OMP_FOR_KIND_CILKFOR; adjusted
	GF_OMP_FOR_KIND_MASK, GF_OMP_FOR_SIMD, GF_OMP_FOR_COMBINED,
	GF_OMP_FOR_COMBINED_INTO.
	* gimplify.c (gimplify_scan_omp_clauses): Added
	OMP_CLAUSE__CILK_FOR_COUNT_ case.
	(gimplify_adjust_omp_clauses): Ditto.
	(gimplify_omp_for): Added CILK_FOR case.
	(gimplify_expr): Ditto.
	* omp-low.c: Include cilk.h.
	(extract_omp_for_data): Set appropriate kind for
	GF_OMP_FOR_KIND_CILKFOR; added check for GF_OMP_FOR_KIND_CILKFOR.
	(scan_sharing_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_ cases.
	(create_omp_child_function_name): Added second argument to handle
	cilk_for case.
	(cilk_for_check_loop_diff_type): New function.
	(expand_cilk_for_call): Likewise.
	(expand_cilk_for): Likewise.
	(create_omp_child_function): Set cilk_for_count; handle the cases when
	it is true; call create_omp_child_function_name with second argument.
	(expand_omp_taskreg): Set is_cilk_for and handle cases when it's true.
	(expand_omp_for): Handle case of GF_OMP_FOR_KIND_CILKFOR.
	* tree-core.h (omp_clause_code): Added OMP_CLAUSE__CILK_FOR_COUNT_.
	* tree-nested.c (convert_nonlocal_omp_clauses): Added
	OMP_CLAUSE__CILK_FOR_COUNT_ case.
	(convert_local_omp_clauses): Ditto.
	* tree-pretty-print.c (dump_omp_clause): Added
	OMP_CLAUSE__CILK_FOR_COUNT_ and OMP_CLAUSE_SCHEDULE_CILKFOR cases.
	(dump_generic_node): Added CILK_FOR case.
	* tree.c (omp_clause_num_ops): New element
	OMP_CLAUSE__CILK_FOR_COUNT_ (1).
	(omp_clause_code_name): New element _Cilk_for_count_.
	(walk_tree_1): Added OMP_CLAUSE__CILK_FOR_COUNT_ case.
	* tree.def: Add tree code for CILK_FOR.

gcc/c/
	* c-parser.c (c_parser_cilk_for): New function.
	(c_parser_cilk_grainsize): Likewise.
	(c_get_temp_regvar): Likewise.
	(c_parser_statement_after_labels): Added RID_CILK_FOR case.
	(c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
	(c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
	* c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
	case.

gcc/cp/
	* cp-cilkplus.c (cpp_validate_cilk_plus_loop_aux): Loc definition
	simplified.
	* parser.c (cp_parser_cilk_for): New function.
	(cp_parser_cilk_grainsize): Likewise.
	(cp_parser_statement): Added RID_CILK_FOR case.
	(cp_parser_omp_for_cond): Added CILK_FOR check.
	(cp_parser_omp_for_loop_init): Change function argument to accept
	tree_code instead just a bool flag; change the check to use that
	tree_code; check for initialization declaration in case of Cilk_for.
	(cp_parser_omp_for_loop): Added checks for CILK_FOR and RID_CILK_FOR;
	changed call to cp_parser_omp_for_loop_init according new arguments'
	list.
	(cp_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
	* pt.c (tsubst_expr): Added CILK_FOR case.
	* semantics.c: Include convert.h.
	(finish_omp_clauses): Properly handle OMP_CLAUSE_SCHEDULE_CILKFOR
	case; added OMP_CLAUSE__CILK_FOR_COUNT_.
	(handle_omp_for_class_iterator): New argument lastp and its usage;
	added NE_EXPR case.
	(finish_omp_for): Changed call to handle_omp_for_class_iterator
	according new arguments' list; in case of Cilk_for save very first
	decl and create empty stmt_list block; use block to build correct
	statement tree.

gcc/c-family/
	* c-cilkplus.c (cilk_for_number_of_iterations): New function.
	* c-common.c (c_common_reswords): Added _Cilk_for.
	* c-common.h (enum rid): Added RID_CILK_FOR.
	(cilk_for_number_of_iterations): Add declaration.
	* c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
	CILK_FOR.
	* c-pragma.c (init_pragma): Register "grainsize" pragma.
	* c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.

gcc/testsuite/
	* c-c++-common/cilk-plus/CK/cilk-fors.c: New test.
	* c-c++-common/cilk-plus/CK/cilk-for-2.c: New test.
	* c-c++-common/cilk-plus/CK/cilk-for-3.c: New test.
	* c-c++-common/cilk-plus/CK/cilk_for_errors.c: New test.
	* c-c++-common/cilk-plus/CK/cilk_for_grain.c: New test.
	* c-c++-common/cilk-plus/CK/cilk_for_grain_errors.c: New test.
	* c-c++-common/cilk-plus/CK/cilk_for_ptr_iter.c: New test.
	* c-c++-common/cilk-plus/CK/nested_cilk_for.c: New test.
	* g++.dg/cilk-plus/CK/cf3.cc: New test.
	* g++.dg/cilk-plus/CK/cilk-for-tplt.cc: New test.
	* g++.dg/cilk-plus/CK/for1.cc: New test.
	* g++.dg/cilk-plus/CK/stl_iter.cc: New test.
	* g++.dg/cilk-plus/CK/stl_rev_iter.cc: New test.
	* g++.dg/cilk-plus/CK/stl_test.cc: New test.

Co-Authored-By: Balaji V. Iyer <balaji.v.iyer@intel.com>
Co-Authored-By: Igor Zamyatin <igor.zamyatin@intel.com>

From-SVN: r214818
2014-09-02 12:52:29 +00:00
Richard Biener 6cd87a2ea5 re PR lto/62190 (LTO DWARF produces __unknown__ type for unsigned int function argument type)
2014-08-20  Richard Biener  <rguenther@suse.de>

	PR lto/62190
	* tree.c (build_common_tree_nodes): Use make_or_reuse_type
	to build uint{16,32,64}_type_node.

From-SVN: r214216
2014-08-20 11:06:48 +00:00
Jason Merrill 33cb682bce re PR bootstrap/62077 (--with-build-config=bootstrap-lto fails)
PR bootstrap/62077
gcc/
	* tree.c (type_hash_canon): Uncomment assert.
gcc/cp/
	* tree.c (build_min_array_type, set_array_type_canon): Split out...
	(build_cplus_array_type): ...from here.  Only call build_array_type
	for main variants.

From-SVN: r214030
2014-08-15 13:27:58 -04:00
Richard Biener 0cff9154ec tree.c (type_hash_lookup, [...]): Merge into ...
2014-08-14  Richard Biener  <rguenther@suse.de>

	* tree.c (type_hash_lookup, type_hash_add): Merge into ...
	(type_hash_canon): ... this and avoid 2nd lookup for the add.

From-SVN: r213956
2014-08-14 11:15:41 +00:00
Yury Gribov c62ccb9a0a Move inlining of Asan memory checks to sanopt pass.
Change asan-instrumentation-with-call-threshold to more closely match LLVM.

2014-08-11  Yury Gribov  <y.gribov@samsung.com>

gcc/
	* asan.c (asan_check_flags): New enum.
	(build_check_stmt_with_calls): Removed function.
	(build_check_stmt): Split inlining logic to
	asan_expand_check_ifn.
	(instrument_derefs): Rename parameter.
	(instrument_mem_region_access): Rename parameter.
	(instrument_strlen_call): Likewise.
	(asan_expand_check_ifn): New function.
	(asan_instrument): Remove old code.
	(pass_sanopt::execute): Change handling of
	asan-instrumentation-with-call-threshold.
	(asan_clear_shadow): Fix formatting.
	(asan_function_start): Likewise.
	(asan_emit_stack_protection): Likewise.
	* doc/invoke.texi (asan-instrumentation-with-call-threshold):
	Update description.
	* internal-fn.c (expand_ASAN_CHECK): New function.
	* internal-fn.def (ASAN_CHECK): New internal function.
	* params.def (PARAM_ASAN_INSTRUMENTATION_WITH_CALL_THRESHOLD):
	Update description.
	(PARAM_ASAN_USE_AFTER_RETURN): Likewise.
	* tree.c: Small comment fix.

gcc/testsuite/
	* c-c++-common/asan/inc.c: Update test.
	* c-c++-common/asan/instrument-with-calls-2.c: Likewise.
	* c-c++-common/asan/no-redundant-instrumentation-1.c: Likewise.
	* c-c++-common/asan/no-redundant-instrumentation-2.c: Likewise.
	* c-c++-common/asan/no-redundant-instrumentation-3.c: Likewise.
	* c-c++-common/asan/no-redundant-instrumentation-4.c: Likewise.
	* c-c++-common/asan/no-redundant-instrumentation-5.c: Likewise.
	* c-c++-common/asan/no-redundant-instrumentation-6.c: Likewise.
	* c-c++-common/asan/no-redundant-instrumentation-7.c: Likewise.
	* c-c++-common/asan/no-redundant-instrumentation-8.c: Likewise.
	* c-c++-common/asan/no-redundant-instrumentation-9.c: Likewise.

From-SVN: r213807
2014-08-11 06:12:12 +00:00
Yury Gribov b78475cf73 Added fnspec to internal functions.
2014-08-11  Yury Gribov  <y.gribov@samsung.com>

gcc/
        * gimple.c (gimple_call_fnspec): Support internal functions.
        (gimple_call_return_flags): Use const.
        * Makefile.in (GTFILES): Add internal-fn.h to list of GC files.
        * internal-fn.def: Add fnspec information.
        * internal-fn.h (internal_fn_fnspec): New function.
        (init_internal_fns): Declare new function.
        * internal-fn.c (internal_fn_fnspec_array): New global variable.
        (init_internal_fns): New function.
        * tree-core.h: Update macro call.
        * tree.c (build_common_builtin_nodes): Initialize internal fns.

From-SVN: r213806
2014-08-11 06:06:29 +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 6e2830c3db add a hash_set based on hash_table
This allows us to replace the usage of pointer_set outside of
pointer_map with a nicer interface.

gcc/ada/

	* gcc-interface/trans.c: Use hash_set instead of pointer_set.

gcc/c-family/

	* c-gimplify.c: Use hash_set instead of pointer_set.

gcc/c/

	* c-decl.c: Use hash_set instead of pointer_set.

gcc/cp/

	* class.c, cp-gimplify.c, cp-tree.h, decl.c, decl2.c, error.c,
	method.c, name-lookup.c, pt.c, semantics.c, tree.c: Use hash_set
	instead of pointer_set.

gcc/fortran/

	* openmp.c, trans-decl.c: Use hash_set instead of pointer_set.

gcc/

	* hash-set.h: new File.
	* cfgexpand.c, cfgloop.c, cgraph.c, cgraphbuild.c, cgraphunit.c,
	cprop.c, cse.c, gimple-walk.c, gimple-walk.h, gimplify.c, godump.c,
	ipa-devirt.c, ipa-pure-const.c, ipa-visibility.c, ipa.c, lto-cgraph.c,
	lto-streamer-out.c, stmt.c, tree-cfg.c, tree-core.h, tree-eh.c,
	tree-inline.c, tree-inline.h, tree-nested.c, tree-pretty-print.c,
	tree-ssa-loop-niter.c, tree-ssa-phiopt.c, tree-ssa-threadedge.c,
	tree-ssa-uninit.c, tree.c, tree.h, value-prof.c, varasm.c,
	varpool.c: Use hash_set instead of pointer_set.

gcc/lto/

	* lto-partition.c, lto-partition.h: Use hash_set instead of
	pointer_set.

From-SVN: r213516
2014-08-02 11:23:49 +00:00
Andi Kleen 50de5793fc Change inchash to name space.
Change class inchash to move into a inchash namespace as requested.
The class is now inchash::hash

Rename iterative_hstate_expr to inchash::add_expr
... and convert existing users. It wasn't possible to use hash::,
because that lead to name space conflicts with cp and objc.

So class inchash is now inchash::hash and iterative_hstate_expr
is now inchash::add_expr.

gcc/:

2014-07-31  Andi Kleen  <ak@linux.intel.com>

	* inchash.h (inchash): Change inchash class to namespace.
	(class hash): ... Rename from inchash.
	(add_object): Move from macro to class template.
	* lto-streamer-out.c (hash_tree): Change inchash
	to inchash::hash.
	* tree.c (build_type_attribute_qual_variant): Dito.
	(type_hash_list): Dito.
	(attribute_hash_list): Dito.
	(iterative_hstate_expr): Rename to inchash::add_expr
	(build_range_type_1): Change inchash to inchash::hash
	and use hash::add_expr.
	(build_array_type_1): Dito.
	(build_function_type): Dito
	(build_method_type_directly): Dito.
	(build_offset_type): Dito.
	(build_complex_type): Dito.
	(make_vector_type): Dito.
	* tree.h (iterative_hash_expr): Dito.

gcc/lto/:

2014-07-31  Andi Kleen  <ak@linux.intel.com>

	* lto.c (hash_canonical_type): Use inchash::hash
	and use inchash::add_expr.
	(iterative_hash_canonical_type): Dito.

From-SVN: r213394
2014-08-01 02:51:46 +00:00
Andi Kleen 56fdfd3e85 Convert the tree.c type hashing over to inchash
v2: Use commutative interface. Be much nearer to the old
code.

gcc/:

2014-07-25  Andi Kleen  <ak@linux.intel.com>

	* tree.c (build_type_attribute_qual_variant): Use inchash.
	(type_hash_list): Dito.
	(attribute_hash_list): Dito
	(iterative_hstate_expr): Dito.
	(iterative_hash_expr): Dito.
	(build_range_type_1): Dito.
	(build_array_type_1): Dito.
	(build_function_type): Dito.
	(build_method_type_directly): Dito.
	(build_offset_type): Dito.
	(build_complex_type): Dito.
	(make_vector_type): Dito.
	* tree.h (iterative_hash_expr): Add compat wrapper.
	(iterative_hstate_expr): Add.

gcc/lto/:

2014-07-25  Andi Kleen  <ak@linux.intel.com>

	* lto.c (hash_canonical_type): Call iterative_hstate_expr.

From-SVN: r213056
2014-07-25 13:39:36 +00:00
Andi Kleen 6d8eb96b44 Add an abstract incremental hash data type
Some files in gcc, like lto or tree, do large scale incremential hashing.
The current jhash implementation of this could be likely improved
by using an incremential hash that does not do a full rehashing
for every new value added.

This patch adds a new "inchash" class that abstracts the internal
state of the hash. This makes it easier to plug in new hashes
and also cleans up the code a bit.

Right now it is just implemented in the same way as the old
iterative hash in tree.c. The previous iterative hash code
from tree.c moved into a new separate file. Also I fixed up all
users to include the new header.

It should not really significantly change any hashing by itself,
it's mostly a cleanup at this point.

v2: Remove begin. Add commutative interface.
Add merge hash interface.  Add add_flag.

gcc/:

2014-07-25  Andi Kleen  <ak@linux.intel.com>

	* Makefile.in (OBJS): Add inchash.o.
	(PLUGIN_HEADERS): Add inchash.h.
	* ipa-devirt.c: Include inchash.h.
	* lto-streamer-out.c: Dito.
	* tree-ssa-dom.c: Dito.
	* tree-ssa-pre.c: Dito.
	* tree-ssa-sccvn.c: Dito.
	* tree-ssa-tail-merge.c: Dito.
	* asan.c: Dito.
	* tree.c (iterative_hash_hashval_t): Move to ...
	(iterative_hash_host_wide_int): Move to ...
	* inchash.c: Here. New file.
	* tree.h (iterative_hash_hashval_t): Move to ...
	(iterative_hash_host_wide_int): Move to ...
	* inchash.h: Here. New file.

gcc/lto/:

2014-07-25  Andi Kleen  <ak@linux.intel.com>

	* lto.c: Include inchash.h

From-SVN: r213054
2014-07-25 13:39:05 +00:00
Martin Liska 9041d2e6d2 IPA C++ refactoring 2/N
* cgraph.h (varpool_node):
  (availability get_availability (void)):
    created from cgraph_variable_initializer_availability
  (inline varpool_node *ultimate_alias_target (availability *availability = NULL)
    creted from: cgraph_variable_initializer_availability
  (inline varpool_node *get_alias_target (void)): created from varpool_alias_target
  (void finalize_named_section_flags (void)):
    created from varpool_finalize_named_section_flags
  (bool assemble_decl (void)): created from varpool_assemble_decl
  (void analyze (void)): created from varpool_analyze_node
  (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *),
    void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases
  (void remove_initializer (void)): created from varpool_remove_initializer
  (tree get_constructor (void)): created from varpool_get_constructor
  (bool externally_visible_p (void)): created from varpool_externally_visible_p
  (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p
  (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p
  (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs
  (static inline varpool_node *get (const_tree decl)): created from varpool_get_node
  (static void finalize_decl (tree decl)): created from varpool_finalize_decl
  (static bool output_variables (void)): created from varpool_output_variables
  (static varpool_node * create_extra_name_alias (tree alias, tree decl)):
    created from varpool_extra_name_alias
  (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias
  (static void dump_varpool (FILE *f)): created from dump_varpool
  (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool
  (static varpool_node *create_empty (void)): created from varpool_create_empty_node
  (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl
  (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm
  (void assemble_aliases (void)): created from assemble_aliases

From-SVN: r212984
2014-07-24 12:25:27 +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 ad115a3c32 tree.c (tree_code_size): Add TRANSLATION_UNIT_DECL, NAMESPACE_DECL, IMPORTED_DECL and NAMELIST_DECL...
* tree.c (tree_code_size): Add TRANSLATION_UNIT_DECL,
	NAMESPACE_DECL, IMPORTED_DECL and NAMELIST_DECL;
	call langhook for unknown declaration.
	(find_decls_types_r): Do not walk DECL_ARGUMENT_FLD.
	* tree.h (DECL_ARGUMENTS): Update.
	* print-tree.c (print_node): Update.
	* tree-core.h (tree_decl_non_common): Remove arguments.
	(tree_function_decl): Add arguments.

	* class.c (build_clone): Do not clear assembler names of
	templates.
	* decl.c (cp_tree_node_structure): Add TEMPLATE_DECL.
	* cp-objcp-common.c (cp_tree_size): Add TEMPLATE_DECL
	as a special case return sizeof (struct tree_decl_non_common)
	for other decls.
	(cp_common_init_ts): Do not initialize NAMESPACE_DECL;
	initialize TEMPLATE_DECL as MARK_TS_DECL_COMMON.
	* cp/cp-tree.h (tree_template_decl): New structure.
	(cp_tree_node_structure_enum): Add TS_CP_TEMPLATE_DECL.
	(union cp_lang_tree_node): Add template_decl.
	(DECL_TEMPLATE_PARMS, DECL_TEMPLATE_RESULT): Update.

	* lto/lto.c (mentions_vars_p_decl_non_common): Skip
	DECL_ARGUMENT_FLD.
	mentions_vars_p_function): Do DECL_ARGUMENTS.
	(lto_fixup_prevailing_decls): Update.

	* objc-act.c (objc_common_tree_size): New function.
	* objc-act.h (KEYWORD_KEY_NAME, KEYWORD_ARG_NAME): Add type
	checking.
	(INSTANCE_METHOD_OR_CLASS_METHOD_DECL_CHECK): New macro.
	(METHOD_SEL_NAME, METHOD_SEL_ARGS, METHOD_ADD_ARGS,
 	METHOD_ADD_ARGS_ELLIPSIS_P, METHOD_DEFINITION, METHOD_ENCODING,
	METHOD_TYPE_ATTRIBUTES, METHOD_PROPERTY_CONTEXT): Add type checking.
	(METHOD_SEL_ARGS): Use decl_common.size instead of
	decl_non_common.result.
	(PROPERTY_NAME, PROPERTY_GETTER_NAME, PROPERTY_SETTER_NAME,
	PROPERTY_READONLY, PROPERTY_NONATOMIC, PROPERTY_ASSIGN_SEMANTICS,
	PROPERTY_IVAR_NAME, PROPERTY_DYNAMIC, PROPERTY_HAS_NO_GETTER,
	PROPERTY_HAS_NO_SETTER, PROPERTY_OPTIONAL): Add type checking.
	(objc_common_tree_size): Declare.
	* objc/objc-lang.c (LANG_HOOKS_TREE_SIZE): New macro.

From-SVN: r212549
2014-07-15 10:17:32 +00:00
Jan Hubicka c59f720328 tree.c (type_in_anonymous_namespace_p): Ignore TREE_PUBLIC on builtin types.
* tree.c (type_in_anonymous_namespace_p): Ignore TREE_PUBLIC
	on builtin types.
	* ipa-devirt.c: Include stor-layout.h and intl.h
	(odr_subtypes_equivalent_p): New function.
	(warn_odr): New function.
	(warn_type_mismatch): New function.
	(odr_types_equivalent_p): New function.
	(add_type_duplicate): Use it.
	* common.opt (Wodr): New flag.
	* doc/invoke.texi (Wodr): Document new warning.

From-SVN: r212481
2014-07-12 15:34:45 +00:00
Trevor Saunders 558d255943 remove has_execute
gcc/

	* tree-pass.h (pass_data): Remove has_execute member.
	* passes.c (execute_one_pass): Don't check pass->has_execute.
	* asan.c, auto-inc-dec.c, bb-reorder.c, bt-load.c, cfgcleanup.c,
	cfgexpand.c, cfgrtl.c, cgraphbuild.c, combine-stack-adj.c, combine.c,
	compare-elim.c, config/arc/arc.c, config/epiphany/mode-switch-use.c,
	config/epiphany/resolve-sw-modes.c, config/i386/i386.c,
	config/mips/mips.c, config/rl78/rl78.c, config/s390/s390.c,
	config/sh/sh_optimize_sett_clrt.cc, config/sh/sh_treg_combine.cc,
	config/sparc/sparc.c, cprop.c, cse.c, dce.c, df-core.c, dse.c,
	dwarf2cfi.c, except.c, final.c, function.c, fwprop.c, gcse.c,
	gimple-low.c, gimple-ssa-isolate-paths.c,
	gimple-ssa-strength-reduction.c, graphite.c, ifcvt.c, init-regs.c,
	ipa-comdats.c, ipa-cp.c, ipa-devirt.c, ipa-inline-analysis.c,
	ipa-inline.c, ipa-profile.c, ipa-pure-const.c, ipa-reference.c,
	ipa-split.c, ipa-visibility.c, ipa.c, ira.c, jump.c, loop-init.c,
	lower-subreg.c, mode-switching.c, modulo-sched.c, omp-low.c, passes.c,
	postreload-gcse.c, postreload.c, predict.c, recog.c, ree.c,
	reg-stack.c, regcprop.c, reginfo.c, regrename.c, reorg.c, sched-rgn.c,
	stack-ptr-mod.c, store-motion.c, tracer.c, trans-mem.c,
	tree-call-cdce.c, tree-cfg.c, tree-cfgcleanup.c, tree-complex.c,
	tree-eh.c, tree-emutls.c, tree-if-conv.c, tree-into-ssa.c,
	tree-loop-distribution.c, tree-nrv.c, tree-object-size.c,
	tree-parloops.c, tree-pass.h, tree-predcom.c, tree-profile.c,
	tree-sra.c, tree-ssa-ccp.c, tree-ssa-copy.c, tree-ssa-copyrename.c,
	tree-ssa-dce.c, tree-ssa-dom.c, tree-ssa-dse.c, tree-ssa-forwprop.c,
	tree-ssa-ifcombine.c, tree-ssa-loop-ch.c, tree-ssa-loop-im.c,
	tree-ssa-loop-ivcanon.c, tree-ssa-loop-prefetch.c,
	tree-ssa-loop-unswitch.c, tree-ssa-loop.c, tree-ssa-math-opts.c,
	tree-ssa-phiopt.c, tree-ssa-phiprop.c, tree-ssa-pre.c,
	tree-ssa-reassoc.c, tree-ssa-sink.c, tree-ssa-strlen.c,
	tree-ssa-structalias.c, tree-ssa-uncprop.c, tree-ssa-uninit.c,
	tree-ssa.c, tree-ssanames.c, tree-stdarg.c, tree-switch-conversion.c,
	tree-tailcall.c, tree-vect-generic.c, tree-vectorizer.c, tree-vrp.c,
	tree.c, tsan.c, ubsan.c, var-tracking.c, vtable-verify.c,
	web.c: Remove initializer for pass_data::has_execute.

From-SVN: r212383
2014-07-09 03:06:49 +00:00
Jan Hubicka 549bcbd17f tree.c (decls_same_for_odr, [...]): Remove.
* tree.c (decls_same_for_odr, decls_same_for_odr,
	types_same_for_odr): Remove.
	(type_in_anonymous_namespace_p): Constify argument.
	* tree.h (types_same_for_odr, type_in_anonymous_namespace_p):
	Constify.
	* ipa-devirt.c (odr_type_d): Add ODR_VIOLATED field.
	(main_odr_variant): New function.
	(hash_type_name): Make static; update assert; do not ICE on
	non-records.
	(types_same_for_odr): Bring here from tree.c; simplify
	and remove old structural comparing code that doesn't work
	for templates.
	(odr_hasher::equal): Update assert.
	(add_type_duplicate): Return true when bases should be computed;
	replace incomplete loader by complete; do not output duplicated
	warnings; do not ICE on non-records; set odr_violated flag.
	(get_odr_type): Be ready to replace incomplete type by complete
	one; work on ODR variants instead of main variants; reorder item
	in array so bases have still smaller indexes.
	(dump_type_inheritance_graph): Be ready for holdes in odr_types
	array.
	(possible_polymorphic_call_targets): Do not ICE when BINFO is NULL.

From-SVN: r212218
2014-07-02 03:19:45 +00:00
Jan Hubicka aaf8a23ef3 class.c (check_methods, [...]): Guard VINDEX checks by FUNCTION_DECL check.
* class.c (check_methods, create_vtable_ptr, determine_key_method,
	add_vcall_offset_vtbl_entries_1): Guard VINDEX checks by FUNCTION_DECL check.
	* cp-tree.h (lang_decl_ns): Add ns_using and ns_users.
	(DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): Use lang_decl_ns.
	(DECL_NAMESPACE_ASSOCIATIONS): Use DECL_INITIAL.
	(DECL_TEMPLATE_INSTANTIATIONS): Use DECL_SIZE_UNIT.
	* tree.c (find_decls_types_r): Do not check DECL_VINDEX for TYPE_DECL.
	* tree.h (DECL_VINDEX, DECL_SAVED_TREE): Restrict to DECL_FUNCTION.
	* tree-core.h (tree_decl_non_common): Move saved_tree and vindex...
	(tree_function_decl): ... here.
	* tree-streamer-out.c (write_ts_decl_non_common_tree_pointers): Move
	streaming of vindex to ...
	(write_ts_function_decl_tree_pointers): ... here.

	* tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
	Do not stream DECL_VINDEX.
	(lto_input_ts_function_decl_tree_pointers): Stream it here.

	* lto.c (mentions_vars_p_decl_non_common): Move DECL_VINDEX check to ..
	(mentions_vars_p_function): ... here.
	(compare_tree_sccs_1): Update VINDEX checks.
	(lto_fixup_prevailing_decls): Likewise.

From-SVN: r211960
2014-06-24 23:14:26 +00:00
Marek Polacek 0e37a2f33d asan.c (pass_sanopt::execute): Handle IFN_UBSAN_BOUNDS.
* asan.c (pass_sanopt::execute): Handle IFN_UBSAN_BOUNDS.
	* flag-types.h (enum sanitize_code): Add SANITIZE_BOUNDS and or it
	into SANITIZE_UNDEFINED.
	* doc/invoke.texi: Describe -fsanitize=bounds.
	* gimplify.c (gimplify_call_expr): Add gimplification of internal
	functions created in the FEs.
	* internal-fn.c: Move "internal-fn.h" after "tree.h".
	(expand_UBSAN_BOUNDS): New function.
	* internal-fn.def (UBSAN_BOUNDS): New internal function.
	* internal-fn.h: Don't define internal functions here.
	* opts.c (common_handle_option): Add -fsanitize=bounds.
	* sanitizer.def (BUILT_IN_UBSAN_HANDLE_OUT_OF_BOUNDS,
	BUILT_IN_UBSAN_HANDLE_OUT_OF_BOUNDS_ABORT): Add.
	* tree-core.h: Define internal functions here.
	(struct tree_base): Add ifn field.
	* tree-pretty-print.c: Include "internal-fn.h".
	(dump_generic_node): Handle functions without CALL_EXPR_FN.
	* tree.c (get_callee_fndecl): Likewise.
	(build_call_expr_internal_loc): New function.
	* tree.def (CALL_EXPR): Update description.
	* tree.h (CALL_EXPR_IFN): Define.
	(build_call_expr_internal_loc): Declare.
	* ubsan.c (get_ubsan_type_info_for_type): Return 0 for non-arithmetic
	types.
	(ubsan_type_descriptor): Change bool parameter to enum
	ubsan_print_style.  Adjust the code.  Add handling of
	UBSAN_PRINT_ARRAY.
	(ubsan_expand_bounds_ifn): New function.
	(ubsan_expand_null_ifn): Adjust ubsan_type_descriptor call.
	(ubsan_build_overflow_builtin): Likewise.
	(instrument_bool_enum_load): Likewise.
	(ubsan_instrument_float_cast): Likewise.
	* ubsan.h (enum ubsan_print_style): New enum.
	(ubsan_expand_bounds_ifn): Declare.
	(ubsan_type_descriptor): Adjust declaration.  Use a default parameter.
c-family/
	* c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
	(ubsan_walk_array_refs_r): New function.
	(c_genericize): Instrument array bounds.
	* c-ubsan.c: Include "internal-fn.h".
	(ubsan_instrument_division): Mark instrumented arrays as having
	side effects.  Adjust ubsan_type_descriptor call.
	(ubsan_instrument_shift): Likewise.
	(ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
	(ubsan_instrument_bounds): New function.
	(ubsan_array_ref_instrumented_p): New function.
	(ubsan_maybe_instrument_array_ref): New function.
	* c-ubsan.h (ubsan_instrument_bounds): Declare.
	(ubsan_array_ref_instrumented_p): Declare.
	(ubsan_maybe_instrument_array_ref): Declare.
testsuite/
	* c-c++-common/ubsan/bounds-1.c: New test.
	* c-c++-common/ubsan/bounds-2.c: New test.
	* c-c++-common/ubsan/bounds-3.c: New test.
	* c-c++-common/ubsan/bounds-4.c: New test.
	* c-c++-common/ubsan/bounds-5.c: New test.
	* c-c++-common/ubsan/bounds-6.c: New test.

From-SVN: r211859
2014-06-20 21:20:51 +00:00
Jan Hubicka 569b1784fe cgraph.h (struct symtab_node): Add field in_init_priority_hash (set_init_priority...
* cgraph.h (struct symtab_node): Add field in_init_priority_hash
	(set_init_priority, get_init_priority, set_fini_priority,
	get_fini_priority): New methods.
	* tree.c (init_priority_for_decl): Remove.
	(init_ttree): Do not initialize init priority.
	(decl_init_priority_lookup, decl_fini_priority_lookup): Rewrite.
	(decl_priority_info): Remove.
	(decl_init_priority_insert): Rewrite.
	(decl_fini_priority_insert): Rewrite.
	* tree.h (tree_priority_map_eq, tree_priority_map_hash,
	tree_priority_map_marked_p): Remove.
	* lto-cgraph.c (lto_output_node, input_node): Stream init priorities.
	* lto-streamer-out.c (hash_tree): Do not hash priorities.
	* tree-streamer-out.c (pack_ts_decl_with_vis_value_fields): Do
	not output priorities.
	(pack_ts_function_decl_value_fields): Likewise.
	* tree-streamer-in.c (unpack_ts_decl_with_vis_value_fields): Do
	not input priorities.
	(unpack_ts_function_decl_value_fields): Likewise.
	* symtab.c (symbol_priority_map): Declare.
	(init_priority_hash): Declare.
	(symtab_unregister_node): Unregister from priority hash, too.
	(symtab_node::get_init_priority, cgraph_node::get_fini_priority):
	New methods.
	(symbol_priority_map_eq, symbol_priority_map_hash): New functions.
	(symbol_priority_info): New function.
	(symtab_node::set_init_priority, cgraph_node::set_fini_priority):
	New methods.
	* tree-core.h (tree_priority_map): Remove.

	* lto.c (compare_tree_sccs_1): Do not compare priorities.

From-SVN: r211838
2014-06-20 07:09:27 +00:00
Jan Hubicka 56363ffd48 c-common.c (handle_tls_model_attribute): Use set_decl_tls_model.
* c-family/c-common.c (handle_tls_model_attribute): Use set_decl_tls_model.
	* cgraph.h (struct varpool_node): Add tls_model.
	* tree.c (decl_tls_model, set_decl_tls_model): New functions.
	* tree.h (DECL_TLS_MODEL): Update.
	(DECL_THREAD_LOCAL_P): Check that variable is static.
	(decl_tls_model): Declare.
	(set_decl_tls_model): Declare.
	* tree-emutls.c (get_emutls_init_templ_addr): First build decl and then
	set symbol prorperties.
	(get_emutls_init_templ_addr): Cleanup.
	(new_emutls_decl): Update.
	* lto-cgraph.c (lto_output_varpool_node): Stream TLS model
	(lto_input_varpool_node): Likewise.
	* lto-streamer-out.c (hash_tree): Likewise.
	* tree-streamer-in.c (unpack_ts_decl_with_vis_value_fields): Do
	not stream DECL_TLS_MODEL.
	* tree-profile.c (init_ic_make_global_vars): Use
	set_decl_tls_model.
	* tree-core.h (tree_decl_with_vis): Remove tls_model;
	update comments.

	* c-parser.c (c_parser_omp_threadprivate): Likewise.
	* c-decl.c (merge_decls): Likewise.

	* decl.c (duplicate_decls): Use set_decl_tls_model.
	(grokdeclarator): Likewise.
	* semantics.c (finish_id_expression): Check TLS only for
	static variables.
	(finish_omp_threadprivate): Use decl_default_tls_model.
	* decl2.c (get_guard): Likewise.
	* call.c (make_temporary_var_for_ref_to_temp): Likewise.

	* gcc-interface/utils.c (process_attributes): Use
	set_decl_tls_model.

	* trans-common.c (build_common_decl): Use
	set_decl_tls_model.
	* trans-decl.c (gfc_finish_var_decl): Likewise.
	(get_proc_pointer_decl): Likewise.

	* lto.c (compare_tree_sccs_1): Do not compare DECL_TLS_MODEL.

From-SVN: r211689
2014-06-15 23:38:29 +00:00
Jan Hubicka f961457f88 symtab.c (section_hash): New hash.
* symtab.c (section_hash): New hash.
	(symtab_unregister_node): Clear section before freeing.
	(hash_section_hash_entry): New haser.
	(eq_sections): New function.
	(symtab_node::set_section_for_node): New method.
	(set_section_1): Update.
	(symtab_node::set_section): Take string instead of tree as parameter.
	(symtab_resolve_alias): Update.
	* cgraph.h (section_hash_entry_d): New structure.
	(section_hash_entry): New typedef.
	(cgraph_node): Change comdat_group_ to x_comdat_group,
	change section_ to x_section and turn into section_hash_entry;
	update accestors; put set_section_for_node offline.
	* tree.c (decl_section_name): Turn into string.
	(set_decl_section_name): Change parameter to be string.
	* tree.h (decl_section_name, set_decl_section_name): Update prototypes.
	* sdbout.c (sdbout_one_type): Update.
	* tree-vect-data-refs.c (vect_can_force_dr_alignment_p): Update.
	* varasm.c (IN_NAMED_SECTION, get_named_section, resolve_unique_section,
	hot_function_section, get_named_text_section, USE_SELECT_SECTION_FOR_FUNCTIONS,
	default_function_rodata_section, make_decl_rtl, default_unique_section):
	Update.
	* config/c6x/c6x.c (c6x_in_small_data_p): Update.
	(c6x_elf_unique_section): Update.
	* config/nios2/nios2.c (nios2_in_small_data_p): Update.
	* config/pa/pa.c (pa_function_section): Update.
	* config/pa/pa.h (IN_NAMED_SECTION_P): Update.
	* config/ia64/ia64.c (ia64_in_small_data_p): Update.
	* config/arc/arc.c (arc_in_small_data_p): Update.
	* config/arm/unknown-elf.h (IN_NAMED_SECTION_P): Update.
	* config/mcore/mcore.c (mcore_unique_section): Update.
	* config/mips/mips.c (mips16_build_function_stub): Update.
	(mips16_build_call_stub): Update.
	(mips_function_rodata_section): Update.
	(mips_in_small_data_p): Update.
	* config/score/score.c (score_in_small_data_p): Update.
	* config/rx/rx.c (rx_in_small_data): Update.
	* config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Update.
	(rs6000_xcoff_asm_named_section): Update.
	(rs6000_xcoff_unique_section): Update.
	* config/frv/frv.c (frv_string_begins_with): Update.
	(frv_in_small_data_p): Update.
	* config/v850/v850.c (v850_encode_data_area): Update.
	* config/bfin/bfin.c (DECL_SECTION_NAME): Update.
	(bfin_handle_l1_data_attribute): Update.
	(bfin_handle_l2_attribute): Update.
	* config/mep/mep.c (mep_unique_section): Update.
	* config/microblaze/microblaze.c (microblaze_elf_in_small_data_p): Update.
	* config/h8300/h8300.c (h8300_handle_eightbit_data_attribute): Update.
	(h8300_handle_tiny_data_attribute): Update.
	* config/m32r/m32r.c (m32r_in_small_data_p): Update.
	(m32r_in_small_data_p): Update.
	* config/alpha/alpha.c (alpha_in_small_data_p): Update.
	* config/i386/i386.c (ix86_in_large_data_p): Update.
	* config/i386/winnt.c (i386_pe_unique_section): Update.
	* config/darwin.c (darwin_function_section): Update.
	* config/lm32/lm32.c (lm32_in_small_data_p): Update.
	* tree-emutls.c (get_emutls_init_templ_addr): Update.
	(new_emutls_decl): Update.
	* lto-cgraph.c (lto_output_node, input_node, input_varpool_node,
	input_varpool_node): Update.
	(ead_string_cst): Turn to ...
	(read_string): ... this one.
	* dwarf2out.c (secname_for_decl): Update.
	* asan.c (asan_protect_global): Update.

	* c-family/c-common.c (handle_section_attribute): Update handling for
	section names that are no longer trees.

	* java/class.c (build_utf8_ref): Update handling for section names
	that are no longer trees.
	(emit_register_classes_in_jcr_section): Update.

	* vtable-class-hierarchy.c: Update handling for section names
	that are no longer trees.
	* decl.c (duplicate_decls): Likewise.

	* gcc-interface/utils.c:  Update handling for section names
	that are no longer trees.

From-SVN: r211489
2014-06-12 04:03:49 +00:00
Jan Hubicka e257a17cb9 varasm.c (set_implicit_section): New function.
* varasm.c (set_implicit_section): New function.
	(resolve_unique_section): Use it to set implicit section
	for aliases, too.
	(get_named_text_section): Use symtab_get_node (decl)->implicit_section
	(default_function_section): Likewise.
	(decl_binds_to_current_def_p): Constify argument.
	* varasm.h (decl_binds_to_current_def_p): Update prototype.
	* asan.c (asan_protect_global): Use symtab_get_node (decl)->implicit_section.
	* symtab.c (dump_symtab_base): Dump implicit sections.
	(verify_symtab_base): Verify sanity of sectoins and comdats.
	(symtab_resolve_alias): Alias share the section of its target.
	(set_section_1): New function.
	(symtab_node::set_section): Move here, recurse to aliases.
	(verify_symtab): Check for duplicated symtab lists.
	* tree-core.h (implicit_section_name_p): Remove.
	* tree-vect-data-refs.c: Include varasm.h.
	(vect_can_force_dr_alignment_p): Fix conditional on when
	decl bints to current definition; use
	symtab_get_node (decl)->implicit_section.
	* cgraph.c (cgraph_make_node_local_1): Fix section set.
	* cgraph.h (struct symtab_node): Add implicit_section.
	(set_section): Rename to ...
	(set_section_for_node): ... this one.
	(set_section): Declare.
	* tree.h (DECL_HAS_IMPLICIT_SECTION_NAME_P): Remove.
	* lto-cgraph.c (lto_output_node, lto_output_varpool_node,
	input_overwrite_node, input_varpool_node): Stream implicit_section.
	* ipa.c (symtab_remove_unreachable_nodes): Do not check symtab before
	removal; it will fail in LTO.
	
	* vtable-class-hierarchy.c: Use symtab_get_node (var_decl)->implicit_section.
	* optimize.c (cdtor_comdat_group): Fix handling of aliases.
	(maybe_clone_body): Move symbol across comdat groups.
	* method.c (use_thunk): Copy implicit section flag.

	* go/go-gcc.cc (Gcc_backend::global_variable_set_init): Use
	symtab_get_node(var_decl)->implicit_section.

	* lto.c (read_cgraph_and_symbols): Remove unreachable symbols.
	(do_whole_program_analysis): Use verify_symtab.

From-SVN: r211434
2014-06-11 05:51:23 +00:00
Marc Glisse 00f30445f4 re PR c++/54442 (Const overloads resolution failure)
2014-06-09  Marc Glisse  <marc.glisse@inria.fr>

	PR c++/54442
gcc/
	* tree.c (build_qualified_type): Use a canonical type for
	TYPE_CANONICAL.
gcc/testsuite/
	* g++.dg/pr54442.C: New file.

From-SVN: r211377
2014-06-09 15:07:24 +00:00
Jan Hubicka 24d047a30a symtab.c (dump_symtab_base): Update dumping.
* symtab.c (dump_symtab_base): Update dumping.
	(symtab_make_decl_local): Clear only DECL_COMDAT.
	* tree-vect-data-refs.c (Check that variable is static before
	tampering with sections.
	* cgraphclones.c (duplicate_thunk_for_node): Do not clear section name.
	(cgraph_create_virtual_clone): Likewise.
	* tree.c (decl_comdat_group, decl_comdat_group_id): Constify argument.
	(decl_section_name, set_decl_section_name): New accessors.
	(find_decls_types_r): Do not walk section name
	* tree.h (DECL_SECTION_NAME): Implement using
	decl_section_name.
	(decl_comdat_group, decl_comdat_group_id): Constify.
	(decl_section_name, set_decl_section_name): Update.
	* varpool.c (varpool_finalize_named_section_flags): Use
	get_section.
	* cgraph.c (cgraph_add_thunk): Reset node instead of rebuilding.
	(cgraph_make_node_local_1): Clear section and comdat group.
	* cgraph.h (set_comdat_group): Sanity check.
	(get_section, set_section): New.
	* ipa-comdats.c (ipa_comdats): Use get_section.
	* ipa.c (ipa_discover_readonly_nonaddressable_var): Likewise.
	* lto-streamer-out.c: Do not follow section names.
	* c-family/c-common.c (handle_section_attribute):
	Update.
	* lto-cgraph.c (lto_output_node): Output section.
	(lto_output_varpool_node): Likewise.
	(read_comdat_group): Rename to ...
	(read_identifier): ... this one.
	(read_string_cst): New function.
	(input_node, input_varpool_node): Input section names.
	* tree-emutls.c (get_emutls_init_templ_addr): Update.
	(new_emutls_decl): Update.
	(secname_for_decl): Check section names only of static
	vars.
	* config/mep/mep.c (mep_unique_section): Use set_decl_section_name.
	* config/i386/winnt.c (i386_pe_unique_section): Likewise.
	* config/i386/i386.c (x86_64_elf_unique_section): Likewise.
	* config/c6x/c6x.c (c6x_elf_unique_section): Likewise.
	* config/rs6000/rs6000.c (rs6000_xcoff_unique_section): Likewise.
	* config/mcore/mcore.c (mcore_unique_section): Likewise.
	* config/mips/mips.c (mips16_build_function_stub): Likewise.
	* config/v850/v850.c (v850_insert_attributes): Likewise.
	* config/h8300/h8300.c: (h8300_handle_eightbit_data_attribute):
	Likewise.
	(h8300_handle_tiny_data_attribute): Likewise.
	* config/bfin/bfin.c (bfin_handle_l1_text_attribute): Likewise.
	(bfin_handle_l2_attribute): Likewise.
	* tree-streamer-in.c (lto_input_ts_decl_with_vis_tree_pointers): Do not read section name.

	* lto.c (mentions_vars_p_decl_with_vis, compare_tree_sccs_1,
	lto_fixup_prevailing_decls): Skip section names.

	* go-gcc.cc (global_variable_set_init): Use
	set_decl_section_name.

	* gcc-interface/utils.c (process_attributes): Use it.

	* c-decl.c (merge_decls): Use set_decl_section_name.
	(duplicate_decls): Remove node if it exists.

	* class.c (build_utf8_ref): Use set_decl_section_name.
	(emit_register_classes_in_jcr_section): Likewise.
	(emit_register_classes_in_jcr_section): Likewise.

	* method.c (use_thunk): Use set_decl_section_name.
	* optimize.c (maybe_clone_body): Use set_decl_section_name.
	* decl.c (duplicate_decls): Likewise.
	* vtable-class-hierarchy.c: Likewise.

From-SVN: r211363
2014-06-09 02:30:30 +00:00
Martin Liska 8a57e88dc6 New attribute lookup function addition
* tree.h (private_lookup_attribute_starting): New function.
	(lookup_attribute_starting): Likewise.
	* tree.c (private_lookup_attribute_starting): Likewise.

From-SVN: r211219
2014-06-04 09:44:33 +00:00
Andrew MacLeod 9b2b72791e expr.h: Remove prototypes of functions defined in builtins.c.
* expr.h: Remove prototypes of functions defined in builtins.c.
	* tree.h: (build_call_expr_*, build_string_literal): Add prototypes.
	Remove prototypes of functions defined in builtins.c.
	* builtins.h: Update prototype list to include all exported functions.
	* builtins.c: (default_libc_has_function, gnu_libc_has_function,
	no_c99_libc_has_function): Move to targhooks.c
	(build_string_literal, build_call_expr_loc_array,
	build_call_expr_loc_vec, build_call_expr_loc, build_call_expr): Move
	to tree.c.
	(expand_builtin_object_size, fold_builtin_object_size): Make static.
	* targhooks.c (default_libc_has_function, gnu_libc_has_function,
	no_c99_libc_has_function): Relocate from builtins.c.
	* tree.c: Include builtins.h.
	(build_call_expr_loc_array, build_call_expr_loc_vec,
	build_call_expr_loc, build_call_expr, build_string_literal): Relocate
	from builtins.c.
	* fold-const.h (fold_fma): Move prototype to builtins.h.
	* realmpfr.h (do_mpc_arg2): Move prototype to builtins.h.

	* fortran/trans.c (trans_runtime_error_vararg): Call
	fold_build_call_array_loc instead of fold_builtin_call_array.

	* asan.c: Include builtins.h.
	* cfgexpand.c: Likewise.
	* convert.c: Likewise.
	* emit-rtl.c: Likewise.
	* except.c: Likewise.
	* expr.c: Likewise.
	* fold-const.c: Likewise.
	* gimple-fold.c: Likewise.
	* gimple-ssa-strength-reduction.c: Likewise.
	* gimplify.c: Likewise.
	* ipa-inline.c: Likewise.
	* ipa-prop.c: Likewise.
	* lto-streamer-out.c: Likewise.
	* stmt.c: Likewise.
	* tree-inline.c: Likewise.
	* tree-object-size.c: Likewise.
	* tree-sra.c: Likewise.
	* tree-ssa-ccp.c: Likewise.
	* tree-ssa-forwprop.c: Likewise.
	* tree-ssa-loop-ivcanon.c: Likewise.
	* tree-ssa-loop-ivopts.c: Likewise.
	* tree-ssa-math-opts.c: Likewise.
	* tree-ssa-reassoc.c: Likewise.
	* tree-ssa-threadedge.c: Likewise.
	* tree-streamer-in.c: Likewise.
	* tree-vect-data-refs.c: Likewise.
	* tree-vect-patterns.c: Likewise.
	* tree-vect-stmts.c: Likewise.

	c
	* c-decl.c: Include builtins.h.
	* c-parser.c: Likewise.

	cp
	* decl.c: Include builtins.h.
	* semantics.c: Likewise.

	go
	* go-gcc.cc: Include builtins.h.

	lto
	* lto-symtab.c: Include builtins.h.

	config
	* aarch64/aarch64.c: Include builtins.h.
	* alpha/alpha.c: Likewise.
	* arc/arc.c: Likewise.
	* arm/arm.c: Likewise.
	* avr/avr.c: Likewise.
	* bfin/bfin.c: Likewise.
	* c6x/c6x.c: Likewise.
	* cr16/cr16.c: Likewise.
	* cris/cris.c: Likewise.
	* epiphany/epiphany.c: Likewise.
	* fr30/fr30.c: Likewise.
	* frv/frv.c: Likewise.
	* h8300/h8300.c: Likewise.
	* i386/i386.c: Likewise.
	* i386/winnt.c: Likewise.
	* ia64/ia64.c: Likewise.
	* iq2000/iq2000.c: Likewise.
	* lm32/lm32.c: Likewise.
	* m32c/m32c.c: Likewise.
	* m32r/m32r.c: Likewise.
	* m68k/m68k.c: Likewise.
	* mcore/mcore.c: Likewise.
	* mep/mep.c: Likewise.
	* microblaze/microblaze.c: Likewise.
	* mips/mips.c: Likewise.
	* mmix/mmix.c: Likewise.
	* mn10300/mn10300.c: Likewise.
	* moxie/moxie.c: Likewise.
	* msp430/msp430.c: Likewise.
	* nds32/nds32.c: Likewise.
	* pa/pa.c: Likewise.
	* pdp11/pdp11.c: Likewise.
	* picochip/picochip.c: Likewise.
	* rl78/rl78.c: Likewise.
	* rs6000/rs6000.c: Likewise.
	* rx/rx.c: Likewise.
	* s390/s390.c: Likewise.
	* score/score.c: Likewise.
	* sh/sh.c: Likewise.
	* sparc/sparc.c: Likewise.
	* spu/spu.c: Likewise.
	* stormy16/stormy16.c: Likewise.
	* tilegx/tilegx.c: Likewise.
	* tilepro/tilepro.c: Likewise.
	* v850/v850.c: Likewise.
	* vax/vax.c: Likewise.
	* xtensa/xtensa.c: Likewise.

From-SVN: r211145
2014-06-02 20:13:44 +00:00
Jason Merrill d67ff7b75d re PR c++/47202 (Endless recursion during mangling)
PR c++/47202
gcc/cp/
	* decl.c (cxx_comdat_group): Return a decl.
	* optimize.c (cdtor_comdat_group): Get its DECL_ASSEMBLER_NAME.
gcc/
	* cgraph.h (symtab_node::get_comdat_group_id): New.
	* cgraphunit.c (analyze_functions): Call it.
	* symtab.c (dump_symtab_node): Likewise.
	* tree.c (decl_comdat_group_id): New.
	* tree.h: Declare it.
	* lto-streamer-out.c (write_symbol): Use it.
	* trans-mem.c (ipa_tm_create_version_alias): Likewise.

From-SVN: r211026
2014-05-28 12:38:23 -04:00
Jan Hubicka 50efcce1d5 tree.h (decl_comdat_group): Declare.
* tree.h (decl_comdat_group): Declare.
	* cgraph.h (symtab_in_same_comdat_p): Move offline to ...
	* tree.c (decl_comdat_group): Here.

From-SVN: r210956
2014-05-27 04:18:38 +00:00
Richard Biener a9243bfced system.h: Define __STDC_FORMAT_MACROS before including inttypes.h.
2014-05-23  Richard Biener  <rguenther@suse.de>

	* system.h: Define __STDC_FORMAT_MACROS before
	including inttypes.h.
	* hwint.h (HOST_WIDEST_INT, HOST_BITS_PER_WIDEST_INT,
	HOST_WIDEST_INT_PRINT, HOST_WIDEST_INT_PRINT_DEC,
	HOST_WIDEST_INT_PRINT_DEC_C, HOST_WIDEST_INT_PRINT_UNSIGNED,
	HOST_WIDEST_INT_PRINT_HEX, HOST_WIDEST_INT_PRINT_DOUBLE_HEX,
	HOST_WIDEST_INT_C): Remove.
	(PRId64, PRIi64, PRIo64, PRIu64, PRIx64, PRIX64): Define
	if C99 inttypes.h is not available.

	* coretypes.h (gcov_type, gcov_type_unsigned): Use [u]int64_t.
	* gcov-io.h (gcov_type, gcov_type_unsigned): Likewise.
	* gcov-io.c (gcov_histo_index): Drop non-64bit hwi case.
	* cfgloop.h (struct niter_desc): Use uint64_t for niter field.
	* bitmap.c (struct bitmap_descriptor_d): Use uint64_t for counters.
	(struct output_info): Likewise.
	(print_statistics): Adjust.
	(dump_bitmap_statistics): Likewise.
	* bt-load.c (migrate_btr_defs): Print with PRId64.
	* cfg.c (dump_edge_info, dump_bb_info): Likewise.
	(MAX_SAFE_MULTIPLIER): Adjust.
	* cfghooks.c (dump_bb_for_graph): Print with PRId64.
	* cgraph.c (cgraph_redirect_edge_call_stmt_to_callee,
	dump_cgraph_node): Likewise.
	* final.c (dump_basic_block_info): Likewise.
	* gcov-dump.c (tag_counters, tag_summary, dump_working_sets): Likewise.
	* gcov.c (format_gcov): Likewise.
	* ipa-cp.c (good_cloning_opportunity_p): Likewise.  Use int64_t
	for calculation.
	(get_clone_agg_value): Use HOST_WIDE_INT for offset.
	* ipa-inline.c (compute_max_insns): Use int64_t for calcuation.
	(inline_small_functions, dump_overall_stats, dump_inline_stats):
	Use PRId64 for dumping.
	* ipa-profile.c (dump_histogram, ipa_profile): Likewise.
	* ira-color.c (struct allocno_hard_regs): Use int64_t for cost.
	(add_allocno_hard_regs): Adjust.
	* loop-doloop.c (doloop_modify): Print using PRId64.
	* loop-iv.c (inverse): Compute in uint64_t.
	(determine_max_iter, iv_number_of_iterations): Likewise.
	* loop-unroll.c (decide_peel_completely, decide_peel_simple):
	Print using PRId64.
	* lto-streamer-out.c (write_symbol): Use uint64_t.
	* mcf.c (CAP_INFINITY): Use int64_t maximum.
	(dump_fixup_edge, create_fixup_graph, cancel_negative_cycle,
	find_max_flow, adjust_cfg_counts): Use int64_t and dump with PRId64.
	* modulo-sched.c (const_iteration_count): Use int64_t.
	(sms_schedule): Dump using PRId64.
	* predict.c (dump_prediction): Likewise.
	* pretty-print.h (pp_widest_integer): Remove.
	* profile.c (get_working_sets, is_edge_inconsistent,
	is_inconsistent, read_profile_edge_counts): Dump using PRId64.
	* tree-pretty-print.c (pp_double_int): Remove case handling
	HOST_BITS_PER_DOUBLE_INT == HOST_BITS_PER_WIDEST_INT.
	* tree-ssa-math-opts.c (struct symbolic_number): Use uint64_t
	and adjust users.
	(pass_optimize_bswap::execute): Remove restriction on hosts.
	* tree-streamer-in.c (streamer_alloc_tree): Use HOST_WIDE_INT.
	* tree-streamer-out.c (streamer_write_tree_header): Likewise.
	* tree.c (widest_int_cst_value): Remove.
	* tree.h (widest_int_cst_value): Likewise.
	* value-prof.c (dump_histogram_value): Print using PRId64.
	* gengtype.c (main): Also inject int64_t.
	* ggc-page.c (struct max_alignment): Use int64_t.
	* alloc-pool.c (struct allocation_object_def): Likewise.
	* ira-conflicts.c (build_conflict_bit_table): Use uint64_t
	for computation.
	* doc/tm.texi.in: Remove reference to HOST_WIDEST_INT.
	* doc/tm.texi: Regenerated.
	* gengtype-lex.l (IWORD): Handle [u]int64_t.
	* config/sh/sh.c (expand_cbranchdi4): Use gcov_type.
	* config/mmix/mmix-protos.h (mmix_intval, mmix_shiftable_wyde_value,
	mmix_output_register_setting): Use [u]int64_t in prototypes.
	* config/mmix/mmix.c (mmix_print_operand, mmix_output_register_setting,
	mmix_shiftable_wyde_value, mmix_output_shiftvalue_op_from_str,
	mmix_output_octa, mmix_output_shifted_value): Adjust.
	(mmix_intval): Adjust.  Remove unreachable case.
	* config/mmix/mmix.md (*nonlocal_goto_receiver_expanded): Use
	int64_t.

	lto/
	* lto.c (lto_parse_hex): Use int64_t.
	(lto_resolution_read): Likewise.

From-SVN: r210931
2014-05-26 10:42:43 +00:00
Jan Hubicka aede2c10ca tree-core.h (tree_decl_with_vis): Replace comdat_group by symtab_node pointer.
* tree-core.h (tree_decl_with_vis): Replace comdat_group by
	symtab_node pointer.
	* tree.c (copy_node_stat): Be sure tonot copy
	symtab_node pointer.
	(find_decls_types_r): Do not walk COMDAT_GROUP.
	* tree.h (DECL_COMDAT_GROUP): Revamp to use decl_comdat_group.
	* varasm.c (make_decl_one_only): Use set_comdat_group;
	create node if needed.
	* ipa-inline-transform.c (save_inline_function_body): Update
	way we decl->symtab mapping.
	* symtab.c (symtab_hash, hash_node, eq_node
	symtab_insert_node_to_hashtable): Remove.
	(symtab_register_node): Update.
	(symtab_unregister_node): Update.
	(symtab_get_node): Reimplement as inline function.
	(symtab_add_to_same_comdat_group): Update.
	(symtab_dissolve_same_comdat_group_list): Update.
	(dump_symtab_base): Update.
	(verify_symtab_base): Update.
	(symtab_make_decl_local): Update.
	(fixup_same_cpp_alias_visibility): Update.
	(symtab_nonoverwritable_alias): Update.
	* cgraphclones.c (set_new_clone_decl_and_node_flags): Update.
	* ipa.c (update_visibility_by_resolution_info): UPdate.
	* bb-reorder.c: Include cgraph.h
	* lto-streamer-out.c (DFS_write_tree_body, hash_tree): Do not deal
	with comdat groups.
	* ipa-comdats.c (set_comdat_group, ipa_comdats): Update.
	* cgraph.c (cgraph_get_create_node): Update.
	* cgraph.h (struct symtab_node): Add get_comdat_group, set_comdat_group
	and comdat_group_.
	(symtab_get_node): Make inline.
	(symtab_insert_node_to_hashtable): Remove.
	(symtab_can_be_discarded): Update.
	(decl_comdat_group): New function.
	* tree-streamer-in.c (lto_input_ts_decl_with_vis_tree_pointers): Update.
	* lto-cgraph.c (lto_output_node, lto_output_varpool_node): Stream out
	comdat group name.
	(read_comdat_group): New function.
	(input_node, input_varpool_node): Use it.
	* trans-mem.c (ipa_tm_create_version_alias): Update code creating
	comdat groups.
	* mips.c (mips_start_unique_function): Likewise.
	(ix86_code_end): Likewise.
	(rs6000_code_end): Likweise.
	* tree-streamer-out.c (DECL_COMDAT_GROUP): Do not stream
	comdat group.

	* lto-symtab.c (lto_symtab_merge_symbols): Update code setting
	symtab pointer.
	* lto.c (compare_tree_sccs_1): Do not compare comdat groups.

	* optmize.c (maybe_thunk_body): Use set_comdat_group.
	(maybe_clone_body): Likewise.
	* decl.c (duplicate_decls): Update code duplicating comdat group;
	do not copy symtab pointer; before freeing newdecl remove it
	from symtab.
	* decl2.c (constrain_visibility): Use set_comdat_group.

	* c-decl.c (merge_decls): Preserve symtab node pointers.
	(duplicate_decls): Free new decl.

From-SVN: r210901
2014-05-24 22:00:14 +00:00
Richard Sandiford 632f2871ed tree.def (VOID_CST): New.
gcc/
	* tree.def (VOID_CST): New.
	* tree-core.h (TI_VOID): New.
	* tree.h (void_node): New.
	* tree.c (tree_node_structure_for_code, tree_code_size)
	(iterative_hash_expr): Handle VOID_CST.
	(build_common_tree_nodes): Initialize void_node.

gcc/c-family/
	* c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
	* c-common.c (c_common_nodes_and_builtins): Don't initialize
	void_zero_node.
	* c-pretty-print.c (pp_c_void_constant): New function.
	(c_pretty_printer::constant, c_pretty_printer::primary_expression)
	(c_pretty_printer::expression): Handle VOID_CST.
	* cilk.c (extract_free_variables): Likewise.
	* c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
	(ubsan_instrument_vla): Use void_node instead of void_zero_node.

gcc/c/
	* c-array-notation.c (expand_array_notations): Use void_node
	instead of void_zero_node.

gcc/cp/
	* cvt.c (convert_to_void): Use void_node instead of void_zero_node.
	* cp-array-notation.c (replace_invariant_exprs): Likewise.
	(expand_array_notation): Handle VOID_CST.
	* error.c (dump_expr): Likewise.
	* cxx-pretty-print.c (cxx_pretty_printer::primary_expression)
	(cxx_pretty_printer::expression): Likewise.
	(pp_cxx_new_expression): Use void_node instead of void_zero_node.
	* decl.c (register_dtor_fn): Likewise.
	* init.c (build_raw_new_expr, build_new_1, build_vec_init)
	(build_delete, push_base_cleanups): Likewise.
	* mangle.c (write_expression): Likewise.
	* semantics.c (finish_break_stmt, empty_expr_stmt_p): Likewise.
	* pt.c (tsubst_decl, tsubst_copy_and_build): Likewise.
	(tsubst, tsubst_copy, build_non_dependent_expr): Handle VOID_CST.
	* tree.c (cp_tree_equal): Likewise.
	(build_dummy_object, is_dummy_object, stabilize_expr): Use void_node
	instead of void_zero_node.
	* typeck.c (check_return_expr): Likewise.
	* typeck2.c (build_functional_cast): Likewise.

From-SVN: r210692
2014-05-21 11:00:35 +00:00
Trevor Saunders 766090c20f use templates instead of gengtype for typed allocation functions
gcc/ChangeLog:

	* alias.c (record_alias_subset): Adjust.
	* bitmap.c (bitmap_element_allocate): Likewise.
	(bitmap_gc_alloc_stat): Likewise.
	* cfg.c (init_flow): Likewise.
	(alloc_block): Likewise.
	(unchecked_make_edge): Likewise.
	* cfgloop.c (alloc_loop): Likewise.
	(flow_loops_find): Likewise.
	(rescan_loop_exit): Likewise.
	* cfgrtl.c (init_rtl_bb_info): Likewise.
	* cgraph.c (insert_new_cgraph_node_version): Likewise.
	(cgraph_allocate_node): Likewise.
	(cgraph_create_edge_1): Likewise.
	(cgraph_allocate_init_indirect_info): Likewise.
	* cgraphclones.c (cgraph_clone_edge): Likewise.
	* cgraphunit.c (add_asm_node): Likewise.
	(init_lowered_empty_function): Likewise.
	* config/aarch64/aarch64.c (aarch64_init_machine_status):
	Likewise.
	* config/alpha/alpha.c (alpha_init_machine_status): Likewise.
	(alpha_use_linkage): Likewise.
	* config/arc/arc.c (arc_init_machine_status): Likewise.
	* config/arm/arm.c (arm_init_machine_status): Likewise.
	* config/avr/avr.c (avr_init_machine_status): Likewise.
	* config/bfin/bfin.c (bfin_init_machine_status): Likewise.
	* config/c6x/c6x.c (c6x_init_machine_status): Likewise.
	* config/cris/cris.c (cris_init_machine_status): Likewise.
	* config/darwin.c (machopic_indirection_name): Likewise.
	(darwin_build_constant_cfstring): Likewise.
	(darwin_enter_string_into_cfstring_table): Likewise.
	* config/epiphany/epiphany.c (epiphany_init_machine_status):
	* Likewise.
	* config/frv/frv.c (frv_init_machine_status): Likewise.
	* config/i386/i386.c (get_dllimport_decl): Likewise.
	(ix86_init_machine_status): Likewise.
	(assign_386_stack_local): Likewise.
	* config/i386/winnt.c (i386_pe_record_external_function):
	Likewise.
	(i386_pe_maybe_record_exported_symbol): Likewise.
	(i386_pe_record_stub): Likewise.
	* config/ia64/ia64.c (ia64_init_machine_status): Likewise.
	* config/iq2000/iq2000.c (iq2000_init_machine_status): Likewise.
	* config/m32c/m32c.c (m32c_init_machine_status): Likewise.
	(m32c_note_pragma_address): Likewise.
	* config/mep/mep.c (mep_init_machine_status): Likewise.
	(mep_note_pragma_flag): Likewise.
	* config/mips/mips.c (mflip_mips16_use_mips16_p): Likewise.
	(mips16_local_alias): Likewise.
	(mips_init_machine_status): Likewise.
	* config/mmix/mmix.c (mmix_init_machine_status): Likewise.
	* config/moxie/moxie.c (moxie_init_machine_status): Likewise.
	* config/msp430/msp430.c (msp430_init_machine_status): Likewise.
	* config/nds32/nds32.c (nds32_init_machine_status): Likewise.
	* config/nios2/nios2.c (nios2_init_machine_status): Likewise.
	* config/pa/pa.c (pa_init_machine_status): Likewise.
	(pa_get_deferred_plabel): Likewise.
	* config/rl78/rl78.c (rl78_init_machine_status): Likewise.
	* config/rs6000/rs6000.c (builtin_function_type): Likewise.
	(rs6000_init_machine_status): Likewise.
	(output_toc): Likewise.
	* config/s390/s390.c (s390_init_machine_status): Likewise.
	* config/score/score.c (score_output_external): Likewise.
	* config/sparc/sparc.c (sparc_init_machine_status): Likewise.
	* config/spu/spu.c (spu_init_machine_status): Likewise.
	* config/tilegx/tilegx.c (tilegx_init_machine_status): Likewise.
	* config/tilepro/tilepro.c (tilepro_init_machine_status):
	* Likewise.
	* config/xtensa/xtensa.c (xtensa_init_machine_status): Likewise.
	* coverage.c (coverage_end_function): Likewise.
	* dbxout.c (dbxout_init): Likewise.
	* doc/gty.texi: Don't mention variable_size attribute.
	* dwarf2cfi.c (new_cfi): Adjust.
	(new_cfi_row): Likewise.
	(copy_cfi_row): Likewise.
	(create_cie_data): Likewise.
	* dwarf2out.c (dwarf2out_alloc_current_fde): Likewise.
	(new_loc_descr): Likewise.
	(find_AT_string_in_table): Likewise.
	(add_addr_table_entry): Likewise.
	(new_die): Likewise.
	(add_var_loc_to_decl): Likewise.
	(clone_die): Likewise.
	(clone_as_declaration): Likewise.
	(break_out_comdat_types): Likewise.
	(new_loc_list): Likewise.
	(add_loc_descr_to_each): Likewise.
	(add_location_or_const_value_attribute): Likewise.
	(add_linkage_name): Likewise.
	(lookup_filename): Likewise.
	(dwarf2out_var_location): Likewise.
	(new_line_info_table): Likewise.
	(dwarf2out_init): Likewise.
	(mem_loc_descriptor): Likewise.
	(loc_descriptor): Likewise.
	(add_const_value_attribute): Likewise.
	(tree_add_const_value_attribute): Likewise.
	(comp_dir_string): Likewise.
	(dwarf2out_vms_debug_main_pointer): Likewise.
	(string_cst_pool_decl): Likewise.
	* emit-rtl.c (set_mem_attrs): Likewise.
	(get_reg_attrs): Likewise.
	(start_sequence): Likewise.
	(init_emit): Likewise.
	(init_emit_regs): Likewise.
	* except.c (init_eh_for_function): Likewise.
	(gen_eh_region): Likewise.
	(gen_eh_region_catch): Likewise.
	(gen_eh_landing_pad): Likewise.
	(add_call_site): Likewise.
	* function.c (add_frame_space): Likewise.
	(insert_temp_slot_address): Likewise.
	(assign_stack_temp_for_type): Likewise.
	(get_hard_reg_initial_val): Likewise.
	(allocate_struct_function): Likewise.
	(prepare_function_start): Likewise.
	(types_used_by_var_decl_insert): Likewise.
	* gengtype.c (variable_size_p): Remove function.
	(enum alloc_quantity): Remove enum.
	(write_typed_alloc_def): Remove function.
	(write_typed_struct_alloc_def): Likewise.
	(write_typed_typedef_alloc_def): Likewise.
	(write_typed_alloc_defns): Likewise.
	(main): Adjust.
	* ggc-common.c (ggc_cleared_alloc_htab_ignore_args): Adjust.
	(ggc_cleared_alloc_ptr_array_two_args): Likewise.
	* ggc.h (ggc_alloc): new function.
	(ggc_cleared_alloc): Likewise.
	(ggc_vec_alloc): Template on type of vector element, and remove
	element size argument.
	(ggc_cleared_vec_alloc): Likewise.
	* gimple.c (gimple_build_omp_for): Adjust.
	(gimple_copy): Likewise.
	* ipa-cp.c (get_replacement_map): Likewise.
	(find_aggregate_values_for_callers_subset): Likewise.
	(known_aggs_to_agg_replacement_list): Likewise.
	* ipa-devirt.c (get_odr_type): Likewise.
	* ipa-prop.c (ipa_node_duplication_hook): Likewise.
	(read_agg_replacement_chain): Likewise.
	* loop-iv.c (get_simple_loop_desc): Likewise.
	* lto-cgraph.c (input_node_opt_summary): Likewise.
	* lto-section-in.c (lto_new_in_decl_state): Likewise.
	* lto-streamer-in.c (lto_input_eh_catch_list): Likewise.
	(input_eh_region): Likewise.
	(input_eh_lp): Likewise.
	(input_cfg): Likewise.
	* optabs.c (set_optab_libfunc): Likewise.
	(init_tree_optimization_optabs): Likewise.
	(set_conv_libfunc): Likewise.
	* passes.c (do_per_function_toporder): Likewise.
	* rtl.h: Don't use variable_size gty attribute.
	* sese.c (if_region_set_false_region): Adjust.
	* stringpool.c (gt_pch_save_stringpool): Likewise.
	* target-globals.c (save_target_globals): Likewise.
	* toplev.c (general_init): Likewise.
	* trans-mem.c (record_tm_replacement): Likewise.
	(split_bb_make_tm_edge): Likewise.
	* tree-cfg.c (move_sese_region_to_fn): Likewise.
	* tree-data-ref.h (lambda_vector_new): Likewise.
	* tree-eh.c (add_stmt_to_eh_lp_fn): Likewise.
	* tree-iterator.c (tsi_link_before): Likewise.
	(tsi_link_after): Likewise.
	* tree-scalar-evolution.c (new_scev_info_str): Likewise.
	* tree-ssa-loop-niter.c (record_estimate): Likewise.
	* tree-ssa-operands.c (ssa_operand_alloc): Likewise.
	* tree-ssa-operands.h: Don't use variable_size gty attribute.
	* tree-ssa.c (init_tree_ssa): Adjust.
	* tree-ssanames.c (set_range_info): Likewise.
	(get_ptr_info): Likewise.
	(duplicate_ssa_name_ptr_info): Likewise.
	(duplicate_ssa_name_range_info): Likewise.
	* tree-streamer-in.c (unpack_ts_real_cst_value_fields): Likewise.
	(unpack_ts_fixed_cst_value_fields): Likewise.
	* tree.c (build_fixed): Likewise.
	(build_real): Likewise.
	(build_string): Likewise.
	(decl_priority_info): Likewise.
	(decl_debug_expr_insert): Likewise.
	(decl_value_expr_insert): Likewise.
	(decl_debug_args_insert): Likewise.
	(type_hash_add): Likewise.
	(build_omp_clause): Likewise.
	* ubsan.c (decl_for_type_insert): Likewise.
	* varasm.c (get_unnamed_section): Likewise.
	(get_noswitch_section): Likewise.
	(get_section): Likewise.
	(get_block_for_section): Likewise.
	(create_block_symbol): Likewise.
	(build_constant_desc): Likewise.
	(create_constant_pool): Likewise.
	(force_const_mem): Likewise.
	(record_tm_clone_pair): Likewise.
	* varpool.c (varpool_create_empty_node): Likewise.

gcc/c/ChangeLog:

	* c-decl.c (finish_struct): Adjust.
	(finish_enum): Likewise.
	(bind): Adjust.
	(record_inline_static): Likewise.
	(push_scope): Likewise.
	(make_label): Likewise.
	(lookup_label_for_goto): Likewise.
	(finish_struct): Likewise.
	(finish_enum): Likewise.
	(store_parm_decls): Likewise.
	(c_push_function_context): Likewise.
	* c-lang.h: Remove usage of variable_size gty attribute.
	* c-parser.c (c_parse_init): Adjust.
	(c_parse_file): Likewise.

gcc/java/ChangeLog:

	* class.c (add_method_1): Adjust.
	(java_treetreehash_new): Likewise.
	* constants.c (set_constant_entry): Likewise.
	(cpool_for_class): Likewise.
	* decl.c (make_binding_level): Likewise.
	(java_dup_lang_specific_decl): Likewise.
	* expr.c (add_type_assertion): Likewise.
	* java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Likewise.
	(lang_decl): don't use variable_size gty attribute.
	(MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Adjust.
	(lang_type): Don't use variable_size gty attribute.
	* jcf-parse.c (java_parse_file): Adjust.
	(process_zip_dir): Likewise.
	* jcf.h: Remove usage of variable_size gty attribute.
	* jcf-reader.c (jcf_parse_constant_pool): Adjust.
	(jcf_parse_bootstrap_methods): Likewise.

gcc/objc/ChangeLog:

	* objc-act.c (objc_build_string_object): Adjust.
	(continue_class): Likewise.
	* objc-act.h (ALLOC_OBJC_TYPE_LANG_SPECIFIC): Likewise.
	* objc-map.c (objc_map_alloc_ggc): Likewise.
	(objc_map_private_resize): Likewise.
	* objc-next-runtime-abi-02.c (objc_next_runtime_abi_02_init):
	Likewise.
	(hash_name_enter): Likewise.

gcc/cp/ChangeLog:

	* class.c (sorted_fields_type_new): Adjust.
	* cp-cilkplus.c (cilk_install_body_with_frame_cleanup): Likewise.
	* cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
	* cp-tree.h: Remove usage of variable_size gty attribute.
	* decl.c (make_label_decl): Adjust.
	(check_goto): Likewise.
	(start_preparsed_function): Likewise.
	(save_function_data): Likewise.
	* lex.c (init_reswords): Likewise.
	(retrofit_lang_decl): Likewise.
	(cxx_dup_lang_specific_decl): Likewise.
	(copy_lang_type): Likewise.
	(cxx_make_type): Likewise.
	* name-lookup.c (binding_entry_make): Likewise.
	(binding_table_construct): Likewise.
	(binding_table_new): Likewise.
	(cxx_binding_make): Likewise.
	(pushdecl_maybe_friend_1): Likewise.
	(begin_scope): Likewise.
	(push_to_top_level): Likewise.
	* parser.c (cp_lexer_alloc): Likewise.
	(cp_lexer_new_from_tokens): Likewise.
	(cp_token_cache_new): Likewise.
	(cp_parser_context_new): Likewise.
	(cp_parser_new): Likewise.
	(cp_parser_nested_name_specifier_opt): Likewise.
	(cp_parser_template_id): Likewise.
	* pt.c (maybe_process_partial_specialization): Likewise.
	(register_specialization): Likewise.
	(add_pending_template): Likewise.
	(lookup_template_class_1): Likewise.
	(push_tinst_level): Likewise.
	* semantics.c (register_constexpr_fundef): Likewise.
	(cxx_eval_call_expression): Likewise.
	* typeck2.c (abstract_virtuals_error_sfinae): Likewise.

gcc/fortran/ChangeLog:

	* f95-lang.c (pushlevel): Adjust.
	* trans-decl.c (gfc_allocate_lang_decl): Adjust.
	(gfc_find_module): Likewise.
	* trans-types.c (gfc_get_nodesc_array_type): Likewise.
	(gfc_get_array_type_bounds): Likewise.
	(gfc_nonrestricted_type): Likewise.
	* trans.h: Don't use variable_size gty attribute.

gcc/ada/ChangeLog:

	* gcc-interface/ada-tree.h: Remove usage of variable_size gty
	annotation.
	* gcc-interface/decl.c (annotate_value): Adjust.
	* gcc-interface/trans.c (Attribute_to_gnu): Likewise.
	(push_range_check_info): Likewise.
	(Loop_Statement_to_gnu): Likewise.
	(Subprogram_Body_to_gnu): Likewise.
	(Compilation_Unit_to_gnu): Likewise.
	(start_stmt_group): Likewise.
	* gcc-interface/utils.c (init_gnat_utils): Likewise.
	(gnat_pushlevel): Likewise.
	(maybe_pad_type): Likewise.

gcc/go/ChangeLog:

	* go-lang.c (struct GTY): Don't use variable_size gty attribute.

gcc/c-family/ChangeLog:

	* c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
	* c-pragma.c (push_alignment): Adjust.
	(handle_pragma_push_options): Likewise.

gcc/lto/ChangeLog:

	* lto-tree.h: Don't use variable_size gty attribute.
	* lto.c (lto_read_in_decl_state): Adjust.
	(create_subid_section_table): Likewise.
	(lto_flatten_files): Likewise.
	(read_cgraph_and_symbols): Likewise.

gcc/objcp/ChangeLog:

	* objcp-decl.h: Adjust.

From-SVN: r210566
2014-05-17 23:07:23 +00:00
Trevor Saunders 231120e5d4 rm a bunch of _stat allocation functions
Now that we can use c++ default arguments there's no reason to use
functions and wrapper macros.

gcc/ChangeLog:

	* dwarf2out.c (tree_add_const_value_attribute): Call
	ggc_internal_cleared_alloc instead of ggc_alloc_cleared_atomic.
	* gengtype.c (write_typed_alloc_def): Call ggc_internal_<x>alloc
	instead of ggc_internal_<x>alloc_stat.
	* ggc-common.c (ggc_internal_cleared_alloc): Drop _stat suffix.
	(ggc_realloc): Likewise.
	* ggc-none.c (ggc_internal_alloc): Likewise.
	(ggc_internal_cleared_alloc): Likewise.
	* ggc-page.c: Likewise.
	* ggc.h (ggc_internal_alloc_stat): Likewise.
	(ggc_internal_alloc): Remove macro.
	(ggc_internal_cleared_alloc_stat): Drop _stat suffix.
	(ggc_internal_cleared_alloc): Remove macro.
	(GGC_RESIZEVEC): Adjust.
	(ggc_resizevar): Remove macro.
	(ggc_internal_vec_alloc_stat): Drop _stat suffix.
	(ggc_internal_cleared_vec_alloc_stat): Likewise.
	(ggc_internal_vec_cleared_alloc): Remove macro.
	(ggc_alloc_atomic_stat): Drop _stat suffix.
	(ggc_alloc_atomic): Remove macro.
	(ggc_alloc_cleared_atomic): Remove macro.
	(ggc_alloc_string_stat): Drop _stat suffix.
	(ggc_alloc_string): Remove macro.
	(ggc_alloc_rtx_def_stat): Adjust.
	(ggc_alloc_tree_node_stat): Likewise.
	(ggc_alloc_cleared_tree_node_stat): Likewise.
	(ggc_alloc_cleared_gimple_statement_stat): Likewise.
	(ggc_alloc_cleared_simd_clone_stat): Likewise.
	* gimple.c (gimple_build_omp_for): Likewise.
	(gimple_copy): Likewise.
	* stringpool.c (ggc_alloc_string_stat): Drop _stat suffix.
	* toplev.c (realloc_for_line_map): Adjust.
	* tree-data-ref.h (lambda_vector_new): Likewise.
	* tree-phinodes.c (allocate_phi_node): Likewise.
	* tree.c (grow_tree_vec_stat): Likewise.
	* vec.h (va_gc::reserve): Adjust.

gcc/java/ChangeLog:

	* constants.c (set_constant_entry): Adjust.

From-SVN: r210565
2014-05-17 23:06:33 +00:00
Jakub Jelinek dd2fc5256e tree.h (OMP_CLAUSE_LINEAR_STMT): Define.
* tree.h (OMP_CLAUSE_LINEAR_STMT): Define.
	* tree.c (omp_clause_num_ops): Increase OMP_CLAUSE_LINEAR
	number of operands to 3.
	(walk_tree_1): Walk all operands of OMP_CLAUSE_LINEAR.
	* tree-nested.c (convert_nonlocal_omp_clauses,
	convert_local_omp_clauses): Handle OMP_CLAUSE_DEPEND.
	* gimplify.c (gimplify_scan_omp_clauses): Handle
	OMP_CLAUSE_LINEAR_STMT.
	* omp-low.c (lower_rec_input_clauses): Fix typo.
	(maybe_add_implicit_barrier_cancel, lower_omp_1): Add
	cast between Fortran boolean_type_node and C _Bool if
	needed.
gcc/fortran/
	* gfortran.h (gfc_statement): Add ST_OMP_CANCEL,
	ST_OMP_CANCELLATION_POINT, ST_OMP_TASKGROUP, ST_OMP_END_TASKGROUP,
	ST_OMP_SIMD, ST_OMP_END_SIMD, ST_OMP_DO_SIMD, ST_OMP_END_DO_SIMD,
	ST_OMP_PARALLEL_DO_SIMD, ST_OMP_END_PARALLEL_DO_SIMD and
	ST_OMP_DECLARE_SIMD.
	(gfc_omp_namelist): New typedef.
	(gfc_get_omp_namelist): Define.
	(OMP_LIST_UNIFORM, OMP_LIST_ALIGNED, OMP_LIST_LINEAR,
	OMP_LIST_DEPEND_IN, OMP_LIST_DEPEND_OUT): New clause list kinds.
	(gfc_omp_proc_bind_kind, gfc_omp_cancel_kind): New enums.
	(gfc_omp_clauses): Change type of lists to gfc_omp_namelist *.
	Add inbranch, notinbranch, cancel, proc_bind, safelen_expr and
	simdlen_expr fields.
	(gfc_omp_declare_simd): New typedef.
	(gfc_get_omp_declare_simd): Define.
	(gfc_namespace): Add omp_declare_simd field.
	(gfc_exec_op): Add EXEC_OMP_CANCEL, EXEC_OMP_CANCELLATION_POINT,
	EXEC_OMP_TASKGROUP, EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD and
	EXEC_OMP_PARALLEL_DO_SIMD.
	(gfc_omp_atomic_op): Add GFC_OMP_ATOMIC_MASK, GFC_OMP_ATOMIC_SEQ_CST
	and GFC_OMP_ATOMIC_SWAP.
	(gfc_code): Change type of omp_namelist field to gfc_omp_namelist *.
	(gfc_free_omp_namelist, gfc_free_omp_declare_simd,
	gfc_free_omp_declare_simd_list, gfc_resolve_omp_declare_simd): New
	prototypes.
	* trans-stmt.h (gfc_trans_omp_declare_simd): New prototype.
	* symbol.c (gfc_free_namespace): Call gfc_free_omp_declare_simd.
	* openmp.c (gfc_free_omp_clauses): Free safelen_expr and
	simdlen_expr.  Use gfc_free_omp_namelist instead of
	gfc_free_namelist.
	(gfc_free_omp_declare_simd, gfc_free_omp_declare_simd_list): New
	functions.
	(gfc_match_omp_variable_list): Add end_colon, headp and
	allow_sections arguments.  Handle parsing of array sections.
	Use *omp_namelist* instead of *namelist* data structure and
	functions/macros.  Allow termination at : character.
	(OMP_CLAUSE_ALIGNED, OMP_CLAUSE_DEPEND, OMP_CLAUSE_INBRANCH,
	OMP_CLAUSE_LINEAR, OMP_CLAUSE_NOTINBRANCH, OMP_CLAUSE_PROC_BIND,
	OMP_CLAUSE_SAFELEN, OMP_CLAUSE_SIMDLEN, OMP_CLAUSE_UNIFORM): Define.
	(gfc_match_omp_clauses): Change first and needs_space variables
	into arguments with default values.  Parse inbranch, notinbranch,
	proc_bind, safelen, simdlen, uniform, linear, aligned and
	depend clauses.
	(OMP_PARALLEL_CLAUSES): Add OMP_CLAUSE_PROC_BIND.
	(OMP_DECLARE_SIMD_CLAUSES, OMP_SIMD_CLAUSES): Define.
	(OMP_TASK_CLAUSES): Add OMP_CLAUSE_DEPEND.
	(gfc_match_omp_do_simd): New function.
	(gfc_match_omp_flush): Use *omp_namelist* instead of *namelist*
	data structure and functions/macros.
	(gfc_match_omp_simd, gfc_match_omp_declare_simd,
	gfc_match_omp_parallel_do_simd): New functions.
	(gfc_match_omp_atomic): Handle seq_cst clause.  Handle atomic swap.
	(gfc_match_omp_taskgroup, gfc_match_omp_cancel_kind,
	gfc_match_omp_cancel, gfc_match_omp_cancellation_point): New
	functions.
	(resolve_omp_clauses): Add where, omp_clauses and ns arguments.
	Use *omp_namelist* instead of *namelist* data structure and
	functions/macros.  Resolve uniform, aligned, linear, depend,
	safelen and simdlen clauses.
	(resolve_omp_atomic): Adjust for GFC_OMP_ATOMIC_{MASK,SEQ_CST,SWAP}
	addition, recognize atomic swap.
	(gfc_resolve_omp_parallel_blocks): Use gfc_omp_namelist instead
	of gfc_namelist.  Handle EXEC_OMP_PARALLEL_DO_SIMD the same as
	EXEC_OMP_PARALLEL_DO.
	(gfc_resolve_do_iterator): Use *omp_namelist* instead of *namelist*
	data structure and functions/macros.
	(resolve_omp_do): Likewise.  Handle EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD,
	EXEC_OMP_PARALLEL_DO_SIMD.
	(gfc_resolve_omp_directive): Handle EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD,
	EXEC_OMP_PARALLEL_DO_SIMD and EXEC_OMP_CANCEL.  Adjust
	resolve_omp_clauses caller.
	(gfc_resolve_omp_declare_simd): New function.
	* parse.c (decode_omp_directive): Parse cancellation point, cancel,
	declare simd, end do simd, end simd, end parallel do simd,
	end taskgroup, parallel do simd, simd and taskgroup directives.
	(case_executable): Add ST_OMP_CANCEL and ST_OMP_CANCELLATION_POINT.
	(case_exec_markers): Add ST_OMP_TASKGROUP, case ST_OMP_SIMD,
	ST_OMP_DO_SIMD and ST_OMP_PARALLEL_DO_SIMD.
	(case_decl): Add ST_OMP_DECLARE_SIMD.
	(gfc_ascii_statement): Handle ST_OMP_CANCEL,
	ST_OMP_CANCELLATION_POINT, ST_OMP_TASKGROUP, ST_OMP_END_TASKGROUP,
	ST_OMP_SIMD, ST_OMP_END_SIMD, ST_OMP_DO_SIMD, ST_OMP_END_DO_SIMD,
	ST_OMP_PARALLEL_DO_SIMD, ST_OMP_END_PARALLEL_DO_SIMD and
	ST_OMP_DECLARE_SIMD.
	(parse_omp_do): Handle ST_OMP_SIMD, ST_OMP_DO_SIMD and
	ST_OMP_PARALLEL_DO_SIMD.
	(parse_omp_atomic): Adjust for GFC_OMP_ATOMIC_* additions.
	(parse_omp_structured_block): Handle ST_OMP_TASKGROUP and
	ST_OMP_PARALLEL_DO_SIMD.
	(parse_executable): Handle ST_OMP_SIMD, ST_OMP_DO_SIMD,
	ST_OMP_PARALLEL_DO_SIMD and ST_OMP_TASKGROUP.
	* trans-decl.c (gfc_get_extern_function_decl,
	gfc_create_function_decl): Call gfc_trans_omp_declare_simd if
	needed.
	* frontend-passes.c (gfc_code_walker): Handle EXEC_OMP_SIMD,
	EXEC_OMP_DO_SIMD and EXEC_OMP_PARALLEL_DO_SIMD.  Walk
	safelen_expr and simdlen_expr.  Walk expressions in gfc_omp_namelist
	of depend, aligned and linear clauses.
	* match.c (match_exit_cycle): Handle EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD
	and EXEC_OMP_PARALLEL_DO_SIMD.
	(gfc_free_omp_namelist): New function.
	* dump-parse-tree.c (show_namelist): Removed.
	(show_omp_namelist): New function.
	(show_omp_node): Handle OpenMP 4.0 additions.
	(show_code_node): Handle EXEC_OMP_CANCEL, EXEC_OMP_CANCELLATION_POINT,
	EXEC_OMP_DO_SIMD, EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and
	EXEC_OMP_TASKGROUP.
	* match.h (gfc_match_omp_cancel, gfc_match_omp_cancellation_point,
	gfc_match_omp_declare_simd, gfc_match_omp_do_simd,
	gfc_match_omp_parallel_do_simd, gfc_match_omp_simd,
	gfc_match_omp_taskgroup): New prototypes.
	* trans-openmp.c (gfc_trans_omp_variable): Add declare_simd
	argument, handle it.  Allow current_function_decl to be NULL.
	(gfc_trans_omp_variable_list): Add declare_simd argument, pass
	it through to gfc_trans_omp_variable and disregard whether
	sym is referenced if declare_simd is true.  Work on gfc_omp_namelist
	instead of gfc_namelist.
	(gfc_trans_omp_reduction_list): Work on gfc_omp_namelist instead of
	gfc_namelist.  Adjust gfc_trans_omp_variable caller.
	(gfc_trans_omp_clauses): Add declare_simd argument, pass it through
	to gfc_trans_omp_variable{,_list} callers.  Work on gfc_omp_namelist
	instead of gfc_namelist.  Handle inbranch, notinbranch, safelen,
	simdlen, depend, uniform, linear, proc_bind and aligned clauses.
	Handle cancel kind.
	(gfc_trans_omp_atomic): Handle seq_cst clause, handle atomic swap,
	adjust for GFC_OMP_ATOMIC_* changes.
	(gfc_trans_omp_cancel, gfc_trans_omp_cancellation_point): New
	functions.
	(gfc_trans_omp_do): Add op argument, handle simd translation into
	generic.
	(GFC_OMP_SPLIT_SIMD, GFC_OMP_SPLIT_DO, GFC_OMP_SPLIT_PARALLEL,
	GFC_OMP_SPLIT_NUM, GFC_OMP_MASK_SIMD, GFC_OMP_MASK_DO,
	GFC_OMP_MASK_PARALLEL): New.
	(gfc_split_omp_clauses, gfc_trans_omp_do_simd): New functions.
	(gfc_trans_omp_parallel_do): Rework to use gfc_split_omp_clauses.
	(gfc_trans_omp_parallel_do_simd, gfc_trans_omp_taskgroup): New
	functions.
	(gfc_trans_omp_directive): Handle EXEC_OMP_CANCEL,
	EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD,
	EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
	Adjust gfc_trans_omp_do caller.
	(gfc_trans_omp_declare_simd): New function.
	* st.c (gfc_free_statement): Handle EXEC_OMP_CANCEL,
	EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD,
	EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
	For EXEC_OMP_FLUSH call gfc_free_omp_namelist instead of
	gfc_free_namelist.
	* module.c (omp_declare_simd_clauses): New variable.
	(mio_omp_declare_simd): New function.
	(mio_symbol): Call it.
	* trans.c (trans_code): Handle EXEC_OMP_CANCEL,
	EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD,
	EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
	* resolve.c (gfc_resolve_blocks): Handle EXEC_OMP_DO_SIMD,  
	EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
	(resolve_code): Handle EXEC_OMP_CANCEL,
	EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD,
	EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
	(resolve_types): Call gfc_resolve_omp_declare_simd.
gcc/testsuite/
	* gfortran.dg/gomp/affinity-1.f90: New test.
libgomp/
	* testsuite/libgomp.fortran/cancel-do-1.f90: New test.
	* testsuite/libgomp.fortran/cancel-do-2.f90: New test.
	* testsuite/libgomp.fortran/cancel-parallel-1.f90: New test.
	* testsuite/libgomp.fortran/cancel-parallel-3.f90: New test.
	* testsuite/libgomp.fortran/cancel-sections-1.f90: New test.
	* testsuite/libgomp.fortran/cancel-taskgroup-2.f90: New test.
	* testsuite/libgomp.fortran/declare-simd-1.f90: New test.
	* testsuite/libgomp.fortran/declare-simd-2.f90: New test.
	* testsuite/libgomp.fortran/declare-simd-3.f90: New test.
	* testsuite/libgomp.fortran/depend-1.f90: New test.
	* testsuite/libgomp.fortran/depend-2.f90: New test.
	* testsuite/libgomp.fortran/omp_atomic5.f90: New test.
	* testsuite/libgomp.fortran/simd1.f90: New test.
	* testsuite/libgomp.fortran/simd2.f90: New test.
	* testsuite/libgomp.fortran/simd3.f90: New test.
	* testsuite/libgomp.fortran/simd4.f90: New test.
	* testsuite/libgomp.fortran/taskgroup1.f90: New test.

From-SVN: r210313
2014-05-11 22:26:36 +02:00
Kenneth Zadeck 807e902eea Merge in wide-int.
From-SVN: r210113
2014-05-06 16:25:05 +00:00
Trevor Saunders be55bfe6cf pass cfun to pass::execute
gcc/
	* passes.c (opt_pass::execute): Adjust.
	(pass_manager::execute_pass_mode_switching): Likewise.
	(early_local_passes::execute): Likewise.
	(execute_one_pass): Pass cfun to the pass's execute method.
	* tree-pass.h (opt_pass::execute): Add function * argument.
	* asan.c, auto-inc-dec.c, bb-reorder.c, bt-load.c, cfgcleanup.c,
	cfgexpand.c, cfgrtl.c, cgraphbuild.c, combine-stack-adj.c, combine.c,
	compare-elim.c, config/arc/arc.c, config/epiphany/mode-switch-use.c,
	config/epiphany/resolve-sw-modes.c, config/i386/i386.c,
	config/mips/mips.c, config/rl78/rl78.c, config/s390/s390.c,
	config/sparc/sparc.c, cprop.c, dce.c, df-core.c, dse.c, dwarf2cfi.c,
	except.c, final.c, function.c, fwprop.c, gcse.c, gimple-low.c,
	gimple-ssa-isolate-paths.c, gimple-ssa-strength-reduction.c,
	graphite.c, ifcvt.c, init-regs.c, ipa-cp.c, ipa-devirt.c,
	ipa-inline-analysis.c, ipa-inline.c, ipa-profile.c, ipa-pure-const.c,
	ipa-reference.c, ipa-split.c, ipa.c, ira.c, jump.c, loop-init.c,
	lower-subreg.c, mode-switching.c, omp-low.c, postreload-gcse.c,
	postreload.c, predict.c, recog.c, ree.c, reg-stack.c, regcprop.c,
	reginfo.c, regrename.c, reorg.c, sched-rgn.c, stack-ptr-mod.c,
	store-motion.c, tracer.c, trans-mem.c, tree-call-cdce.c, tree-cfg.c,
	tree-cfgcleanup.c, tree-complex.c, tree-eh.c, tree-emutls.c,
	tree-if-conv.c, tree-into-ssa.c, tree-loop-distribution.c, tree-nrv.c,
	tree-object-size.c, tree-parloops.c, tree-predcom.c, tree-ssa-ccp.c,
	tree-ssa-copy.c, tree-ssa-copyrename.c, tree-ssa-dce.c,
	tree-ssa-dom.c, tree-ssa-dse.c, tree-ssa-forwprop.c,
	tree-ssa-ifcombine.c, tree-ssa-loop-ch.c, tree-ssa-loop-im.c,
	tree-ssa-loop-ivcanon.c, tree-ssa-loop-prefetch.c,
	tree-ssa-loop-unswitch.c, tree-ssa-loop.c, tree-ssa-math-opts.c,
	tree-ssa-phiopt.c, tree-ssa-phiprop.c, tree-ssa-pre.c,
	tree-ssa-reassoc.c, tree-ssa-sink.c, tree-ssa-strlen.c,
	tree-ssa-structalias.c, tree-ssa-uncprop.c, tree-ssa-uninit.c,
	tree-ssa.c, tree-ssanames.c, tree-stdarg.c, tree-switch-conversion.c,
	tree-tailcall.c, tree-vect-generic.c, tree-vectorizer.c, tree-vrp.c,
	tree.c, tsan.c, ubsan.c, var-tracking.c, vtable-verify.c, web.c:
	Adjust.

From-SVN: r209482
2014-04-17 12:37:34 +00:00
Trevor Saunders 0481253d15 remove has_gate
gcc/
	* passes.c (dump_one_pass): don't check pass->has_gate.
	(execute_ipa_summary_passes): Likewise.
	(execute_one_pass): Likewise.
	(ipa_write_summaries_2): Likewise.
	(ipa_write_optimization_summaries_1): Likewise.
	(ipa_read_optimization_summaries_1): Likewise.
	(execute_ipa_stmt_fixups): Likewise.
	* tree-pass.h (pass_data::has_gate): Remove.
	* asan.c, auto-inc-dec.c, bb-reorder.c, bt-load.c, cfgcleanup.c,
	cfgexpand.c, cfgrtl.c, cgraphbuild.c, combine-stack-adj.c, combine.c,
	compare-elim.c, config/arc/arc.c, config/epiphany/mode-switch-use.c,
	config/epiphany/resolve-sw-modes.c, config/i386/i386.c,
	config/mips/mips.c, config/rl78/rl78.c, config/s390/s390.c,
	config/sh/sh_optimize_sett_clrt.cc, config/sh/sh_treg_combine.cc,
	config/sparc/sparc.c, cprop.c, cse.c, dce.c, df-core.c, dse.c,
	dwarf2cfi.c, except.c, final.c, function.c, fwprop.c, gcse.c,
	gimple-low.c, gimple-ssa-isolate-paths.c,
	gimple-ssa-strength-reduction.c, graphite.c, ifcvt.c, init-regs.c,
	ipa-cp.c, ipa-devirt.c, ipa-inline-analysis.c, ipa-inline.c,
	ipa-profile.c, ipa-pure-const.c, ipa-reference.c, ipa-split.c, ipa.c,
	ira.c, jump.c, loop-init.c, lower-subreg.c, mode-switching.c,
	modulo-sched.c, omp-low.c, postreload-gcse.c, postreload.c, predict.c,
	recog.c, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c,
	reorg.c, sched-rgn.c, stack-ptr-mod.c, store-motion.c, tracer.c,
	trans-mem.c, tree-call-cdce.c, tree-cfg.c, tree-cfgcleanup.c,
	tree-complex.c, tree-eh.c, tree-emutls.c, tree-if-conv.c,
	tree-into-ssa.c, tree-loop-distribution.c, tree-nrv.c,
	tree-object-size.c, tree-parloops.c, tree-predcom.c, tree-profile.c,
	tree-sra.c, tree-ssa-ccp.c, tree-ssa-copy.c, tree-ssa-copyrename.c,
	tree-ssa-dce.c, tree-ssa-dom.c, tree-ssa-dse.c, tree-ssa-forwprop.c,
	tree-ssa-ifcombine.c, tree-ssa-loop-ch.c, tree-ssa-loop-im.c,
	tree-ssa-loop-ivcanon.c, tree-ssa-loop-prefetch.c,
	tree-ssa-loop-unswitch.c, tree-ssa-loop.c, tree-ssa-math-opts.c,
	tree-ssa-phiopt.c, tree-ssa-phiprop.c, tree-ssa-pre.c,
	tree-ssa-reassoc.c, tree-ssa-sink.c, tree-ssa-strlen.c,
	tree-ssa-structalias.c, tree-ssa-uncprop.c, tree-ssa-uninit.c,
	tree-ssa.c, tree-ssanames.c, tree-stdarg.c, tree-switch-conversion.c,
	tree-tailcall.c, tree-vect-generic.c, tree-vectorizer.c, tree-vrp.c,
	tree.c, tsan.c, ubsan.c, var-tracking.c, vtable-verify.c, web.c:
	Adjust.

gcc/testsuite/
	* g++.dg/plugin/dumb_plugin.c, g++.dg/plugin/selfassign.c,
	gcc.dg/plugin/one_time_plugin.c, gcc.dg/plugin/selfassign.c: Adjust.

From-SVN: r209479
2014-04-17 12:36:56 +00:00
Richard Biener 349e621099 tree.c (iterative_hash_expr): Use enum tree_code_class to store TREE_CODE_CLASS.
2014-04-15  Richard Biener  <rguenther@suse.de>

	* tree.c (iterative_hash_expr): Use enum tree_code_class
	to store TREE_CODE_CLASS.
	(tree_block): Likewise.
	(tree_set_block): Likewise.
	* tree.h (fold_build_pointer_plus_loc): Use
	convert_to_ptrofftype_loc.

From-SVN: r209406
2014-04-15 08:08:06 +00:00
Paolo Carlini 9dba4b5565 tree.h (TYPE_IDENTIFIER): Declare.
2014-04-14  Paolo Carlini  <paolo.carlini@oracle.com>

	* tree.h (TYPE_IDENTIFIER): Declare.
	* tree.c (subrange_type_for_debug_p): Use it.
	* godump.c (go_format_type): Likewise.
	* dwarf2out.c (is_cxx_auto, modified_type_die,
	gen_type_die_with_usage, gen_type_die_with_usage): Likewise.
	* dbxout.c (dbxout_type, dbxout_symbol): Likewise.

/cp
2014-04-14  Paolo Carlini  <paolo.carlini@oracle.com>

	* cp-tree.h (TYPE_IDENTIFIER): Remove declaration.
      	    
/objcp
2014-04-14  Paolo Carlini  <paolo.carlini@oracle.com>

	* objcp-decl.h (OBJC_TYPE_NAME, OBJC_SET_TYPE_NAME): Use
	TYPE_IDENTIFIER.

/ada
2014-04-14  Paolo Carlini  <paolo.carlini@oracle.com>

	* gcc-interface/decl.c (gnat_to_gnu_entity, components_to_record):
	Use TYPE_IDENTIFIER.
	* gcc-interface/utils.c (make_aligning_type, maybe_pad_type,
	finish_record_type, rest_of_record_type_compilation): Likewise.

From-SVN: r209390
2014-04-14 18:10:27 +00:00
Richard Biener 3c1c08d6d7 re PR c++/60474 (Crash in tree_class_check)
2014-03-10  Richard Biener  <rguenther@suse.de>

	PR middle-end/60474
	* tree.c (signed_or_unsigned_type_for): Handle OFFSET_TYPEs.

	* g++.dg/torture/pr60474.C: New testcase.

From-SVN: r208451
2014-03-10 13:27:16 +00:00
Jakub Jelinek 7ee9c16fa8 re PR c++/60082 (Certain Cilk keywords executable Hanging for -O1)
PR c++/60082
	* tree.c (build_common_builtin_nodes): Set ECF_LEAF for
	__builtin_setjmp_receiver.

	Revert
	2014-02-05  Balaji V. Iyer  <balaji.v.iyer@intel.com>

	* g++.dg/cilk-plus/CK/catch_exc.cc: Disable test for -O1.
	* c-c++-common/cilk-plus/CK/spawner_inline.c: Likewise.

From-SVN: r207597
2014-02-07 11:49:08 +01:00
Jan Hubicka 39960d1cfa re PR ipa/59882 (internal compiler error: Segmentation fault)
PR ipa/59882
	* tree.c (get_binfo_at_offset): Do not get confused by empty classes;
	* g++.dg/torture/pr59882.C: New testcase

From-SVN: r207451
2014-02-04 06:28:22 +00:00
Jason Merrill 404c2aeaae re PR c++/59633 (ICE with __attribute((vector_size(...))) for enum)
PR c++/59633
gcc/
	* tree.c (walk_type_fields): Handle VECTOR_TYPE.
gcc/cp/
	* decl2.c (attributes_naming_typedef_ok): New.
	* cp-tree.h: Declare it.
	* decl.c (grokdeclarator): Check it.
	* tree.c (no_linkage_check): Handle VECTOR_TYPE.

From-SVN: r207302
2014-01-30 09:21:31 -05:00
Jakub Jelinek 09b22f48d4 re PR middle-end/59917 (ICE in calc_dfs_tree, at dominance.c:401)
PR middle-end/59917
	PR tree-optimization/59920
	* tree.c (build_common_builtin_nodes): Remove
	__builtin_setjmp_dispatcher initialization.
	* omp-low.h (make_gimple_omp_edges): Add a new int * argument.
	* profile.c (branch_prob): Use gsi_start_nondebug_after_labels_bb
	instead of gsi_after_labels + manually skipping debug stmts.
	Don't ignore bbs with BUILT_IN_SETJMP_DISPATCHER, instead
	ignore bbs with IFN_ABNORMAL_DISPATCHER.
	* tree-inline.c (copy_edges_for_bb): Remove
	can_make_abnormal_goto argument, instead add abnormal_goto_dest
	argument.  Ignore computed_goto_p stmts.  Don't call
	make_abnormal_goto_edges.  If a call might need abnormal edges
	for non-local gotos, see if it already has an edge to
	IFN_ABNORMAL_DISPATCHER or if it is IFN_ABNORMAL_DISPATCHER
	with true argument, don't do anything then, otherwise add
	EDGE_ABNORMAL from the call's bb to abnormal_goto_dest.
	(copy_cfg_body): Compute abnormal_goto_dest, adjust copy_edges_for_bb
	caller.
	* gimple-low.c (struct lower_data): Remove calls_builtin_setjmp.
	(lower_function_body): Don't emit __builtin_setjmp_dispatcher.
	(lower_stmt): Don't set data->calls_builtin_setjmp.
	(lower_builtin_setjmp): Adjust comment.
	* builtins.def (BUILT_IN_SETJMP_DISPATCHER): Remove.
	* tree-cfg.c (found_computed_goto): Remove.
	(factor_computed_gotos): Remove.
	(make_goto_expr_edges): Return bool, true for computed gotos.
	Don't call make_abnormal_goto_edges.
	(build_gimple_cfg): Don't set found_computed_goto, don't call
	factor_computed_gotos.
	(computed_goto_p): No longer static.
	(make_blocks): Don't set found_computed_goto.
	(get_abnormal_succ_dispatcher, handle_abnormal_edges): New functions.
	(make_edges): If make_goto_expr_edges returns true, push bb
	into ab_edge_goto vector, for stmt_can_make_abnormal_goto calls
	instead of calling make_abnormal_goto_edges push bb into ab_edge_call
	vector.  Record mapping between bbs and OpenMP regions if there
	are any, adjust make_gimple_omp_edges caller.  Call
	handle_abnormal_edges.
	(make_abnormal_goto_edges): Remove.
	* tree-cfg.h (make_abnormal_goto_edges): Remove.
	(computed_goto_p, get_abnormal_succ_dispatcher): New prototypes.
	* internal-fn.c (expand_ABNORMAL_DISPATCHER): New function.
	* builtins.c (expand_builtin): Don't handle
	BUILT_IN_SETJMP_DISPATCHER.
	* internal-fn.def (ABNORMAL_DISPATCHER): New.
	* omp-low.c (make_gimple_omp_edges): Add region_idx argument, when
	filling *region also set *region_idx to (*region)->entry->index.

	* gcc.dg/pr59920-1.c: New test.
	* gcc.dg/pr59920-2.c: New test.
	* gcc.dg/pr59920-3.c: New test.
	* c-c++-common/gomp/pr59917-1.c: New test.
	* c-c++-common/gomp/pr59917-2.c: New test.

From-SVN: r207231
2014-01-29 12:02:46 +01:00
Jan Hubicka f910753dbe re PR ipa/59775 (internal compiler error: Segmentation fault)
PR ipa/59775
	* tree.c (get_binfo_at_offset): Look harder for virtual bases.

From-SVN: r206694
2014-01-17 01:04:59 +00:00
Jakub Jelinek e83b8e2e24 re PR target/58115 (testcase gcc.target/i386/intrinsics_4.c failure)
PR target/58115
	* tree-core.h (struct target_globals): New forward declaration.
	(struct tree_target_option): Add globals field.
	* tree.h (TREE_TARGET_GLOBALS): Define.
	(prepare_target_option_nodes_for_pch): New prototype.
	* target-globals.h (struct target_globals): Define even if
	!SWITCHABLE_TARGET.
	* tree.c (prepare_target_option_node_for_pch,
	prepare_target_option_nodes_for_pch): New functions.
	* config/i386/i386.h (SWITCHABLE_TARGET): Define.
	* config/i386/i386.c: Include target-globals.h.
	(ix86_set_current_function): Instead of doing target_reinit
	unconditionally, use save_target_globals_default_opts and
	restore_target_globals.
c-family/
	* c-pch.c (c_common_write_pch): Call
	prepare_target_option_nodes_for_pch.

From-SVN: r206478
2014-01-09 19:25:19 +01:00
Richard Sandiford 23a5b65a92 Update copyright years in gcc/
From-SVN: r206289
2014-01-02 22:23:26 +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
Ilya Enkovich 089d122746 revert: cgraph.h (varpool_node): Add need_bounds_init field.
Reverted:
	2013-11-20  Ilya Enkovich  <ilya.enkovich@intel.com>
	* cgraph.h (varpool_node): Add need_bounds_init field.
	* lto-cgraph.c (lto_output_varpool_node): Output
	need_bounds_init value.
	(input_varpool_node): Read need_bounds_init value.
	* varpool.c (dump_varpool_node): Dump need_bounds_init field.

	Reverted:
	2013-11-20  Ilya Enkovich  <ilya.enkovich@intel.com>
	* dbxout.c (dbxout_type): Ignore POINTER_BOUNDS_TYPE.
	* dwarf2out.c (gen_subprogram_die): Ignore bound args.
	(gen_type_die_with_usage): Skip pointer bounds.
	(dwarf2out_global_decl): Likewise.

	Reverted:
	2013-11-18  Ilya Enkovich  <ilya.enkovich@intel.com>
	* builtin-types.def (BT_FN_PTR_CONST_PTR_VAR): New.
	* chkp-builtins.def (BUILT_IN_CHKP_BIND_BOUNDS): New.
	* cfgexpand.c (expand_call_stmt): Expand BUILT_IN_CHKP_BIND_BOUNDS.
	* gimple.c (gimple_call_get_nobnd_arg_index): Remove.
	* gimple.h (gf_mask): Add GF_CALL_WITH_BOUNDS.
	(gimple_call_with_bounds_p): New.
	(gimple_call_set_with_bounds): New.
	(gimple_call_num_nobnd_args): Remove.
	(gimple_call_nobnd_arg): Remove.
	* tree.h (CALL_WITH_BOUNDS_P): New.
	* rtl.h (CALL_EXPR_WITH_BOUNDS_P): New.

	Reverted:
	2013-11-08  Ilya Enkovich  <ilya.enkovich@intel.com>
	* common.opt (fcheck-pointer-bounds): Move to ...
	* c-family/c.opt: ... here.
	* langhooks-def.h (LANG_HOOKS_CHKP_SUPPORTED): Remove.
	(LANG_HOOKS_INITIALIZER): Remove LANG_HOOKS_CHKP_SUPPORTED.
	* langhooks.h (lang_hooks): Remove chkp_supported field.
	* toplev.c (process_options): Remove chkp_supported check.

	Reverted:
	2013-10-30  Ilya Enkovich  <ilya.enkovich@intel.com>
	* tree-core.h (tree_index): Add TI_POINTER_BOUNDS_TYPE.
	* tree.h (POINTER_BOUNDS_P): New.
	(BOUNDED_TYPE_P): New.
	(BOUNDED_P): New.
	(pointer_bounds_type_node): New.
	* tree.c (build_common_tree_nodes): Initialize
	pointer_bounds_type_node.
	* gimple.h (gimple_call_get_nobnd_arg_index): New.
	(gimple_call_num_nobnd_args): New.
	(gimple_call_nobnd_arg): New.
	(gimple_return_retbnd): New.
	(gimple_return_set_retbnd): New
	* gimple.c (gimple_build_return): Increase number of ops
	for return statement.
	(gimple_call_get_nobnd_arg_index): New.
	* gimple-pretty-print.c (dump_gimple_return): Print second op.

	Reverted:
	2013-10-30  Ilya Enkovich  <ilya.enkovich@intel.com>
	* ipa.c (cgraph_build_static_cdtor_1): Support contructors
	with "chkp ctor" and "bnd_legacy" attributes.
	* gimplify.c (gimplify_init_constructor): Avoid infinite
	loop during gimplification of bounds initializer.

	Reverted:
	2013-10-30  Ilya Enkovich  <ilya.enkovich@intel.com>
	* c-family/c-common.c (handle_bnd_variable_size_attribute): New.
	(handle_bnd_legacy): New.
	(c_common_attribute_table): Add bnd_variable_size and bnd_legacy.
	* doc/extend.texi: Document bnd_variable_size and bnd_legacy
	attributes.

	Reverted:
	2013-10-29  Ilya Enkovich  <ilya.enkovich@intel.com>
	* builtin-types.def (BT_FN_VOID_CONST_PTR): New.
	(BT_FN_PTR_CONST_PTR): New.
	(BT_FN_CONST_PTR_CONST_PTR): New.
	(BT_FN_PTR_CONST_PTR_SIZE): New.
	(BT_FN_PTR_CONST_PTR_CONST_PTR): New.
	(BT_FN_VOID_PTRPTR_CONST_PTR): New.
	(BT_FN_VOID_CONST_PTR_SIZE): New.
	(BT_FN_PTR_CONST_PTR_CONST_PTR_SIZE): New.
	* chkp-builtins.def: New.
	* builtins.def: include chkp-builtins.def.
	(DEF_CHKP_BUILTIN): New.
	* builtins.c (expand_builtin): Support BUILT_IN_CHKP_INIT_PTR_BOUNDS,
	BUILT_IN_CHKP_NULL_PTR_BOUNDS, BUILT_IN_CHKP_COPY_PTR_BOUNDS,
	BUILT_IN_CHKP_CHECK_PTR_LBOUNDS, BUILT_IN_CHKP_CHECK_PTR_UBOUNDS,
	BUILT_IN_CHKP_CHECK_PTR_BOUNDS, BUILT_IN_CHKP_SET_PTR_BOUNDS,
	BUILT_IN_CHKP_NARROW_PTR_BOUNDS, BUILT_IN_CHKP_STORE_PTR_BOUNDS,
	BUILT_IN_CHKP_GET_PTR_LBOUND, BUILT_IN_CHKP_GET_PTR_UBOUND,
	BUILT_IN_CHKP_BNDMK, BUILT_IN_CHKP_BNDSTX, BUILT_IN_CHKP_BNDCL,
	BUILT_IN_CHKP_BNDCU, BUILT_IN_CHKP_BNDLDX, BUILT_IN_CHKP_BNDRET,
	BUILT_IN_CHKP_INTERSECT, BUILT_IN_CHKP_ARG_BND, BUILT_IN_CHKP_NARROW,
	BUILT_IN_CHKP_EXTRACT_LOWER, BUILT_IN_CHKP_EXTRACT_UPPER.
	* common.opt (fcheck-pointer-bounds): New.
	* toplev.c (process_options): Check Pointer Bounds Checker is
	supported.
	* doc/extend.texi: Document Pointer Bounds Checker built-in functions.

	Reverted:
	2013-10-30  Ilya Enkovich  <ilya.enkovich@intel.com>
	* target.def (builtin_chkp_function): New.
	(chkp_bound_type): New.
	(chkp_bound_mode): New.
	(fn_abi_va_list_bounds_size): New.
	(load_bounds_for_arg): New.
	(store_bounds_for_arg): New.
	* targhooks.h (default_load_bounds_for_arg): New.
	(default_store_bounds_for_arg): New.
	(default_fn_abi_va_list_bounds_size): New.
	(default_chkp_bound_type): New.
	(default_chkp_bound_mode): New.
	(default_builtin_chkp_function): New.
	* targhooks.c (default_load_bounds_for_arg): New.
	(default_store_bounds_for_arg): New.
	(default_fn_abi_va_list_bounds_size): New.
	(default_chkp_bound_type): New.
	(default_chkp_bound_mode); New.
	(default_builtin_chkp_function): New.
	* doc/tm.texi.in (TARGET_FN_ABI_VA_LIST_BOUNDS_SIZE): New.
	(TARGET_LOAD_BOUNDS_FOR_ARG): New.
	(TARGET_STORE_BOUNDS_FOR_ARG): New.
	(TARGET_BUILTIN_CHKP_FUNCTION): New.
	(TARGET_CHKP_BOUND_TYPE): New.
	(TARGET_CHKP_BOUND_MODE): New.
	* doc/tm.texi: Regenerated.
	* langhooks.h (lang_hooks): Add chkp_supported field.
	* langhooks-def.h (LANG_HOOKS_CHKP_SUPPORTED): New.
	(LANG_HOOKS_INITIALIZER); Add LANG_HOOKS_CHKP_SUPPORTED.

	Reverted:
	2013-10-24  Ilya Enkovich  <ilya.enkovich@intel.com>
	* config/i386/constraints.md (B): New.
	(Ti): New.
	(Tb): New.
	* config/i386/i386-c.c (ix86_target_macros_internal): Add __MPX__.
	* config/i386/i386-modes.def (BND32): New.
	(BND64): New.
	* config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): New.
	* config/i386/i386.c (isa_opts): Add mmpx.
	(regclass_map): Add bound registers.
	(dbx_register_map): Likewise.
	(dbx64_register_map): Likewise.
	(svr4_dbx_register_map): Likewise.
	(PTA_MPX): New.
	(ix86_option_override_internal): Support MPX ISA.
	(ix86_conditional_register_usage): Support bound registers.
	(print_reg): Likewise.
	(ix86_code_end): Add MPX bnd prefix.
	(output_set_got): Likewise.
	(ix86_output_call_insn): Likewise.
	(ix86_print_operand): Add '!' (MPX bnd) print prefix support.
	(ix86_print_operand_punct_valid_p): Likewise.
	(ix86_print_operand_address): Support UNSPEC_BNDMK_ADDR and
	UNSPEC_BNDMK_ADDR.
	(ix86_class_likely_spilled_p): Add bound regs support.
	(ix86_hard_regno_mode_ok): Likewise.
	(x86_order_regs_for_local_alloc): Likewise.
	(ix86_bnd_prefixed_insn_p): New.
	* config/i386/i386.h (FIRST_PSEUDO_REGISTER): Fix to new value.
	(FIXED_REGISTERS): Add bound registers.
	(CALL_USED_REGISTERS): Likewise.
	(REG_ALLOC_ORDER): Likewise.
	(HARD_REGNO_NREGS): Likewise.
	(TARGET_MPX): New.
	(VALID_BND_REG_MODE): New.
	(FIRST_BND_REG): New.
	(LAST_BND_REG): New.
	(reg_class): Add BND_REGS.
	(REG_CLASS_NAMES): Likewise.
	(REG_CLASS_CONTENTS): Likewise.
	(BND_REGNO_P): New.
	(ANY_BND_REG_P): New.
	(BNDmode): New.
	(HI_REGISTER_NAMES): Add bound registers.
	* config/i386/i386.md (UNSPEC_BNDMK): New.
	(UNSPEC_BNDMK_ADDR): New.
	(UNSPEC_BNDSTX): New.
	(UNSPEC_BNDLDX): New.
	(UNSPEC_BNDLDX_ADDR): New.
	(UNSPEC_BNDCL): New.
	(UNSPEC_BNDCU): New.
	(UNSPEC_BNDCN): New.
	(UNSPEC_MPX_FENCE): New.
	(BND0_REG): New.
	(BND1_REG): New.
	(type): Add mpxmov, mpxmk, mpxchk, mpxld, mpxst.
	(length_immediate): Likewise.
	(prefix_0f): Likewise.
	(memory): Likewise.
	(prefix_rep): Check for bnd prefix.
	(length_nobnd): New.
	(length): Use length_nobnd if specified.
	(BND): New.
	(bnd_ptr): New.
	(BNDCHECK): New.
	(bndcheck): New.
	(*jcc_1): Add bnd prefix and rename length attr to length_nobnd.
	(*jcc_2): Likewise.
	(jump): Likewise.
	(simple_return_internal): Likewise.
	(simple_return_pop_internal): Likewise.
	(*indirect_jump): Add MPX bnd prefix.
	(*tablejump_1): Likewise.
	(simple_return_internal_long): Likewise.
	(simple_return_indirect_internal): Likewise.
	(<mode>_mk): New.
	(*<mode>_mk): New.
	(mov<mode>): New.
	(*mov<mode>_internal_mpx): New.
	(<mode>_<bndcheck>): New.
	(*<mode>_<bndcheck>): New.
	(<mode>_ldx): New.
	(*<mode>_ldx): New.
	(<mode>_stx): New.
	(*<mode>_stx): New.
	* config/i386/predicates.md (lea_address_operand): Rename to...
	(address_no_seg_operand): ... this.
	(address_mpx_no_base_operand): New.
	(address_mpx_no_index_operand): New.
	(bnd_mem_operator): New.
	* config/i386/i386.opt (mmpx): New.
	* doc/invoke.texi: Add documentation for the flags -mmpx, -mno-mpx.
	* doc/rtl.texi Add documentation for BND32mode and BND64mode.

	Reverted:
	2013-10-24  Ilya Enkovich  <ilya.enkovich@intel.com>
	* mode-classes.def (MODE_POINTER_BOUNDS): New.
	* tree.def (POINTER_BOUNDS_TYPE): New.
	* genmodes.c (complete_mode): Support MODE_POINTER_BOUNDS.
	(POINTER_BOUNDS_MODE): New.
	(make_pointer_bounds_mode): New.
	* machmode.h (POINTER_BOUNDS_MODE_P): New.
	* stor-layout.c (int_mode_for_mode): Support MODE_POINTER_BOUNDS.
	(layout_type): Support POINTER_BOUNDS_TYPE.
	* tree-pretty-print.c (dump_generic_node): Support POINTER_BOUNDS_TYPE.
	* tree.c (build_int_cst_wide): Support POINTER_BOUNDS_TYPE.
	(type_contains_placeholder_1): Likewise.
	* tree.h (POINTER_BOUNDS_TYPE_P): New.
	* varasm.c (output_constant): Support POINTER_BOUNDS_TYPE.
	* doc/rtl.texi (MODE_POINTER_BOUNDS): New.

From-SVN: r205522
2013-11-29 12:12:39 +00:00
Andrew MacLeod fceec4d3d7 hooks.h (hook_uint_mode_0): Add Prototype.
* hooks.h (hook_uint_mode_0): Add Prototype.
	* hooks.c (hook_uint_mode_0): New default function.
	* target.def (atomic_align_for_mode): New target hook.
	* tree.c (build_atomic_base): Add alignment override parameter.
	(build_common_tree_nodes): Use atomic alignment override.
	* doc/tm.texi.in (TARGET_ATOMIC_ALIGN_FOR_MODE): Define.
	* doc/tm.texi (TARGET_ATOMIC_ALIGN_FOR_MODE): Add description.

From-SVN: r205273
2013-11-22 16:19:21 +00:00
Andrew MacLeod 2fb9a547b4 gimple.h: Remove all includes.
* gimple.h: Remove all includes.
	(recalculate_side_effects): Move prototype to gimplify.h.
	* Makefile.in (PLUGIN_HEADERS): Add flattened gimple.h includes.
	* gengtype.c (open_base_files): Add gimple.h include list.
	* gimplify.h (recalculate_side_effects): Relocate prototype here.
	* gimple.c: Adjust include list.
	(recalculate_side_effects): Move to gimplify.c.
	* gimplify.c: Adjust include list.
	(recalculate_side_effects): Relocate from gimple.c.
	* alias.c: Add required include files removed from gimple.h.
	* asan.c: Likewise.
	* builtins.c: Likewise.
	* calls.c: Likewise.
	* cfgexpand.c: Likewise.
	* cfgloop.c: Likewise.
	* cfgloopmanip.c: Likewise.
	* cgraphbuild.c: Likewise.
	* cgraph.c: Likewise.
	* cgraphclones.c: Likewise.
	* cgraphunit.c: Likewise.
	* cilk-common.c: Likewise.
	* data-streamer.c: Likewise.
	* data-streamer-in.c: Likewise.
	* data-streamer-out.c: Likewise.
	* dse.c: Likewise.
	* dwarf2out.c: Likewise.
	* emit-rtl.c: Likewise.
	* except.c: Likewise.
	* expr.c: Likewise.
	* fold-const.c: Likewise.
	* function.c: Likewise.
	* gimple-builder.c: Likewise.
	* gimple-expr.c: Likewise.
	* gimple-fold.c: Likewise.
	* gimple-iterator.c: Likewise.
	* gimple-low.c: Likewise.
	* gimple-pretty-print.c: Likewise.
	* gimple-ssa-isolate-paths.c: Likewise.
	* gimple-ssa-strength-reduction.c: Likewise.
	* gimple-streamer-in.c: Likewise.
	* gimple-streamer-out.c: Likewise.
	* gimple-walk.c: Likewise.
	* gimplify-me.c: Likewise.
	* graphite-blocking.c: Likewise.
	* graphite.c: Likewise.
	* graphite-clast-to-gimple.c: Likewise.
	* graphite-dependences.c: Likewise.
	* graphite-interchange.c: Likewise.
	* graphite-optimize-isl.c: Likewise.
	* graphite-poly.c: Likewise.
	* graphite-scop-detection.c: Likewise.
	* graphite-sese-to-poly.c: Likewise.
	* internal-fn.c: Likewise.
	* ipa.c: Likewise.
	* ipa-cp.c: Likewise.
	* ipa-devirt.c: Likewise.
	* ipa-inline-analysis.c: Likewise.
	* ipa-inline.c: Likewise.
	* ipa-profile.c: Likewise.
	* ipa-prop.c: Likewise.
	* ipa-pure-const.c: Likewise.
	* ipa-reference.c: Likewise.
	* ipa-split.c: Likewise.
	* ipa-utils.c: Likewise.
	* langhooks.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.c: Likewise.
	* lto-streamer-in.c: Likewise.
	* lto-streamer-out.c: Likewise.
	* omp-low.c: Likewise.
	* opts-global.c: Likewise.
	* passes.c: Likewise.
	* predict.c: Likewise.
	* profile.c: Likewise.
	* sese.c: Likewise.
	* stmt.c: Likewise.
	* stor-layout.c: Likewise.
	* symtab.c: Likewise.
	* targhooks.c: Likewise.
	* toplev.c: Likewise.
	* tracer.c: Likewise.
	* trans-mem.c: Likewise.
	* tree-affine.c: Likewise.
	* tree.c: Likewise.
	* tree-call-cdce.c: Likewise.
	* tree-cfg.c: Likewise.
	* tree-cfgcleanup.c: Likewise.
	* tree-chrec.c: Likewise.
	* tree-complex.c: Likewise.
	* tree-data-ref.c: Likewise.
	* tree-dfa.c: Likewise.
	* tree-eh.c: Likewise.
	* tree-emutls.c: Likewise.
	* tree-if-conv.c: Likewise.
	* tree-inline.c: Likewise.
	* tree-into-ssa.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.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.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-math-opts.c: Likewise.
	* tree-ssanames.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-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-stdarg.c: Likewise.
	* tree-streamer.c: Likewise.
	* tree-streamer-in.c: Likewise.
	* tree-streamer-out.c: Likewise.
	* tree-switch-conversion.c: Likewise.
	* tree-tailcall.c: Likewise.
	* tree-vect-data-refs.c: Likewise.
	* tree-vect-generic.c: Likewise.
	* tree-vect-loop.c: Likewise.
	* tree-vect-loop-manip.c: Likewise.
	* tree-vectorizer.c: Likewise.
	* tree-vect-patterns.c: Likewise.
	* tree-vect-slp.c: Likewise.
	* tree-vect-stmts.c: Likewise.
	* tree-vrp.c: Likewise.
	* tsan.c: Likewise.
	* ubsan.c: Likewise.
	* value-prof.c: Likewise.
	* varpool.c: Likewise.
	* var-tracking.c: Likewise.
	* vtable-verify.c: Likewise.

	* ada/gcc-interface/trans.c: Add required include files from gimple.h.

	* c/c-typeck.c: Add required include files from gimple.h.

	* c-family/c-common.c: Add required include files from gimple.h.
	* c-family/c-gimplify.c: Likewise
	* c-family/cilk.c: Likewise

	* cp/class.c: Add required include files from gimple.h.
	* cp/cp-gimplify.c: Likewise
	* cp/decl2.c: Likewise
	* cp/init.c: Likewise
	* cp/optimize.c: Likewise
	* cp/pt.c: Likewise
	* cp/semantics.c: Likewise
	* cp/tree.c: Likewise
	* cp/typeck.c: Likewise
	* cp/vtable-class-hierarchy.c: Likewise

	* fortran/trans.c: Add required include files from gimple.h.
	* fortran/trans-expr.c: Likewise
	* fortran/trans-openmp.c: Likewise

	* go/gofrontend/expressions.cc: Add required include files from
	gimple.h.
	* go/gofrontend/gogo-tree.cc: Likewise
	* go/gofrontend/types.cc: Likewise
	* go/go-gcc.cc: Likewise
	* go/go-lang.c: Likewise

	* java/java-gimplify.c: Add required include files from gimple.h.

	* lto/lto.c: Add required include files from gimple.h.
	* lto/lto-lang.c: Likewise
	* lto/lto-object.c: Likewise
	* lto/lto-partition.c: Likewise
	* lto/lto-symtab.c: Likewise

	* objc/objc-act.c: Add required include files from gimple.h.

	* config/darwin.c: Add required include files removed from gimple.h.
	* config/aarch64/aarch64-builtins.c: Likewise.
	* config/aarch64/aarch64.c: Likewise.
	* config/alpha/alpha.c: Likewise.
	* config/i386/i386.c: Likewise.
	* config/i386/winnt.c: Likewise.
	* config/ia64/ia64.c: Likewise.
	* config/m32c/m32c.c: Likewise.
	* config/mep/mep.c: Likewise.
	* config/mips/mips.c: Likewise.
	* config/rs6000/rs6000.c: Likewise.
	* config/s390/s390.c: Likewise.
	* config/sh/sh.c: Likewise.
	* config/sparc/sparc.c: Likewise.
	* config/spu/spu.c: Likewise.
	* config/stormy16/stormy16.c: Likewise.
	* config/tilegx/tilegx.c: Likewise.
	* config/tilepro/tilepro.c: Likewise.
	* config/xtensa/xtensa.c: Likewise.

	* testsuite/gcc.dg/plugin/finish_unit_plugin.c: Add required include
	files removed from gimple.h.
	* testsuite/gcc.dg/plugin/ggcplug.c: Likewise.
	* testsuite/gcc.dg/plugin/one_time_plugin.c: Likewise.
	* testsuite/gcc.dg/plugin/selfassign.c: Likewise.
	* testsuite/gcc.dg/plugin/start_unit_plugin.c: Likewise.
	* testsuite/g++.dg/plugin/selfassign.c: Likewise.

From-SVN: r205272
2013-11-22 15:58:51 +00:00
David Malcolm 8400e75ec4 Remove macros that implicitly use input_location
gcc/
	* input.h (input_line): Remove.
	(input_filename): Likewise.
	(in_system_header): Likewise.
	* tree.h (EXPR_LOC_OR_HERE): Remove.
	* config/bfin/bfin.c (output_file_start): Remove use of
	input_filename macro.
	* builtins.c (c_strlen): Remove use of EXPR_LOC_OR_HERE macro.
	* gimplify.c (internal_get_tmp_var): Likewise.
	EXPR_LOC_OR_HERE macro.
	(shortcut_cond_expr): Likewise.
	* tree-diagnostic.c (diagnostic_report_current_function): Remove
	use of input_filename macro.
	* tree.c (get_file_function_name): Likewise.

gcc/ada
	* gcc-interface/utils2.c (build_call_raise): Remove use of
	input_line macro.
	(build_call_raise_range): Likewise.
	(build_call_raise_column): Likewise.

gcc/c-family
	* c-common.c (unsafe_conversion_p): Remove use of
	EXPR_LOC_OR_HERE macro.
	(conversion_warning): Likewise.
	(warnings_for_convert_and_check): Likewise.
	(warn_for_collisions_1): Likewise.
	(shorten_compare): Likewise, and remove use of in_system_header
	macro, using the location from the former.
	* c-lex.c (dump_one_header): Remove use of input_filename macro.
	(cb_def_pragma): Remove use of in_system_header macro.
	(lex_string): Likewise.
	* c-pragma.c (handle_pragma_float_const_decimal64): Likewise.

gcc/c
	* c-decl.c (define_label, shadow_tag_warned)
	(check_bitfield_type_and_width, grokdeclarator, grokparms,
	store_parm_decls_newstyle, store_parm_decls_oldstyle)
	(declspecs_add_type): Remove use of in_system_header macro.
	* c-parser.c (c_parser_unary_expression): Likewise.
	* c-typeck.c (store_init_value, process_init_element)
	(c_start_case): Likewise.

	* c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
	macro.

	* c-parser.c (c_parser_set_source_position_from_token): Remove
	reference to in_system_header from comment.

gcc/cp
	* call.c (build_integral_nontype_arg_conv): Remove use of
	EXPR_LOC_OR_HERE macro.
	(convert_like_real): Likewise.
	(convert_arg_to_ellipsis): Likewise.
	(build_cxx_call): Likewise.
	(perform_implicit_conversion_flags): Likewise.
	(initialize_reference): Likewise.
	* cvt.c (cp_convert_to_pointer): Likewise.
	(convert_to_reference): Likewise.
	(ocp_convert): Likewise.
	(convert_to_void): Likewise.
	* decl.c (pop_label): Update comment.
	(pop_switch): Remove use of EXPR_LOC_OR_HERE macro.
	(check_tag_decl): Remove use of in_system_header macro.
	(make_rtl_for_nonlocal_decl): Remove use of input_filename
	macro.
	(compute_array_index_type): Remove use of in_system_header
	macro.
	(grokdeclarator): Likewise.
	* error.c (dump_global_iord): Remove use of input_filename
	macro.
	(location_of): Remove use of EXPR_LOC_OR_HERE macro.
	(maybe_warn_cpp0x): Remove use of in_system_header macro.
	* init.c (build_new_1): Remove use of EXPR_LOC_OR_HERE macro.
	* lex.c (handle_pragma_interface): Remove use of input_filename
	macro.
	(handle_pragma_implementation): Likewise.
	(cxx_make_type): Likewise.
	(in_main_input_context): Likewise.
	* name-lookup.c (push_binding_level): Remove use of
	input_line macro.
	(leave_scope): Likewise.
	(resume_scope): Likewise.
	* parser.c (cp_parser_unqualified_id): Remove use of
	in_system_header macro.
	(cp_parser_cast_expression): Likewise.
	(cp_parser_declaration_seq_opt): Likewise.
	(cp_parser_enumerator_list): Likewise.
	(cp_parser_parameter_declaration_clause): Likewise.
	(cp_parser_exception_specification_opt): Likewise.
	* pt.c (unify_arg_conversion): Remove use of EXPR_LOC_OR_HERE
	macro.
	(convert_nontype_argument): Likewise.
	(push_tinst_level): Remove use of in_system_header macro.
	(tsubst_copy_and_build): Remove use of EXPR_LOC_OR_HERE
	macros.
	(do_decl_instantiation): Remove use of in_system_header macro.
	(do_type_instantiation): Likewise.
	* semantics.c (finish_call_expr): Remove use of EXPR_LOC_OR_HERE
	macro.
	(begin_class_definition): Remove use of input_filename macro.
	(cxx_eval_call_expression): Remove use of EXPR_LOC_OR_HERE
	macro.
	(cxx_eval_constant_expression): Likewise.
	(potential_constant_expression_1): Likewise.
	* typeck.c (decay_conversion): Likewise.
	(rationalize_conditional_expr): Likewise.
	(build_x_compound_expr_from_list): Likewise.
	(convert_for_assignment): Likewise.
	* typeck2.c (check_narrowing): Likewise.

gcc/fortran
	* trans.c (trans_runtime_error_vararg): Remove use of input_line
	macro.

gcc/java
	* class.c (maybe_layout_super_class): Update comment.
	* decl.c (java_add_stmt): Remove use of input_filename macro.
	* jcf-parse.c (set_source_filename): Remove use of
	input_filename macro.
	(parse_class_file): Remove use of input_line and input_filename
	macros.
	(java_parse_file): Remove use of input_filename macro.

From-SVN: r205262
2013-11-22 14:18:13 +00:00
Diego Novillo d8a2d370dc Factor unrelated declarations out of tree.h.
This patch applies the rule that functions defined in FOO.c must be
declared in FOO.h. One of the worst offenders in the code base is
tree.h, unsurprisingly.

The patch creates several new headers: attribs.h calls.h fold-const.h
gcc-symtab.h print-rtl.h print-tree.h stmt.h stor-layout.h stringpool.h
tree-nested.h tree-object-size.h varasm.h.

Functions in each corresponding .c file got moved to those headers and
others that already existed. I wanted to make this patch as mechanical
as possible, so I made no attempt to fix problems like having
build_addr defined in tree-inline.c. I left that for later.

There were some declarations that I could not move out of tree.h
because of header poisoning or the use of target macros. We forbid the
inclusion of things like expr.h from FE files. While that's a
reasonable idea, the FE file *still* manage to at expr.c functionality
because the declarations they want to use were defined in tree.h.

The affected files are builtins.h, emit-rtl.h and expr.h.

If that functionality is allowed to be accessed from the FEs,
then I will later move those functions out of expr.c into tree.c.
I have moved these declarations to the bottom of tree.h so they
are easy to identify later.

There is a namespace collision with libcpp. The file gcc/symtab.c
cannot use gcc/symtab.h because the #include command picks up
libcpp/include/symtab.h first. So I named this file gcc-symtab.h
for now.

Finally, I added a new header to PLUGIN_HEADERS to account for the
tree.h refactoring. I did not add all headers factored out of tree.h
because it is unclear (and impossible to tell) what plugins need.
This adds the one header used by the plugins in the testsuite.

This will be changing quite dramatically as we progress with the header
refactoring.

This patch should offer some minimal incremental build advantages
by reducing the size of tree.h. Changes that would otherwise
affected tree.h, will now go to other headers which are less
frequently included.

	* tree.h: Include fold-const.h.
	(aggregate_value_p): Moved to function.h.
	(alloca_call_p): Moved to calls.h.
	(allocate_struct_function): Moved to function.h.
	(apply_tm_attr): Moved to attribs.h.
	(array_at_struct_end_p): Moved to expr.h.
	(array_ref_element_size): Moved to tree-dfa.h.
	(array_ref_low_bound): Moved to tree-dfa.h.
	(array_ref_up_bound): Moved to tree.h.
	(assemble_alias): Moved to cgraph.h.
	(bit_from_pos): Moved to stor-layout.h.
	(build_addr): Moved to tree-nested.h.
	(build_duplicate_type): Moved to tree-inline.h.
	(build_fold_addr_expr): Moved to fold-const.h.
	(build_fold_addr_expr_with_type): Moved to fold-const.h.
	(build_fold_addr_expr_with_type_loc): Moved to fold-const.h.
	(build_fold_indirect_ref): Moved to fold-const.h.
	(build_fold_indirect_ref_loc): Moved to fold-const.h.
	(build_personality_function): Moved to tree.h.
	(build_range_check): Moved to fold-const.h.
	(build_simple_mem_ref): Moved to fold-const.h.
	(build_simple_mem_ref_loc): Moved to fold-const.h.
	(build_tm_abort_call): Moved to trans-mem.h.
	(byte_from_pos): Moved to stor-layout.h.
	(call_expr_flags): Moved to calls.h.
	(can_move_by_pieces): Moved to expr.h.
	(categorize_ctor_elements): Moved to expr.h.
	(change_decl_assembler_name): Moved to gcc-symtab.h.
	(combine_comparisons): Moved to fold-const.h.
	(complete_ctor_at_level_p): Moved to tree.h.
	(component_ref_field_offset): Moved to tree-dfa.h.
	(compute_builtin_object_size): Moved to tree-object-size.h.
	(compute_record_mode): Moved to stor-layout.h.
	(constant_boolean_node): Moved to fold-const.h.
	(constructor_static_from_elts_p): Moved to varasm.h.
	(cxx11_attribute_p): Moved to attribs.h.
	(debug_body): Moved to print-tree.h.
	(debug_find_tree): Moved to tree-inline.h.
	(debug_fold_checksum): Moved to fold-const.h.
	(debug_head): Moved to print-tree.h.
	(debug_head): Moved to print-tree.h.
	(debug_raw): Moved to print-tree.h.
	(debug_tree): Moved to print-tree.h.
	(debug_vec_tree): Moved to print-tree.h.
	(debug_verbose): Moved to print-tree.h.
	(debug_verbose): Moved to print-tree.h.
	(decl_attributes): Moved to attribs.h.
	(decl_binds_to_current_def_p): Moved to varasm.h.
	(decl_default_tls_model): Moved to varasm.h.
	(decl_replaceable_p): Moved to varasm.h.
	(div_if_zero_remainder): Moved to fold-const.h.
	(double_int mem_ref_offset): Moved to fold-const.h.
	(dump_addr): Moved to print-tree.h.
	(element_precision): Moved to machmode.h.
	(expand_dummy_function_end): Moved to function.h.
	(expand_function_end): Moved to function.h.
	(expand_function_start): Moved to function.h.
	(expand_label): Moved to stmt.h.
	(expr_first): Moved to tree-iterator.h.
	(expr_last): Moved to tree-iterator.h.
	(finalize_size_functions): Moved to stor-layout.h.
	(finish_builtin_struct): Moved to stor-layout.h.
	(finish_record_layout): Moved to stor-layout.h.
	(fixup_signed_type): Moved to stor-layout.h.
	(fixup_unsigned_type): Moved to stor-layout.h.
	(flags_from_decl_or_type): Moved to calls.h.
	(fold): Moved to fold-const.h.
	(fold_abs_const): Moved to fold-const.h.
	(fold_binary): Moved to fold-const.h.
	(fold_binary_loc): Moved to fold-const.h.
	(fold_binary_to_constant): Moved to fold-const.h.
	(fold_build1): Moved to fold-const.h.
	(fold_build1_initializer_loc): Moved to fold-const.h.
	(fold_build1_loc): Moved to fold-const.h.
	(fold_build1_stat_loc): Moved to fold-const.h.
	(fold_build2): Moved to fold-const.h.
	(fold_build2_initializer_loc): Moved to fold-const.h.
	(fold_build2_loc): Moved to fold-const.h.
	(fold_build2_stat_loc): Moved to fold-const.h.
	(fold_build3): Moved to fold-const.h.
	(fold_build3_loc): Moved to fold-const.h.
	(fold_build3_stat_loc): Moved to fold-const.h.
	(fold_build_call_array): Moved to fold-const.h.
	(fold_build_call_array_initializer): Moved to fold-const.h.
	(fold_build_call_array_initializer_loc): Moved to fold-const.h.
	(fold_build_call_array_loc): Moved to fold-const.h.
	(fold_build_cleanup_point_expr): Moved to fold-const.h.
	(fold_convert): Moved to fold-const.h.
	(fold_convert_loc): Moved to fold-const.h.
	(fold_convertible_p): Moved to fold-const.h.
	(fold_defer_overflow_warnings): Moved to fold-const.h.
	(fold_deferring_overflow_warnings_p): Moved to fold-const.h.
	(fold_fma): Moved to fold-const.h.
	(fold_ignored_result): Moved to fold-const.h.
	(fold_indirect_ref): Moved to fold-const.h.
	(fold_indirect_ref_1): Moved to fold-const.h.
	(fold_indirect_ref_loc): Moved to fold-const.h.
	(fold_read_from_constant_string): Moved to fold-const.h.
	(fold_real_zero_addition_p): Moved to fold-const.h.
	(fold_single_bit_test): Moved to fold-const.h.
	(fold_strip_sign_ops): Moved to fold-const.h.
	(fold_ternary): Moved to fold-const.h.
	(fold_ternary_loc): Moved to fold-const.h.
	(fold_unary): Moved to tree-data-ref.h.
	(fold_unary_ignore_overflow): Moved to fold-const.h.
	(fold_unary_ignore_overflow_loc): Moved to fold-const.h.
	(fold_unary_loc): Moved to fold-const.h.
	(fold_unary_to_constant): Moved to fold-const.h.
	(fold_undefer_and_ignore_overflow_warnings): Moved to fold-const.h.
	(fold_undefer_overflow_warnings): Moved to fold-const.h.
	(folding_initializer): Moved to fold-const.h.
	(free_temp_slots): Moved to function.h.
	(generate_setjmp_warnings): Moved to function.h.
	(get_attribute_name): Moved to attribs.h.
	(get_identifier): Moved to stringpool.h.
	(get_identifier_with_length): Moved to stringpool.h.
	(get_inner_reference): Moved to tree.h.
	(gimple_alloca_call_p): Moved to calls.h.
	(gimplify_parameters): Moved to function.h.
	(highest_pow2_factor): Moved to expr.h.
	(indent_to): Moved to print-tree.h.
	(init_attributes): Moved to attribs.h.
	(init_dummy_function_start): Moved to function.h.
	(init_function_start): Moved to function.h.
	(init_inline_once): Moved to tree-inline.h.
	(init_object_sizes): Moved to tree-object-size.h.
	(init_temp_slots): Moved to function.h.
	(init_tree_optimization_optabs): Moved to optabs.h.
	(initialize_sizetypes): Moved to stor-layout.h.
	(initializer_constant_valid_for_bitfield_p): Moved to varasm.h.
	(initializer_constant_valid_p): Moved to varasm.h.
	(int_const_binop): Moved to fold-const.h.
	(internal_reference_types): Moved to stor-layout.h.
	(invert_tree_comparison): Moved to fold-const.h.
	(invert_truthvalue): Moved to fold-const.h.
	(invert_truthvalue_loc): Moved to fold-const.h.
	(is_tm_ending_fndecl): Moved to trans-mem.h.
	(is_tm_may_cancel_outer): Moved to trans-mem.h.
	(is_tm_pure): Moved to trans-mem.h.
	(is_tm_safe): Moved to trans-mem.h.
	(layout_decl): Moved to stor-layout.h.
	(layout_type): Moved to stor-layout.h.
	(lookup_attribute_spec): Moved to attribs.h.
	(make_accum_type): Moved to stor-layout.h.
	(make_decl_one_only): Moved to varasm.h.
	(make_decl_rtl): Moved to tree.h.
	(make_decl_rtl_for_debug): Moved to varasm.h.
	(make_fract_type): Moved to stor-layout.h.
	(make_or_reuse_sat_signed_accum_type): Moved to stor-layout.h.
	(make_or_reuse_sat_signed_fract_type): Moved to stor-layout.h.
	(make_or_reuse_sat_unsigned_accum_type): Moved to stor-layout.h.
	(make_or_reuse_sat_unsigned_fract_type): Moved to stor-layout.h.
	(make_or_reuse_signed_accum_type): Moved to stor-layout.h.
	(make_or_reuse_signed_fract_type): Moved to stor-layout.h.
	(make_or_reuse_unsigned_accum_type): Moved to stor-layout.h.
	(make_or_reuse_unsigned_fract_type): Moved to stor-layout.h.
	(make_range): Moved to fold-const.h.
	(make_range_step): Moved to fold-const.h.
	(make_sat_signed_accum_type): Moved to stor-layout.h.
	(make_sat_signed_fract_type): Moved to stor-layout.h.
	(make_sat_unsigned_accum_type): Moved to stor-layout.h.
	(make_sat_unsigned_fract_type): Moved to stor-layout.h.
	(make_signed_accum_type): Moved to stor-layout.h.
	(make_signed_fract_type): Moved to stor-layout.h.
	(make_signed_type): Moved to stor-layout.h.
	(make_unsigned_accum_type): Moved to stor-layout.h.
	(make_unsigned_fract_type): Moved to stor-layout.h.
	(make_unsigned_type): Moved to stor-layout.h.
	(mark_decl_referenced): Moved to varasm.h.
	(mark_referenced): Moved to varasm.h.
	(may_negate_without_overflow_p): Moved to fold-const.h.
	(maybe_get_identifier): Moved to stringpool.h.
	(merge_ranges): Moved to fold-const.h.
	(merge_weak): Moved to varasm.h.
	(mode_for_size_tree): Moved to stor-layout.h.
	(multiple_of_p): Moved to fold-const.h.
	(must_pass_in_stack_var_size): Moved to calls.h.
	(must_pass_in_stack_var_size_or_pad): Moved to calls.h.
	(native_encode_expr): Moved to fold-const.h.
	(native_interpret_expr): Moved to fold-const.h.
	(non_lvalue): Moved to fold-const.h.
	(non_lvalue_loc): Moved to fold-const.h.
	(normalize_offset): Moved to stor-layout.h.
	(normalize_rli): Moved to stor-layout.h.
	(notice_global_symbol): Moved to varasm.h.
	(omit_one_operand): Moved to fold-const.h.
	(omit_one_operand_loc): Moved to fold-const.h.
	(omit_two_operands): Moved to fold-const.h.
	(omit_two_operands_loc): Moved to fold-const.h.
	(operand_equal_p): Moved to tree-data-ref.h.
	(parse_input_constraint): Moved to stmt.h.
	(parse_output_constraint): Moved to stmt.h.
	(place_field): Moved to stor-layout.h.
	(pop_function_context): Moved to function.h.
	(pop_temp_slots): Moved to function.h.
	(pos_from_bit): Moved to stor-layout.h.
	(preserve_temp_slots): Moved to function.h.
	(print_node): Moved to print-tree.h.
	(print_node_brief): Moved to print-tree.h.
	(print_rtl): Moved to rtl.h.
	(process_pending_assemble_externals): Moved to varasm.h.
	(ptr_difference_const): Moved to fold-const.h.
	(push_function_context): Moved to function.h.
	(push_struct_function): Moved to function.h.
	(push_temp_slots): Moved to function.h.
	(record_tm_replacement): Moved to trans-mem.h.
	(relayout_decl): Moved to stor-layout.h.
	(resolve_asm_operand_names): Moved to stmt.h.
	(resolve_unique_section): Moved to varasm.h.
	(rli_size_so_far): Moved to stor-layout.h.
	(rli_size_unit_so_far): Moved to stor-layout.h.
	(round_down): Moved to fold-const.h.
	(round_down_loc): Moved to fold-const.h.
	(round_up): Moved to fold-const.h.
	(round_up_loc): Moved to fold-const.h.
	(set_decl_incoming_rtl): Moved to emit-rtl.h.
	(set_decl_rtl): Moved to tree.h.
	(set_min_and_max_values_for_integral_type): Moved to stor-layout.h.
	(set_user_assembler_name): Moved to varasm.h.
	(setjmp_call_p): Moved to calls.h.
	(size_binop): Moved to fold-const.h.
	(size_binop_loc): Moved to fold-const.h.
	(size_diffop): Moved to fold-const.h.
	(size_diffop_loc): Moved to fold-const.h.
	(size_int_kind): Moved to fold-const.h.
	(stack_protect_epilogue): Moved to function.h.
	(start_record_layout): Moved to stor-layout.h.
	(supports_one_only): Moved to varasm.h.
	(swap_tree_comparison): Moved to fold-const.h.
	(tm_malloc_replacement): Moved to trans-mem.h.
	(tree build_fold_addr_expr_loc): Moved to fold-const.h.
	(tree build_invariant_address): Moved to fold-const.h.
	(tree_binary_nonnegative_warnv_p): Moved to fold-const.h.
	(tree_binary_nonzero_warnv_p): Moved to fold-const.h.
	(tree_call_nonnegative_warnv_p): Moved to fold-const.h.
	(tree_expr_nonnegative_p): Moved to fold-const.h.
	(tree_expr_nonnegative_warnv_p): Moved to fold-const.h.
	(tree_output_constant_def): Moved to varasm.h.
	(tree_overlaps_hard_reg_set): Moved to stmt.h.
	(tree_single_nonnegative_warnv_p): Moved to fold-const.h.
	(tree_single_nonzero_warnv_p): Moved to fold-const.h.
	(tree_swap_operands_p): Moved to fold-const.h.
	(tree_unary_nonnegative_warnv_p): Moved to fold-const.h.
	(tree_unary_nonzero_warnv_p): Moved to fold-const.h.
	(update_alignment_for_field): Moved to stor-layout.h.
	(use_register_for_decl): Moved to function.h.
	(variable_size): Moved to rtl.h.
	(vector_type_mode): Moved to stor-layout.h.
	* cgraph.h: Corresponding changes.
	* emit-rtl.h: Corresponding changes.
	* expr.h: Corresponding changes.
	* function.h: Corresponding changes.
	* optabs.h: Corresponding changes.
	* trans-mem.h: Corresponding changes.
	Protect against multiple inclusion.
	* tree-inline.h: Corresponding changes.
	* tree-iterator.h: Corresponding changes.
	* tree-dfa.h: Include expr.h.
	* tree-ssanames.h: Include stringpool.h.
	* attribs.h: New file.
	* calls.h: New file.
	* fold-const.h: New file.
	* gcc-symtab.h: New file.
	* print-rtl.h: New file.
	* print-tree.h: New file.
	* stmt.h: New file.
	* stor-layout.h: New file.
	* strinpool.h: New file.
	* tree-nested.h: New file
	* tree-object-size.h: New file.
	* varasm.h: New file.
	* Makefile.in (PLUGIN_HEADERS): Add stringpool.h.

	* alias.c: Include varasm.h.
	Include expr.h.
	* asan.c: Include calls.h.
	Include stor-layout.h.
	Include varasm.h.
	* attribs.c: Include stringpool.h.
	Include attribs.h.
	Include stor-layout.h.
	* builtins.c: Include stringpool.h.
	Include stor-layout.h.
	Include calls.h.
	Include varasm.h.
	Include tree-object-size.h.
	* calls.c: Include stor-layout.h.
	Include varasm.h.
	Include stringpool.h.
	Include attribs.h.
	* cfgexpand.c: Include stringpool.h.
	Include varasm.h.
	Include stor-layout.h.
	Include stmt.h.
	Include print-tree.h.
	* cgraph.c: Include varasm.h.
	Include calls.h.
	Include print-tree.h.
	* cgraphclones.c: Include stringpool.h.
	Include function.h.
	Include emit-rtl.h.
	Move inclusion of rtl.h earlier in the file.
	* cgraphunit.c: Include varasm.h.
	Include stor-layout.h.
	Include stringpool.h.
	* cilk-common.c: Include stringpool.h.
	Include stor-layout.h.
	* combine.c: Include stor-layout.h.
	* config/aarch64/aarch64-builtins.c: Include stor-layout.h.
	Include stringpool.h.
	Include calls.h.
	* config/aarch64/aarch64.c: Include stringpool.h.
	Include stor-layout.h.
	Include calls.h.
	Include varasm.h.
	* config/alpha/alpha.c: Include stor-layout.h.
	Include calls.h.
	Include varasm.h.
	* config/arc/arc.c: Include varasm.h.
	Include stor-layout.h.
	Include stringpool.h.
	Include calls.h.
	* config/arm/arm.c: Include stringpool.h.
	Include stor-layout.h.
	Include calls.h.
	Include varasm.h.
	* config/avr/avr-c.c: Include stor-layout.h.
	* config/avr/avr-log.c: Include print-tree.h.
	* config/avr/avr.c: Include print-tree.h.
	Include calls.h.
	Include stor-layout.h.
	Include stringpool.h.
	* config/bfin/bfin.c: Include varasm.h.
	Include calls.h.
	* config/c6x/c6x.c: Include stor-layout.h.
	Include varasm.h.
	Include calls.h.
	Include stringpool.h.
	* config/cr16/cr16.c: Include stor-layout.h.
	Include calls.h.
	* config/cris/cris.c: Include varasm.h.
	Include stor-layout.h.
	Include calls.h.
	Include stmt.h.
	* config/darwin.c: Include stringpool.h.
	Include varasm.h.
	Include stor-layout.h.
	* config/epiphany/epiphany.c: Include stor-layout.h.
	Include varasm.h.
	Include calls.h.
	Include stringpool.h.
	* config/fr30/fr30.c: Include stor-layout.h.
	Include varasm.h.
	* config/frv/frv.c: Include varasm.h.
	Include stor-layout.h.
	Include stringpool.h.
	* config/h8300/h8300.c: Include stor-layout.h.
	Include varasm.h.
	Include calls.h.
	Include stringpool.h.
	* config/i386/i386.c: Include stringpool.h.
	Include attribs.h.
	Include calls.h.
	Include stor-layout.h.
	Include varasm.h.
	* config/i386/winnt-cxx.c: Include stringpool.h.
	Include attribs.h.
	* config/i386/winnt.c: Include stringpool.h.
	Include varasm.h.
	* config/ia64/ia64-c.c: Include stringpool.h.
	* config/ia64/ia64.c: Include stringpool.h.
	Include stor-layout.h.
	Include calls.h.
	Include varasm.h.
	* config/iq2000/iq2000.c: Include stor-layout.h.
	Include calls.h.
	Include varasm.h.
	* config/lm32/lm32.c: Include calls.h.
	* config/m32c/m32c.c: Include stor-layout.h.
	Include varasm.h.
	Include calls.h.
	* config/m32r/m32r.c: Include stor-layout.h.
	Include varasm.h.
	Include stringpool.h.
	Include calls.h.
	* config/m68k/m68k.c: Include calls.h.
	Include stor-layout.h.
	Include varasm.h.
	* config/mcore/mcore.c: Include stor-layout.h.
	Include varasm.h.
	Include stringpool.h.
	Include calls.h.
	* config/mep/mep.c: Include varasm.h.
	Include calls.h.
	Include stringpool.h.
	Include stor-layout.h.
	* config/microblaze/microblaze.c: Include varasm.h.
	Include stor-layout.h.
	Include calls.h.
	* config/mips/mips.c: Include varasm.h.
	Include stringpool.h.
	Include stor-layout.h.
	Include calls.h.
	* config/mmix/mmix.c: Include varasm.h.
	Include stor-layout.h.
	Include calls.h.
	* config/mn10300/mn10300.c: Include stor-layout.h.
	Include varasm.h.
	Include calls.h.
	* config/moxie/moxie.c: Include stor-layout.h.
	Include varasm.h.
	Include calls.h.
	* config/msp430/msp430.c: Include stor-layout.h.
	Include calls.h.
	* config/nds32/nds32.c: Include stor-layout.h.
	Include varasm.h.
	Include calls.h.
	* config/pa/pa.c: Include stor-layout.h.
	Include stringpool.h.
	Include varasm.h.
	Include calls.h.
	* config/pdp11/pdp11.c: Include stor-layout.h.
	Include varasm.h.
	Include calls.h.
	* config/picochip/picochip.c: Include calls.h.
	Include stor-layout.h.
	Include stringpool.h.
	Include varasm.h.
	* config/rl78/rl78.c: Include varasm.h.
	Include stor-layout.h.
	Include calls.h.
	* config/rs6000/rs6000-c.c: Include stor-layout.h.
	Include stringpool.h.
	* config/rs6000/rs6000.c: Include stringpool.h.
	Include stor-layout.h.
	Include calls.h.
	Include print-tree.h.
	Include varasm.h.
	* config/rx/rx.c: Include varasm.h.
	Include stor-layout.h.
	Include calls.h.
	* config/s390/s390.c: Include print-tree.h.
	Include stringpool.h.
	Include stor-layout.h.
	Include varasm.h.
	Include calls.h.
	* config/score/score.c: Include stringpool.h.
	Include calls.h.
	Include varasm.h.
	Include stor-layout.h.
	* config/sh/sh-c.c: Include stringpool.h.
	Include attribs.h.h.
	* config/sh/sh.c: Include stringpool.h.
	Include stor-layout.h.
	Include calls.h.
	Include varasm.h.
	* config/sol2-c.c: Include stringpool.h.
	Include attribs.h.
	* config/sol2-cxx.c: Include stringpool.h.
	* config/sol2.c: Include stringpool.h.
	Include varasm.h.
	* config/sparc/sparc.c: Include stringpool.h.
	Include stor-layout.h.
	Include calls.h.
	Include varasm.h.
	* config/spu/spu-c.c: Include stringpool.h.
	* config/spu/spu.c: Include stringpool.h.
	Include stor-layout.h.
	Include calls.h.
	Include varasm.h.
	* config/stormy16/stormy16.c: Include stringpool.h.
	Include stor-layout.h.
	Include varasm.h.
	Include calls.h.
	* config/tilegx/tilegx.c: Include stringpool.h.
	Include stor-layout.h.
	Include varasm.h.
	Include calls.h.
	* config/tilepro/tilepro.c: Include stringpool.h.
	Include stor-layout.h.
	Include varasm.h.
	Include calls.h.
	* config/v850/v850-c.c: Include stringpool.h.
	Include attribs.h.
	* config/v850/v850.c: Include stringpool.h.
	Include stor-layout.h.
	Include varasm.h.
	Include calls.h.
	* config/vax/vax.c: Include calls.h.
	Include varasm.h.
	* config/vms/vms.c: Include stringpool.h.
	* config/vxworks.c: Include stringpool.h.
	* config/xtensa/xtensa.c: Include stringpool.h.
	Include stor-layout.h.
	Include calls.h.
	Include varasm.h.
	* convert.c: Include stor-layout.h.
	* coverage.c: Include stringpool.h.
	Include stor-layout.h.
	* dbxout.c: Include varasm.h.
	Include stor-layout.h.
	* dojump.c: Include stor-layout.h.
	* dse.c: Include stor-layout.h.
	* dwarf2asm.c: Include stringpool.h.
	Include varasm.h.
	* dwarf2cfi.c: Include stor-layout.h.
	* dwarf2out.c: Include rtl.h.
	Include stringpool.h.
	Include stor-layout.h.
	Include varasm.h.
	Include function.h.
	Include emit-rtl.h.
	Move inclusion of rtl.h earlier in the file.
	* emit-rtl.c: Include varasm.h.
	* except.c: Include stringpool.h.
	Include stor-layout.h.
	* explow.c: Include stor-layout.h.
	* expmed.c: Include stor-layout.h.
	* expr.c: Include stringpool.h.
	Include stor-layout.h.
	Include attribs.h.
	Include varasm.h.
	* final.c: Include varasm.h.
	* fold-const.c: Include stor-layout.h.
	Include calls.h.
	Include tree-iterator.h.
	* function.c: Include stor-layout.h.
	Include varasm.h.
	Include stringpool.h.
	* genattrtab.c (write_header): Emit includes for varasm.h,
	stor-layout.h and calls.h.
	* genautomata.c (main): Likewise.
	* genemit.c: Likewise.
	* genopinit.c: Likewise.
	* genoutput.c (output_prologue): Likewise.
	* genpeep.c: Likewise.
	* genpreds.c (write_insn_preds_c): Likewise.
	* gengtype.c (open_base_files): Add stringpool.h.
	* gimple-expr.c: Include stringpool.h.
	Include stor-layout.h.
	* gimple-fold.c: Include stringpool.h.
	Include expr.h.
	Include stmt.h.
	Include stor-layout.h.
	* gimple-low.c: Include tree-nested.h.
	Include calls.h.
	* gimple-pretty-print.c: Include stringpool.h.
	* gimple-ssa-strength-reduction.c: Include stor-layout.h.
	Include expr.h.
	* gimple-walk.c: Include stmt.h.
	* gimple.c: Include calls.h.
	Include stmt.h.
	Include stor-layout.h.
	* gimplify.c: Include stringpool.h.
	Include calls.h.
	Include varasm.h.
	Include stor-layout.h.
	Include stmt.h.
	Include print-tree.h.
	Include expr.h.
	* gimplify-me.c: Include stmt.h
	Include stor-layout.h
	* internal-fn.c: Include stor-layout.h.
	* ipa-devirt.c: Include print-tree.h.
	Include calls.h.
	* ipa-inline-analysis.c: Include stor-layout.h.
	Include stringpool.h.
	Include print-tree.h.
	* ipa-inline.c: Include trans-mem.h.
	Include calls.h.
	* ipa-prop.c: Include expr.h.
	Include stor-layout.h.
	Include print-tree.h.
	* ipa-pure-const.c: Include print-tree.h.
	Include calls.h.
	* ipa-reference.c: Include calls.h.
	* ipa-split.c: Include stringpool.h.
	Include expr.h.
	Include calls.h.
	* ipa.c: Include calls.h.
	Include stringpool.h.
	* langhooks.c: Include stringpool.h.
	Include attribs.h.
	* lto-cgraph.c: Include stringpool.h.
	* lto-streamer-in.c: Include stringpool.h.
	* lto-streamer-out.c: Include stor-layout.h.
	Include stringpool.h.
	* omp-low.c: Include stringpool.h.
	Include stor-layout.h.
	Include expr.h.
	* optabs.c: Include stor-layout.h.
	Include stringpool.h.
	Include varasm.h.
	* passes.c: Include varasm.h.
	* predict.c: Include calls.h.
	* print-rtl.c: Include print-tree.h.
	* print-tree.c: Include varasm.h.
	Include print-rtl.h.
	Include stor-layout.h.
	* realmpfr.c: Include stor-layout.h.
	* reg-stack.c: Include varasm.h.
	* sdbout.c: Include varasm.h.
	Include stor-layout.h.
	* simplify-rtx.c: Include varasm.h.
	* stmt.c: Include varasm.h.
	Include stor-layout.h.
	* stor-layout.c: Include stor-layout.h.
	Include stringpool.h.
	Include varasm.h.
	Include print-tree.h.
	* symtab.c: Include rtl.h.
	Include print-tree.h.
	Include varasm.h.
	Include function.h.
	Include emit-rtl.h.
	* targhooks.c: Include stor-layout.h.
	Include varasm.h.
	* toplev.c: Include varasm.h.
	Include tree-inline.h.
	* trans-mem.c: Include calls.h.
	Include function.h.
	Include rtl.h.
	Include emit-rtl.h.
	* tree-affine.c: Include expr.h.
	* tree-browser.c: Include print-tree.h.
	* tree-call-cdce.c: Include stor-layout.h.
	* tree-cfg.c: Include trans-mem.h.
	Include stor-layout.h.
	Include print-tree.h.
	* tree-complex.c: Include stor-layout.h.
	* tree-data-ref.c: Include expr.h.
	* tree-dfa.c: Include stor-layout.h.
	* tree-eh.c: Include expr.h.
	Include calls.h.
	* tree-emutls.c: Include stor-layout.h.
	Include varasm.h.
	* tree-if-conv.c: Include stor-layout.h.
	* tree-inline.c: Include stor-layout.h.
	Include calls.h.
	* tree-loop-distribution.c: Include stor-layout.h.
	* tree-nested.c: Include stringpool.h.
	Include stor-layout.h.
	* tree-object-size.c: Include tree-object-size.h.
	* tree-outof-ssa.c: Include stor-layout.h.
	* tree-parloops.c: Include stor-layout.h.
	Include tree-nested.h.
	* tree-pretty-print.c: Include stor-layout.h.
	Include expr.h.
	* tree-profile.c: Include varasm.h.
	Include tree-nested.h.
	* tree-scalar-evolution.c: Include expr.h.
	* tree-sra.c: Include stor-layout.h.
	* tree-ssa-address.c: Include stor-layout.h.
	* tree-ssa-ccp.c: Include stor-layout.h.
	* tree-ssa-dce.c: Include calls.h.
	* tree-ssa-dom.c: Include stor-layout.h.
	* tree-ssa-forwprop.c: Include stor-layout.h.
	* tree-ssa-ifcombine.c: Include stor-layout.h.
	* tree-ssa-loop-ivopts.c: Include stor-layout.h.
	* tree-ssa-loop-niter.c: Include calls.h.
	Include expr.h.
	* tree-ssa-loop-prefetch.c: Include stor-layout.h.
	* tree-ssa-math-opts.c: Include stor-layout.h.
	* tree-ssa-operands.c: Include stmt.h.
	Include print-tree.h.
	* tree-ssa-phiopt.c: Include stor-layout.h.
	* tree-ssa-reassoc.c: Include stor-layout.h.
	* tree-ssa-sccvn.c: Include stor-layout.h.
	* tree-ssa-sink.c: Include stor-layout.h.
	* tree-ssa-strlen.c: Include stor-layout.h.
	* tree-ssa-structalias.c: Include stor-layout.h.
	Include stmt.h.
	* tree-ssa-tail-merge.c: Include stor-layout.h.
	Include trans-mem.h.
	* tree-ssa-uncprop.c: Include stor-layout.h.
	* tree-ssa.c: Include stor-layout.h.
	* tree-ssanames.c: Include stor-layout.h.
	* tree-streamer-in.c: Include stringpool.h.
	* tree-streamer-out.c: Include stor-layout.h.
	* tree-switch-conversion.c: Include varasm.h.
	Include stor-layout.h.
	* tree-tailcall.c: Include stor-layout.h.
	* tree-vect-data-refs.c: Include stor-layout.h.
	* tree-vect-generic.c: Include stor-layout.h.
	* tree-vect-loop.c: Include stor-layout.h.
	* tree-vect-patterns.c: Include stor-layout.h.
	* tree-vect-slp.c: Include stor-layout.h.
	* tree-vect-stmts.c: Include stor-layout.h.
	* tree-vectorizer.c: Include stor-layout.h.
	* tree-vrp.c: Include stor-layout.h.
	Include calls.h.
	* tree.c: Include stor-layout.h.
	Include calls.h.
	Include attribs.h.
	Include varasm.h.
	* tsan.c: Include expr.h.
	* ubsan.c: Include stor-layout.h.
	Include stringpool.h.
	* value-prof.c: Include tree-nested.h.
	Include calls.h.
	* var-tracking.c: Include varasm.h.
	Include stor-layout.h.
	* varasm.c: Include stor-layout.h.
	Include stringpool.h.
	Include gcc-symtab.h.
	Include varasm.h.
	* varpool.c: Include varasm.h.
	* vmsdbgout.c: Include varasm.h.
	* xcoffout.c: Include varasm.h.

ada/ChangeLog

	* gcc-interface/decl.c: Include stringpool.h
	Include stor-layout.h
	* gcc-interface/misc.c: Include stor-layout.h
	Include print-tree.h
	* gcc-interface/trans.c: Include stringpool.h
	Include stor-layout.h
	Include stmt.h
	Include varasm.h
	* gcc-interface/utils.c: Include stringpool.h
	Include stor-layout.h
	Include attribs.h
	Include varasm.h
	* gcc-interface/utils2.c: Include stringpool.h
	Include stor-layout.h
	Include attribs.h
	Include varasm.h

c-family/ChangeLog

	* c-common.c: Include fold-const.h.
	Include stor-layout.h.
	Include calls.h.
	Include stringpool.h.
	Include attribs.h.
	Include varasm.h.
	Include trans-mem.h.
	* c-cppbuiltin.c: Include stor-layout.h.
	Include stringpool.h.
	* c-format.c: Include stringpool.h.
	* c-lex.c: Include stringpool.h.
	Include stor-layout.h.
	* c-pragma.c: Include stringpool.h.
	Include attribs.h.
	Include varasm.h.
	Include gcc-symtab.h.
	* c-pretty-print.c: Include stor-layout.h.
	Include attribs.h.
	* cilk.c: Include stringpool.h.
	Include calls.h.

c/ChangeLog

	* c-decl.c: Include print-tree.h.
	Include stor-layout.h.
	Include varasm.h.
	Include attribs.h.
	Include stringpool.h.
	* c-lang.c: Include fold-const.h.
	* c-parser.c: Include stringpool.h.
	Include attribs.h.
	Include stor-layout.h.
	Include varasm.h.
	Include trans-mem.h.
	* c-typeck.c: Include stor-layout.h.
	Include trans-mem.h.
	Include varasm.h.
	Include stmt.h.

cp/ChangeLog

	* call.c: Include stor-layout.h.
	Include trans-mem.h.
	Include stringpool.h.
	* class.c: Include stringpool.h.
	Include stor-layout.h.
	Include attribs.h.
	* cp-gimplify.c: Include stor-layout.h.
	* cvt.c: Include stor-layout.h.
	* decl.c: Include stringpool.h.
	Include stor-layout.h.
	Include varasm.h.
	Include attribs.h.
	Include calls.h.
	* decl2.c: Include stringpool.h.
	Include varasm.h.
	Include attribs.h.
	Include stor-layout.h.
	Include calls.h.
	* error.c: Include stringpool.h.
	* except.c: Include stringpool.h.
	Include trans-mem.h.
	Include attribs.h.
	* init.c: Include stringpool.h.
	Include varasm.h.
	* lambda.c: Include stringpool.h.
	* lex.c: Include stringpool.h.
	* mangle.c: Include stor-layout.h.
	Include stringpool.h.
	* method.c: Include stringpool.h.
	Include varasm.h.
	* name-lookup.c: Include stringpool.h.
	Include print-tree.h.
	Include attribs.h.
	* optimize.c: Include stringpool.h.
	* parser.c: Include print-tree.h.
	Include stringpool.h.
	Include attribs.h.
	Include trans-mem.h.
	* pt.c: Include stringpool.h.
	Include varasm.h.
	Include attribs.h.
	Include stor-layout.h.
	* ptree.c: Include print-tree.h.
	* repo.c: Include stringpool.h.
	* rtti.c: Include stringpool.h.
	Include stor-layout.h.
	* semantics.c: Include stmt.h.
	Include varasm.h.
	Include stor-layout.h.
	Include stringpool.h.
	* tree.c: Include stor-layout.h.
	Include print-tree.h.
	Include tree-iterator.h.
	* typeck.c: Include stor-layout.h.
	Include varasm.h.
	* typeck2.c: Include stor-layout.h.
	Include varasm.h.
	* vtable-class-hierarchy.c: Include stringpool.h.
	Include stor-layout.h.

fortran/ChangeLog

	* decl.c: Include stringpool.h.
	* iresolve.c: Include stringpool.h.
	* match.c: Include stringpool.h.
	* module.c: Include stringpool.h.
	* target-memory.c: Include stor-layout.h.
	* trans-common.c: Include stringpool.h.
	Include stor-layout.h.
	Include varasm.h.
	* trans-const.c: Include stor-layout.h.
	* trans-decl.c: Include stringpool.h.
	Include stor-layout.h.
	Include varasm.h.
	Include attribs.h.
	* trans-expr.c: Include stringpool.h.
	* trans-intrinsic.c: Include stringpool.h.
	Include tree-nested.h.
	Include stor-layout.h.
	* trans-io.c: Include stringpool.h.
	Include stor-layout.h.
	* trans-openmp.c: Include stringpool.h.
	* trans-stmt.c: Include stringpool.h.
	* trans-types.c: Include stor-layout.h.
	Include stringpool.h.
	* trans.c: Include stringpool.h.

go/ChangeLog

	* go-backend.c: Include stor-layout.h.
	* go-gcc.cc: Include stringpool.h.
	Include stor-layout.h.
	Include varasm.h.
	* go-lang.c: Include stor-layout.h.

java/ChangeLog

	* builtins.c: Include stor-layout.h.
	Include stringpool.h.
	* class.c: Include stringpool.h.
	Include stor-layout.h.
	Include varasm.h.
	* constants.c: Include stringpool.h.
	Include stor-layout.h.
	* decl.c: Include stor-layout.h.
	Include stringpool.h.
	Include varasm.h.
	* except.c: Include stringpool.h.
	Include stor-layout.h.
	* expr.c: Include stringpool.h.
	Include stor-layout.h.
	* jcf-parse.c: Include stringpool.h.
	* mangle.c: Include stringpool.h.
	* resource.c: Include stringpool.h.
	Include stor-layout.h.
	* typeck.c: Include stor-layout.h.
	Include stringpool.h.
	* verify-glue.c: Include stringpool.h.

lto/ChangeLog
	* lto-lang.c: Include stringpool.h.
	Include stor-layout.h.
	* lto-partition.c: Include gcc-symtab.h.
	* lto.c: Include stor-layout.h.

objc/ChangeLog
	* objc-act.c: Include stringpool.h.
	Include stor-layout.h.
	Include attribs.h.
	* objc-encoding.c: Include stringpool.h.
	Include stor-layout.h.
	* objc-gnu-runtime-abi-01.c: Include stringpool.h.
	* objc-next-runtime-abi-01.c:
	Include stringpool.h.
	* objc-next-runtime-abi-02.c: Include stringpool.h.
	* objc-runtime-shared-support.c: Include stringpool.h.

testsuite/ChangeLog

	* gcc.dg/plugin/selfassign.c: Include stringpool.h.
	* gcc.dg/plugin/start_unit_plugin.c: Likewise.

From-SVN: r205023
2013-11-19 07:31:09 -05:00
Kenneth Zadeck bd6337aaeb tree.c (int_fits_type_p): Change GET_MODE_BITSIZE to GET_MODE_PRECISION.
2013-11-18 Kenneth Zadeck <zadeck@naturalbridge.com>

	* tree.c (int_fits_type_p): Change GET_MODE_BITSIZE to
	GET_MODE_PRECISION.
	* fold-const.c (fold_single_bit_test_into_sign_test)
	(fold_binary_loc):  Change GET_MODE_BITSIZE to
	GET_MODE_PRECISION.

From-SVN: r204987
2013-11-19 00:00:17 +00:00
Richard Sandiford 7d362f6c2b c-common.c (convert_vector_to_pointer_for_subscript): Remove cast to unsigned type.
gcc/c-family/
	* c-common.c (convert_vector_to_pointer_for_subscript): Remove
	cast to unsigned type.

gcc/
	* tree.h (tree_to_uhwi): Return an unsigned HOST_WIDE_INT.
	* tree.c (tree_to_uhwi): Return an unsigned HOST_WIDE_INT.
	(tree_ctz): Remove cast to unsigned type.
	* builtins.c (fold_builtin_memory_op): Likewise.
	* dwarf2out.c (descr_info_loc): Likewise.
	* godump.c (go_output_typedef): Likewise.
	* omp-low.c (expand_omp_simd): Likewise.
	* stor-layout.c (excess_unit_span): Likewise.
	* tree-object-size.c (addr_object_size): Likewise.
	* tree-sra.c (analyze_all_variable_accesses): Likewise.
	* tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
	(simplify_rotate): Likewise.
	* tree-ssa-strlen.c (adjust_last_stmt, handle_builtin_memcpy)
	(handle_pointer_plus): Likewise.
	* tree-switch-conversion.c (check_range): Likewise.
	* tree-vect-patterns.c (vect_recog_rotate_pattern): Likewise.
	* tsan.c (instrument_builtin_call): Likewise.
	* cfgexpand.c (defer_stack_allocation): Add cast to HOST_WIDE_INT.
	* trans-mem.c (tm_log_add): Likewise.
	* config/aarch64/aarch64.c (aapcs_vfp_sub_candidate): Likewise.
	* config/arm/arm.c (aapcs_vfp_sub_candidate): Likewise.
	* config/rs6000/rs6000.c (rs6000_aggregate_candidate): Likewise.
	* config/mips/mips.c (r10k_safe_mem_expr_p): Make offset unsigned.

From-SVN: r204964
2013-11-18 14:52:56 +00:00
Richard Sandiford b23b672e8d tree.h (host_integerp, [...]): Delete.
gcc/
	* tree.h (host_integerp, tree_low_cst): Delete.
	* tree.c (host_integerp, tree_low_cst): Delete.

From-SVN: r204963
2013-11-18 14:52:42 +00:00
Richard Sandiford ae7e9dddb8 decl.c, [...]: Replace tree_low_cst (..., 1) with tree_to_uhwi throughout.
gcc/ada/
	* gcc-interface/decl.c, gcc-interface/utils.c, gcc-interface/utils2.c:
	Replace tree_low_cst (..., 1) with tree_to_uhwi throughout.

gcc/c-family/
	* c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
	tree_to_uhwi throughout.

gcc/c/
	* c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
	tree_to_uhwi throughout.

gcc/cp/
	* call.c, class.c, decl.c, error.c: Replace tree_low_cst (..., 1) with
	tree_to_uhwi throughout.

gcc/objc/
	* objc-encoding.c: Replace tree_low_cst (..., 1) with tree_to_uhwi
	throughout.

gcc/
	* alias.c, asan.c, builtins.c, cfgexpand.c, cgraph.c,
	config/aarch64/aarch64.c, config/alpha/predicates.md,
	config/arm/arm.c, config/darwin.c, config/epiphany/epiphany.c,
	config/i386/i386.c, config/iq2000/iq2000.c, config/m32c/m32c-pragma.c,
	config/mep/mep-pragma.c, config/mips/mips.c,
	config/picochip/picochip.c, config/rs6000/rs6000.c, cppbuiltin.c,
	dbxout.c, dwarf2out.c, emit-rtl.c, except.c, expr.c, fold-const.c,
	function.c, gimple-fold.c, godump.c, ipa-cp.c, ipa-prop.c, omp-low.c,
	predict.c, sdbout.c, stor-layout.c, trans-mem.c, tree-object-size.c,
	tree-sra.c, tree-ssa-ccp.c, tree-ssa-forwprop.c,
	tree-ssa-loop-ivcanon.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-niter.c,
	tree-ssa-loop-prefetch.c, tree-ssa-strlen.c, tree-stdarg.c,
	tree-switch-conversion.c, tree-vect-generic.c, tree-vect-loop.c,
	tree-vect-patterns.c, tree-vrp.c, tree.c, tsan.c, ubsan.c, varasm.c:
	Replace tree_low_cst (..., 1) with tree_to_uhwi throughout.

From-SVN: r204961
2013-11-18 14:52:19 +00:00
Richard Sandiford 9439e9a1a4 c-common.c, [...]: Replace tree_low_cst (..., 0) with tree_to_shwi throughout.
gcc/c-family/
	* c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
	tree_low_cst (..., 0) with tree_to_shwi throughout.

gcc/c/
	* c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
	throughout.

gcc/cp/
	* class.c, dump.c, error.c, init.c, method.c, parser.c, semantics.c:
	Replace tree_low_cst (..., 0) with tree_to_shwi throughout.

gcc/go/
	* gofrontend/expressions.cc: Replace tree_low_cst (..., 0) with
	tree_to_shwi throughout.

gcc/java/
	* class.c, expr.c: Replace tree_low_cst (..., 0) with tree_to_shwi
	throughout.

gcc/objc/
	* objc-next-runtime-abi-02.c: Replace tree_low_cst (..., 0) with
	tree_to_shwi throughout.

gcc/
	* builtins.c, cilk-common.c, config/aarch64/aarch64.c,
	config/alpha/alpha.c, config/arm/arm.c, config/c6x/predicates.md,
	config/i386/i386.c, config/ia64/predicates.md, config/s390/s390.c,
	coverage.c, dbxout.c, dwarf2out.c, except.c, explow.c, expr.c, expr.h,
	fold-const.c, gimple-fold.c, godump.c, ipa-prop.c, omp-low.c,
	predict.c, rtlanal.c, sdbout.c, stmt.c, stor-layout.c, targhooks.c,
	tree-cfg.c, tree-data-ref.c, tree-inline.c, tree-ssa-forwprop.c,
	tree-ssa-loop-prefetch.c, tree-ssa-phiopt.c, tree-ssa-sccvn.c,
	tree-ssa-strlen.c, tree-stdarg.c, tree-vect-data-refs.c,
	tree-vect-patterns.c, tree.c, tree.h, var-tracking.c, varasm.c:
	Replace tree_low_cst (..., 0) with tree_to_shwi throughout.

From-SVN: r204959
2013-11-18 14:52:03 +00:00
Richard Sandiford 7c5efc1206 tree.h (tree_to_shwi, [...]): Declare, with inline expansions.
gcc/
	* tree.h (tree_to_shwi, tree_to_uhwi): Declare, with inline expansions.
	* tree.c (tree_to_shwi, tree_to_uhwi): New functions.

From-SVN: r204958
2013-11-18 14:51:45 +00:00
Richard Sandiford cc269bb6d9 decl.c, [...]: Replace host_integerp (..., 1) with tree_fits_uhwi_p throughout.
gcc/ada/
	* gcc-interface/decl.c, gcc-interface/misc.c, gcc-interface/utils.c:
	Replace host_integerp (..., 1) with tree_fits_uhwi_p throughout.

gcc/c-family/
	* c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
	host_integerp (..., 1) with tree_fits_uhwi_p throughout.

gcc/cp/
	* decl.c: Replace host_integerp (..., 1) with tree_fits_uhwi_p
	throughout.

gcc/
	* builtins.c, config/alpha/alpha.c, config/iq2000/iq2000.c,
	config/mips/mips.c, dbxout.c, dwarf2out.c, expr.c, fold-const.c,
	gimple-fold.c, godump.c, omp-low.c, predict.c, sdbout.c, stor-layout.c,
	tree-dfa.c, tree-sra.c, tree-ssa-forwprop.c, tree-ssa-loop-prefetch.c,
	tree-ssa-phiopt.c, tree-ssa-sccvn.c, tree-ssa-strlen.c,
	tree-ssa-structalias.c, tree-vect-data-refs.c, tree-vect-patterns.c,
	tree.c, varasm.c, alias.c, cfgexpand.c, config/aarch64/aarch64.c,
	config/arm/arm.c, config/epiphany/epiphany.c, config/i386/i386.c,
	config/m32c/m32c-pragma.c, config/mep/mep-pragma.c,
	config/rs6000/rs6000.c, config/sparc/sparc.c, emit-rtl.c, function.c,
	gimplify.c, ipa-prop.c, stmt.c, trans-mem.c, tree-cfg.c,
	tree-object-size.c, tree-ssa-ccp.c, tree-ssa-loop-ivcanon.c,
	tree-stdarg.c, tree-switch-conversion.c, tree-vect-generic.c,
	tree-vrp.c, tsan.c, ubsan.c: Replace host_integerp (..., 1) with
	tree_fits_uhwi_p throughout.

From-SVN: r204956
2013-11-18 14:51:26 +00:00
Richard Sandiford 9541ffee8c cuintp.c: Replace host_integerp (..., 0) with tree_fits_shwi_p throughout.
gcc/ada/
	* gcc-interface/cuintp.c: Replace host_integerp (..., 0) with
	tree_fits_shwi_p throughout.

gcc/c-family/
	* c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
	host_integerp (..., 0) with tree_fits_shwi_p throughout.

gcc/c/
	* c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
	throughout.

gcc/cp/
	* error.c, init.c, parser.c, semantics.c: Replace
	host_integerp (..., 0) with tree_fits_shwi_p throughout.

gcc/go/
	* gofrontend/expressions.cc: Replace host_integerp (..., 0) with
	tree_fits_shwi_p throughout.

gcc/java/
	* class.c, expr.c: Replace host_integerp (..., 0) with
	tree_fits_shwi_p throughout.

gcc/
	* builtins.c, config/alpha/alpha.c, config/c6x/predicates.md,
	config/ia64/predicates.md, config/iq2000/iq2000.c, config/mips/mips.c,
	config/s390/s390.c, dbxout.c, dwarf2out.c, except.c, explow.c, expr.c,
	expr.h, fold-const.c, gimple-fold.c, gimple-ssa-strength-reduction.c,
	gimple.c, godump.c, graphite-scop-detection.c, graphite-sese-to-poly.c,
	omp-low.c, predict.c, rtlanal.c, sdbout.c, simplify-rtx.c,
	stor-layout.c, tree-data-ref.c, tree-dfa.c, tree-pretty-print.c,
	tree-sra.c, tree-ssa-alias.c, tree-ssa-forwprop.c,
	tree-ssa-loop-ivopts.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c,
	tree-ssa-phiopt.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c,
	tree-ssa-strlen.c, tree-ssa-structalias.c, tree-vect-data-refs.c,
	tree-vect-patterns.c, tree-vectorizer.h, tree.c, var-tracking.c,
	varasm.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
	throughout.

From-SVN: r204955
2013-11-18 14:51:10 +00:00
Richard Sandiford b04268a57f tree.h (tree_fits_shwi_p, [...]): Declare.
gcc/
	* tree.h (tree_fits_shwi_p, tree_fits_uhwi_p): Declare.
	* tree.c (tree_fits_shwi_p, tree_fits_uhwi_p): Define.

From-SVN: r204954
2013-11-18 14:50:47 +00:00
Andrew MacLeod 1fe37220af gimple.h: Reorder prototypes to match .c declaration order...
* gimple.h: Reorder prototypes to match .c declaration order, and remove
	protyotypes for functions not in gimple.c.
	(LABEL): Move to tree-into-ssa.c.
	* gimple.c: Remove unused prototypes.
	(get_base_address): Move to tree.c.
	* tree.c (get_base_address): Relocate from gimple.c.
	* builtins.h (validate_gimple_arglist): Add prototype.
	* trans-mem.h (compute_transaction_bits, is_tm_ending): Add prototype.
	* cfgexpand.h: New File.
	(gimple_assign_rhs_to_tree, estimated_stack_frame_size): Add protoype.
	* tree.h (build_addr): Move to tree-nested.h.
	* tree-nested.h: New File.
	(build_addr, lower_nested_functions, insert_field_into_struct): Add
	prototypes.
	* tree-inline.h (estimated_stack_frame_size): Remove prototype.
	* ipa-inline-analysis.c: Include cfgexpand.h.
	* cgraphunit.c: Include tree-nested.h.
	* omp-low.c: Likewise.
	* tree-parloops.c: Likewise.
	* gimple-low.h: Likewise.
	* tree-profile.h: Likewise.
	* expr.c: Include cfgexpand.h.
	* tree-affine.c: Likewise.
	* tree-ssa.c: Likewise.
	* tree-ssa-loop-im.c: Include trans-mem.h.
	* tree-ssa-tail-merge.c: Likewise.
	* value-prof.c: Include builtins.h and tree-nested.h.
	* tree-into-ssa.c (LABEL): Define here.

	* fortran/trans-intrinsic.c: Include tree-nested.h.

From-SVN: r204919
2013-11-17 16:14:46 +00:00
Andrew MacLeod 18f429e29c gimplify-be.h: New file.
* gimplify-be.h:  New file.  Add prototypes.
	* gimplify.h: Don't include gimple.h.
	(struct gimplify_hasher, struct gimplify_ctx, is_gimple_sizepos,
	gimplify_hasher::hash, gimplify_hasher::equal): Relocate from gimple.h.
	* gimple.h (struct gimplify_hasher, gimplify_hasher::hash,
	gimplify_hasher::equal, struct gimplify_ctx, is_gimple_sizepos): Move
	to gimplify.h.
	(enum gsi_iterator_update): Move to gimple-iterator.h.
	* gimple-iterator.h (enum gsi_iterator_update): Relocate from gimple.h.
	* gimplify-be.c: New File.
	(force_gimple_operand_1, force_gimple_operand,
	force_gimple_operand_gsi_1, force_gimple_operand_gsi): Relocate from
	gimplify.c.
	* gimplify.c (force_gimple_operand_1, force_gimple_operand,
	force_gimple_operand_gsi_1, force_gimple_operand_gsi): Move to
	gimplify-be.c.
	* Makefile.in (OBJS): Add gimplify-be.o
	* asan.c: Include only gimplify.h, gimplify-be.h, and/or gimple.h as
	required.
	* cfgloopmanip.c: Likewise.
	* cgraphunit.c: Likewise.
	* cilk-common.c: Likewise.
	* fold-const.c: Likewise.
	* function.c: Likewise.
	* gimple-expr.c: Likewise.
	* gimple-fold.c: Likewise.
	* gimple-ssa-strength-reduction.c: Likewise.
	* gimple.c: Likewise.
	* graphite-clast-to-gimple.c: Likewise.
	* graphite-sese-to-poly.c: Likewise.
	* ipa-prop.c: Likewise.
	* ipa-split.c: Likewise.
	* ipa.c: Likewise.
	* langhooks.c: Likewise.
	* omp-low.c: Likewise.
	* sese.c: Likewise.
	* stor-layout.c: Likewise.
	* targhooks.c: Likewise.
	* trans-mem.c: Likewise.
	* tree-affine.c: Likewise.
	* tree-cfg.c: Likewise.
	* tree-cfgcleanup.c: Likewise.
	* tree-complex.c: Likewise.
	* tree-if-conv.c: Likewise.
	* tree-inline.c: Likewise.
	* tree-loop-distribution.c: Likewise.
	* tree-nested.c: Likewise.
	* tree-parloops.c: Likewise.
	* tree-predcom.c: Likewise.
	* tree-profile.c: Likewise.
	* tree-scalar-evolution.c: Likewise.
	* tree-sra.c: Likewise.
	* tree-ssa-address.c: Likewise.
	* tree-ssa-ccp.c: Likewise.
	* tree-ssa-dce.c: Likewise.
	* tree-ssa-forwprop.c: Likewise.
	* tree-ssa-ifcombine.c: Likewise.
	* tree-ssa-loop-im.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-math-opts.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-strlen.c: Likewise.
	* tree-ssa.c: 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-stmts.c: Likewise.
	* tree.c: Likewise.
	* tsan.c: Likewise.
	* value-prof.c: Likewise.
	* config/aarch64/aarch64.c: Likewise.
	* config/alpha/alpha.c: Likewise.
	* config/darwin.c: Likewise.
	* config/i386/i386.c: Likewise.
	* config/ia64/ia64.c: Likewise.
	* config/mep/mep.c: Likewise.
	* config/mips/mips.c: Likewise.
	* config/rs6000/rs6000.c: Likewise.
	* config/s390/s390.c: Likewise.
	* config/sh/sh.c: Likewise.
	* config/sparc/sparc.c: Likewise.
	* config/spu/spu.c: Likewise.
	* config/stormy16/stormy16.c: Likewise.
	* config/tilegx/tilegx.c: Likewise.
	* config/tilepro/tilepro.c: Likewise.
	* config/xtensa/xtensa.c: Likewise.

	* c/c-typeck.c: Include only gimplify.h and gimple.h as needed.
	* c-family/c-common.c: Likewise.
	* c-family/c-gimplify.c: Likewise.
	* c-family/cilk.c: Likewise.

	* cp/class.c: Include only gimplify.h and gimple.h as needed.
	* cp/cp-gimplify.c: Likewise.
	* cp/error.c: Likewise.
	* cp/init.c: Likewise.
	* cp/optimize.c: Likewise.
	* cp/pt.c: Likewise.
	* cp/semantics.c: Likewise.
	* cp/tree.c: Likewise.
	* cp/vtable-class-hierarchy.c: Likewise.

	* fortran/trans-expr.c: Include only gimplify.h and gimple.h as needed.
	* fortran/trans-openmp.c: Likewise.

	* go/go-lang.c: Include only gimplify.h and gimple.h as needed.

	* java/java-gimplify.c: Include only gimplify.h and gimple.h as needed.

	* objc/objc-act.c: Include only gimplify.h and gimple.h as needed.

From-SVN: r204812
2013-11-14 19:39:38 +00:00
Andrew Macleod 5be5c23841 gimple-walk.h: New File.
* gimple-walk.h: New File.  Relocate prototypes from gimple.h.
	(struct walk_stmt_info):  Relocate here from gimple.h.
	* gimple-iterator.h: New File.  Relocate prototypes from gimple.h.
	(struct gimple_stmt_iterator_d): Relocate here from gimple.h.
	(gsi_start_1, gsi_none, gsi_start_bb, gsi_last_1, gsi_last_bb,
	gsi_end_p, gsi_one_before_end_p, gsi_next, gsi_prev, gsi_stmt,
	gsi_after_labels, gsi_next_nondebug, gsi_prev_nondebug,
	gsi_start_nondebug_bb, gsi_start_nondebug_after_labels_bb,
	gsi_last_nondebug_bb, gsi_bb, gsi_seq): Relocate here from gimple.h.
	* gimple.h (struct gimple_stmt_iterator_d): Move to gimple-iterator.h.
	(gsi_start_1, gsi_none, gsi_start_bb, gsi_last_1, gsi_last_bb,
	gsi_end_p, gsi_one_before_end_p, gsi_next, gsi_prev, gsi_stmt,
	gsi_after_labels, gsi_next_nondebug, gsi_prev_nondebug,
	gsi_start_nondebug_bb, gsi_start_nondebug_after_labels_bb,
	gsi_last_nondebug_bb, gsi_bb, gsi_seq): Move to gimple-iterator.h.
	(struct walk_stmt_info): Move to gimple-walk.h.
	(gimple_seq_set_location): Move to gimple.c
	* gimple-walk.c: New File.
	(walk_gimple_seq_mod, walk_gimple_seq, walk_gimple_asm, walk_gimple_op,
	walk_gimple_stmt, get_base_loadstore, walk_stmt_load_store_addr_ops,
	walk_stmt_load_store_ops): Relocate here from gimple.c.
	* gimple-iterator.c: Include gimple-iterator.h.
	* gimple.c (walk_gimple_seq_mod, walk_gimple_seq, walk_gimple_asm,
	walk_gimple_op, walk_gimple_stmt, get_base_loadstore,
	walk_stmt_load_store_addr_ops, walk_stmt_load_store_ops): Move to
	gimple-walk.c.
	(gimple_seq_set_location): Relocate from gimple.h.
	* tree-phinodes.h (set_phi_nodes): Move to tree-phinodes.c.
	* tree-phinodes.c (set_phi_nodes): Relocate from tree-phinodes.h.
	* gengtype.c (open_base_files): Add gimple-iterator.h to include list.
	* Makefile.in (OBJS): Add gimple-walk.o

	* asan.c: Update Include list as required for gimple-iterator.h and
	gimple-walk.h.
	* cfgexpand.c: Likewise.
	* cfgloop.c: Likewise.
	* cfgloopmanip.c: Likewise.
	* cgraph.c: Likewise.
	* cgraphbuild.c: Likewise.
	* cgraphunit.c: Likewise.
	* gimple-fold.c: Likewise.
	* gimple-low.c: Likewise.
	* gimple-pretty-print.c: Likewise.
	* gimple-ssa-isolate-paths.c: Likewise.
	* gimple-ssa-strength-reduction.c: Likewise.
	* gimple-streamer-in.c: Likewise.
	* gimple-streamer-out.c: Likewise.
	* gimplify.c: Likewise.
	* graphite-blocking.c: Likewise.
	* graphite-clast-to-gimple.c: Likewise.
	* graphite-dependences.c: Likewise.
	* graphite-interchange.c: Likewise.
	* graphite-optimize-isl.c: Likewise.
	* graphite-poly.c: Likewise.
	* graphite-scop-detection.c: Likewise.
	* graphite-sese-to-poly.c: Likewise.
	* graphite.c: Likewise.
	* ipa-inline-analysis.c: Likewise.
	* ipa-profile.c: Likewise.
	* ipa-prop.c: Likewise.
	* ipa-pure-const.c: Likewise.
	* ipa-split.c: Likewise.
	* lto-streamer-in.c: Likewise.
	* lto-streamer-out.c: Likewise.
	* omp-low.c: Likewise.
	* predict.c: Likewise.
	* profile.c: Likewise.
	* sese.c: Likewise.
	* tracer.c: Likewise.
	* trans-mem.c: Likewise.
	* tree-call-cdce.c: Likewise.
	* tree-cfg.c: Likewise.
	* tree-cfgcleanup.c: Likewise.
	* tree-complex.c: Likewise.
	* tree-data-ref.c: Likewise.
	* tree-dfa.c: Likewise.
	* tree-eh.c: Likewise.
	* tree-emutls.c: Likewise.
	* tree-if-conv.c: Likewise.
	* tree-inline.c: Likewise.
	* tree-into-ssa.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-predcom.c: Likewise.
	* tree-profile.c: Likewise.
	* tree-scalar-evolution.c: Likewise.
	* tree-sra.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.c: Likewise.
	* tree-ssa-math-opts.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-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-stdarg.c: 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-vrp.c: Likewise.
	* tree.c: Likewise.
	* tsan.c: Likewise.
	* value-prof.c: Likewise.
	* vtable-verify.c: Likewise.

	* config/aarch64/aarch64-builtins.c: Include gimple-iterator.h.
	* config/rs6000/rs6000.c: Include gimple-iterator.h and gimple-walk.h.
	* testsuite/g++.dg/plugin/selfassign.c: Include gimple-iterator.h.
	* testsuite/gcc.dg/plugin/selfassign.c: Likewise.

From-SVN: r204763
2013-11-13 23:54:17 +00:00
Adam Butcher 0dca5025f0 Refactor implicit function template implementation and fix 58534, 58536, 58548, 58549 and 58637.
gcc/
	* tree.c (grow_tree_vec_stat): New function ...
	* tree.h (grow_tree_vec_stat) (grow_tree_vec): ... and its declaration
	and macro front-end.

gcc/cp/
	PR c++/58534
	PR c++/58536
	PR c++/58548
	PR c++/58549
	PR c++/58637
	* parser.h (struct cp_parser): New members implicit_template_parms,
	implicit_template_scope and auto_is_implicit_function_template_parm_p.
	* parser.c (add_implicit_template_parms): Refactor as ...
	(synthesize_implicit_template_parm): ... this to append a new template
	type parm to the current template parameter list (introducing a new list
	if necessary).  Removed push_deferring_access_checks.
	(finish_fully_implicit_template): Removed pop_deferring_access_checks.
	(cp_parser_new): Initialize new cp_parser members.
	(cp_parser_parameter_declaration_clause): Consider auto as implicit
	template parm when parsing a parameter declaration (unless parsing an
	explicit specialization).
	(cp_parser_parameter_declaration_list): Remove local
	implicit_template_parms counter and reset cp_parser implicit template
	state when complete.
	(cp_parser_lambda_expression): Reset implicit template cp_parser members
	whilst generating lambda class.
	(cp_parser_function_definition_after_declarator): Reset implicit
	template cp_parser members whilst parsing function definition.
	(make_generic_type_name): Respell '<autoN>' as 'auto:N' which works
	better with template diagnostics.
	(cp_parser_simple_type_specifier): Synthesize implicit template parm on
	parsing 'auto' if auto_is_implicit_function_template_parm_p and provide
	diagnostics ...
	* decl.c (grokdeclarator): ... that were previously done here.

gcc/testsuite/g++.dg/
	* cpp1y/pr58534.C: New testcase.
	* cpp1y/pr58536.C: New testcase.
	* cpp1y/pr58548.C: New testcase.
	* cpp1y/pr58549.C: New testcase.
	* cpp1y/pr58637.C: New testcase.

From-SVN: r204714
2013-11-12 20:17:33 +00:00
Diego Novillo 862d0b359f Re-factor tree.h - Part 1.
This is the first patch in a series of patches to cleanup tree.h to
reduce the exposure it has all over the compiler.

In this patch, I'm moving functions that are used once into the files
that use them, and make them private to that file. These functions
were declared extern in tree.h and called from exactly one place.

The patch does not move EVERY function. This usually happens
when the function uses private state from its original file, and
moving that private state would mean moving other functions that made
no sense to move.

Additionally, the patch removes functions that were never used.

In subsequent patches, I will be moving out of tree.h extern definitions
that should be grouped in other files (e.g., all functions defined in
some FOO.c will be moved to the corresponding FOO.h). This will allow
me to remove the inclusion of tree.h from some files.

    * attribs.c (lookup_scoped_attribute_spec): Make static.
    (get_attribute_namespace): Likewise.
    * builtins.c (more_const_call_expr_args_p): Move from
    tree.h.
    (validate_arglist): Move earlier in the file. Make static.
    (expand_stack_restore): Move from stmt.c
    (expand_stack_save): Move from stmt.c
    (rewrite_call_expr_array): Move earlier in the file.
    (rewrite_call_expr_valist): Likewise.
    * cfgexpand.c: Include hard-reg-set.h before tree.h
    Include recog.h.
    Include output.h.
    (expand_asm_loc): Move from stmt.c.
    (n_occurrences): Move from stmt.c.
    (check_operand_nalternatives): Move from stmt.c.
    (tree_conflicts_with_clobbers_p): Move from stmt.c.
    (expand_asm_operands): Move from stmt.c
    (expand_asm_stmt): Move from stmt.c
    (expand_computed_goto): Move from stmt.c
    (expand_goto): Move from stmt.c
    (expand_null_return_1): Move from stmt.c
    (expand_null_return): Move from stmt.c
    (expand_value_return): Move from stmt.c
    (expand_return): Move from stmt.c
    (expand_main_function): Move from function.c
    (stack_protect_prologue): Move from function.c
    * cgraphclones.c (build_function_type_skip_args): Move from tree.c.
    (build_function_decl_skip_args): Move from tree.c.
    * explow.c (tree_expr_size): Move from tree.c.
    * expr.c (addr_expr_of_non_mem_decl_p): Remove.
    (fields_length): Move from tree.c.
    * fold-const.c (size_low_cst): Move from tree.c.
    (tree_expr_nonzero_warnv_p): Make static. Move earlier in the file.
    (tree_expr_nonzero_p): Make static. Move earlier in the file.
    (fold_build3_initializer_loc): Remove.
    (tree_invalid_nonnegative_warnv_p): Make static.
    * function.c (expand_main_function): Move to cfgexpand.c.
    (stack_protect_prologue): Move to cfgexpand.c.
    (set_insn_locations): Move earlier in the file.
    * gimple-fold.c: Include langhooks.h.
    (truth_type_for): Move from tree.c.
    * print-tree.c (print_vec_tree): Remove.
    * stmt.c (expand_computed_goto): Move to cfgexpand.c.
    (expand_goto): Move to cfgexpand.c.
    (n_occurrences): Move to cfgexpand.c.
    (expand_asm_loc): Move to cfgexpand.c
    (tree_conflicts_with_clobbers_p): Move to cfgexpand.c.
    (expand_asm_operands): Move to cfgexpand.c.
    (expand_asm_stmt): Move to cfgexpand.c.
    (check_operand_nalternatives): Move to cfgexpand.c
    (expand_null_return): Move to cfgexpand.c.
    (expand_value_return): Move to cfgexpand.c.
    (expand_null_return_1): Move to cfgexpand.c.
    (expand_return): Move to cfgexpand.c.
    (expand_stack_save): Move to builtins.c.
    (expand_stack_restore): Move to builtins.c
    * symtab.c: Include output.h.
    (decl_assembler_name_hash): Move from tree.c.
    (decl_assembler_name_equal): Move from tree.c.
    * trans-mem.c (is_tm_safe_or_pure): Move from tree.h.
    * tree-eh.c (in_array_bounds_p): Move from tree.c.
    (range_in_array_bounds_p): Move from tree.c.
    * tree-object-size.c (fini_object_sizes): Make static.
    * tree-ssa-dom.c (iterative_hash_exprs_commutative): Move from tree.h.
    * tree-vrp.c (ssa_name_nonnegative_p): Remove.
    * tree.c (decl_assembler_name_equal): Move to symtab.c.
    (tree_expr_size): Move to explow.c.
    (decl_assembler_name_hash): Move to symtab.c.
    (real_twop): Remove.
    (tree_expr_size): Move to explow.c.
    (stabilize_reference_1): Move earlier in the file. Make static.
    (omp_remove_redundant_declare_simd_attrs): Remove.
    (simple_cst_list_equal): Move earlier in the file. Make static.
    (size_low_cst): Move to fold-const.c.
    (build_type_no_quals): Remove.
    (build_function_type_skip_args): Move to cgraphclones.c.
    (build_function_decl_skip_args): Move to cgraphclones.c.
    (in_array_bounds_p): Move to tree-eh.c.
    (range_in_array_bounds_p): Move to tree-eh.c.
    (truth_type_for): Move to gimple-fold.c.
    (list_equal_p): remove.
    * tree.h (decl_assembler_name_equal): Remove.
    (decl_assembler_name_hash): Remove.
    (truth_type_for): Remove.
    (build_type_no_quals): Remove.
    (build_function_decl_skip_args): Remove.
    (in_array_bounds_p): Remove.
    (range_in_array_bounds_p): Remove.
    (size_low_cst): Remove.
    (omp_remove_redundant_declare_simd_attrs): Remove.
    (tree_expr_size): Remove.
    (fields_length): Remove.
    (stabilize_reference_1): Remove.
    (expand_goto): Remove.
    (expand_stack_save): Remove.
    (expand_stack_restore): Remove.
    (expand_return): Remove.
    (fold_build3_initializer_loc): Remove.
    (tree_expr_nonzero_p): Remove.
    (tree_invalid_nonnegative_warnv_p): Remove.
    (tree_expr_nonzero_warnv_p): Remove.
    (fold_builtin_snprintf_chk): Remove.
    (validate_arglist): Remove.
    (iterative_hash_exprs_commutative): Move to tree-ssa-dom.c.
    (simple_cst_list_equal): Remove.
    (real_twop): Remove.
    (expand_main_function): Remove.
    (stack_protect_prologue): Remove.
    (print_vec_tree): Remove.
    (lookup_scoped_attribute_spec): Remove.
    (get_attribute_namespace): Remove.
    (expand_computed_goto): Remove.
    (expand_asm_stmt): Remove.
    (list_equal_p): Remove.
    (ssa_name_nonnegative_p): Remove.
    (fini_object_sizes): Remove.
    (addr_expr_of_non_mem_decl_p): Remove.
    (is_tm_safe_or_pure): Move to trans-mem.c.
    (more_const_call_expr_args_p): Remove.
    (save_vtable_map_decl): Remove.

From-SVN: r204606
2013-11-08 17:46:16 -05:00
Joseph Myers 267bac1078 tree-core.h (enum cv_qualifier): Add TYPE_QUAL_ATOMIC.
gcc:
2013-11-05  Andrew MacLeod  <amacleod@redhat.com>
	    Joseph Myers  <joseph@codesourcery.com>

	* tree-core.h (enum cv_qualifier): Add TYPE_QUAL_ATOMIC.
	(enum tree_index): Add TI_ATOMICQI_TYPE, TI_ATOMICHI_TYPE,
	TI_ATOMICSI_TYPE, TI_ATOMICDI_TYPE and TI_ATOMICTI_TYPE.
	(struct tree_base): Add atomic_flag field.
	* tree.h (TYPE_ATOMIC): New accessor macro.
	(TYPE_QUALS, TYPE_QUALS_NO_ADDR_SPACE): Add TYPE_QUAL_ATOMIC.
	(TYPE_QUALS_NO_ADDR_SPACE_NO_ATOMIC): New macro.
	(atomicQI_type_node, atomicHI_type_node, atomicSI_type_node)
	(atomicDI_type_node, atomicTI_type_node): New macros for type
	nodes.
	* tree.c (set_type_quals): Set TYPE_ATOMIC.
	(find_atomic_core_type): New function.
	(build_qualified_type): Adjust alignment for qualified types.
	(build_atomic_base): New function
	(build_common_tree_nodes): Build atomicQI_type_node,
	atomicHI_type_node, atomicSI_type_node, atomicDI_type_node and
	atomicTI_type_node.
	* print-tree.c (print_node): Print atomic qualifier.
	* tree-pretty-print.c (dump_generic_node): Print atomic type
	attribute.
	* target.def (atomic_assign_expand_fenv): New hook.
	* doc/tm.texi.in (TARGET_ATOMIC_ASSIGN_EXPAND_FENV): New @hook.
	* doc/tm.texi: Regenerate.
	* targhooks.c (default_atomic_assign_expand_fenv): New function.
	* targhooks.h (default_atomic_assign_expand_fenv): Declare.
	* sync-builtins.def (__atomic_feraiseexcept): New built-in
	function.
	* config/i386/i386-builtin-types.def (VOID_FTYPE_PUSHORT): New
	function type.
	* config/i386/i386.c (enum ix86_builtins): Add
	IX86_BUILTIN_FNSTENV, IX86_BUILTIN_FLDENV, IX86_BUILTIN_FNSTSW and
	IX86_BUILTIN_FNCLEX.
	(bdesc_special_args): Add __builtin_ia32_fnstenv,
	__builtin_ia32_fldenv, __builtin_ia32_fnstsw and
	__builtin_ia32_fnclex.
	(ix86_expand_builtin): Handle the new built-in functions.
	(ix86_atomic_assign_expand_fenv): New function.
	(TARGET_ATOMIC_ASSIGN_EXPAND_FENV): New macro.
	* config/i386/i386.md (UNSPECV_FNSTENV, UNSPECV_FLDENV)
	(UNSPECV_FNSTSW, UNSPECV_FNCLEX): New unspecs.
	(fnstenv, fldenv, fnstsw, fnclex): New insns.

gcc/c-family:
2013-11-05  Andrew MacLeod  <amacleod@redhat.com>
	    Joseph Myers  <joseph@codesourcery.com>

	* c-common.h (enum rid): Add RID_ATOMIC.
	* c-common.c (c_common_reswords): Add _Atomic.
	(sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
	(keyword_is_type_qualifier): Accept RID_ATOMIC.
	* c-format.c (check_format_types): Check for extra _Atomic
	qualifiers in format argument.
	* c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
	(pp_c_type_qualifier_list): Mention _Atomic in comment.

gcc/c:
2013-11-05  Joseph Myers  <joseph@codesourcery.com>
	    Andrew MacLeod  <amacleod@redhat.com>

	* c-aux-info.c (gen_type): Handle atomic qualifier.
	* c-decl.c (validate_proto_after_old_defn): Do not remove atomic
	qualifiers when compating types.
	(shadow_tag_warned): Handle atomic_p in declspecs.
	(quals_from_declspecs): Likewise.
	(start_decl): Use c_type_promotes_to when promoting argument
	types.
	(grokdeclarator): Handle _Atomic.
	(get_parm_info): Diagnose any qualifier on "void" as only
	parameter.
	(store_parm_decls_oldstyle): Do not remove atomic qualifiers when
	comparing types.  Use c_type_promotes_to when promoting argument
	types.
	(finish_function): Use c_type_promotes_to when promoting argument
	types.
	(build_null_declspecs): Handle atomic_p in declspecs.
	(declspecs_add_qual): Handle RID_ATOMIC.
	* c-parser.c (c_token_starts_typename, c_token_is_qualifier)
	(c_token_starts_declspecs): Handle RID_ATOMIC.
	(c_parser_declspecs): Handle atomic type specifiers and
	qualifiers.
	(c_parser_typeof_specifier): Remove const and _Atomic qualifiers
	from types of expressions with atomic type.
	(c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
	(c_parser_attribute_any_word): Handle RID_ATOMIC.
	(c_parser_initializer, c_parser_initelt, c_parser_initval)
	(c_parser_statement_after_labels, c_parser_switch_statement)
	(c_parser_for_statement, c_parser_expr_no_commas)
	(c_parser_conditional_expression, c_parser_binary_expression)
	(c_parser_cast_expression, c_parser_unary_expression)
	(c_parser_postfix_expression)
	(c_parser_postfix_expression_after_primary, c_parser_expression):
	Use convert_lvalue_to_rvalue.
	(c_parser_expression_conv, c_parser_expr_list): Document
	conversion of lvalues to rvalues.  Use convert_lvalue_to_rvalue.
	(c_parser_objc_synchronized_statement): Use
	convert_lvalue_to_rvalue.
	(c_parser_objc_selector): Handle RID_ATOMIC.
	(c_parser_objc_receiver, c_parser_array_notation): Use
	convert_lvalue_to_rvalue.
	* c-tree.h (ctsk_typeof): Adjust comment to mention use for
	_Atomic (type-name).
	(struct c_declspecs): Add atomic_p field.
	(convert_lvalue_to_rvalue): Declare.
	* c-typeck.c (c_type_promotes_to): Promote atomic types to
	corresponding atomic types.
	(qualify_type): Don't add _Atomic qualifiers from second argument.
	(comp_target_types): Do not allow _Atomic mismatches.
	(type_lists_compatible_p): Do not remove atomic qualifiers when
	comparing types.
	(really_atomic_lvalue, convert_lvalue_to_rvalue)
	(build_atomic_assign): New functions.
	(build_unary_op): Use build_atomic_assign for atomic increment and
	decrement.
	(build_conditional_expr): Do not treat _Atomic void as a qualified
	version of void.
	(build_modify_expr): Use build_atomic_assign for atomic LHS.
	(find_anonymous_field_with_type, convert_to_anonymous_field)
	(convert_for_assignment): Do not remove atomic qualifiers when
	comparing types.
	(digest_init): Do not accept initialization of arrays of atomic
	elements by string constants.
	(build_asm_expr): Use convert_lvalue_to_rvalue.
	(build_binary_op): Do not treat _Atomic void as a qualified
	version of void.

gcc/objc:
2013-11-05  Andrew MacLeod  <amacleod@redhat.com>

	* objc-act.c (objc_push_parm): Handle atomic qualifier.

gcc/testsuite:
2013-11-05  Joseph Myers  <joseph@codesourcery.com>

	* lib/target-supports.exp
	(check_effective_target_fenv_exceptions): New function.
	* lib/atomic-dg.exp, gcc.dg/atomic/atomic.exp: New files.
	* gcc.dg/atomic/c11-atomic-exec-1.c,
	gcc.dg/atomic/c11-atomic-exec-2.c,
	gcc.dg/atomic/c11-atomic-exec-3.c,
	gcc.dg/atomic/c11-atomic-exec-4.c,
	gcc.dg/atomic/c11-atomic-exec-5.c, gcc.dg/c11-atomic-1.c,
	gcc.dg/c11-atomic-2.c, gcc.dg/c11-atomic-3.c,
	gcc.dg/c90-atomic-1.c, gcc.dg/c99-atomic-1.c: New tests.

libatomic:
2013-11-05  Joseph Myers  <joseph@codesourcery.com>

	* fenv.c: New file.
	* libatomic.map (LIBATOMIC_1.1): New symbol version.  Include
	__atomic_feraiseexcept.
	* configure.ac (libtool_VERSION): Change to 2:0:1.
	(fenv.h): Test for header.
	* Makefile.am (libatomic_la_SOURCES): Add fenv.c.
	* Makefile.in, auto-config.h.in, configure: Regenerate.

From-SVN: r204544
2013-11-07 21:15:25 +00:00
Richard Biener 3f5c390ddd tree.c (drop_tree_overflow): New function.
2013-11-06  Richard Biener  <rguenther@suse.de>

	* tree.c (drop_tree_overflow): New function.
	* tree.h (drop_tree_overflow): Declare.
	* gimplify.c (gimplify_expr): Drop TREE_OVERFLOW.
	* tree-vrp.c (range_int_cst_singleton_p): Use
	is_overflow_infinity instead of testing TREE_OVERFLOW.
	(extract_range_from_assert): Likewise.
	(zero_nonzero_bits_from_vr): Likewise.
	(extract_range_basic): Likewise.
	(register_new_assert_for): Use drop_tree_overflow.
	(vrp_visit_phi_node): Likewise.

From-SVN: r204454
2013-11-06 13:08:06 +00:00
Tobias Burnus 6d7f7e0a63 invoke.texi (-fopenmp-simd): Document new option.
2013-11-05  Tobias Burnus  <burnus@net-b.de>

gcc/
        * doc/invoke.texi (-fopenmp-simd): Document new option.
        * gimplify.c (gimplify_body): Accept -fopenmp-simd.
        * omp-low.c (execute_expand_omp, execute_lower_omp): Ditto.
        * tree.c (attribute_value_equal): Ditto.

gcc/fortran/
        * lang.opt (fopenmp-simd): New option.
        * gfortran.h (gfc_option_t): Add gfc_flag_openmp_simd.
        * options.c (gfc_handle_option): Handle it.

gcc/c-family/
        * c.opt (fopenmp-simd): New option.
        * c-pragma.c (omp_pragmas): Move pragmas which can contain simd
        * to ...
        (omp_pragmas): ... this new struct.
        (c_pp_lookup_pragma): Also walk omp_pragmas.
        (init_pragma): Init pragmas for -fopenmp-simd.

gcc/c
        * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
        c_parser_omp_distribute, c_parser_omp_teams,
        c_parser_omp_target, c_parser_omp_declare): Handle
        -fopenmp-simd.

gcc/cp
        * parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
        cp_parser_omp_distribute, cp_parser_omp_teams,
cp_parser_omp_target,
        cp_parser_omp_declare): Handle
        -fopenmp-simd.

gcc/testsuite/
        * g++.dg/gomp/openmp-simd-1.C: New.
        * g++.dg/gomp/openmp-simd-2.C: New.
        * gcc.dg/gomp/openmp-simd-1.c: New.
        * gcc.dg/gomp/openmp-simd-2.c: New.

From-SVN: r204382
2013-11-05 08:29:47 +01:00
Jakub Jelinek eae76e53d9 tree.c (tree_ctz): New function.
* tree.c (tree_ctz): New function.
	* tree.h (tree_ctz): New prototype.
	* tree-ssanames.h (get_range_info, get_nonzero_bits): Change
	first argument from tree to const_tree.
	* tree-ssanames.c (get_range_info, get_nonzero_bits): Likewise.
	* tree-vectorizer.h (vect_generate_tmps_on_preheader): New prototype.
	* tree-vect-loop-manip.c (vect_generate_tmps_on_preheader): No longer
	static.
	* expr.c (highest_pow2_factor): Reimplemented using tree_ctz.
	* tree-vect-loop.c (vect_analyze_loop_operations,
	vect_transform_loop): Don't force scalar loop for bound just because
	number of iterations is unknown, only do it if it is not known to be
	a multiple of vectorization_factor.
	* builtins.c (get_object_alignment_2): Use tree_ctz on offset.

From-SVN: r204257
2013-10-31 14:57:05 +01:00
Ilya Enkovich ea9637cdcd tree-core.h (tree_index): Add TI_POINTER_BOUNDS_TYPE.
* tree-core.h (tree_index): Add TI_POINTER_BOUNDS_TYPE.
        * tree.h (POINTER_BOUNDS_P): New.
        (BOUNDED_TYPE_P): New.
        (BOUNDED_P): New.
        (pointer_bounds_type_node): New.
        * tree.c (build_common_tree_nodes): Initialize
        pointer_bounds_type_node.
        * gimple.h (gimple_call_get_nobnd_arg_index): New.
        (gimple_call_num_nobnd_args): New.
        (gimple_call_nobnd_arg): New.
        (gimple_return_retbnd): New.
        (gimple_return_set_retbnd): New
        * gimple.c (gimple_build_return): Increase number of ops
        for return statement.
        (gimple_call_get_nobnd_arg_index): New.
        * gimple-pretty-print.c (dump_gimple_return): Print second op.

From-SVN: r204199
2013-10-30 09:09:44 +00:00
David Malcolm 67348ccc9c Autogenerated fixes of "->symbol." to "->"
This is the autogenerated part of the conversion of the symtable types
to a C++ class hierarchy.

gcc/

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

	* asan.c (asan_finish_file): Update for conversion of symtab types to
	a true class hierarchy.
	* cfgexpand.c (estimated_stack_frame_size): Likewise.
	* cgraph.c (cgraph_get_body): Likewise.
	(cgraph_get_create_real_symbol_node): Likewise.
	(verify_cgraph_node): Likewise.
	(verify_edge_corresponds_to_fndecl): Likewise.
	(verify_edge_count_and_frequency): Likewise.
	(cgraph_will_be_removed_from_program_if_no_direct_calls): Likewise.
	(cgraph_can_remove_if_no_direct_calls_p): Likewise.
	(cgraph_can_remove_if_no_direct_calls_and_refs_p): Likewise.
	(cgraph_node_cannot_return): Likewise.
	(cgraph_set_pure_flag_1): Likewise.
	(cgraph_set_const_flag_1): Likewise.
	(cgraph_set_nothrow_flag_1): Likewise.
	(cgraph_make_node_local_1): Likewise.
	(cgraph_for_node_and_aliases): Likewise.
	(cgraph_for_node_thunks_and_aliases): Likewise.
	(cgraph_node_can_be_local_p): Likewise.
	(cgraph_node_cannot_be_local_p_1): Likewise.
	(cgraph_function_body_availability): Likewise.
	(dump_cgraph_node): Likewise.
	(cgraph_rtl_info): Likewise.
	(cgraph_mark_address_taken_node): Likewise.
	(cgraph_remove_node): Likewise.
	(cgraph_release_function_body): Likewise.
	(cgraph_update_edges_for_call_stmt_node): Likewise.
	(cgraph_redirect_edge_call_stmt_to_callee): Likewise.
	(cgraph_make_edge_direct): Likewise.
	(cgraph_resolve_speculation): Likewise.
	(cgraph_speculative_call_info): Likewise.
	(cgraph_turn_edge_to_speculative): Likewise.
	(cgraph_create_edge_1): Likewise.
	(cgraph_set_call_stmt): Likewise.
	(cgraph_node_for_asm): Likewise.
	(cgraph_add_thunk): Likewise.
	(cgraph_same_body_alias): Likewise.
	(cgraph_create_function_alias): Likewise.
	(cgraph_create_node): Likewise.
	(cgraph_create_empty_node): Likewise.
	(record_function_versions): Likewise.
	(used_from_object_file_p): Likewise.
	* cgraph.h (symtab_can_be_discarded): Likewise.
	(symtab_real_symbol_p): Likewise.
	(cgraph_mark_force_output_node): Likewise.
	(cgraph_edge_recursive_p): Likewise.
	(symtab_alias_target): Likewise.
	(varpool_all_refs_explicit_p): Likewise.
	(varpool_can_remove_if_no_refs): Likewise.
	(cgraph_only_called_directly_or_aliased_p): Likewise.
	(cgraph_next_function_with_gimple_body): Likewise.
	(cgraph_first_function_with_gimple_body): Likewise.
	(cgraph_function_with_gimple_body_p): Likewise.
	(cgraph_next_function): Likewise.
	(cgraph_first_function): Likewise.
	(cgraph_next_defined_function): Likewise.
	(cgraph_first_defined_function): Likewise.
	(varpool_next_defined_variable): Likewise.
	(varpool_first_defined_variable): Likewise.
	(varpool_next_static_initializer): Likewise.
	(varpool_first_static_initializer): Likewise.
	(varpool_next_variable): Likewise.
	(varpool_first_variable): Likewise.
	(varpool_node_name): Likewise.
	(varpool): Likewise.
	(cgraph): Likewise.
	(is_a_helper <varpool_node>::test): Likewise.
	(is_a_helper <cgraph_node>::test): Likewise.
	(varpool_variable_node): Likewise.
	(cgraph_function_or_thunk_node): Likewise.
	(varpool_alias_target): Likewise.
	(cgraph_alias_target): Likewise.
	(cgraph_node_name): Likewise.
	(varpool_node_asm_name): Likewise.
	(cgraph_node_asm_name): Likewise.
	* cgraphbuild.c (remove_cgraph_callee_edges): Likewise.
	(cgraph_rebuild_references): Likewise.
	(rebuild_cgraph_edges): Likewise.
	(record_eh_tables): Likewise.
	(build_cgraph_edges): Likewise.
	(mark_store): Likewise.
	(mark_load): Likewise.
	(mark_address): Likewise.
	(record_type_list): Likewise.
	(record_reference): Likewise.
	* cgraphclones.c (cgraph_materialize_all_clones): Likewise.
	(cgraph_materialize_clone): Likewise.
	(cgraph_function_versioning): Likewise.
	(cgraph_copy_node_for_versioning): Likewise.
	(update_call_expr): Likewise.
	(cgraph_find_replacement_node): Likewise.
	(cgraph_create_virtual_clone): Likewise.
	(cgraph_clone_node): Likewise.
	* cgraphunit.c (compile): Likewise.
	(output_weakrefs): Likewise.
	(output_in_order): Likewise.
	(expand_function): Likewise.
	(assemble_thunks_and_aliases): Likewise.
	(expand_thunk): Likewise.
	(mark_functions_to_output): Likewise.
	(handle_alias_pairs): Likewise.
	(analyze_functions): Likewise.
	(walk_polymorphic_call_targets): Likewise.
	(varpool_finalize_decl): Likewise.
	(process_function_and_variable_attributes): Likewise.
	(cgraph_process_same_body_aliases): Likewise.
	(analyze_function): Likewise.
	(cgraph_add_new_function): Likewise.
	(cgraph_finalize_function): Likewise.
	(referred_to_p): Likewise.
	(cgraph_reset_node): Likewise.
	(cgraph_process_new_functions): Likewise.
	(enqueue_node): Likewise.
	(decide_is_symbol_needed): Likewise.
	* coverage.c (coverage_compute_profile_id): Likewise.
	* dbxout.c (dbxout_expand_expr): Likewise.
	* dwarf2out.c (premark_types_used_by_global_vars_helper): Likewise.
	(reference_to_unused): Likewise.
	* gimple-fold.c (can_refer_decl_in_current_unit_p): Likewise.
	* gimplify.c (unvisit_body): Likewise.
	(unshare_body): Likewise.
	* ipa-cp.c (ipcp_generate_summary): Likewise.
	(ipcp_decision_stage): Likewise.
	(identify_dead_nodes): Likewise.
	(decide_whether_version_node): Likewise.
	(decide_about_value): Likewise.
	(perhaps_add_new_callers): Likewise.
	(create_specialized_node): Likewise.
	(update_profiling_info): Likewise.
	(ipcp_propagate_stage): Likewise.
	(estimate_local_effects): Likewise.
	(good_cloning_opportunity_p): Likewise.
	(devirtualization_time_bonus): Likewise.
	(propagate_constants_accross_call): Likewise.
	(initialize_node_lattices): Likewise.
	(ipcp_cloning_candidate_p): Likewise.
	(determine_versionability): Likewise.
	(print_all_lattices): Likewise.
	(print_lattice): Likewise.
	(ipcp_discover_new_direct_edges): Likewise.
	* ipa-devirt.c (ipa_devirt): Likewise.
	(likely_target_p): Likewise.
	(update_type_inheritance_graph): Likewise.
	(possible_polymorphic_call_target_p): Likewise.
	(dump_possible_polymorphic_call_targets): Likewise.
	(devirt_variable_node_removal_hook): Likewise.
	(record_binfo): Likewise.
	(maybe_record_node): Likewise.
	(build_type_inheritance_graph): Likewise.
	* ipa-inline-analysis.c (inline_write_summary): Likewise.
	(inline_generate_summary): Likewise.
	(inline_analyze_function): Likewise.
	(do_estimate_growth): Likewise.
	(simple_edge_hints): Likewise.
	(estimate_node_size_and_time): Likewise.
	(estimate_edge_devirt_benefit): Likewise.
	(compute_inline_parameters): Likewise.
	(estimate_function_body_sizes): Likewise.
	(compute_bb_predicates): Likewise.
	(initialize_inline_failed): Likewise.
	(dump_inline_summary): Likewise.
	(dump_inline_edge_summary): Likewise.
	* ipa-inline-transform.c (inline_transform): Likewise.
	(preserve_function_body_p): Likewise.
	(save_inline_function_body): Likewise.
	(inline_call): Likewise.
	(clone_inlined_nodes): Likewise.
	(can_remove_node_now_p): Likewise.
	(can_remove_node_now_p_1): Likewise.
	* ipa-inline.c (early_inliner): Likewise.
	(early_inline_small_functions): Likewise.
	(inline_always_inline_functions): Likewise.
	(ipa_inline): Likewise.
	(flatten_function): Likewise.
	(inline_small_functions): Likewise.
	(speculation_useful_p): Likewise.
	(recursive_inlining): Likewise.
	(update_caller_keys): Likewise.
	(reset_edge_caches): Likewise.
	(update_edge_key): Likewise.
	(edge_badness): Likewise.
	(relative_time_benefit): Likewise.
	(want_inline_self_recursive_call_p): Likewise.
	(want_inline_small_function_p): Likewise.
	(want_early_inline_function_p): Likewise.
	(num_calls): Likewise.
	(can_early_inline_edge_p): Likewise.
	(can_inline_edge_p): Likewise.
	(report_inline_failed_reason): Likewise.
	* ipa-profile.c (ipa_profile): Likewise.
	(ipa_propagate_frequency): Likewise.
	(ipa_propagate_frequency_1): Likewise.
	(ipa_profile_generate_summary): Likewise.
	* ipa-prop.c (ipcp_transform_function): Likewise.
	(read_replacements_section): Likewise.
	(ipa_prop_read_section): Likewise.
	(ipa_modify_call_arguments): Likewise.
	(ipa_print_node_params): Likewise.
	(propagate_controlled_uses): Likewise.
	(update_indirect_edges_after_inlining): Likewise.
	(remove_described_reference): Likewise.
	(ipa_make_edge_direct_to_target): Likewise.
	(ipa_analyze_node): Likewise.
	(ipa_analyze_params_uses): Likewise.
	(ipa_compute_jump_functions): Likewise.
	(ipa_get_callee_param_type): Likewise.
	(ipa_print_node_jump_functions): Likewise.
	(ipa_initialize_node_params): Likewise.
	(ipa_populate_param_decls): Likewise.
	(ipa_func_spec_opts_forbid_analysis_p): Likewise.
	(write_agg_replacement_chain): Likewise.
	(ipa_write_node_info): Likewise.
	(ipa_edge_duplication_hook): Likewise.
	(try_decrement_rdesc_refcount): Likewise.
	* ipa-pure-const.c (propagate_nothrow): Likewise.
	(propagate_pure_const): Likewise.
	(pure_const_read_summary): Likewise.
	(pure_const_write_summary): Likewise.
	(analyze_function): Likewise.
	* ipa-ref-inline.h (ipa_ref_referred_ref_list): Likewise.
	(ipa_ref_referring_ref_list): Likewise.
	* ipa-ref.c (ipa_clear_stmts_in_references): Likewise.
	(ipa_remove_stmt_references): Likewise.
	(ipa_find_reference): Likewise.
	(ipa_dump_referring): Likewise.
	(ipa_dump_references): Likewise.
	(ipa_record_reference): Likewise.
	* ipa-reference.c (ipa_reference_read_optimization_summary): Likewise.
	(ipa_reference_write_optimization_summary): Likewise.
	(write_node_summary_p): Likewise.
	(propagate): Likewise.
	(read_write_all_from_decl): Likewise.
	(generate_summary): Likewise.
	(analyze_function): Likewise.
	(propagate_bits): Likewise.
	(ipa_reference_get_not_written_global): Likewise.
	(ipa_reference_get_not_read_global): Likewise.
	* ipa-split.c (execute_split_functions): Likewise.
	(split_function): Likewise.
	* ipa-utils.c (ipa_merge_profiles): Likewise.
	(dump_cgraph_node_set): Likewise.
	(ipa_reverse_postorder): Likewise.
	(ipa_edge_within_scc): Likewise.
	(ipa_get_nodes_in_cycle): Likewise.
	(ipa_free_postorder_info): Likewise.
	(ipa_reduced_postorder): Likewise.
	(searchc): Likewise.
	(recursive_call_p): Likewise.
	* ipa.c (ipa_cdtor_merge): Likewise.
	(record_cdtor_fn): Likewise.
	(function_and_variable_visibility): Likewise.
	(varpool_externally_visible_p): Likewise.
	(cgraph_externally_visible_p): Likewise.
	(comdat_can_be_unshared_p): Likewise.
	(comdat_can_be_unshared_p_1): Likewise.
	(address_taken_from_non_vtable_p): Likewise.
	(ipa_discover_readonly_nonaddressable_vars): Likewise.
	(symtab_remove_unreachable_nodes): Likewise.
	(walk_polymorphic_call_targets): Likewise.
	(process_references): Likewise.
	(enqueue_node): Likewise.
	(has_addr_references_p): Likewise.
	(cgraph_non_local_node_p_1): Likewise.
	* is-a.h (varpool_analyze_node): Likewise.
	* lto-cgraph.c (input_symtab): Likewise.
	(merge_profile_summaries): Likewise.
	(input_cgraph_1): Likewise.
	(input_edge): Likewise.
	(input_varpool_node): Likewise.
	(input_node): Likewise.
	(input_overwrite_node): Likewise.
	(compute_ltrans_boundary): Likewise.
	(output_refs): Likewise.
	(lto_output_varpool_node): Likewise.
	(lto_output_node): Likewise.
	(reachable_from_other_partition_p): Likewise.
	(referenced_from_other_partition_p): Likewise.
	(lto_output_edge): Likewise.
	(output_node_opt_summary): Likewise.
	(add_node_to): Likewise.
	(reachable_from_this_partition_p): Likewise.
	(lto_set_symtab_encoder_in_partition): Likewise.
	(lto_symtab_encoder_in_partition_p): Likewise.
	(lto_set_symtab_encoder_encode_initializer): Likewise.
	(lto_symtab_encoder_encode_initializer_p): Likewise.
	(lto_set_symtab_encoder_encode_body): Likewise.
	(lto_symtab_encoder_encode_body_p): Likewise.
	* lto-section-in.c (lto_free_function_in_decl_state_for_node):
	Likewise.
	* lto-streamer-in.c (lto_read_body): Likewise.
	(fixup_call_stmt_edges): Likewise.
	(fixup_call_stmt_edges_1): Likewise.
	* lto-streamer-out.c (produce_symtab): Likewise.
	(output_symbol_p): Likewise.
	(write_symbol): Likewise.
	(lto_output): Likewise.
	(copy_function): Likewise.
	(output_function): Likewise.
	* passes.c (function_called_by_processed_nodes_p): Likewise.
	(ipa_write_optimization_summaries): Likewise.
	(ipa_write_summaries): Likewise.
	(do_per_function_toporder): Likewise.
	(do_per_function): Likewise.
	(dump_passes): Likewise.
	* symtab.c (symtab_semantically_equivalent_p): Likewise.
	(symtab_nonoverwritable_alias): Likewise.
	(symtab_nonoverwritable_alias_1): Likewise.
	(symtab_for_node_and_aliases): Likewise.
	(symtab_resolve_alias): Likewise.
	(fixup_same_cpp_alias_visibility): Likewise.
	(symtab_alias_ultimate_target): Likewise.
	(symtab_used_from_object_file_p): Likewise.
	(verify_symtab_base): Likewise.
	(dump_symtab_base): Likewise.
	(symtab_node_name): Likewise.
	(symtab_node_asm_name): Likewise.
	(symtab_dissolve_same_comdat_group_list): Likewise.
	(symtab_add_to_same_comdat_group): Likewise.
	(symtab_unregister_node): Likewise.
	(symtab_insert_node_to_hashtable): Likewise.
	(symtab_register_node): Likewise.
	(unlink_from_assembler_name_hash): Likewise.
	(insert_to_assembler_name_hash): Likewise.
	(eq_assembler_name): Likewise.
	(hash_node_by_assembler_name): Likewise.
	(eq_node): Likewise.
	(hash_node): Likewise.
	* toplev.c (wrapup_global_declaration_2): Likewise.
	* trans-mem.c (ipa_tm_execute): Likewise.
	(ipa_tm_transform_clone): Likewise.
	(ipa_tm_transform_transaction): Likewise.
	(ipa_tm_transform_calls_redirect): Likewise.
	(ipa_tm_insert_gettmclone_call): Likewise.
	(ipa_tm_insert_irr_call): Likewise.
	(ipa_tm_create_version): Likewise.
	(ipa_tm_create_version_alias): Likewise.
	(ipa_tm_mark_forced_by_abi_node): Likewise.
	(ipa_tm_mark_force_output_node): Likewise.
	(ipa_tm_diagnose_tm_safe): Likewise.
	(ipa_tm_mayenterirr_function): Likewise.
	(ipa_tm_scan_irr_function): Likewise.
	(ipa_tm_note_irrevocable): Likewise.
	(ipa_tm_scan_calls_clone): Likewise.
	(get_cg_data): Likewise.
	* tree-eh.c (tree_could_trap_p): Likewise.
	* tree-emutls.c (ipa_lower_emutls): Likewise.
	(create_emultls_var): Likewise.
	(lower_emutls_function_body): Likewise.
	(gen_emutls_addr): Likewise.
	(emutls_decl): Likewise.
	(new_emutls_decl): Likewise.
	* tree-inline.c (tree_function_versioning): Likewise.
	(optimize_inline_calls): Likewise.
	(expand_call_inline): Likewise.
	(estimate_num_insns): Likewise.
	(copy_bb): Likewise.
	(delete_unreachable_blocks_update_callgraph): Likewise.
	* tree-nested.c (gimplify_all_functions): Likewise.
	(create_nesting_tree): Likewise.
	(check_for_nested_with_variably_modified): Likewise.
	* tree-pretty-print.c (dump_function_header): Likewise.
	* tree-profile.c (tree_profiling): Likewise.
	* tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
	(modify_function): Likewise.
	(convert_callers): Likewise.
	(convert_callers_for_node): Likewise.
	* tree-ssa-structalias.c (ipa_pta_execute): Likewise.
	(associate_varinfo_to_alias): Likewise.
	(create_variable_info_for): Likewise.
	(get_constraint_for_ssa_var): Likewise.
	* tree-vectorizer.c (increase_alignment): Likewise.
	* tree.c (find_decls_types_in_var): Likewise.
	(find_decls_types_in_node): Likewise.
	(free_lang_data_in_decl): Likewise.
	* value-prof.c (gimple_ic_transform): Likewise.
	(gimple_ic): Likewise.
	(check_ic_target): Likewise.
	(init_node_map): Likewise.
	* varasm.c (decl_binds_to_current_def_p): Likewise.
	(default_binds_local_p_1): Likewise.
	(dump_tm_clone_pairs): Likewise.
	(assemble_alias): Likewise.
	(find_decl): Likewise.
	(mark_decl_referenced): Likewise.
	* varpool.c (varpool_for_node_and_aliases): Likewise.
	(varpool_extra_name_alias): Likewise.
	(varpool_create_variable_alias): Likewise.
	(add_new_static_var): Likewise.
	(varpool_finalize_named_section_flags): Likewise.
	(varpool_remove_unreferenced_decls): Likewise.
	(enqueue_node): Likewise.
	(varpool_assemble_decl): Likewise.
	(assemble_aliases): Likewise.
	(varpool_analyze_node): Likewise.
	(cgraph_variable_initializer_availability): Likewise.
	(varpool_add_new_variable): Likewise.
	(ctor_for_folding): Likewise.
	(dump_varpool_node): Likewise.
	(varpool_remove_initializer): Likewise.
	(varpool_remove_node): Likewise.
	(varpool_node_for_decl): Likewise.
	(varpool_create_empty_node): Likewise.
	* config/i386/i386.c (ix86_generate_version_dispatcher_body):
	Likewise.
	(ix86_get_function_versions_dispatcher): Likewise.

gcc/ada/

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

	* gcc-interface/trans.c (finalize_nrv): Update for conversion of
	symtab types to a true class hierarchy.
	* gcc-interface/utils.c (gnat_write_global_declarations): Likewise.

gcc/c-family/

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

	* c-gimplify.c (c_genericize): Update for conversion of symtab types
	to a true class hierarchy.
	* c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.

gcc/cp/

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

	* call.c (mark_versions_used): Update for conversion of symtab types
	to a true class hierarchy.
	* decl2.c (cp_write_global_declarations): Likewise.
	(clear_decl_external): Likewise.
	(build_java_method_aliases): Likewise.
	(collect_candidates_for_java_method_aliases): Likewise.
	(mark_needed): Likewise.
	(var_finalized_p): Likewise.
	(maybe_make_one_only): Likewise.
	(maybe_emit_vtables): Likewise.
	* lambda.c (maybe_add_lambda_conv_op): Likewise.
	* method.c (use_thunk): Likewise.
	* optimize.c (maybe_clone_body): Likewise.
	* tree.c (cp_fix_function_decl_p): Likewise.

gcc/java/

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

	* decl.c (java_mark_decl_local): Update for conversion of symtab types
	to a true class hierarchy.

gcc/lto/

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

	* lto-partition.c (lto_promote_cross_file_statics): Update for
	conversion of symtab types to a true class hierarchy.
	(rename_statics): Likewise.
	(promote_symbol): Likewise.
	(privatize_symbol_name): Likewise.
	(lto_balanced_map): Likewise.
	(varpool_node_cmp): Likewise.
	(node_cmp): Likewise.
	(lto_1_to_1_map): Likewise.
	(undo_partition): Likewise.
	(add_symbol_to_partition): Likewise.
	(contained_in_symbol): Likewise.
	(add_symbol_to_partition_1): Likewise.
	(add_references_to_partition): Likewise.
	(symbol_partitioned_p): Likewise.
	(get_symbol_class): Likewise.
	(lto_max_map): Likewise.
	* lto-symtab.c (lto_symtab_prevailing_decl): Likewise.
	(lto_symtab_merge_symbols): Likewise.
	(lto_symtab_merge_symbols_1): Likewise.
	(lto_symtab_merge_decls): Likewise.
	(lto_symtab_merge_decls_1): Likewise.
	(lto_symtab_merge_decls_2): Likewise.
	(lto_symtab_resolve_symbols): Likewise.
	(lto_symtab_resolve_can_prevail_p): Likewise.
	(lto_symtab_symbol_p): Likewise.
	(lto_symtab_resolve_replaceable_p): Likewise.
	(lto_symtab_merge): Likewise.
	(lto_varpool_replace_node): Likewise.
	(lto_cgraph_replace_node): Likewise.
	* lto.c (lto_main): Likewise.
	(do_whole_program_analysis): Likewise.
	(materialize_cgraph): Likewise.
	(read_cgraph_and_symbols): Likewise.
	(cmp_partitions_order): Likewise.
	(lto_materialize_function): Likewise.
	(has_analyzed_clone_p): Likewise.

From-SVN: r204171
2013-10-29 18:30:00 +00:00
Ilya Enkovich 65f55baca4 mode-classes.def (MODE_POINTER_BOUNDS): New.
* mode-classes.def (MODE_POINTER_BOUNDS): New.
        * tree.def (POINTER_BOUNDS_TYPE): New.
        * genmodes.c (complete_mode): Support MODE_POINTER_BOUNDS.
        (POINTER_BOUNDS_MODE): New.
        (make_pointer_bounds_mode): New.
        * machmode.h (POINTER_BOUNDS_MODE_P): New.
        * stor-layout.c (int_mode_for_mode): Support MODE_POINTER_BOUNDS.
        (layout_type): Support POINTER_BOUNDS_TYPE.
        * tree-pretty-print.c (dump_generic_node): Support POINTER_BOUNDS_TYPE.
        * tree.c (build_int_cst_wide): Support POINTER_BOUNDS_TYPE.
        (type_contains_placeholder_1): Likewise.
        * tree.h (POINTER_BOUNDS_TYPE_P): New.
        * varasm.c (output_constant): Support POINTER_BOUNDS_TYPE.
        * doc/rtl.texi (MODE_POINTER_BOUNDS): New.

From-SVN: r204045
2013-10-25 05:36:14 +00:00
Andrew MacLeod 442b4905f4 tree-ssa.h: Remove all #include's
* tree-ssa.h: Remove all #include's
	* gengtype.c (open_base_files): Adjust include list for gtype-desc.c.
	* alias.c: Move required includes from tree-ssa.h.
	* asan.c: Likewise.
	* builtins.c: Likewise.
	* calls.c: Likewise.
	* cfgexpand.c: Likewise.
	* cfghooks.c: Likewise.
	* cfgloop.c: Likewise.
	* cfgloopmanip.c: Likewise.
	* cgraph.c: Likewise.
	* cgraphbuild.c: Likewise.
	* cgraphclones.c: Likewise.
	* cgraphunit.c: Likewise.
	* dse.c: Likewise.
	* except.c: Likewise.
	* expr.c: Likewise.
	* final.c: Likewise.
	* fold-const.c: Likewise.
	* ggc-page.c: Likewise.
	* gimple-builder.c: Likewise.
	* gimple-fold.c: Likewise.
	* gimple-iterator.c: Likewise.
	* gimple-low.c: Likewise.
	* gimple-pretty-print.c: Likewise.
	* gimple-ssa-strength-reduction.c: Likewise.
	* gimple-streamer-in.c: Likewise.
	* gimple-streamer-out.c: Likewise.
	* gimplify.c: Likewise.
	* graphite-blocking.c: Likewise.
	* graphite-clast-to-gimple.c: Likewise.
	* graphite-dependences.c: Likewise.
	* graphite-interchange.c: Likewise.
	* graphite-optimize-isl.c: Likewise.
	* graphite-poly.c: Likewise.
	* graphite-scop-detection.c: Likewise.
	* graphite-sese-to-poly.c: Likewise.
	* graphite.c: Likewise.
	* ipa-cp.c: Likewise.
	* ipa-inline-analysis.c: Likewise.
	* ipa-inline-transform.c: Likewise.
	* ipa-inline.c: Likewise.
	* ipa-prop.c: Likewise.
	* ipa-pure-const.c: Likewise.
	* ipa-reference.c: Likewise.
	* ipa-split.c: Likewise.
	* ipa-utils.c: Likewise.
	* loop-init.c: Likewise.
	* lto-cgraph.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.
	* omp-low.c: Likewise.
	* passes.c: Likewise.
	* predict.c: Likewise.
	* print-tree.c: Likewise.
	* profile.c: Likewise.
	* sese.c: Likewise.
	* targhooks.c: Likewise.
	* tracer.c: Likewise.
	* trans-mem.c: Likewise.
	* tree-call-cdce.c: Likewise.
	* tree-cfg.c: Likewise.
	* tree-cfgcleanup.c: Likewise.
	* tree-chrec.c: Likewise.
	* tree-complex.c: Likewise.
	* tree-data-ref.c: Likewise.
	* tree-dfa.c: Likewise.
	* tree-eh.c: Likewise.
	* tree-emutls.c: Likewise.
	* tree-if-conv.c: Likewise.
	* tree-inline.c: Likewise.
	* tree-into-ssa.c: Likewise.
	* tree-loop-distribution.c: Likewise.
	* tree-mudflap.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-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-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-vrp.c: Likewise.
	* tree.c: Likewise.
	* tsan.c: Likewise.
	* value-prof.c: Likewise.
	* var-tracking.c: Likewise.
	* varpool.c: Likewise.
	* vtable-verify.c: Likewise.

From-SVN: r203967
2013-10-23 12:16:58 +00:00
Paulo Matos 5806f4814c tree-core.h (tree_code_name): Remove.
gcc/
	* tree-core.h (tree_code_name): Remove.
	* tree.h (get_tree_code_name): New prototype.
	* tree.c (tree_code_name): Make static.
	(get_tree_code_name): New function.
	(dump_tree_statistics, tree_check_failed, tree_not_check_failed, 
	tree_class_check_failed, tree_range_check_failed,
	tree_not_class_check_failed, omp_clause_check_failed,
	tree_contains_struct_check_failed, tree_operand_check_failed): Use new
	wrapper get_tree_code_name instead of calling tree_code_name directly.
	* tree-vrp.c (dump_asserts_for): Likewise.
	* tree-dump.c (dequeue_and_dump): Likewise.
	* tree-pretty-print.c (do_niy, dump_generic_node): Likewise.
	* tree-pretty-print.h (pp_unsupported_tree): Likewise.
	* lto-streamer-out.c (lto_write_tree, DFS_write_tree): Likewise.
	* tree-ssa-dom.c (print_expr_hash_elt): Likewise.
	* gimple-pretty-print.c (dump_unary_rhs, dump_binary_rhs,
	dump_ternary_rhs, dump_gimple_assign, dump_gimple_cond,
	dump_gimple_omp_for): Likewise.
	* tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
	* tree-ssa-pre.c (print_pre_expr): Likewise.
	* ipa-prop.c (ipa_print_node_jump_functions_for_edge): Likewise.
	* print-tree.c (print_node_brief, print_node): Likewise.
	* gimple.c (gimple_check_failed): Likewise.
	* lto-streamer.c (lto_tag_name, print_lto_report): Likewise.
	* config/frv/frv.c (frv_init_cumulative_args): Likewise.
	* config/mep/mep.c (mep_validate_vliw): Likewise.
	* config/iq2000/iq2000.c (init_cumulative_args): Likewise.
	* config/rs6000/rs6000.c (init_cumulative_args): Likewise.

gcc/cp/
	* error.c (code_to_string): Use new wrapper get_tree_code_name.
	* cxx-pretty-print.c (pp_cxx_assignment_operator): Likewise.
	* pt.c (tsubst): Likewise.
	* semantics.c (cxx_eval_constant_expression,
	potential_constant_expression_1): Likewise.
	* mangle.c (MANGLE_TRACE_TREE, dump_substitution_candidates,
	add_substitution, find_substitution): Likewise.

From-SVN: r203695
2013-10-16 12:09:17 +02:00
Sriraman Tallam bf7b5747bb re PR target/57756 (Function target attribute is retaining state of previously seen function)
PR target/57756

The root-cause of this PR is that global_options is not restored to
default before calling ix86_valid_target_attribute_tree and hence
target attributes are incorrectly processed sometimes.

This patch refactors code in i386.c in functions in the call-chain of 
ix86_valid_target_attribute_tree to use any gcc_options struct passed
as a parameter. It replaces existing code which always uses the
global_options struct.

2013-10-15 Sriraman Tallam  <tmsriram@google.com>

	PR target/57756
	* optc-save-gen.awk: Add extra parameter to the save and restore
	target calls.
	* opth-gen.awk: Generate new TARGET_* macros  to accept a parameter.
	* tree.c (build_optimization_node): New parameter.  Add extra parameter
	to call to cl_optimization_save.
	(build_target_option_node): New parameter. Add extra parameter
	to call to cl_target_option_save.
	* tree.h (build_optimization_node): New parameter.
	(build_target_option_node): New parameter.
	* c-family/c-common.c (handle_optimize_attribute): Fix calls to
	build_optimization_node and build_target_option_node.
	* c-family/c-pragma.c (handle_pragma_optimize): Ditto.
	(handle_pragma_push_options): Ditto.
	* toplev.c (process_options): Ditto.
	* opts.c (init_options_struct): Check for opts_set non-null.
	* target.def (target_option.save): New parameter.
	(target_option.restore): New parameter.
	* tm.texi: Generate.
	* config/i386/i386-c.c (ix86_target_macros_internal): Ditto.
	(ix86_pragma_target_parse): Ditto.
	* config/i386/i386-protos.h (ix86_valid_target_attribute_tree): New
	parameters.
	* config/rs6000/rs6000.c (rs6000_option_override_internal): Fix calls
	to  build_optimization_node and build_target_option_node.
	(rs6000_valid_attribute_p): Ditto.
	(rs6000_pragma_target_parse): Ditto.
	* config/i386/i386.opt (x_ix86_target_flags_explicit): New TargetSave
	data.
	* config/i386/i386.h:
	TARGET_64BIT_P: New Macro
	TARGET_MMX_P: New Macro.
	TARGET_3DNOW_P: New Macro.
	TARGET_3DNOW_A_P: New Macro.
	TARGET_SSE_P: New Macro.
	TARGET_SSE2_P: New Macro.
	TARGET_SSE3_P: New Macro.
	TARGET_SSSE3_P: New Macro.
	TARGET_SSE4_1_P: New Macro.
	TARGET_SSE4_2_P: New Macro.
	TARGET_AVX_P: New Macro.
	TARGET_AVX2_P: New Macro.
	TARGET_AVX512F_P: New Macro.
	TARGET_AVX512PF_P: New Macro.
	TARGET_AVX512ER_P: New Macro.
	TARGET_AVX512CD_P: New Macro.
	TARGET_FMA_P: New Macro.
	TARGET_SSE4A_P: New Macro.
	TARGET_FMA4_P: New Macro.
	TARGET_XOP_P: New Macro.
	TARGET_LWP_P: New Macro.
	TARGET_ABM_P: New Macro.
	TARGET_BMI_P: New Macro.
	TARGET_BMI2_P: New Macro.
	TARGET_LZCNT_P: New Macro.
	TARGET_TBM_P: New Macro.
	TARGET_POPCNT_P: New Macro.
	TARGET_SAHF_P: New Macro.
	TARGET_MOVBE_P: New Macro.
	TARGET_CRC32_P: New Macro.
	TARGET_AES_P: New Macro.
	TARGET_PCLMUL_P: New Macro.
	TARGET_CMPXCHG16B_P: New Macro.
	TARGET_FSGSBASE_P: New Macro.
	TARGET_RDRND_P: New Macro.
	TARGET_F16C_P: New Macro.
	TARGET_RTM_P: New Macro.
	TARGET_HLE_P: New Macro.
	TARGET_RDSEED_P: New Macro.
	TARGET_PRFCHW_P: New Macro.
	TARGET_ADX_P: New Macro.
	TARGET_FXSR_P: New Macro.
	TARGET_XSAVE_P: New Macro.
	TARGET_XSAVEOPT_P: New Macro.
	TARGET_LP64_P: New Macro.
	TARGET_X32_P: New Macro.
	TARGET_FPMATH_DEFAULT_P: New Macro.
	TARGET_FLOAT_RETURNS_IN_80387_P: New Macro.
	* config/i386/i386.c (ix86_option_override_internal): New parameters.
	opts and opts_set.
	Change ix86_tune_string to access opts->x_ix86_tune_string.
	Change ix86_isa_flags to access opts->x_ix86_isa_flags.
	Change ix86_arch_string to access opts->x_ix86_arch_string.
	Change ix86_stringop_alg to access opts->x_ix86_stringop_alg.
	Change ix86_pmode to access opts->x_ix86_pmode.
	Change ix86_abi to access opts->x_ix86_abi.
	Change ix86_cmodel to access opts->x_ix86_cmodel.
	Change ix86_asm_dialect to access opts->x_ix86_asm_dialect.
	Change ix86_isa_flags_explicit to access
	opts->x_ix86_isa_flags_explicit.
	Change ix86_dump_tunes to access opts->x_ix86_dump_tunes.
	Change ix86_regparm to access opts->x_ix86_regparm.
	Change ix86_branch_cost to access opts->x_ix86_branch_cost.
	Change ix86_preferred_stack_boundary_arg to access
	opts->x_ix86_preferred_stack_boundary_arg.
	Change ix86_force_align_arg_pointer to access
	opts->x_ix86_force_align_arg_pointer.
	Change ix86_incoming_stack_boundar_arg to access
	opts->x_ix86_incoming_stack_boundar_arg.
	Change ix86_fpmath to access opts->x_ix86_fpmath.
	Change ix86_veclibabi_type to access opts->x_ix86_veclibabi_type.
	Change ix86_recip_name to access opts->x_ix86_recip_name.
	Change ix86_stack_protector_guard to access
	opts->x_ix86_stack_protector_guard.
	Change ix86_tune_memcpy_strategy to access
	opts->x_ix86_tune_memcpy_strategy.
	Change ix86_tune_memset_strategy to access
	opts->x_ix86_tune_memset_strategy.
	Change global_options to access opts.
	Change global_options_set to access opts_set.
        Change TARGET_64BIT to TARGET_64BIT_P (opts->...)
        Change TARGET_MMX to TARGET_MMX_P (opts->...)
        Change TARGET_3DNOW to TARGET_3DNOW_P (opts->...)
        Change TARGET_3DNOW_A to TARGET_3DNOW_A_P (opts->...)
        Change TARGET_SSE to TARGET_SSE_P (opts->...)
        Change TARGET_SSE2 to TARGET_SSE2_P (opts->...)
        Change TARGET_SSE3 to TARGET_SSE3_P (opts->...)
        Change TARGET_SSSE3 to TARGET_SSSE3_P (opts->...)
        Change TARGET_SSE4_1 to TARGET_SSE4_1_P (opts->...)
        Change TARGET_SSE4_2 to TARGET_SSE4_2_P (opts->...)
        Change TARGET_AVX to TARGET_AVX_P (opts->...)
        Change TARGET_AVX2 to TARGET_AVX2_P (opts->...)
        Change TARGET_AVX512F to TARGET_AVX512F_P (opts->...)
        Change TARGET_AVX512PF to TARGET_AVX512PF_P (opts->...)
        Change TARGET_AVX512ER to TARGET_AVX512ER_P (opts->...)
        Change TARGET_AVX512CD to TARGET_AVX512CD_P (opts->...)
        Change TARGET_FMA to TARGET_FMA_P (opts->...)
        Change TARGET_SSE4A to TARGET_SSE4A_P (opts->...)
        Change TARGET_FMA4 to TARGET_FMA4_P (opts->...)
        Change TARGET_XOP to TARGET_XOP_P (opts->...)
        Change TARGET_LWP to TARGET_LWP_P (opts->...)
        Change TARGET_ABM to TARGET_ABM_P (opts->...)
        Change TARGET_BMI to TARGET_BMI_P (opts->...)
        Change TARGET_BMI2 to TARGET_BMI2_P (opts->...)
        Change TARGET_LZCNT to TARGET_LZCNT_P (opts->...)
        Change TARGET_TBM to TARGET_TBM_P (opts->...)
        Change TARGET_POPCNT to TARGET_POPCNT_P (opts->...)
        Change TARGET_SAHF to TARGET_SAHF_P (opts->...)
        Change TARGET_MOVBE to TARGET_MOVBE_P (opts->...)
        Change TARGET_CRC32 to TARGET_CRC32_P (opts->...)
        Change TARGET_AES to TARGET_AES_P (opts->...)
        Change TARGET_PCLMUL to TARGET_PCLMUL_P (opts->...)
        Change TARGET_CMPXCHG16B to TARGET_CMPXCHG16B_P (opts->...)
        Change TARGET_FSGSBASE to TARGET_FSGSBASE_P (opts->...)
        Change TARGET_RDRND to TARGET_RDRND_P (opts->...)
        Change TARGET_F16C to TARGET_F16C_P (opts->...)
        Change TARGET_RTM to TARGET_RTM_P (opts->...)
        Change TARGET_HLE to TARGET_HLE_P (opts->...)
        Change TARGET_RDSEED to TARGET_RDSEED_P (opts->...)
        Change TARGET_PRFCHW to TARGET_PRFCHW_P (opts->...)
        Change TARGET_ADX to TARGET_ADX_P (opts->...)
        Change TARGET_FXSR to TARGET_FXSR_P (opts->...)
        Change TARGET_XSAVE to TARGET_XSAVE_P (opts->...)
        Change TARGET_XSAVEOPT to TARGET_XSAVEOPT_P (opts->...)
        Change TARGET_LP64 to TARGET_LP64_P (opts->...)
        Change TARGET_X32 to TARGET_X32_P (opts->...)
        Change TARGET_FPMATH_DEFAULT to TARGET_FPMATH_DEFAULT_P (opts->...)
        Change TARGET_FLOAT_RETURNS_IN_80387 to
	 TARGET_FLOAT_RETURNS_IN_80387_P (opts->...)
	(ix86_function_specific_save): New parameter. Use opts-> fields
	to replace global fields.
	(ix86_function_specific_restore): Ditto.
	(ix86_valid_target_attribute_inner_p): New parameters.
	Fix recursive call.
	Fix call to ix86_handle_option and set_option.
	(ix86_valid_target_attribute_tree): New parameters.
	Change global_options to access opts.
	Change global_options_set to access opts_set.
	Fix call to ix86_valid_target_attribute_inner_p.
	Change ix86_tune_string to access opts->x_ix86_tune_string.
	Change ix86_arch_string to access opts->x_ix86_arch_string.
	Change ix86_fpmath to access opts->x_ix86_fpmath
	Fix call to ix86_option_override_internal.
	Fix call to ix86_add_new_builtins.
	Fix calls to build_optimization_node and build_target_option_node.
	(ix86_valid_target_attribute_p): Remove access to global_options.
	Use new gcc_options structure func_options.
	Fix call to ix86_valid_target_attribute_tree.
	Fix call to  build_optimization_node.
	(get_builtin_code_for_version):	Fix call to
	ix86_valid_target_attribute_tree.

	PR target/57756
	* gcc.target/i386/pr57756.c: New test.
	* gcc.target/i386/pr57756_2.c: New test.

From-SVN: r203634
2013-10-15 21:43:21 +00:00
Jakub Jelinek acf0174b6f target.c: New file.
libgomp/
	* target.c: New file.
	* Makefile.am (libgomp_la_SOURCES): Add target.c.
	* Makefile.in: Regenerated.
	* libgomp_g.h (GOMP_task): Add depend argument.
	(GOMP_barrier_cancel, GOMP_loop_end_cancel,
	GOMP_sections_end_cancel, GOMP_target, GOMP_target_data,
	GOMP_target_end_data, GOMP_target_update, GOMP_teams,
	GOMP_parallel_loop_static, GOMP_parallel_loop_dynamic,
	GOMP_parallel_loop_guided, GOMP_parallel_loop_runtime,
	GOMP_parallel, GOMP_cancel, GOMP_cancellation_point,
	GOMP_taskgroup_start, GOMP_taskgroup_end,
	GOMP_parallel_sections): New prototypes.
	* fortran.c (omp_is_initial_device): Add ialias_redirect.
	(omp_is_initial_device_): New function.
	(ULP, STR1, STR2, ialias_redirect): Removed.
	(omp_get_cancellation_, omp_get_proc_bind_, omp_set_default_device_,
	omp_set_default_device_8_, omp_get_default_device_,
	omp_get_num_devices_, omp_get_num_teams_, omp_get_team_num_): New
	functions.
	* libgomp.map (GOMP_barrier_cancel, GOMP_loop_end_cancel,
	GOMP_sections_end_cancel, GOMP_target, GOMP_target_data,
	GOMP_target_end_data, GOMP_target_update, GOMP_teams): Export
	@@GOMP_4.0.
	(omp_is_initial_device, omp_is_initial_device_, omp_get_cancellation,
	omp_get_cancellation_, omp_get_proc_bind, omp_get_proc_bind_,
	omp_set_default_device, omp_set_default_device_,
	omp_set_default_device_8_, omp_get_default_device,
	omp_get_default_device_, omp_get_num_devices, omp_get_num_devices_,
	omp_get_num_teams, omp_get_num_teams_, omp_get_team_num,
	omp_get_team_num_): Export @@OMP_4.0.
	* team.c (struct gomp_thread_start_data): Add place field.
	(gomp_thread_start): Clear thr->thread_pool and
	thr->task before returning.  Use gomp_team_barrier_wait_final
	instead of gomp_team_barrier_wait.  Initialize thr->place.
	(gomp_new_team): Initialize work_shares_to_free, work_share_cancelled,
	team_cancelled and task_queued_count fields.
	(gomp_free_pool_helper): Clear thr->thread_pool and thr->task
	before calling pthread_exit.
	(gomp_free_thread): No longer static.  Use
	gomp_managed_threads_lock instead of gomp_remaining_threads_lock.
	(gomp_team_start): Add flags argument.  Set
	thr->thread_pool->threads_busy to nthreads immediately after creating
	new pool.  Use gomp_managed_threads_lock instead of
	gomp_remaining_threads_lock.  Handle OpenMP 4.0 affinity.
	(gomp_team_end): Use gomp_managed_threads_lock instead of
	gomp_remaining_threads_lock.  Use gomp_team_barrier_wait_final instead
	of gomp_team_barrier_wait.  If team->team_cancelled, call
	gomp_fini_worshare on ws chain starting at team->work_shares_to_free
	rather than thr->ts.work_share.
	(initialize_team): Don't call gomp_sem_init here.
	* sections.c (GOMP_parallel_sections_start): Adjust gomp_team_start
	caller.
	(GOMP_parallel_sections, GOMP_sections_end_cancel): New functions.
	* env.c (gomp_global_icv): Add default_device_var, target_data and
	bind_var initializers.
	(gomp_cpu_affinity, gomp_cpu_affinity_len): Remove.
	(gomp_bind_var_list, gomp_bind_var_list_len, gomp_places_list,
	gomp_places_list_len): New variables.
	(parse_bind_var, parse_one_place, parse_places_var): New functions.
	(parse_affinity): Rewritten to construct OMP_PLACES list with unit
	sized places.
	(gomp_cancel_var): New global variable.
	(parse_int): New function.
	(handle_omp_display_env): New function.
	(initialize_env): Use it.  Initialize default_device_var.
	Parse OMP_CANCELLATION env var.  Use parse_bind_var to parse
	OMP_PROC_BIND instead of parse_boolean.  Use parse_places_var for
	OMP_PLACES parsing.  Don't call parse_affinity if OMP_PLACES has
	been successfully parsed (and call gomp_init_affinity in that case).
	(omp_get_cancellation, omp_get_proc_bind, omp_set_default_device,
	omp_get_default_device, omp_get_num_devices, omp_get_num_teams,
	omp_get_team_num, omp_is_initial_device): New functions.
	* libgomp.h: Include stdlib.h.
	(ialias_ulp, ialias_str1, ialias_str2, ialias_redirect, ialias_call):
	Define.
	(struct target_mem_desc): Forward declare.
	(struct gomp_task_icv): Add default_device_var, target_data, bind_var
	and thread_limit_var fields.
	(gomp_get_num_devices): New prototype.
	(gomp_cancel_var): New extern decl.
	(struct gomp_team): Add work_shares_to_free, work_share_cancelled,
	team_cancelled and task_queued_count fields.  Add comments about
	task_{,queued_,running_}count.
	(gomp_cancel_kind): New enum.
	(gomp_work_share_end_cancel): New prototype.
	(struct gomp_task): Add next_taskgroup, prev_taskgroup, taskgroup,
	copy_ctors_done, dependers, depend_hash, depend_count, num_dependees
	and depend fields.
	(struct gomp_taskgroup): New type.
	(struct gomp_task_depend_entry,
	struct gomp_dependers_vec): New types.
	(gomp_finish_task): Free depend_hash if non-NULL.
	(struct gomp_team_state): Add place_partition_off
	and place_partition_len fields.
	(gomp_bind_var_list, gomp_bind_var_list_len, gomp_places_list,
	gomp_places_list_len): New extern decls.
	(struct gomp_thread): Add place field.
	(gomp_cpu_affinity, gomp_cpu_affinity_len): Remove.
	(gomp_init_thread_affinity): Add place argument.
	(gomp_affinity_alloc, gomp_affinity_init_place, gomp_affinity_add_cpus,
	gomp_affinity_remove_cpu, gomp_affinity_copy_place,
	gomp_affinity_same_place, gomp_affinity_finalize_place_list,
	gomp_affinity_init_level, gomp_affinity_print_place): New
	prototypes.
	(gomp_team_start): Add flags argument.
	(gomp_thread_limit_var, gomp_remaining_threads_count,
	gomp_remaining_threads_lock): Remove.
	(gomp_managed_threads_lock): New variable.
	(struct gomp_thread_pool): Add threads_busy field.
	(gomp_free_thread): New prototype.
	* task.c: Include hashtab.h.
	(hash_entry_type): New typedef.
	(htab_alloc, htab_free, htab_hash, htab_eq): New inlines.
	(gomp_init_task): Clear dependers, depend_hash, depend_count,
	copy_ctors_done and taskgroup fields.
	(GOMP_task): Add depend argument, handle depend clauses.  If
	gomp_team_barrier_cancelled or if it's taskgroup has been
	cancelled, don't queue or start new tasks.  Set copy_ctors_done
	field if needed.  Initialize taskgroup field.  If copy_ctors_done
	and already cancelled, don't discard the task.  If taskgroup is
	non-NULL, enqueue the task into taskgroup queue.  Increment
	num_children field in taskgroup.  Increment task_queued_count.
	(gomp_task_run_pre, gomp_task_run_post_remove_parent,
	gomp_task_run_post_remove_taskgroup): New inline functions.
	(gomp_task_run_post_handle_depend_hash,
	gomp_task_run_post_handle_dependers,
	gomp_task_run_post_handle_depend): New functions.
	(GOMP_taskwait): Use them.  If more than one new tasks
	have been queued, wake other threads if needed.
	(gomp_barrier_handle_tasks): Likewise.  If
	gomp_team_barrier_cancelled, don't start any new tasks, just free
	all tasks.
	(GOMP_taskgroup_start, GOMP_taskgroup_end): New functions.
	* omp_lib.f90.in
	(omp_proc_bind_kind, omp_proc_bind_false,
	omp_proc_bind_true, omp_proc_bind_master, omp_proc_bind_close,
	omp_proc_bind_spread): New params.
	(omp_get_cancellation, omp_get_proc_bind, omp_set_default_device,
	omp_get_default_device, omp_get_num_devices, omp_get_num_teams,
	omp_get_team_num, omp_is_initial_device): New interfaces.
	(omp_get_dynamic, omp_get_nested, omp_in_parallel,
	omp_get_max_threads, omp_get_num_procs, omp_get_num_threads,
	omp_get_thread_num, omp_get_thread_limit, omp_set_max_active_levels,
	omp_get_max_active_levels, omp_get_level, omp_get_ancestor_thread_num,
	omp_get_team_size, omp_get_active_level, omp_in_final): Remove
	useless use omp_lib_kinds.
	* omp.h.in (omp_proc_bind_t): New typedef.
	(omp_get_cancellation, omp_get_proc_bind, omp_set_default_device,
	omp_get_default_device, omp_get_num_devices, omp_get_num_teams,
	omp_get_team_num, omp_is_initial_device): New prototypes.
	* loop.c (gomp_parallel_loop_start): Add flags argument, pass it
	through to gomp_team_start.
	(GOMP_parallel_loop_static_start, GOMP_parallel_loop_dynamic_start,
	GOMP_parallel_loop_guided_start, GOMP_parallel_loop_runtime_start):
	Adjust gomp_parallel_loop_start callers.
	(GOMP_parallel_loop_static, GOMP_parallel_loop_dynamic,
	GOMP_parallel_loop_guided, GOMP_parallel_loop_runtime,
	GOMP_loop_end_cancel): New functions.
	(GOMP_parallel_end): Add ialias_redirect.
	* hashtab.h: New file.
	* libgomp.texi (Environment Variables): Minor cleanup,
	update section refs to OpenMP 4.0rc2.
	(OMP_DISPLAY_ENV, GOMP_SPINCOUNT): Document these
	environment variables.
	* work.c (gomp_work_share_end, gomp_work_share_end_nowait): Set
	team->work_shares_to_free to thr->ts.work_share before calling
	free_work_share.
	(gomp_work_share_end_cancel): New function.
	* config/linux/proc.c: Include errno.h.
	(gomp_get_cpuset_size, gomp_cpuset_size, gomp_cpusetp): New variables.
	(gomp_cpuset_popcount): Add cpusetsize argument, use it instead of
	sizeof (cpu_set_t) to determine number of iterations.  Fix up check
	extern decl.  Use CPU_COUNT_S if available, or CPU_COUNT if
	gomp_cpuset_size is sizeof (cpu_set_t).
	(gomp_init_num_threads): Initialize gomp_cpuset_size,
	gomp_get_cpuset_size and gomp_cpusetp here, use gomp_cpusetp instead
	of &cpuset and pass gomp_cpuset_size instead of sizeof (cpu_set_t)
	to pthread_getaffinity_np.  Free and clear gomp_cpusetp if it didn't
	contain any logical CPUs.
	(get_num_procs): Don't call pthread_getaffinity_np if gomp_cpusetp
	is NULL.  Use gomp_cpusetp instead of &cpuset and pass
	gomp_get_cpuset_size instead of sizeof (cpu_set_t) to
	pthread_getaffinity_np.  Check gomp_places_list instead of
	gomp_cpu_affinity.  Adjust gomp_cpuset_popcount caller.
	* config/linux/bar.c (gomp_barrier_wait_end,
	gomp_barrier_wait_last): Use BAR_* defines.
	(gomp_team_barrier_wait_end): Likewise.  Clear BAR_CANCELLED
	from state where needed.  Set work_share_cancelled to 0 on last
	thread.
	(gomp_team_barrier_wait_final, gomp_team_barrier_wait_cancel_end,
	gomp_team_barrier_wait_cancel, gomp_team_barrier_cancel): New
	functions.
	* config/linux/proc.h (gomp_cpuset_popcount): Add attribute_hidden.
	Add cpusetsize argument.
	(gomp_cpuset_size, gomp_cpusetp): Declare.
	* config/linux/affinity.c: Include errno.h, stdio.h and string.h.
	(affinity_counter): Remove.
	(CPU_ISSET_S, CPU_ZERO_S, CPU_SET_S, CPU_CLR_S): Define
	if CPU_ALLOC_SIZE isn't defined.
	(gomp_init_affinity): Rewritten, if gomp_places_list is NULL, try
	silently create OMP_PLACES=threads, if it is non-NULL afterwards,
	bind current thread to the first place.
	(gomp_init_thread_affinity): Rewritten.  Add place argument, just
	pthread_setaffinity_np to gomp_places_list[place].
	(gomp_affinity_alloc, gomp_affinity_init_place, gomp_affinity_add_cpus,
	gomp_affinity_remove_cpu, gomp_affinity_copy_place,
	gomp_affinity_same_place, gomp_affinity_finalize_place_list,
	gomp_affinity_init_level, gomp_affinity_print_place): New functions.
	* config/linux/bar.h (BAR_TASK_PENDING, BAR_WAS_LAST,
	BAR_WAITING_FOR_TASK, BAR_INCR, BAR_CANCELLED): Define.
	(gomp_barrier_t): Add awaited_final field.
	(gomp_barrier_init): Initialize awaited_final field.
	(gomp_team_barrier_wait_final, gomp_team_barrier_wait_cancel,
	gomp_team_barrier_wait_cancel_end, gomp_team_barrier_cancel): New
	prototypes.
	(gomp_barrier_wait_start): Preserve BAR_CANCELLED bit.  Use BAR_*
	defines.
	(gomp_barrier_wait_cancel_start, gomp_team_barrier_wait_final_start,
	gomp_team_barrier_cancelled): New inline functions.
	(gomp_barrier_last_thread,
	gomp_team_barrier_set_task_pending,
	gomp_team_barrier_clear_task_pending,
	gomp_team_barrier_set_waiting_for_tasks,
	gomp_team_barrier_waiting_for_tasks,
	gomp_team_barrier_done): Use BAR_* defines.
	* config/posix/bar.c (gomp_barrier_init): Clear cancellable field.
	(gomp_barrier_wait_end): Use BAR_* defines.
	(gomp_team_barrier_wait_end): Clear BAR_CANCELLED from state.
	Set work_share_cancelled to 0 on last thread, use __atomic_load_n.
	Use BAR_* defines.
	(gomp_team_barrier_wait_cancel_end, gomp_team_barrier_wait_cancel,
	gomp_team_barrier_cancel): New functions.
	* config/posix/affinity.c (gomp_init_thread_affinity): Add place
	argument.
	(gomp_affinity_alloc, gomp_affinity_init_place, gomp_affinity_add_cpus,
	gomp_affinity_remove_cpu, gomp_affinity_copy_place,
	gomp_affinity_same_place, gomp_affinity_finalize_place_list,
	gomp_affinity_init_level, gomp_affinity_print_place): New stubs.
	* config/posix/bar.h (BAR_TASK_PENDING, BAR_WAS_LAST,
	BAR_WAITING_FOR_TASK, BAR_INCR, BAR_CANCELLED): Define.
	(gomp_barrier_t): Add cancellable field.
	(gomp_team_barrier_wait_cancel, gomp_team_barrier_wait_cancel_end,
	gomp_team_barrier_cancel): New prototypes.
	(gomp_barrier_wait_start): Preserve BAR_CANCELLED bit.
	(gomp_barrier_wait_cancel_start, gomp_team_barrier_wait_final,
	gomp_team_barrier_cancelled): New inline functions.
	(gomp_barrier_wait_start, gomp_barrier_last_thread,
	gomp_team_barrier_set_task_pending,
	gomp_team_barrier_clear_task_pending,
	gomp_team_barrier_set_waiting_for_tasks,
	gomp_team_barrier_waiting_for_tasks,
	gomp_team_barrier_done): Use BAR_* defines.
	* barrier.c (GOMP_barrier_cancel): New function.
	* omp_lib.h.in (omp_proc_bind_kind, omp_proc_bind_false,
	omp_proc_bind_true, omp_proc_bind_master, omp_proc_bind_close,
	omp_proc_bind_spread): New params.
	(omp_get_cancellation, omp_get_proc_bind, omp_set_default_device,
	omp_get_default_device, omp_get_num_devices, omp_get_num_teams,
	omp_get_team_num, omp_is_initial_device): New externals.
	* parallel.c (GOMP_parallel, GOMP_cancel, GOMP_cancellation_point):
	New functions.
	(gomp_resolve_num_threads): Adjust for thread_limit now being in
	icv->thread_limit_var.  Use UINT_MAX instead of ULONG_MAX as
	infinity.  If not nested, just return minimum of max_num_threads
	and icv->thread_limit_var and if thr->thread_pool, set threads_busy
	to the returned value.  Otherwise, don't update atomically
	gomp_remaining_threads_count, but instead thr->thread_pool->threads_busy.
	(GOMP_parallel_end): Adjust for thread_limit now being in
	icv->thread_limit_var.  Use UINT_MAX instead of ULONG_MAX as
	infinity.  Adjust threads_busy in the pool rather than
	gomp_remaining_threads_count.  Remember team->nthreads and call
	gomp_team_end before adjusting threads_busy, if not nested
	afterwards, just set it to 1 non-atomically.  Add ialias.
	(GOMP_parallel_start): Adjust gomp_team_start caller.
	* testsuite/libgomp.c/atomic-14.c: Add parens to make it valid.
	* testsuite/libgomp.c/affinity-1.c: New test.
	* testsuite/libgomp.c/atomic-15.c: New test.
	* testsuite/libgomp.c/atomic-16.c: New test.
	* testsuite/libgomp.c/atomic-17.c: New test.
	* testsuite/libgomp.c/cancel-for-1.c: New test.
	* testsuite/libgomp.c/cancel-for-2.c: New test.
	* testsuite/libgomp.c/cancel-parallel-1.c: New test.
	* testsuite/libgomp.c/cancel-parallel-2.c: New test.
	* testsuite/libgomp.c/cancel-parallel-3.c: New test.
	* testsuite/libgomp.c/cancel-sections-1.c: New test.
	* testsuite/libgomp.c/cancel-taskgroup-1.c: New test.
	* testsuite/libgomp.c/cancel-taskgroup-2.c: New test.
	* testsuite/libgomp.c/depend-1.c: New test.
	* testsuite/libgomp.c/depend-2.c: New test.
	* testsuite/libgomp.c/depend-3.c: New test.
	* testsuite/libgomp.c/depend-4.c: New test.
	* testsuite/libgomp.c/for-1.c: New test.
	* testsuite/libgomp.c/for-1.h: New file.
	* testsuite/libgomp.c/for-2.c: New test.
	* testsuite/libgomp.c/for-2.h: New file.
	* testsuite/libgomp.c/for-3.c: New test.
	* testsuite/libgomp.c/pr58392.c: New test.
	* testsuite/libgomp.c/simd-1.c: New test.
	* testsuite/libgomp.c/simd-2.c: New test.
	* testsuite/libgomp.c/simd-3.c: New test.
	* testsuite/libgomp.c/simd-4.c: New test.
	* testsuite/libgomp.c/simd-5.c: New test.
	* testsuite/libgomp.c/simd-6.c: New test.
	* testsuite/libgomp.c/target-1.c: New test.
	* testsuite/libgomp.c/target-2.c: New test.
	* testsuite/libgomp.c/target-3.c: New test.
	* testsuite/libgomp.c/target-4.c: New test.
	* testsuite/libgomp.c/target-5.c: New test.
	* testsuite/libgomp.c/target-6.c: New test.
	* testsuite/libgomp.c/target-7.c: New test.
	* testsuite/libgomp.c/taskgroup-1.c: New test.
	* testsuite/libgomp.c/thread-limit-1.c: New test.
	* testsuite/libgomp.c/thread-limit-2.c: New test.
	* testsuite/libgomp.c/thread-limit-3.c: New test.
	* testsuite/libgomp.c/udr-1.c: New test.
	* testsuite/libgomp.c/udr-2.c: New test.
	* testsuite/libgomp.c/udr-3.c: New test.
	* testsuite/libgomp.c++/affinity-1.C: New test.
	* testsuite/libgomp.c++/atomic-10.C: New test.
	* testsuite/libgomp.c++/atomic-11.C: New test.
	* testsuite/libgomp.c++/atomic-12.C: New test.
	* testsuite/libgomp.c++/atomic-13.C: New test.
	* testsuite/libgomp.c++/atomic-14.C: New test.
	* testsuite/libgomp.c++/atomic-15.C: New test.
	* testsuite/libgomp.c++/cancel-for-1.C: New test.
	* testsuite/libgomp.c++/cancel-for-2.C: New test.
	* testsuite/libgomp.c++/cancel-parallel-1.C: New test.
	* testsuite/libgomp.c++/cancel-parallel-2.C: New test.
	* testsuite/libgomp.c++/cancel-parallel-3.C: New test.
	* testsuite/libgomp.c++/cancel-sections-1.C: New test.
	* testsuite/libgomp.c++/cancel-taskgroup-1.C: New test.
	* testsuite/libgomp.c++/cancel-taskgroup-2.C: New test.
	* testsuite/libgomp.c++/cancel-taskgroup-3.C: New test.
	* testsuite/libgomp.c++/cancel-test.h: New file.
	* testsuite/libgomp.c++/for-9.C: New test.
	* testsuite/libgomp.c++/for-10.C: New test.
	* testsuite/libgomp.c++/for-11.C: New test.
	* testsuite/libgomp.c++/simd-1.C: New test.
	* testsuite/libgomp.c++/simd-2.C: New test.
	* testsuite/libgomp.c++/simd-3.C: New test.
	* testsuite/libgomp.c++/simd-4.C: New test.
	* testsuite/libgomp.c++/simd-5.C: New test.
	* testsuite/libgomp.c++/simd-6.C: New test.
	* testsuite/libgomp.c++/simd-7.C: New test.
	* testsuite/libgomp.c++/simd-8.C: New test.
	* testsuite/libgomp.c++/target-1.C: New test.
	* testsuite/libgomp.c++/target-2.C: New test.
	* testsuite/libgomp.c++/target-2-aux.cc: New file.
	* testsuite/libgomp.c++/target-3.C: New test.
	* testsuite/libgomp.c++/taskgroup-1.C: New test.
	* testsuite/libgomp.c++/udr-1.C: New test.
	* testsuite/libgomp.c++/udr-2.C: New test.
	* testsuite/libgomp.c++/udr-3.C: New test.
	* testsuite/libgomp.c++/udr-4.C: New test.
	* testsuite/libgomp.c++/udr-5.C: New test.
	* testsuite/libgomp.c++/udr-6.C: New test.
	* testsuite/libgomp.c++/udr-7.C: New test.
	* testsuite/libgomp.c++/udr-8.C: New test.
	* testsuite/libgomp.c++/udr-9.C: New test.
gcc/
	* tree-pretty-print.c (dump_omp_clause): Handle OMP_CLAUSE__LOOPTEMP_
	and new OpenMP 4.0 clauses, handle UDR OMP_CLAUSE_REDUCTION,
	formatting fixes, use pp_colon instead of pp_character (..., ':'),
	similarly pp_right_paren.
	(dump_generic_node): Handle OMP_DISTRIBUTE, OMP_TEAMS,
	OMP_TARGET_DATA, OMP_TARGET, OMP_TARGET_UPDATE, OMP_TASKGROUP,
	allow OMP_FOR_INIT to be NULL, handle OMP_ATOMIC_SEQ_CST.
	* tree.c (omp_clause_num_ops, omp_clause_code_name): Add OpenMP 4.0
	clauses.
	(omp_declare_simd_clauses_equal,
	omp_remove_redundant_declare_simd_attrs): New functions.
	(attribute_value_equal): Use omp_declare_simd_clauses_equal.
	(walk_tree_1): Handle new OpenMP 4.0 clauses.
	* tree.h (OMP_LOOP_CHECK): Define.
	(OMP_FOR_BODY, OMP_FOR_CLAUSES, OMP_FOR_INIT, OMP_FOR_COND,
	OMP_FOR_INCR, OMP_FOR_PRE_BODY): Use it.
	(OMP_TASKGROUP_BODY, OMP_TEAMS_BODY, OMP_TEAMS_CLAUSES,
	OMP_TARGET_DATA_BODY, OMP_TARGET_DATA_CLAUSES, OMP_TARGET_BODY,
	OMP_TARGET_CLAUSES, OMP_TARGET_UPDATE_CLAUSES, OMP_CLAUSE_SIZE,
	OMP_ATOMIC_SEQ_CST, OMP_CLAUSE_DEPEND_KIND, OMP_CLAUSE_MAP_KIND,
	OMP_CLAUSE_MAP_ZERO_BIAS_ARRAY_SECTION, OMP_CLAUSE_PROC_BIND_KIND,
	OMP_CLAUSE_REDUCTION_OMP_ORIG_REF, OMP_CLAUSE_ALIGNED_ALIGNMENT,
	OMP_CLAUSE_NUM_TEAMS_EXPR, OMP_CLAUSE_THREAD_LIMIT_EXPR,
	OMP_CLAUSE_DEVICE_ID, OMP_CLAUSE_DIST_SCHEDULE_CHUNK_EXPR,
	OMP_CLAUSE_SIMDLEN_EXPR): Define.
	(OMP_CLAUSE_DECL): Change range up to OMP_CLAUSE__LOOPTEMP_.
	(omp_remove_redundant_declare_simd_attrs): New prototype.
	* gimple.def (GIMPLE_OMP_TASKGROUP, GIMPLE_OMP_TARGET,
	GIMPLE_OMP_TEAMS): New codes.
	(GIMPLE_OMP_RETURN): Use GSS_OMP_ATOMIC_STORE instead of GSS_BASE.
	* omp-low.c (struct omp_context): Add cancel_label and cancellable
	fields.
	(target_nesting_level): New variable.
	(extract_omp_for_data): Handle GF_OMP_FOR_KIND_DISTRIBUTE and
	OMP_CLAUSE_DIST_SCHEDULE.  Don't fallback to library implementation
	for collapse > 1 static schedule unless ordered.
	(get_ws_args_for): Add par_stmt argument.  Handle combined loops.
	(determine_parallel_type): Adjust get_ws_args_for caller.
	(install_var_field): Handle mask & 4 for double indirection.
	(scan_sharing_clauses): Ignore shared clause on teams construct.
	Handle OMP_CLAUSE__LOOPTEMP_ and new OpenMP 4.0 clauses.
	(create_omp_child_function): If inside target or declare target
	constructs, set "omp declare target" attribute on the child
	function.
	(find_combined_for): New function.
	(scan_omp_parallel): Handle combined loops.
	(scan_omp_target, scan_omp_teams): New functions.
	(check_omp_nesting_restrictions): Check new OpenMP 4.0 nesting
	restrictions and set ctx->cancellable for cancellable constructs.
	(scan_omp_1_stmt): Call check_omp_nesting_restrictions also on
	selected builtin calls.  Handle GIMPLE_OMP_TASKGROUP,
	GIMPLE_OMP_TARGET, GIMPLE_OMP_TEAMS.
	(build_omp_barrier): Add lhs argument, return gimple rather than
	tree.
	(omp_clause_aligned_alignment): New function.
	(lower_rec_simd_input_clauses): Only call SET_DECL_VALUE_EXPR
	on decls.
	(lower_rec_input_clauses): Add FD argument.  Ignore shared clauses
	on teams constructs.  Handle user defined reductions and new
	OpenMP 4.0 clauses.
	(lower_reduction_clauses): Don't set placeholder to address of ref
	if it has already the right type.
	(lower_send_clauses): Handle OMP_CLAUSE__LOOPTEMP_.
	(expand_parallel_call): Use the new non-_start suffixed builtins,
	handle OMP_CLAUSE_PROC_BIND, don't call the outlined function
	and GOMP_parallel_end after the call.
	(expand_task_call): Handle OMP_CLAUSE_DEPEND.
	(expand_omp_for_init_counts): Handle combined loops.
	(expand_omp_for_init_vars): Add inner_stmt argument, handle combined
	loops.
	(expand_omp_for_generic): Likewise.  Use GOMP_loop_end_cancel at the
	end of cancellable loops.
	(expand_omp_for_static_nochunk, expand_omp_for_static_chunk):
	Likewise.  Handle collapse > 1 loops.
	(expand_omp_simd): Handle combined loops.
	(expand_omp_for): Add inner_stmt argument, adjust callers of
	expand_omp_for* functions, use expand_omp_for_static*chunk even
	for collapse > 1 unless ordered.
	(expand_omp_sections): Use GOMP_sections_end_cancel at the end
	of cancellable sections.
	(expand_omp_single): Remove need_barrier variable, just rely on
	gimple_omp_return_nowait_p.  Adjust build_omp_barrier caller.
	(expand_omp_synch): Allow GIMPLE_OMP_TASKGROUP and GIMPLE_OMP_TEAMS.
	(expand_omp_atomic_load, expand_omp_atomic_store,
	expand_omp_atomic_fetch_op): Handle gimple_omp_atomic_seq_cst_p.
	(expand_omp_target): New function.
	(expand_omp): Handle combined loops.  Handle GIMPLE_OMP_TASKGROUP,
	GIMPLE_OMP_TEAMS, GIMPLE_OMP_TARGET.
	(build_omp_regions_1): Immediately close region for
	GF_OMP_TARGET_KIND_UPDATE.
	(maybe_add_implicit_barrier_cancel): New function.
	(lower_omp_sections): Adjust lower_rec_input_clauses caller.  Handle
	cancellation.
	(lower_omp_single): Likewise.  Add clobber after the barrier.
	(lower_omp_taskgroup): New function.
	(lower_omp_for): Handle combined loops.  Adjust
	lower_rec_input_clauses caller.  Handle cancellation.
	(lower_depend_clauses): New function.
	(lower_omp_taskreg): Lower depend clauses.  Adjust
	lower_rec_input_clauses caller.  Add clobber after the call.  Handle
	cancellation.
	(lower_omp_target, lower_omp_teams): New functions.
	(lower_omp_1): Handle cancellation.  Handle GIMPLE_OMP_TASKGROUP,
	GIMPLE_OMP_TARGET, GIMPLE_OMP_TEAMS and GOMP_barrier, GOMP_cancel
	and GOMP_cancellation_point calls.
	(lower_omp): Fold stmts inside of target region.
	(diagnose_sb_1, diagnose_sb_2): Handle GIMPLE_OMP_TASKGROUP,
	GIMPLE_OMP_TARGET and GIMPLE_OMP_TEAMS.
	* builtin-types.def (DEF_FUNCTION_TYPE_8): Document.
	(BT_FN_VOID_OMPFN_PTR_UINT,
	BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG,
	BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG,
	BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): Remove.
	(BT_FN_VOID_OMPFN_PTR_UINT_UINT_UINT,
	BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_UINT,
	BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG_UINT,
	BT_FN_BOOL_INT, BT_FN_BOOL_INT_BOOL, BT_FN_VOID_UINT_UINT,
	BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR,
	BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR,
	BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR): New.
	* tree-ssa-alias.c (ref_maybe_used_by_call_p_1,
	call_may_clobber_ref_p_1): Handle BUILT_IN_GOMP_BARRIER_CANCEL,
	BUILT_IN_GOMP_TASKGROUP_END, BUILT_IN_GOMP_LOOP_END_CANCEL,
	BUILT_IN_GOMP_SECTIONS_END_CANCEL.  Don't handle
	BUILT_IN_GOMP_PARALLEL_END.
	* gimple-low.c (lower_stmt): Handle GIMPLE_OMP_TASKGROUP,
	GIMPLE_OMP_TARGET and GIMPLE_OMP_TEAMS.
	* gimple-pretty-print.c (dump_gimple_omp_for): Handle
	GF_OMP_FOR_KIND_DISTRIBUTE.
	(dump_gimple_omp_target, dump_gimple_omp_teams): New functions.
	(dump_gimple_omp_block): Handle GIMPLE_OMP_TASKGROUP.
	(dump_gimple_omp_return): Print lhs if it has any.
	(dump_gimple_omp_atomic_load, dump_gimple_omp_atomic_store): Handle
	gimple_omp_atomic_seq_cst_p.
	(pp_gimple_stmt_1): Handle GIMPLE_OMP_TASKGROUP, GIMPLE_OMP_TARGET
	and GIMPLE_OMP_TEAMS.
	* langhooks.c (lhd_omp_mappable_type): New function.
	* tree-vectorizer.c (struct simd_array_to_simduid): Fix up comment.
	* langhooks.h (struct lang_hooks_for_types): Add omp_mappable_type
	hook.
	* gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP,
	GOVD_ALIGNED and GOVD_MAP_TO_ONLY.
	(enum omp_region_type): Add ORT_TEAMS, ORT_TARGET_DATA and
	ORT_TARGET.
	(struct gimplify_omp_ctx): Add combined_loop field.
	(gimplify_call_expr, gimplify_modify_expr): Don't call fold_stmt
	on stmts inside of target region.
	(is_gimple_stmt): Return true for OMP_DISTRIBUTE and OMP_TASKGROUP.
	(omp_firstprivatize_variable): Handle GOVD_MAP, GOVD_ALIGNED,
	ORT_TARGET and ORT_TARGET_DATA.
	(omp_add_variable): Avoid checks on readding var for GOVD_ALIGNED.
	Handle GOVD_MAP.
	(omp_notice_threadprivate_variable): Complain about threadprivate
	variables in target region.
	(omp_notice_variable): Complain about vars with non-mappable type
	in target region.  Handle ORT_TEAMS, ORT_TARGET and ORT_TARGET_DATA.
	(omp_check_private): Ignore ORT_TARGET* regions.
	(gimplify_scan_omp_clauses, gimplify_adjust_omp_clauses_1,
	gimplify_adjust_omp_clauses): Handle new OpenMP 4.0 clauses.
	(find_combined_omp_for): New function.
	(gimplify_omp_for): Handle gimplification of combined loops.
	(gimplify_omp_workshare): Gimplify also OMP_TARGET, OMP_TARGET_DATA,
	OMP_TEAMS.
	(gimplify_omp_target_update): New function.
	(gimplify_omp_atomic): Handle OMP_ATOMIC_SEQ_CST.
	(gimplify_expr): Handle OMP_DISTRIBUTE, OMP_TARGET, OMP_TARGET_DATA,
	OMP_TARGET_UPDATE, OMP_TEAMS, OMP_TASKGROUP.
	(gimplify_body): If fndecl has "omp declare target" attribute, add
	implicit ORT_TARGET context around it.
	* tree.def (OMP_DISTRIBUTE, OMP_TEAMS, OMP_TARGET_DATA, OMP_TARGET,
	OMP_TASKGROUP, OMP_TARGET_UPDATE): New tree codes.
	* tree-nested.c (convert_nonlocal_reference_stmt,
	convert_local_reference_stmt, convert_gimple_call): Handle
	GIMPLE_OMP_TARGET, GIMPLE_OMP_TEAMS and GIMPLE_OMP_TASKGROUP.
	* omp-builtins.def (BUILT_IN_GOMP_TASK): Use
	BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR
	instead of BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT.
	(BUILT_IN_GOMP_TARGET, BUILT_IN_GOMP_TARGET_DATA,
	BUILT_IN_GOMP_TARGET_END_DATA, BUILT_IN_GOMP_TARGET_UPDATE,
	BUILT_IN_GOMP_TEAMS, BUILT_IN_BARRIER_CANCEL,
	BUILT_IN_GOMP_LOOP_END_CANCEL,
	BUILT_IN_GOMP_SECTIONS_END_CANCEL, BUILT_IN_OMP_GET_TEAM_NUM,
	BUILT_IN_OMP_GET_NUM_TEAMS, BUILT_IN_GOMP_TASKGROUP_START,
	BUILT_IN_GOMP_TASKGROUP_END, BUILT_IN_GOMP_PARALLEL_LOOP_STATIC,
	BUILT_IN_GOMP_PARALLEL_LOOP_DYNAMIC,
	BUILT_IN_GOMP_PARALLEL_LOOP_GUIDED,
	BUILT_IN_GOMP_PARALLEL_LOOP_RUNTIME, BUILT_IN_GOMP_PARALLEL,
	BUILT_IN_GOMP_PARALLEL_SECTIONS, BUILT_IN_GOMP_CANCEL,
	BUILT_IN_GOMP_CANCELLATION_POINT): New built-ins.
	(BUILT_IN_GOMP_PARALLEL_LOOP_STATIC_START,
	BUILT_IN_GOMP_PARALLEL_LOOP_DYNAMIC_START,
	BUILT_IN_GOMP_PARALLEL_LOOP_GUIDED_START,
	BUILT_IN_GOMP_PARALLEL_LOOP_RUNTIME_START,
	BUILT_IN_GOMP_PARALLEL_START, BUILT_IN_GOMP_PARALLEL_END,
	BUILT_IN_GOMP_PARALLEL_SECTIONS_START): Remove.
	* tree-inline.c (remap_gimple_stmt, estimate_num_insns):
	Handle GIMPLE_OMP_TARGET, GIMPLE_OMP_TEAMS and GIMPLE_OMP_TASKGROUP.
	* gimple.c (gimple_build_omp_taskgroup, gimple_build_omp_target,
	gimple_build_omp_teams): New functions.
	(walk_gimple_op): Handle GIMPLE_OMP_TARGET, GIMPLE_OMP_TEAMS and
	GIMPLE_OMP_TASKGROUP.  Walk optional lhs on GIMPLE_OMP_RETURN.
	(walk_gimple_stmt, gimple_copy): Handle GIMPLE_OMP_TARGET,
	GIMPLE_OMP_TEAMS and GIMPLE_OMP_TASKGROUP.
	* gimple.h (enum gf_mask): GF_OMP_FOR_KIND_DISTRIBUTE,
	GF_OMP_FOR_COMBINED, GF_OMP_FOR_COMBINED_INTO,
	GF_OMP_TARGET_KIND_MASK, GF_OMP_TARGET_KIND_REGION,
	GF_OMP_TARGET_KIND_DATA, GF_OMP_TARGET_KIND_UPDATE,
	GF_OMP_ATOMIC_SEQ_CST): New.
	(gimple_build_omp_taskgroup, gimple_build_omp_target,
	gimple_build_omp_teams): New prototypes.
	(gimple_has_substatements): Handle GIMPLE_OMP_TARGET,
	GIMPLE_OMP_TEAMS and GIMPLE_OMP_TASKGROUP.
	(gimple_omp_subcode): Use GIMPLE_OMP_TEAMS instead of
	GIMPLE_OMP_SINGLE as end of range.
	(gimple_omp_return_set_lhs, gimple_omp_return_lhs,
	gimple_omp_return_lhs_ptr, gimple_omp_atomic_seq_cst_p,
	gimple_omp_atomic_set_seq_cst, gimple_omp_for_combined_p,
	gimple_omp_for_set_combined_p, gimple_omp_for_combined_into_p,
	gimple_omp_for_set_combined_into_p, gimple_omp_target_clauses,
	gimple_omp_target_clauses_ptr, gimple_omp_target_set_clauses,
	gimple_omp_target_kind, gimple_omp_target_set_kind,
	gimple_omp_target_child_fn, gimple_omp_target_child_fn_ptr,
	gimple_omp_target_set_child_fn, gimple_omp_target_data_arg,
	gimple_omp_target_data_arg_ptr, gimple_omp_target_set_data_arg,
	gimple_omp_teams_clauses, gimple_omp_teams_clauses_ptr,
	gimple_omp_teams_set_clauses): New inlines.
	(CASE_GIMPLE_OMP): Add GIMPLE_OMP_TARGET, GIMPLE_OMP_TEAMS
	and GIMPLE_OMP_TASKGROUP.
	* tree-core.h (enum omp_clause_code): Add new OpenMP 4.0 clause
	codes.
	(enum omp_clause_depend_kind, enum omp_clause_map_kind,
	enum omp_clause_proc_bind_kind): New.
	(union omp_clause_subcode): Add depend_kind, map_kind and
	proc_bind_kind fields.
	* tree-cfg.c (make_edges): Handle GIMPLE_OMP_TARGET,
	GIMPLE_OMP_TEAMS and GIMPLE_OMP_TASKGROUP.
	* langhooks-def.h (lhd_omp_mappable_type): New prototype.
	(LANG_HOOKS_OMP_MAPPABLE_TYPE): Define.
	(LANG_HOOKS_FOR_TYPES_INITIALIZER): Add it.
gcc/c-family/
	* c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
	201307 instead of 201107.
	* c-common.c (DEF_FUNCTION_TYPE_8): Define.
	(c_common_attribute_table): Add "omp declare target" and
	"omp declare simd" attributes.
	(handle_omp_declare_target_attribute,
	handle_omp_declare_simd_attribute): New functions.
	* c-omp.c: Include c-pragma.h.
	(c_finish_omp_taskgroup): New function.
	(c_finish_omp_atomic): Add swapped argument, if true,
	build the operation first with rhs, lhs arguments and use NOP_EXPR
	build_modify_expr.
	(c_finish_omp_for): Add code argument, pass it down to make_code.
	(c_omp_split_clauses): New function.
	(c_split_parallel_clauses): Removed.
	(c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
	c_omp_declare_simd_clauses_to_decls): New functions.
	* c-common.h (omp_clause_mask): New type.
	(OMP_CLAUSE_MASK_1): Define.
	(omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
	omp_clause_mask::operator |=, omp_clause_mask::operator ~,
	omp_clause_mask::operator |, omp_clause_mask::operator &,
	omp_clause_mask::operator <<, omp_clause_mask::operator >>,
	omp_clause_mask::operator ==): New methods.
	(enum c_omp_clause_split): New.
	(c_finish_omp_taskgroup): New prototype.
	(c_finish_omp_atomic): Add swapped argument.
	(c_finish_omp_for): Add code argument.
	(c_omp_split_clauses): New prototype.
	(c_split_parallel_clauses): Removed.
	(c_omp_declare_simd_clauses_to_numbers,
	c_omp_declare_simd_clauses_to_decls): New prototypes.
	* c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
	* c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
	PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
	PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
	PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
	Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
	(enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
	PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
	PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
	PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
	PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
	PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
	PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
	PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
	PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
	PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
	PRAGMA_OMP_CLAUSE_UNIFORM.
gcc/ada/
	* gcc-interface/utils.c (DEF_FUNCTION_TYPE_8): Define.
gcc/fortran/
	* trans-openmp.c (gfc_omp_clause_default_ctor,
	gfc_omp_clause_dtor): Return NULL for OMP_CLAUSE_REDUCTION.
	* f95-lang.c (ATTR_NULL, DEF_FUNCTION_TYPE_8): Define.
	* types.def (DEF_FUNCTION_TYPE_8): Document.
	(BT_FN_VOID_OMPFN_PTR_UINT,
	BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG,
	BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG,
	BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): Remove.
	(BT_FN_VOID_OMPFN_PTR_UINT_UINT_UINT,
	BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_UINT,
	BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG_UINT,
	BT_FN_BOOL_INT, BT_FN_BOOL_INT_BOOL, BT_FN_VOID_UINT_UINT,
	BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR,
	BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR,
	BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR): New.
gcc/lto/
	* lto-lang.c (DEF_FUNCTION_TYPE_8): Define.
gcc/c/
	* c-lang.h (current_omp_declare_target_attribute): New extern
	decl.
	* c-parser.c: Include c-lang.h.
	(struct c_parser): Change tokens to c_token *.
	Add tokens_buf field.  Change tokens_avail type to unsigned int.
	(c_parser_consume_token): If parser->tokens isn't
	&parser->tokens_buf[0], increment parser->tokens.
	(c_parser_consume_pragma): Likewise.
	(enum pragma_context): Add pragma_struct and pragma_param.
	(c_parser_external_declaration): Adjust
	c_parser_declaration_or_fndef caller.
	(c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
	argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
	Adjust recursive call.
	(c_parser_struct_or_union_specifier): Use pragma_struct instead
	of pragma_external.
	(c_parser_parameter_declaration): Use pragma_param instead of
	pragma_external.
	(c_parser_compound_statement_nostart, c_parser_label,
	c_parser_for_statement): Adjust
	c_parser_declaration_or_fndef callers.
	(c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
	it through to c_parser_conditional_expression.
	(c_parser_conditional_expression): Add omp_atomic_lhs argument,
	pass it through to c_parser_binary_expression.  Adjust recursive
	call.
	(c_parser_binary_expression): Remove prec argument, add
	omp_atomic_lhs argument instead.  Always start from PREC_NONE, if
	omp_atomic_lhs is non-NULL and one of the arguments of toplevel
	binop matches it, use build2 instead of parser_build_binary_op.
	(c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
	PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
	PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
	Handle pragma_struct and pragma_param the same as pragma_external.
	(c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
	(c_parser_omp_variable_list): Parse array sections for
	OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
	(c_parser_omp_clause_collapse): Fully fold collapse expression.
	(c_parser_omp_clause_reduction): Handle user defined reductions.
	(c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
	c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
	c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
	c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
	c_parser_omp_clause_depend, c_parser_omp_clause_map,
	c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
	c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
	c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
	(c_parser_omp_all_clauses): Add finish_p argument.  Don't call
	c_finish_omp_clauses if it is false.  Handle new OpenMP 4.0 clauses.
	(c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
	present to c_finish_omp_atomic.  Handle OpenMP 4.0 atomic forms.
	(c_parser_omp_for_loop): Add CODE argument, pass it through
	to c_finish_omp_for.  Change last argument to cclauses,
	and adjust uses to grab parallel clauses from the array of all
	the split clauses.  Adjust c_parser_binary_expression,
	c_parser_declaration_or_fndef and c_finish_omp_for callers.
	(omp_split_clauses): New function.
	(c_parser_omp_simd): New function.
	(c_parser_omp_for): Add p_name, mask and cclauses arguments.
	Allow the function to be called also when parsing combined constructs,
	and call c_parser_omp_simd when parsing for simd.
	(c_parser_omp_sections_scope): If section-sequence doesn't start with
	#pragma omp section, require exactly one structured-block instead of
	sequence of statements.
	(c_parser_omp_sections): Add p_name, mask and cclauses arguments.
	Allow the function to be called also when parsing combined constructs.
	(c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
	Allow the function to be called also when parsing combined
	constructs.
	(c_parser_omp_taskgroup, c_parser_omp_cancel,
	c_parser_omp_cancellation_point, c_parser_omp_distribute,
	c_parser_omp_teams, c_parser_omp_target_data,
	c_parser_omp_target_update, c_parser_omp_target,
	c_parser_omp_declare_simd, c_finish_omp_declare_simd,
	c_parser_omp_declare_target, c_parser_omp_end_declare_target,
	c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
	(c_parser_omp_construct): Add p_name and mask vars.  Handle
	PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
	PRAGMA_OMP_TEAMS.  Adjust c_parser_omp_for, c_parser_omp_parallel
	and c_parser_omp_sections callers.
	(c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
	(OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
	OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
	(OMP_PARALLEL_CLAUSE_MASK): Likewise.  Add OMP_CLAUSE_PROC_BIND.
	(OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.  Add
	OMP_CLAUSE_DEPEND.
	(OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
	OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
	OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
	OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
	OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
	* c-typeck.c: Include tree-inline.h.
	(c_finish_omp_cancel, c_finish_omp_cancellation_point,
	handle_omp_array_sections_1, handle_omp_array_sections,
	c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
	(c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
	user defined reductions.
	(c_tree_equal): New function.
	* c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
	c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
	c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
	c_check_omp_declare_reduction_r): New prototypes.
	* c-decl.c (current_omp_declare_target_attribute): New variable.
	(c_decl_attributes): New function.
	(start_decl, start_function): Use it instead of decl_attributes.
	(temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
	c_omp_reduction_decl, c_omp_reduction_lookup,
	c_check_omp_declare_reduction_r): New functions.
gcc/cp/
	* decl.c (duplicate_decls): Error out for redeclaration of UDRs.
	(declare_simd_adjust_this): New function.
	(grokfndecl): If "omp declare simd" attribute is present,
	call declare_simd_adjust_this if needed and
	c_omp_declare_simd_clauses_to_numbers.
	* cp-array-notation.c (expand_array_notation_exprs): Handle
	OMP_TASKGROUP.
	* cp-gimplify.c (cp_gimplify_expr): Handle OMP_SIMD and
	OMP_DISTRIBUTE.  Handle is_invisiref_parm decls in
	OMP_CLAUSE_REDUCTION.
	(cp_genericize_r): Handle OMP_SIMD and OMP_DISTRIBUTE like
	OMP_FOR.
	(cxx_omp_privatize_by_reference): Return true for
	is_invisiref_parm decls.
	(cxx_omp_finish_clause): Adjust cxx_omp_create_clause_info
	caller.
	* pt.c (apply_late_template_attributes): For "omp declare simd"
	attribute call tsubst_omp_clauses,
	c_omp_declare_simd_clauses_to_decls, finish_omp_clauses
	and c_omp_declare_simd_clauses_to_numbers.
	(instantiate_class_template_1): Call cp_check_omp_declare_reduction
	for UDRs.
	(tsubst_decl): Handle UDRs.
	(tsubst_omp_clauses): Add declare_simd argument, if true don't
	call finish_omp_clauses.  Handle new OpenMP 4.0 clauses.
	Handle non-NULL OMP_CLAUSE_REDUCTION_PLACEHOLDER on
	OMP_CLAUSE_REDUCTION.
	(tsubst_expr): For UDRs call pushdecl and
	cp_check_omp_declare_reduction.  Adjust tsubst_omp_clauses
	callers.  Handle OMP_SIMD, OMP_DISTRIBUTE, OMP_TEAMS,
	OMP_TARGET_DATA, OMP_TARGET_UPDATE, OMP_TARGET, OMP_TASKGROUP.
	Adjust finish_omp_atomic caller.
	(tsubst_omp_udr): New function.
	(instantiate_decl): For UDRs at block scope, don't call
	start_preparsed_function/finish_function.  Call tsubst_omp_udr.
	* semantics.c (cxx_omp_create_clause_info): Add need_dtor argument,
	use it instead of need_default_ctor || need_copy_ctor.
	(struct cp_check_omp_declare_reduction_data): New type.
	(handle_omp_array_sections_1, handle_omp_array_sections,
	omp_reduction_id, omp_reduction_lookup,
	cp_remove_omp_priv_cleanup_stmt, cp_check_omp_declare_reduction_r,
	cp_check_omp_declare_reduction, clone_omp_udr,
	find_omp_placeholder_r, finish_omp_reduction_clause): New functions.
	(finish_omp_clauses): Handle new OpenMP 4.0 clauses and user defined
	reductions.
	(finish_omp_for): Add CODE argument, use it instead of hardcoded
	OMP_FOR.  Adjust c_finish_omp_for caller.
	(finish_omp_atomic): Add seq_cst argument, adjust
	c_finish_omp_atomic callers, handle seq_cst and new OpenMP 4.0
	atomic variants.
	(finish_omp_cancel, finish_omp_cancellation_point): New functions.
	* decl2.c (mark_used): Force immediate instantiation of
	DECL_OMP_DECLARE_REDUCTION_P decls.
	(is_late_template_attribute): Return true for "omp declare simd"
	attribute.
	(cp_omp_mappable_type): New function.
	(cplus_decl_attributes): Add implicit "omp declare target" attribute
	if requested.
	* parser.c (cp_debug_parser): Print
	parser->colon_doesnt_start_class_def_p.
	(cp_ensure_no_omp_declare_simd, cp_finalize_omp_declare_simd): New
	functions.
	(enum pragma_context): Add pragma_member and pragma_objc_icode.
	(cp_parser_binary_expression): Handle no_toplevel_fold_p
	even for binary operations other than comparison.
	(cp_parser_linkage_specification): Call
	cp_ensure_no_omp_declare_simd if needed.
	(cp_parser_namespace_definition): Likewise.
	(cp_parser_init_declarator): Call cp_finalize_omp_declare_simd.
	(cp_parser_direct_declarator): Pass declarator to
	cp_parser_late_return_type_opt.
	(cp_parser_late_return_type_opt): Add declarator argument,
	call cp_parser_late_parsing_omp_declare_simd for declare simd.
	(cp_parser_class_specifier_1): Call cp_ensure_no_omp_declare_simd.
	Parse UDRs before all other methods.
	(cp_parser_member_specification_opt): Use pragma_member instead of
	pragma_external.
	(cp_parser_member_declaration): Call cp_finalize_omp_declare_simd.
	(cp_parser_function_definition_from_specifiers_and_declarator,
	cp_parser_save_member_function_body): Likewise.
	(cp_parser_late_parsing_for_member): Handle UDRs specially.
	(cp_parser_next_token_starts_class_definition_p): Don't allow
	CPP_COLON if colon_doesnt_start_class_def_p flag is true.
	(cp_parser_objc_interstitial_code): Use pragma_objc_icode
	instead of pragma_external.
	(cp_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
	(cp_parser_omp_var_list_no_open): Parse array sections for
	OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.  Add COLON argument,
	if non-NULL, allow parsing to end with a colon rather than close
	paren.
	(cp_parser_omp_var_list): Adjust cp_parser_omp_var_list_no_open
	caller.
	(cp_parser_omp_clause_reduction): Handle user defined reductions.
	(cp_parser_omp_clause_branch, cp_parser_omp_clause_cancelkind,
	cp_parser_omp_clause_num_teams, cp_parser_omp_clause_thread_limit,
	cp_parser_omp_clause_aligned, cp_parser_omp_clause_linear,
	cp_parser_omp_clause_safelen, cp_parser_omp_clause_simdlen,
	cp_parser_omp_clause_depend, cp_parser_omp_clause_map,
	cp_parser_omp_clause_device, cp_parser_omp_clause_dist_schedule,
	cp_parser_omp_clause_proc_bind, cp_parser_omp_clause_to,
	cp_parser_omp_clause_from, cp_parser_omp_clause_uniform): New
	functions.
	(cp_parser_omp_all_clauses): Add finish_p argument.  Don't call
	finish_omp_clauses if it is false.  Handle new OpenMP 4.0 clauses.
	(cp_parser_omp_atomic): Parse seq_cst clause, pass
	true if it is present to finish_omp_atomic.  Handle new OpenMP 4.0
	atomic forms.
	(cp_parser_omp_for_loop): Add CODE argument, pass it through
	to finish_omp_for.  Change last argument to cclauses,
	and adjust uses to grab parallel clauses from the array of all
	the split clauses.
	(cp_omp_split_clauses): New function.
	(cp_parser_omp_simd): New function.
	(cp_parser_omp_for): Add p_name, mask and cclauses arguments.
	Allow the function to be called also when parsing combined constructs,
	and call c_parser_omp_simd when parsing for simd.
	(cp_parser_omp_sections_scope): If section-sequence doesn't start with
	#pragma omp section, require exactly one structured-block instead of
	sequence of statements.
	(cp_parser_omp_sections): Add p_name, mask and cclauses arguments.
	Allow the function to be called also when parsing combined constructs.
	(cp_parser_omp_parallel): Add p_name, mask and cclauses arguments.
	Allow the function to be called also when parsing combined
	constructs.
	(cp_parser_omp_taskgroup, cp_parser_omp_cancel,
	cp_parser_omp_cancellation_point, cp_parser_omp_distribute,
	cp_parser_omp_teams, cp_parser_omp_target_data,
	cp_parser_omp_target_update, cp_parser_omp_target,
	cp_parser_omp_declare_simd, cp_parser_late_parsing_omp_declare_simd,
	cp_parser_omp_declare_target, cp_parser_omp_end_declare_target,
	cp_parser_omp_declare_reduction_exprs, cp_parser_omp_declare_reduction,
	cp_parser_omp_declare): New functions.
	(cp_parser_omp_construct): Add p_name and mask vars.  Handle
	PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
	PRAGMA_OMP_TEAMS.  Adjust cp_parser_omp_for, cp_parser_omp_parallel
	and cp_parser_omp_sections callers.
	(cp_parser_pragma): Handle PRAGMA_OMP_CANCEL,
	PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
	PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
	PRAGMA_OMP_TEAMS, PRAGMA_OMP_TARGET, PRAGMA_OMP_END_DECLARE_TARGET.
	Handle pragma_member and pragma_objc_icode like pragma_external.
	(OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
	OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
	(OMP_PARALLEL_CLAUSE_MASK): Likewise.  Add OMP_CLAUSE_PROC_BIND.
	(OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.  Add
	OMP_CLAUSE_DEPEND.
	(OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
	OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
	OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
	OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
	OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
	* parser.h (struct cp_omp_declare_simd_data): New type.
	(struct cp_parser): Add colon_doesnt_start_class_def_p and
	omp_declare_simd fields.
	* cp-objcp-common.h (LANG_HOOKS_OMP_MAPPABLE_TYPE): Define.
	* cp-tree.h (struct lang_decl_fn): Add omp_declare_reduction_p
	bit.
	(DECL_OMP_DECLARE_REDUCTION_P): Define.
	(OMP_FOR_GIMPLIFYING_P): Use OMP_LOOP_CHECK macro.
	(struct saved_scope): Add omp_declare_target_attribute field.
	(cp_omp_mappable_type, omp_reduction_id,
	cp_remove_omp_priv_cleanup_stmt, cp_check_omp_declare_reduction,
	finish_omp_cancel, finish_omp_cancellation_point): New prototypes.
	(finish_omp_for): Add CODE argument.
	(finish_omp_atomic): Add seq_cst argument.
	(cxx_omp_create_clause_info): Add need_dtor argument.
gcc/testsuite/
	* c-c++-common/gomp/atomic-15.c: Adjust for C diagnostics.
	Remove error test that is now valid in OpenMP 4.0.
	* c-c++-common/gomp/atomic-16.c: New test.
	* c-c++-common/gomp/cancel-1.c: New test.
	* c-c++-common/gomp/depend-1.c: New test.
	* c-c++-common/gomp/depend-2.c: New test.
	* c-c++-common/gomp/map-1.c: New test.
	* c-c++-common/gomp/pr58472.c: New test.
	* c-c++-common/gomp/sections1.c: New test.
	* c-c++-common/gomp/simd1.c: New test.
	* c-c++-common/gomp/simd2.c: New test.
	* c-c++-common/gomp/simd3.c: New test.
	* c-c++-common/gomp/simd4.c: New test.
	* c-c++-common/gomp/simd5.c: New test.
	* c-c++-common/gomp/single1.c: New test.
	* g++.dg/gomp/block-0.C: Adjust for stricter #pragma omp sections
	parser.
	* g++.dg/gomp/block-3.C: Likewise.
	* g++.dg/gomp/clause-3.C: Adjust error messages.
	* g++.dg/gomp/declare-simd-1.C: New test.
	* g++.dg/gomp/declare-simd-2.C: New test.
	* g++.dg/gomp/depend-1.C: New test.
	* g++.dg/gomp/depend-2.C: New test.
	* g++.dg/gomp/target-1.C: New test.
	* g++.dg/gomp/target-2.C: New test.
	* g++.dg/gomp/taskgroup-1.C: New test.
	* g++.dg/gomp/teams-1.C: New test.
	* g++.dg/gomp/udr-1.C: New test.
	* g++.dg/gomp/udr-2.C: New test.
	* g++.dg/gomp/udr-3.C: New test.
	* g++.dg/gomp/udr-4.C: New test.
	* g++.dg/gomp/udr-5.C: New test.
	* g++.dg/gomp/udr-6.C: New test.
	* gcc.dg/autopar/outer-1.c: Expect 4 instead of 5 loopfn matches.
	* gcc.dg/autopar/outer-2.c: Likewise.
	* gcc.dg/autopar/outer-3.c: Likewise.
	* gcc.dg/autopar/outer-4.c: Likewise.
	* gcc.dg/autopar/outer-5.c: Likewise.
	* gcc.dg/autopar/outer-6.c: Likewise.
	* gcc.dg/autopar/parallelization-1.c: Likewise.
	* gcc.dg/gomp/block-3.c: Adjust for stricter #pragma omp sections
	parser.
	* gcc.dg/gomp/clause-1.c: Adjust error messages.
	* gcc.dg/gomp/combined-1.c: Look for GOMP_parallel_loop_runtime
	instead of GOMP_parallel_loop_runtime_start.
	* gcc.dg/gomp/declare-simd-1.c: New test.
	* gcc.dg/gomp/declare-simd-2.c: New test.
	* gcc.dg/gomp/nesting-1.c: Adjust for stricter #pragma omp sections
	parser.  Add further #pragma omp sections nesting tests.
	* gcc.dg/gomp/target-1.c: New test.
	* gcc.dg/gomp/target-2.c: New test.
	* gcc.dg/gomp/taskgroup-1.c: New test.
	* gcc.dg/gomp/teams-1.c: New test.
	* gcc.dg/gomp/udr-1.c: New test.
	* gcc.dg/gomp/udr-2.c: New test.
	* gcc.dg/gomp/udr-3.c: New test.
	* gcc.dg/gomp/udr-4.c: New test.
	* gfortran.dg/gomp/appendix-a/a.35.5.f90: Add dg-error.

Co-Authored-By: Richard Henderson <rth@redhat.com>
Co-Authored-By: Tobias Burnus <burnus@net-b.de>

From-SVN: r203408
2013-10-11 11:26:50 +02:00
Andrew MacLeod 481d1b8153 tree-flow.h: Remove some prototypes.
* tree-flow.h: Remove some prototypes.
	* tree.h: Remove some protypes, add a couple.
	* tree.c (using_eh_for_cleanups_flag, using_eh_for_cleanups,
	using_eh_for_cleanups_p): Add interface routines for front ends.
	* tree-eh.h: New file.  Add protoptyes.
	* tree-eh.c (using_eh_for_cleanups_p, using_eh_for_cleanups): Delete.
	(add_stmt_to_eh_lp_fn): Make static.
	(lower_try_finally): Use new using_eh_for_cleanups_p.
	* emit-rtl.c: Include tree-eh.h.
	* gimple.h: Include tree-eh.h.

From-SVN: r203273
2013-10-08 12:13:13 +00:00
Andrew Macleod cf2d1b38ca tree-flow.h: Include new .h files.
* tree-flow.h: Include new .h files.  Move prototypes.
	* tree-cfgcleanup.h: New file.  Add prototypes from tree-flow.h.
	* tree-dfa.h: New File.  Add prototypes from tree-flow.h.
	(get_addr_base_and_unit_offset_1) Move from tree-flow-inline.h.
	* tree-pretty-print.h: Add prototypes from tree-flow.h.
	* tree-into-ssa.h: New File.  Add prototypes from tree-flow.h.
	({debug|dump}*): Move debugging prototypes out of tree-into-ssa.c.
	* tree-into-ssa.c ({debug|dump}*): Move prototypes to header file.
	* tree.h (get_ref_base_and_extent): Move prototype out.
	* tree-flow-inline.h (get_addr_base_and_unit_offset_1): Move to 
	tree-dfa.h.
	* gimple-low.h: New File.  Add prototypes from tree-flow.h.
	* gimple-low.c (try_catch_may_fallthru, block_may_fallthru): Move to...
	* tree.c (try_catch_may_fallthru, block_may_fallthru): Here.
	* tree-scalar-evolution.c: Include tree.h.
	* sese.c: Include tree.h.
	* dumpfile.c: Move gimple-pretty-print.h include after tree.h.
	* dwarf2out.c: Include tree-dfa.h.
	* tree-chrec.c: Include tree.h.
	* tree-data-ref.c: Include tree.h.

From-SVN: r203113
2013-10-02 13:19:29 +00:00
Richard Sandiford c328471880 alloc-pool.c, [...]: Add missing whitespace before "(".
gcc/
	* alloc-pool.c, asan.c, auto-inc-dec.c, basic-block.h, bb-reorder.c,
	bitmap.c, bitmap.h, bt-load.c, builtins.c, calls.c, cfgcleanup.c,
	cfgexpand.c, cfghooks.c, cfgloop.c, cfgloopmanip.c, cfgrtl.c, cgraph.c,
	cgraph.h, cgraphbuild.c, cgraphclones.c, cgraphunit.c, collect2.c,
	combine-stack-adj.c, combine.c, compare-elim.c, context.c, context.h,
	cprop.c, cse.c, cselib.c, dbxout.c, dce.c, defaults.h, df-core.c,
	df-problems.c, df-scan.c, df.h, diagnostic.c, double-int.c, dse.c,
	dumpfile.c, dwarf2asm.c, dwarf2cfi.c, dwarf2out.c, emit-rtl.c,
	errors.c, except.c, expmed.c, expr.c, file-find.c, final.c,
	fixed-value.c, fold-const.c, function.c, fwprop.c, gcc-ar.c, gcc.c,
	gcov-io.c, gcov-io.h, gcov.c, gcse.c, genattr-common.c, genattr.c,
	genattrtab.c, genautomata.c, genconfig.c, genemit.c, genextract.c,
	genflags.c, gengenrtl.c, gengtype-state.c, gengtype.c, genmodes.c,
	genopinit.c, genoutput.c, genpeep.c, genpreds.c, genrecog.c,
	gensupport.c, ggc-common.c, ggc-page.c, gimple-fold.c, gimple-low.c,
	gimple-pretty-print.c, gimple-ssa-strength-reduction.c, gimple.c,
	gimple.h, godump.c, graphite-clast-to-gimple.c,
	graphite-optimize-isl.c, graphite-poly.h, graphite-sese-to-poly.c,
	graphite.c, haifa-sched.c, hash-table.c, hash-table.h, hwint.c,
	hwint.h, ifcvt.c, incpath.c, init-regs.c, input.h, intl.c, intl.h,
	ipa-cp.c, ipa-devirt.c, ipa-inline-analysis.c, ipa-inline.c,
	ipa-profile.c, ipa-pure-const.c, ipa-reference.c, ipa-split.c,
	ipa-utils.c, ipa.c, ira-build.c, ira.c, jump.c, loop-doloop.c,
	loop-init.c, loop-invariant.c, loop-iv.c, lower-subreg.c, lto-cgraph.c,
	lto-streamer-in.c, lto-streamer-out.c, lto-wrapper.c, mcf.c,
	mode-switching.c, modulo-sched.c, omp-low.c, optabs.c, opts.c,
	pass_manager.h, passes.c, plugin.c, postreload-gcse.c, postreload.c,
	predict.c, prefix.c, pretty-print.c, print-rtl.c, print-tree.c,
	profile.c, read-md.c, real.c, real.h, recog.c, ree.c, reg-stack.c,
	regcprop.c, reginfo.c, regmove.c, regrename.c, regs.h, regstat.c,
	reload1.c, reorg.c, rtl.c, rtl.h, rtlanal.c, sbitmap.c, sched-rgn.c,
	sdbout.c, sel-sched-ir.c, sel-sched.c, sparseset.c, stack-ptr-mod.c,
	statistics.c, stmt.c, stor-layout.c, store-motion.c, streamer-hooks.h,
	system.h, target-hooks-macros.h, targhooks.c, targhooks.h, toplev.c,
	tracer.c, trans-mem.c, tree-browser.c, tree-call-cdce.c, tree-cfg.c,
	tree-cfgcleanup.c, tree-complex.c, tree-data-ref.c, tree-data-ref.h,
	tree-eh.c, tree-emutls.c, tree-flow.h, tree-if-conv.c, tree-into-ssa.c,
	tree-iterator.c, tree-loop-distribution.c, tree-mudflap.c,
	tree-nested.c, tree-nomudflap.c, tree-nrv.c, tree-object-size.c,
	tree-optimize.c, tree-pass.h, tree-pretty-print.c, tree-profile.c,
	tree-scalar-evolution.c, tree-sra.c, tree-ssa-ccp.c,
	tree-ssa-coalesce.c, tree-ssa-copy.c, tree-ssa-copyrename.c,
	tree-ssa-dce.c, tree-ssa-dom.c, tree-ssa-dse.c, tree-ssa-forwprop.c,
	tree-ssa-ifcombine.c, tree-ssa-live.c, tree-ssa-loop-ch.c,
	tree-ssa-loop-im.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-prefetch.c,
	tree-ssa-loop.c, tree-ssa-math-opts.c, tree-ssa-operands.c,
	tree-ssa-phiopt.c, tree-ssa-phiprop.c, tree-ssa-pre.c,
	tree-ssa-reassoc.c, tree-ssa-sink.c, tree-ssa-strlen.c,
	tree-ssa-structalias.c, tree-ssa-threadedge.c, tree-ssa-threadupdate.c,
	tree-ssa-uncprop.c, tree-ssa-uninit.c, tree-ssa.c, tree-ssanames.c,
	tree-stdarg.c, tree-switch-conversion.c, tree-tailcall.c,
	tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop-manip.c,
	tree-vect-stmts.c, tree-vectorizer.c, tree-vectorizer.h, tree-vrp.c,
	tree.c, tree.h, tsan.c, tsystem.h, value-prof.c, var-tracking.c,
	varasm.c, vec.h, vmsdbgout.c, vtable-verify.c, web.c: Add missing
	whitespace before "(".

From-SVN: r203004
2013-09-28 08:42:34 +00:00
Richard Biener ed0d30514f re PR bootstrap/58521 (bootstrap failure: ICE in mem_ref_in_stmt, at tree-ssa-loop-im.c:677)
2013-09-25  Richard Biener  <rguenther@suse.de>

	PR middle-end/58521
	* tree.c (iterative_hash_expr): Remove MEM_REF special handling.

From-SVN: r202889
2013-09-25 09:51:13 +00:00
Richard Biener f40333afeb re PR tree-optimization/58513 (*var and MEM[(const int &)var] (var has int* type) are not treated as the same data ref.)
2013-09-24  Richard Biener  <rguenther@suse.de>

	PR middle-end/58513
	* tree.c (reference_alias_ptr_type): Move ...
	* alias.c (reference_alias_ptr_type): ... here and implement
	in terms of the new reference_alias_ptr_type_1.
	(ref_all_alias_ptr_type_p): New helper.
	(get_deref_alias_set_1): Drop flag_strict_aliasing here,
	use ref_all_alias_ptr_type_p.
	(get_deref_alias_set): Add flag_strict_aliasing check here.
	(reference_alias_ptr_type_1): New function, split out from ...
	(get_alias_set): ... here.
	(alias_ptr_types_compatible_p): New function.
	* alias.h (reference_alias_ptr_type): Declare.
	(alias_ptr_types_compatible_p): Likewise.
	* tree.h (reference_alias_ptr_type): Remove.
	* fold-const.c (operand_equal_p): Use alias_ptr_types_compatible_p
	to compare MEM_REF alias types.

	* g++.dg/vect/pr58513.cc: New testcase.

From-SVN: r202865
2013-09-24 11:04:04 +00:00
Andrew MacLeod 7a30045280 tree-ssa.h: New.
* tree-ssa.h: New.  Move content from tree-flow.h and
	tree-flow-inline.h.
	* tree-flow.h (_edge_var_map, edge_var_map_vector): Move to tree-ssa.h.
	Move prototypes belonging to tree-ssa.c.
	* tree-flow-inline.h (redirect_edge_var_map_def, 
	redirect_edge_var_map_result, redirect_edge_var_map_location): Move to
	tree-ssa.h.
	* gimple.h: Adjust prototypes.
	* tree-ssa.c (useless_type_conversion_p, types_compatible_p): Move to...
	* gimple.c (useless_type_conversion_p, types_compatible_p):  Here.
	* tree.h: Move prototype to tree-ssa.h.
	* gengtype.c (open_base_files): Replace tree-flow.h with tree-ssa.h.
	* Makefile.in: (TREE_SSA_H, TREE_FLOW_H): Adjust dependencies.
	* alias.c, asan.c, builtins.c, calls.c, cfgexpand.c, cfghooks.c,
	cfgloop.c, cfgloopmanip.c, cgraph.c, cgraphbuild.c, cgraphclones.c,
	cgraphunit.c, dse.c, except.c, expr.c, final.c, fold-const.c,
	ggc-page.c, gimple-fold.c, gimple-iterator.c, gimple-low.c,
	gimple-pretty-print.c, gimple-ssa-strength-reduction.c,
	gimple-streamer-in.c, gimple-streamer-out.c, gimple.c, gimplify.c,
	graphite-blocking.c, graphite-clast-to-gimple.c, graphite-dependences.c,
	graphite-interchange.c, graphite-optimize-isl.c, graphite-poly.c,
	graphite-scop-detection.c, graphite-sese-to-poly.c, graphite.c,
	ipa-cp.c, ipa-inline-analysis.c, ipa-inline-transform.c, ipa-inline.c,
	ipa-prop.c, ipa-pure-const.c, ipa-reference.c, ipa-split.c, ipa-utils.c,
	loop-init.c, lto-cgraph.c, lto-section-in.c, lto-section-out.c,
	lto-streamer-in.c, lto-streamer-out.c, lto-streamer.c, omp-low.c,
	passes.c, predict.c, print-tree.c, profile.c, sese.c, targhooks.c,
	tracer.c, trans-mem.c, tree-call-cdce.c, tree-cfg.c, tree-cfgcleanup.c,
	tree-chrec.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-eh.c,
	tree-emutls.c, tree-if-conv.c, tree-inline.c, tree-into-ssa.c,
	tree-loop-distribution.c, tree-mudflap.c, tree-nested.c, tree-nrv.c,
	tree-object-size.c, tree-optimize.c, tree-outof-ssa.c, tree-parloops.c,
	tree-phinodes.c, tree-predcom.c, tree-pretty-print.c, tree-profile.c,
	tree-scalar-evolution.c, tree-sra.c, tree-ssa*.c, tree-stdarg.c,
	tree-streamer-in.c, tree-switch-conversion.c, tree-tailcall.c,
	tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop-manip.c,
	tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c,
	tree-vect-stmts.c, tree-vectorizer.c, tree-vrp.c, tsan.c,
	value-prof.c, var-tracking.c,
	varpool.c, vtable-verify.c: Replace tree-flow.h with tree-ssa.h

From-SVN: r202523
2013-09-12 13:03:18 +00:00
Jan Hubicka 7d2ba4711f tree.c (types_same_for_odr): Drop overactive check.
* tree.c (types_same_for_odr): Drop overactive check.
	* ipa-devirt.c (hash_type_name): Likewise.

From-SVN: r202302
2013-09-05 23:25:48 +00:00
Jan Hubicka 61a74079b0 Makefile.in (ipa-devirt.o): Add dependency on diagnostic.h
* Makefile.in (ipa-devirt.o): Add dependency on diagnostic.h
	* ipa-devirt.c: Include diganostic.h
	(odr_type_d): Add types and types_set.
	(hash_type_name): Work for types with vtables during LTO.
	(odr_hasher::remove): Fix comment; destroy types_set.
	(add_type_duplicate): New function,
	(get_odr_type): Use it.
	(dump_type_inheritance_graph): Dump type duplicates.
	* ipa.c (symtab_remove_unreachable_nodes): Build type inheritance
	graph.
	* tree.c (types_same_for_odr): Give exact answers on types with
	virtual tables.

From-SVN: r202258
2013-09-04 14:14:28 +00:00
Marek Polacek de5a5fa139 Merge ubsan into trunk.
From-SVN: r202113
2013-08-30 16:12:58 +00:00
Jan Hubicka 47500756e5 * tree.c (set_call_expr_flags): Fix handling of TM_PURE.
From-SVN: r202098
2013-08-30 08:11:41 +00:00
Jakub Jelinek 74bf76ed78 Makefile.in (omp-low.o): Depend on $(TARGET_H).
* Makefile.in (omp-low.o): Depend on $(TARGET_H).
	* cfgloop.h (struct loop): Add safelen, force_vect, simduid.
	* function.h (struct function): Add has_force_vect_loops and
	has_simduid_loops.
	* gimple-pretty-print.c (dump_gimple_omp_for): Handle
	GF_OMP_FOR_KIND*.
	* gimple.c (gimple_build_omp_critical): Add KIND argument and
	handle it.
	* gimple.def: Update CLAUSES comments.
	* gimple.h (enum gf_mask): Add GF_OMP_FOR_KIND_{FOR,SIMD}.
	(gimple_build_omp_for): Add argument to prototype.
	(gimple_omp_for_kind): New.
	(gimple_omp_for_set_kind): New.
	* gimplify.c (enum gimplify_omp_var_data): Add GOVD_LINEAR to
	GOVD_DATA_SHARE_CLASS.
	(enum omp_region_type): Add ORT_SIMD.
	(gimple_add_tmp_var): Handle ORT_SIMD.
	(gimplify_var_or_parm_decl): Same.
	(is_gimple_stmt): Same.
	(omp_firstprivatize_variable): Same.
	(omp_add_variable): Only use splay_tree_insert if lookup failed.
	(omp_notice_variable): Handle ORT_SIMD.
	(omp_is_private): Add SIMD argument and handle it as well as
	ORT_SIMD.
	(omp_check_private): Handle ORT_SIMD.
	(gimplify_scan_omp_clauses): Handle OMP_CLAUSE_LINEAR and
	OMP_CLAUSE_SAFELEN.
	(gimplify_adjust_omp_clauses_1): Handle GOVD_LINEAR.
	Handle OMP_CLAUSE_LASTPRIVATE.
	(gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_LINEAR and
	OMP_CLAUSE_SAFELEN.
	(gimplify_omp_for): Handle OMP_SIMD and OMP_CLAUSE_LINEAR.
	(gimplify_expr): Handle OMP_SIMD.
	* internal-fn.c (expand_GOMP_SIMD_LANE): New.
	(expand_GOMP_SIMD_VF): New.
	(expand_GOMP_SIMD_LAST_LANE): New.
	* internal-fn.def (GOMP_SIMD_LANE): New.
	(GOMP_SIMD_VF): New.
	(GOMP_SIMD_LAST_LANE): New.
	* omp-low.c: Include target.h.
	(extract_omp_for_data): Handle OMP_SIMD, OMP_CLAUSE_LINEAR,
	OMP_CLAUSE_SAFELEN.
	(check_omp_nesting_restrictions): Same.
	(omp_max_vf): New.
	(lower_rec_simd_input_clauses): New.
	(lower_rec_input_clauses): Handle OMP_SIMD, GF_OMP_FOR_KIND_SIMD,
	OMP_CLAUSE_LINEAR.
	(lower_lastprivate_clauses): Handle OMP_CLAUSE_LINEAR,
	GF_OMP_FOR_KIND_SIMD, OMP_SIMD.
	(expand_omp_build_assign): New.
	(expand_omp_for_init_counts): New.
	(expand_omp_for_init_vars): New.
	(extract_omp_for_update_vars): New.
	(expand_omp_for_generic): Use expand_omp_for_{init,update}_vars
	and rewrite accordingly.
	(expand_omp_simd): New.
	(expand_omp_for): Use expand_omp_simd.
	(lower_omp_for_lastprivate): Unshare vinit when appropriate.
	(lower_omp_for): Do not lower the body.
	* tree-data-ref (get_references_in_stmt): Allow IFN_GOMP_SIMD_LANE
	in their own loops.
	* tree-flow.h (find_omp_clause): Remove prototype.
	* tree-if-conv.c (main_tree_if_conversion): Run if doing if
	conversion, forcing vectorization of the loop, or if
	flag_tree_vectorize.
	(gate_tree_if_conversion): Similarly.
	* tree-inline.c (remap_gimple_stmt): Pass for kind argument to
	gimple_build_omp_for.
	(copy_cfg_body): set has_force_vect_loops and has_simduid_loops.
	* tree-parloops (create_parallel_loop): Pass kind argument to
	gimple_build_omp_for.
	* tree-pretty-print.c (dump_omp_clause): Add cases for
	OMP_CLAUSE_UNIFORM, OMP_CLAUSE_LINEAR, OMP_CLAUSE_SAFELEN,
	OMP_CLAUSE__SIMDUID_.
	(dump_generic_node): Handle OMP_SIMD.
	* tree-ssa-ccp.c (likely_value): Handle IFN_GOMP_SIMD*.
	* tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Do not
	unroll OMP_SIMD loops here.
	* tree-ssa-loop.c (gate_tree_vectorize): Run if
	has_force_vect_loops.
	* tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Handle
	loop->safelen
	(vect_analyze_data_refs): Handle simd loops.
	* tree-vect-loop.c (vectorizable_live_operation): Handle
	IFN_GOMP_SIMD*.
	* tree-vect-stmts.c (vectorizable_call): Handle
	IFN_GOMP_SIMD_LANE.
	(vectorizable_store): Handle STMT_VINFO_SIMD_LANE_ACCESS_P.
	(vectorizable_load): Same.
	* tree-vectorizer.c: Include hash-table.h and
	tree-ssa-propagate.h.
	(struct simduid_to_vf): New.
	(simduid_to_vf::hash): New.
	(simduid_to-vf::equal): New.
	(struct simd_array_to_simduid): New.
	(simd_array_to_simduid::hash): New.
	(simd_array_to_simduid::equal): New.
	(adjust_simduid_builtins): New.
	(struct note_simd_array_uses_struct): New.
	(note_simd_array_uses_cb): New.
	(note_simd_array_uses): New.
	(vectorize_loops): Handle simd hints and adjust simd builtins
	accordingly.
	* tree-vectorizer.h (struct _stmt_vec_info): Add
	simd_lane_access_p field.
	(STMT_VINFO_SIMD_LANE_ACCESS_P): New macro.
	* tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_LINEAR,
	OMP_CLAUSE_SAFELEN, OMP_CLAUSE__SIMDUID_, OMP_CLAUSE_UNIFORM.
	(omp_clause_code_name): Same.
	(walk_tree_1): Handle OMP_CLAUSE_UNIFORM, OMP_CLAUSE_SAFELEN,
	OMP_CLAUSE__SIMDUID_, OMP_CLAUSE_LINEAR.
	* tree.def (OMP_SIMD): New entry.
	* tree.h (enum omp_clause_code): Add entries for
	OMP_CLAUSE_LINEAR, OMP_CLAUSE_UNIFORM, OMP_CLAUSE_SAFELEN,
	OMP_CLAUSE__SIMDUID_.
	(OMP_CLAUSE_DECL): Adjust range for new clauses.
	(OMP_CLAUSE_LINEAR_NO_COPYIN): New.
	(OMP_CLAUSE_LINEAR_NO_COPYOUT): New.
	(OMP_CLAUSE_LINEAR_STEP): New.
	(OMP_CLAUSE_SAFELEN_EXPR): New.
	(OMP_CLAUSE__SIMDUID__DECL): New.
	(find_omp_clause): New prototype.
cp/
	* cp-tree.h (CP_OMP_CLAUSE_INFO): Adjust range for new clauses.

Co-Authored-By: Aldy Hernandez <aldyh@redhat.com>

From-SVN: r202029
2013-08-27 18:38:00 +00:00
Marc Glisse 0cadbfaa89 re PR other/57324 (Undefined behavior issues found with clang's -fsanitize=undefined)
2013-08-24  Marc Glisse  <marc.glisse@inria.fr>

	PR other/57324
	* hwint.h (HOST_WIDE_INT_UC, HOST_WIDE_INT_1U, HOST_WIDE_INT_M1,
	HOST_WIDE_INT_M1U): New macros.
	* fold-const.c (sign_bit_p, build_range_check, fold_unary_loc,
	fold_binary_loc, fold_ternary_loc): Use the new macros. Use an
	unsigned -1 for lshift.
	* cse.c (cse_insn): Likewise.
	* double-int.c (rshift_double, lshift_double): Likewise.
	* builtins.c (fold_builtin_bitop): Likewise.
	* combine.c (force_to_mode): Likewise.
	* tree.c (integer_pow2p, tree_log2, tree_floor_log2): Likewise.
	* simplify-rtx.c (simplify_const_unary_operation,
	simplify_const_binary_operation): Likewise.
	* tree-stdarg.c (va_list_counter_bump, va_list_ptr_read,
	check_va_list_escapes): Likewise.
	* rtlanal.c (nonzero_bits1): Likewise.
	* expmed.c (expand_smod_pow2): Likewise.
	* tree-ssa-structalias.c (UNKNOWN_OFFSET): Use HOST_WIDE_INT_MIN.

From-SVN: r201953
2013-08-23 22:16:08 +00:00
Jan Hubicka eefe9a995c Makeifle-in (ipa-devirt.o): New.
* Makeifle-in (ipa-devirt.o): New.
	(GTFILES): Add ipa-utils.h and ipa-devirt.c
	* cgraphunit.c (decide_is_symbol_needed): Do not care about virtuals.
	(analyze_functions): Look into possible targets of polymorphic call.
	* dumpfile.c (dump_files): Add type-inheritance dump.
	* dumpfile.h (TDI_inheritance): New.
	* ipa-devirt.c: New file.
	* ipa-utils.h (odr_type_d): Forward declare.
	(odr_type): New type.
	(build_type_inheritance_graph): Declare.
	(possible_polymorphic_call_targets): Declare and introduce inline
	variant when only edge is pased.
	(dump_possible_polymorphic_call_targets): Likewise.
	* timevar.def (TV_IPA_INHERITANCE, TV_IPA_VIRTUAL_CALL): New.
	* tree.c (type_in_anonymous_namespace_p): Break out from ...
	(types_same_for_odr): ... here.
	* tree.h (type_in_anonymous_namespace_p): Declare.

	* g++.dg/ipa/type-inheritance-1.C: New testcase.

From-SVN: r201836
2013-08-19 10:14:06 +00:00
Jan Hubicka 1d5755efee cgraph.c (cgraph_create_indirect_edge): Discover polymorphic calls and record basic info into indirect_info.
* cgraph.c (cgraph_create_indirect_edge): Discover
	polymorphic calls and record basic info into indirect_info.
	* gimple-fold.c (gimple_fold_call): When doing BINFO based
	devirtualization, ignore objc function calls.
	* ipa-cp.c (initialize_node_lattices): Be ready for polymorphic
	call with no parm index info.
	* ipa-prop.c (ipa_analyze_call_uses): Likewise.
	* tree.c (virtual_method_call_p): New function.
	* tree.h (virtual_method_call_p): Declare.

From-SVN: r201824
2013-08-18 09:22:42 +00:00
Jan Hubicka 5945bebf44 re PR middle-end/58179 (obj_type_ref ICE building libobjc)
PR middle-end/58179
	* tree.c (obj_type_ref_class): Do not ICE on non-method calls.

From-SVN: r201817
2013-08-17 18:14:18 +00:00
Jan Hubicka c49bdb2ee9 gimple-fold.c (gimple_extract_devirt_binfo_from_cst): Add new arugment expected_type.
* gimple-fold.c (gimple_extract_devirt_binfo_from_cst): Add new
	arugment expected_type.
	(gimple_fold_call): Use it.
	* gimple.h (gimple_extract_devirt_binfo_from_cst): Update prototype.
	* ipa-cp.c (ipa_get_indirect_edge_target_1): Update.
	* ipa-prop.c (ipa_analyze_virtual_call_uses): Use
	obj_type_ref_class.
	(try_make_edge_direct_virtual_call): Likewise.
	* tree.c (obj_type_ref_class): New.
	* tree.h (obj_type_ref_class): Use it.

From-SVN: r201789
2013-08-16 12:38:04 +00:00
David Malcolm 27a4cd485d Automated conversion of passes to C++ classes
gcc/

	Patch autogenerated by refactor_passes.py from
	https://github.com/davidmalcolm/gcc-refactoring-scripts
	revision 03fe39476a4c4ea450b49e087cfa817b5f92021e

	* asan.c (pass_asan): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_asan): ...new pass_data instance and...
	(make_pass_asan): ...new function.
	(pass_asan_O0): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_asan_O0): ...new pass_data instance and...
	(make_pass_asan_O0): ...new function.
	* auto-inc-dec.c (pass_inc_dec): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_inc_dec): ...new pass_data instance and...
	(make_pass_inc_dec): ...new function.
	* bb-reorder.c (pass_reorder_blocks): Convert from a global struct to
	a subclass of rtl_opt_pass along with...
	(pass_data_reorder_blocks): ...new pass_data instance and...
	(make_pass_reorder_blocks): ...new function.
	(pass_duplicate_computed_gotos): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_duplicate_computed_gotos): ...new pass_data instance and...
	(make_pass_duplicate_computed_gotos): ...new function.
	(pass_partition_blocks): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_partition_blocks): ...new pass_data instance and...
	(make_pass_partition_blocks): ...new function.
	* bt-load.c (pass_branch_target_load_optimize1): Convert from a global
	struct to a subclass of rtl_opt_pass along with...
	(pass_data_branch_target_load_optimize1): ...new pass_data instance
	and...
	(make_pass_branch_target_load_optimize1): ...new function.
	(pass_branch_target_load_optimize2): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_branch_target_load_optimize2): ...new pass_data instance
	and...
	(make_pass_branch_target_load_optimize2): ...new function.
	* cfgcleanup.c (pass_jump): Convert from a global struct to a subclass
	of rtl_opt_pass along with...
	(pass_data_jump): ...new pass_data instance and...
	(make_pass_jump): ...new function.
	(pass_jump2): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_jump2): ...new pass_data instance and...
	(make_pass_jump2): ...new function.
	* cfgexpand.c (pass_expand): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_expand): ...new pass_data instance and...
	(make_pass_expand): ...new function.
	* cfgrtl.c (pass_free_cfg): Convert from a global struct to a subclass
	of rtl_opt_pass along with...
	(pass_data_free_cfg): ...new pass_data instance and...
	(make_pass_free_cfg): ...new function.
	(pass_into_cfg_layout_mode): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_into_cfg_layout_mode): ...new pass_data instance and...
	(make_pass_into_cfg_layout_mode): ...new function.
	(pass_outof_cfg_layout_mode): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_outof_cfg_layout_mode): ...new pass_data instance and...
	(make_pass_outof_cfg_layout_mode): ...new function.
	* cgraphbuild.c (pass_build_cgraph_edges): Convert from a global
	struct to a subclass of gimple_opt_pass along with...
	(pass_data_build_cgraph_edges): ...new pass_data instance and...
	(make_pass_build_cgraph_edges): ...new function.
	(pass_rebuild_cgraph_edges): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_rebuild_cgraph_edges): ...new pass_data instance and...
	(make_pass_rebuild_cgraph_edges): ...new function.
	(pass_remove_cgraph_callee_edges): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_remove_cgraph_callee_edges): ...new pass_data instance
	and...
	(make_pass_remove_cgraph_callee_edges): ...new function.
	* combine-stack-adj.c (pass_stack_adjustments): Convert from a global
	struct to a subclass of rtl_opt_pass along with...
	(pass_data_stack_adjustments): ...new pass_data instance and...
	(make_pass_stack_adjustments): ...new function.
	* combine.c (pass_combine): Convert from a global struct to a subclass
	of rtl_opt_pass along with...
	(pass_data_combine): ...new pass_data instance and...
	(make_pass_combine): ...new function.
	* compare-elim.c (pass_compare_elim_after_reload): Convert from a
	global struct to a subclass of rtl_opt_pass along with...
	(pass_data_compare_elim_after_reload): ...new pass_data instance
	and...
	(make_pass_compare_elim_after_reload): ...new function.
	* cprop.c (pass_rtl_cprop): Convert from a global struct to a subclass
	of rtl_opt_pass along with...
	(pass_data_rtl_cprop): ...new pass_data instance and...
	(make_pass_rtl_cprop): ...new function.
	* cse.c (pass_cse): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_cse): ...new pass_data instance and...
	(make_pass_cse): ...new function.
	(pass_cse2): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_cse2): ...new pass_data instance and...
	(make_pass_cse2): ...new function.
	(pass_cse_after_global_opts): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_cse_after_global_opts): ...new pass_data instance and...
	(make_pass_cse_after_global_opts): ...new function.
	* dce.c (pass_ud_rtl_dce): Convert from a global struct to a subclass
	of rtl_opt_pass along with...
	(pass_data_ud_rtl_dce): ...new pass_data instance and...
	(make_pass_ud_rtl_dce): ...new function.
	(pass_fast_rtl_dce): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_fast_rtl_dce): ...new pass_data instance and...
	(make_pass_fast_rtl_dce): ...new function.
	* df-core.c (pass_df_initialize_opt): Convert from a global struct to
	a subclass of rtl_opt_pass along with...
	(pass_data_df_initialize_opt): ...new pass_data instance and...
	(make_pass_df_initialize_opt): ...new function.
	(pass_df_initialize_no_opt): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_df_initialize_no_opt): ...new pass_data instance and...
	(make_pass_df_initialize_no_opt): ...new function.
	(pass_df_finish): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_df_finish): ...new pass_data instance and...
	(make_pass_df_finish): ...new function.
	* dse.c (pass_rtl_dse1): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_rtl_dse1): ...new pass_data instance and...
	(make_pass_rtl_dse1): ...new function.
	(pass_rtl_dse2): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_rtl_dse2): ...new pass_data instance and...
	(make_pass_rtl_dse2): ...new function.
	* dwarf2cfi.c (pass_dwarf2_frame): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_dwarf2_frame): ...new pass_data instance and...
	(make_pass_dwarf2_frame): ...new function.
	* except.c (pass_set_nothrow_function_flags): Convert from a global
	struct to a subclass of rtl_opt_pass along with...
	(pass_data_set_nothrow_function_flags): ...new pass_data instance
	and...
	(make_pass_set_nothrow_function_flags): ...new function.
	(pass_convert_to_eh_region_ranges): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_convert_to_eh_region_ranges): ...new pass_data instance
	and...
	(make_pass_convert_to_eh_region_ranges): ...new function.
	* final.c (pass_compute_alignments): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_compute_alignments): ...new pass_data instance and...
	(make_pass_compute_alignments): ...new function.
	(pass_final): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_final): ...new pass_data instance and...
	(make_pass_final): ...new function.
	(pass_shorten_branches): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_shorten_branches): ...new pass_data instance and...
	(make_pass_shorten_branches): ...new function.
	(pass_clean_state): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_clean_state): ...new pass_data instance and...
	(make_pass_clean_state): ...new function.
	* function.c (pass_instantiate_virtual_regs): Convert from a global
	struct to a subclass of rtl_opt_pass along with...
	(pass_data_instantiate_virtual_regs): ...new pass_data instance and...
	(make_pass_instantiate_virtual_regs): ...new function.
	(pass_leaf_regs): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_leaf_regs): ...new pass_data instance and...
	(make_pass_leaf_regs): ...new function.
	(pass_thread_prologue_and_epilogue): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_thread_prologue_and_epilogue): ...new pass_data instance
	and...
	(make_pass_thread_prologue_and_epilogue): ...new function.
	(pass_match_asm_constraints): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_match_asm_constraints): ...new pass_data instance and...
	(make_pass_match_asm_constraints): ...new function.
	* fwprop.c (pass_rtl_fwprop): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_rtl_fwprop): ...new pass_data instance and...
	(make_pass_rtl_fwprop): ...new function.
	(pass_rtl_fwprop_addr): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_rtl_fwprop_addr): ...new pass_data instance and...
	(make_pass_rtl_fwprop_addr): ...new function.
	* gcse.c (pass_rtl_pre): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_rtl_pre): ...new pass_data instance and...
	(make_pass_rtl_pre): ...new function.
	(pass_rtl_hoist): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_rtl_hoist): ...new pass_data instance and...
	(make_pass_rtl_hoist): ...new function.
	* gimple-low.c (pass_lower_cf): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_lower_cf): ...new pass_data instance and...
	(make_pass_lower_cf): ...new function.
	* gimple-ssa-strength-reduction.c (pass_strength_reduction): Convert
	from a global struct to a subclass of gimple_opt_pass along with...
	(pass_data_strength_reduction): ...new pass_data instance and...
	(make_pass_strength_reduction): ...new function.
	* ifcvt.c (pass_rtl_ifcvt): Convert from a global struct to a subclass
	of rtl_opt_pass along with...
	(pass_data_rtl_ifcvt): ...new pass_data instance and...
	(make_pass_rtl_ifcvt): ...new function.
	(pass_if_after_combine): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_if_after_combine): ...new pass_data instance and...
	(make_pass_if_after_combine): ...new function.
	(pass_if_after_reload): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_if_after_reload): ...new pass_data instance and...
	(make_pass_if_after_reload): ...new function.
	* init-regs.c (pass_initialize_regs): Convert from a global struct to
	a subclass of rtl_opt_pass along with...
	(pass_data_initialize_regs): ...new pass_data instance and...
	(make_pass_initialize_regs): ...new function.
	* ipa-cp.c (pass_ipa_cp): Convert from a global struct to a subclass
	of ipa_opt_pass_d along with...
	(pass_data_ipa_cp): ...new pass_data instance and...
	(make_pass_ipa_cp): ...new function.
	* ipa-inline-analysis.c (pass_inline_parameters): Convert from a
	global struct to a subclass of gimple_opt_pass along with...
	(pass_data_inline_parameters): ...new pass_data instance and...
	(make_pass_inline_parameters): ...new function.
	* ipa-inline.c (pass_early_inline): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_early_inline): ...new pass_data instance and...
	(make_pass_early_inline): ...new function.
	(pass_ipa_inline): Convert from a global struct to a subclass of
	ipa_opt_pass_d along with...
	(pass_data_ipa_inline): ...new pass_data instance and...
	(make_pass_ipa_inline): ...new function.
	* ipa-pure-const.c (pass_local_pure_const): Convert from a global
	struct to a subclass of gimple_opt_pass along with...
	(pass_data_local_pure_const): ...new pass_data instance and...
	(make_pass_local_pure_const): ...new function.
	(pass_ipa_pure_const): Convert from a global struct to a subclass of
	ipa_opt_pass_d along with...
	(pass_data_ipa_pure_const): ...new pass_data instance and...
	(make_pass_ipa_pure_const): ...new function.
	* ipa-reference.c (pass_ipa_reference): Convert from a global struct
	to a subclass of ipa_opt_pass_d along with...
	(pass_data_ipa_reference): ...new pass_data instance and...
	(make_pass_ipa_reference): ...new function.
	* ipa-split.c (pass_split_functions): Convert from a global struct to
	a subclass of gimple_opt_pass along with...
	(pass_data_split_functions): ...new pass_data instance and...
	(make_pass_split_functions): ...new function.
	(pass_feedback_split_functions): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_feedback_split_functions): ...new pass_data instance and...
	(make_pass_feedback_split_functions): ...new function.
	* ipa.c (pass_ipa_function_and_variable_visibility): Convert from a
	global struct to a subclass of simple_ipa_opt_pass along with...
	(pass_data_ipa_function_and_variable_visibility): ...new pass_data
	instance and...
	(make_pass_ipa_function_and_variable_visibility): ...new function.
	(pass_ipa_free_inline_summary): Convert from a global struct to a
	subclass of simple_ipa_opt_pass along with...
	(pass_data_ipa_free_inline_summary): ...new pass_data instance and...
	(make_pass_ipa_free_inline_summary): ...new function.
	(pass_ipa_whole_program_visibility): Convert from a global struct to a
	subclass of ipa_opt_pass_d along with...
	(pass_data_ipa_whole_program_visibility): ...new pass_data instance
	and...
	(make_pass_ipa_whole_program_visibility): ...new function.
	(pass_ipa_profile): Convert from a global struct to a subclass of
	ipa_opt_pass_d along with...
	(pass_data_ipa_profile): ...new pass_data instance and...
	(make_pass_ipa_profile): ...new function.
	(pass_ipa_cdtor_merge): Convert from a global struct to a subclass of
	ipa_opt_pass_d along with...
	(pass_data_ipa_cdtor_merge): ...new pass_data instance and...
	(make_pass_ipa_cdtor_merge): ...new function.
	* ira.c (pass_ira): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_ira): ...new pass_data instance and...
	(make_pass_ira): ...new function.
	(pass_reload): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_reload): ...new pass_data instance and...
	(make_pass_reload): ...new function.
	* jump.c (pass_cleanup_barriers): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_cleanup_barriers): ...new pass_data instance and...
	(make_pass_cleanup_barriers): ...new function.
	* loop-init.c (pass_loop2): Convert from a global struct to a subclass
	of rtl_opt_pass along with...
	(pass_data_loop2): ...new pass_data instance and...
	(make_pass_loop2): ...new function.
	(pass_rtl_loop_init): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_rtl_loop_init): ...new pass_data instance and...
	(make_pass_rtl_loop_init): ...new function.
	(pass_rtl_loop_done): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_rtl_loop_done): ...new pass_data instance and...
	(make_pass_rtl_loop_done): ...new function.
	(pass_rtl_move_loop_invariants): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_rtl_move_loop_invariants): ...new pass_data instance and...
	(make_pass_rtl_move_loop_invariants): ...new function.
	(pass_rtl_unswitch): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_rtl_unswitch): ...new pass_data instance and...
	(make_pass_rtl_unswitch): ...new function.
	(pass_rtl_unroll_and_peel_loops): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_rtl_unroll_and_peel_loops): ...new pass_data instance
	and...
	(make_pass_rtl_unroll_and_peel_loops): ...new function.
	(pass_rtl_doloop): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_rtl_doloop): ...new pass_data instance and...
	(make_pass_rtl_doloop): ...new function.
	* lower-subreg.c (pass_lower_subreg): Convert from a global struct to
	a subclass of rtl_opt_pass along with...
	(pass_data_lower_subreg): ...new pass_data instance and...
	(make_pass_lower_subreg): ...new function.
	(pass_lower_subreg2): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_lower_subreg2): ...new pass_data instance and...
	(make_pass_lower_subreg2): ...new function.
	* lto-streamer-out.c (pass_ipa_lto_gimple_out): Convert from a global
	struct to a subclass of ipa_opt_pass_d along with...
	(pass_data_ipa_lto_gimple_out): ...new pass_data instance and...
	(make_pass_ipa_lto_gimple_out): ...new function.
	(pass_ipa_lto_finish_out): Convert from a global struct to a subclass
	of ipa_opt_pass_d along with...
	(pass_data_ipa_lto_finish_out): ...new pass_data instance and...
	(make_pass_ipa_lto_finish_out): ...new function.
	* mode-switching.c (pass_mode_switching): Convert from a global struct
	to a subclass of rtl_opt_pass along with...
	(pass_data_mode_switching): ...new pass_data instance and...
	(make_pass_mode_switching): ...new function.
	* modulo-sched.c (pass_sms): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_sms): ...new pass_data instance and...
	(make_pass_sms): ...new function.
	* omp-low.c (pass_expand_omp): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_expand_omp): ...new pass_data instance and...
	(make_pass_expand_omp): ...new function.
	(pass_lower_omp): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_lower_omp): ...new pass_data instance and...
	(make_pass_lower_omp): ...new function.
	(pass_diagnose_omp_blocks): Convert from a global struct to a subclass
	of gimple_opt_pass along with...
	(pass_data_diagnose_omp_blocks): ...new pass_data instance and...
	(make_pass_diagnose_omp_blocks): ...new function.
	* passes.c (pass_early_local_passes): Convert from a global struct to
	a subclass of simple_ipa_opt_pass along with...
	(pass_data_early_local_passes): ...new pass_data instance and...
	(make_pass_early_local_passes): ...new function.
	(pass_all_early_optimizations): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_all_early_optimizations): ...new pass_data instance and...
	(make_pass_all_early_optimizations): ...new function.
	(pass_all_optimizations): Convert from a global struct to a subclass
	of gimple_opt_pass along with...
	(pass_data_all_optimizations): ...new pass_data instance and...
	(make_pass_all_optimizations): ...new function.
	(pass_all_optimizations_g): Convert from a global struct to a subclass
	of gimple_opt_pass along with...
	(pass_data_all_optimizations_g): ...new pass_data instance and...
	(make_pass_all_optimizations_g): ...new function.
	(pass_rest_of_compilation): Convert from a global struct to a subclass
	of rtl_opt_pass along with...
	(pass_data_rest_of_compilation): ...new pass_data instance and...
	(make_pass_rest_of_compilation): ...new function.
	(pass_postreload): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_postreload): ...new pass_data instance and...
	(make_pass_postreload): ...new function.
	* postreload-gcse.c (pass_gcse2): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_gcse2): ...new pass_data instance and...
	(make_pass_gcse2): ...new function.
	* postreload.c (pass_postreload_cse): Convert from a global struct to
	a subclass of rtl_opt_pass along with...
	(pass_data_postreload_cse): ...new pass_data instance and...
	(make_pass_postreload_cse): ...new function.
	* predict.c (pass_profile): Convert from a global struct to a subclass
	of gimple_opt_pass along with...
	(pass_data_profile): ...new pass_data instance and...
	(make_pass_profile): ...new function.
	(pass_strip_predict_hints): Convert from a global struct to a subclass
	of gimple_opt_pass along with...
	(pass_data_strip_predict_hints): ...new pass_data instance and...
	(make_pass_strip_predict_hints): ...new function.
	* recog.c (pass_peephole2): Convert from a global struct to a subclass
	of rtl_opt_pass along with...
	(pass_data_peephole2): ...new pass_data instance and...
	(make_pass_peephole2): ...new function.
	(pass_split_all_insns): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_split_all_insns): ...new pass_data instance and...
	(make_pass_split_all_insns): ...new function.
	(pass_split_after_reload): Convert from a global struct to a subclass
	of rtl_opt_pass along with...
	(pass_data_split_after_reload): ...new pass_data instance and...
	(make_pass_split_after_reload): ...new function.
	(pass_split_before_regstack): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_split_before_regstack): ...new pass_data instance and...
	(make_pass_split_before_regstack): ...new function.
	(pass_split_before_sched2): Convert from a global struct to a subclass
	of rtl_opt_pass along with...
	(pass_data_split_before_sched2): ...new pass_data instance and...
	(make_pass_split_before_sched2): ...new function.
	(pass_split_for_shorten_branches): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_split_for_shorten_branches): ...new pass_data instance
	and...
	(make_pass_split_for_shorten_branches): ...new function.
	* ree.c (pass_ree): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_ree): ...new pass_data instance and...
	(make_pass_ree): ...new function.
	* reg-stack.c (pass_stack_regs): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_stack_regs): ...new pass_data instance and...
	(make_pass_stack_regs): ...new function.
	(pass_stack_regs_run): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_stack_regs_run): ...new pass_data instance and...
	(make_pass_stack_regs_run): ...new function.
	* regcprop.c (pass_cprop_hardreg): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_cprop_hardreg): ...new pass_data instance and...
	(make_pass_cprop_hardreg): ...new function.
	* reginfo.c (pass_reginfo_init): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_reginfo_init): ...new pass_data instance and...
	(make_pass_reginfo_init): ...new function.
	* regmove.c (pass_regmove): Convert from a global struct to a subclass
	of rtl_opt_pass along with...
	(pass_data_regmove): ...new pass_data instance and...
	(make_pass_regmove): ...new function.
	* regrename.c (pass_regrename): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_regrename): ...new pass_data instance and...
	(make_pass_regrename): ...new function.
	* reorg.c (pass_delay_slots): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_delay_slots): ...new pass_data instance and...
	(make_pass_delay_slots): ...new function.
	(pass_machine_reorg): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_machine_reorg): ...new pass_data instance and...
	(make_pass_machine_reorg): ...new function.
	* sched-rgn.c (pass_sched): Convert from a global struct to a subclass
	of rtl_opt_pass along with...
	(pass_data_sched): ...new pass_data instance and...
	(make_pass_sched): ...new function.
	(pass_sched2): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_sched2): ...new pass_data instance and...
	(make_pass_sched2): ...new function.
	* stack-ptr-mod.c (pass_stack_ptr_mod): Convert from a global struct
	to a subclass of rtl_opt_pass along with...
	(pass_data_stack_ptr_mod): ...new pass_data instance and...
	(make_pass_stack_ptr_mod): ...new function.
	* store-motion.c (pass_rtl_store_motion): Convert from a global struct
	to a subclass of rtl_opt_pass along with...
	(pass_data_rtl_store_motion): ...new pass_data instance and...
	(make_pass_rtl_store_motion): ...new function.
	* tracer.c (pass_tracer): Convert from a global struct to a subclass
	of gimple_opt_pass along with...
	(pass_data_tracer): ...new pass_data instance and...
	(make_pass_tracer): ...new function.
	* trans-mem.c (pass_diagnose_tm_blocks): Convert from a global struct
	to a subclass of gimple_opt_pass along with...
	(pass_data_diagnose_tm_blocks): ...new pass_data instance and...
	(make_pass_diagnose_tm_blocks): ...new function.
	(pass_lower_tm): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_lower_tm): ...new pass_data instance and...
	(make_pass_lower_tm): ...new function.
	(pass_tm_init): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_tm_init): ...new pass_data instance and...
	(make_pass_tm_init): ...new function.
	(pass_tm_mark): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_tm_mark): ...new pass_data instance and...
	(make_pass_tm_mark): ...new function.
	(pass_tm_edges): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_tm_edges): ...new pass_data instance and...
	(make_pass_tm_edges): ...new function.
	(pass_tm_memopt): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_tm_memopt): ...new pass_data instance and...
	(make_pass_tm_memopt): ...new function.
	(pass_ipa_tm): Convert from a global struct to a subclass of
	simple_ipa_opt_pass along with...
	(pass_data_ipa_tm): ...new pass_data instance and...
	(make_pass_ipa_tm): ...new function.
	* tree-call-cdce.c (pass_call_cdce): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_call_cdce): ...new pass_data instance and...
	(make_pass_call_cdce): ...new function.
	* tree-cfg.c (pass_build_cfg): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_build_cfg): ...new pass_data instance and...
	(make_pass_build_cfg): ...new function.
	(pass_split_crit_edges): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_split_crit_edges): ...new pass_data instance and...
	(make_pass_split_crit_edges): ...new function.
	(pass_warn_function_return): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_warn_function_return): ...new pass_data instance and...
	(make_pass_warn_function_return): ...new function.
	(pass_warn_function_noreturn): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_warn_function_noreturn): ...new pass_data instance and...
	(make_pass_warn_function_noreturn): ...new function.
	(pass_warn_unused_result): Convert from a global struct to a subclass
	of gimple_opt_pass along with...
	(pass_data_warn_unused_result): ...new pass_data instance and...
	(make_pass_warn_unused_result): ...new function.
	* tree-cfgcleanup.c (pass_merge_phi): Convert from a global struct to
	a subclass of gimple_opt_pass along with...
	(pass_data_merge_phi): ...new pass_data instance and...
	(make_pass_merge_phi): ...new function.
	* tree-complex.c (pass_lower_complex): Convert from a global struct to
	a subclass of gimple_opt_pass along with...
	(pass_data_lower_complex): ...new pass_data instance and...
	(make_pass_lower_complex): ...new function.
	(pass_lower_complex_O0): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_lower_complex_O0): ...new pass_data instance and...
	(make_pass_lower_complex_O0): ...new function.
	* tree-eh.c (pass_lower_eh): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_lower_eh): ...new pass_data instance and...
	(make_pass_lower_eh): ...new function.
	(pass_refactor_eh): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_refactor_eh): ...new pass_data instance and...
	(make_pass_refactor_eh): ...new function.
	(pass_lower_resx): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_lower_resx): ...new pass_data instance and...
	(make_pass_lower_resx): ...new function.
	(pass_lower_eh_dispatch): Convert from a global struct to a subclass
	of gimple_opt_pass along with...
	(pass_data_lower_eh_dispatch): ...new pass_data instance and...
	(make_pass_lower_eh_dispatch): ...new function.
	(pass_cleanup_eh): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_cleanup_eh): ...new pass_data instance and...
	(make_pass_cleanup_eh): ...new function.
	* tree-emutls.c (pass_ipa_lower_emutls): Convert from a global struct
	to a subclass of simple_ipa_opt_pass along with...
	(pass_data_ipa_lower_emutls): ...new pass_data instance and...
	(make_pass_ipa_lower_emutls): ...new function.
	* tree-if-conv.c (pass_if_conversion): Convert from a global struct to
	a subclass of gimple_opt_pass along with...
	(pass_data_if_conversion): ...new pass_data instance and...
	(make_pass_if_conversion): ...new function.
	* tree-into-ssa.c (pass_build_ssa): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_build_ssa): ...new pass_data instance and...
	(make_pass_build_ssa): ...new function.
	* tree-loop-distribution.c (pass_loop_distribution): Convert from a
	global struct to a subclass of gimple_opt_pass along with...
	(pass_data_loop_distribution): ...new pass_data instance and...
	(make_pass_loop_distribution): ...new function.
	* tree-mudflap.c (pass_mudflap_1): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_mudflap_1): ...new pass_data instance and...
	(make_pass_mudflap_1): ...new function.
	(pass_mudflap_2): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_mudflap_2): ...new pass_data instance and...
	(make_pass_mudflap_2): ...new function.
	* tree-nomudflap.c (pass_mudflap_1): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_mudflap_1): ...new pass_data instance and...
	(make_pass_mudflap_1): ...new function.
	(pass_mudflap_2): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_mudflap_2): ...new pass_data instance and...
	(make_pass_mudflap_2): ...new function.
	* tree-nrv.c (pass_nrv): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_nrv): ...new pass_data instance and...
	(make_pass_nrv): ...new function.
	(pass_return_slot): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_return_slot): ...new pass_data instance and...
	(make_pass_return_slot): ...new function.
	* tree-object-size.c (pass_object_sizes): Convert from a global struct
	to a subclass of gimple_opt_pass along with...
	(pass_data_object_sizes): ...new pass_data instance and...
	(make_pass_object_sizes): ...new function.
	* tree-optimize.c (pass_cleanup_cfg_post_optimizing): Convert from a
	global struct to a subclass of gimple_opt_pass along with...
	(pass_data_cleanup_cfg_post_optimizing): ...new pass_data instance
	and...
	(make_pass_cleanup_cfg_post_optimizing): ...new function.
	(pass_fixup_cfg): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_fixup_cfg): ...new pass_data instance and...
	(make_pass_fixup_cfg): ...new function.
	* tree-pass.h (pass_mudflap_1): Replace declaration with that of...
	(make_pass_mudflap_1): ...new function.
	(pass_mudflap_2): Replace declaration with that of...
	(make_pass_mudflap_2): ...new function.
	(pass_asan): Replace declaration with that of...
	(make_pass_asan): ...new function.
	(pass_asan_O0): Replace declaration with that of...
	(make_pass_asan_O0): ...new function.
	(pass_tsan): Replace declaration with that of...
	(make_pass_tsan): ...new function.
	(pass_tsan_O0): Replace declaration with that of...
	(make_pass_tsan_O0): ...new function.
	(pass_lower_cf): Replace declaration with that of...
	(make_pass_lower_cf): ...new function.
	(pass_refactor_eh): Replace declaration with that of...
	(make_pass_refactor_eh): ...new function.
	(pass_lower_eh): Replace declaration with that of...
	(make_pass_lower_eh): ...new function.
	(pass_lower_eh_dispatch): Replace declaration with that of...
	(make_pass_lower_eh_dispatch): ...new function.
	(pass_lower_resx): Replace declaration with that of...
	(make_pass_lower_resx): ...new function.
	(pass_build_cfg): Replace declaration with that of...
	(make_pass_build_cfg): ...new function.
	(pass_early_tree_profile): Replace declaration with that of...
	(make_pass_early_tree_profile): ...new function.
	(pass_cleanup_eh): Replace declaration with that of...
	(make_pass_cleanup_eh): ...new function.
	(pass_sra): Replace declaration with that of...
	(make_pass_sra): ...new function.
	(pass_sra_early): Replace declaration with that of...
	(make_pass_sra_early): ...new function.
	(pass_early_ipa_sra): Replace declaration with that of...
	(make_pass_early_ipa_sra): ...new function.
	(pass_tail_recursion): Replace declaration with that of...
	(make_pass_tail_recursion): ...new function.
	(pass_tail_calls): Replace declaration with that of...
	(make_pass_tail_calls): ...new function.
	(pass_tree_loop): Replace declaration with that of...
	(make_pass_tree_loop): ...new function.
	(pass_tree_loop_init): Replace declaration with that of...
	(make_pass_tree_loop_init): ...new function.
	(pass_lim): Replace declaration with that of...
	(make_pass_lim): ...new function.
	(pass_tree_unswitch): Replace declaration with that of...
	(make_pass_tree_unswitch): ...new function.
	(pass_predcom): Replace declaration with that of...
	(make_pass_predcom): ...new function.
	(pass_iv_canon): Replace declaration with that of...
	(make_pass_iv_canon): ...new function.
	(pass_scev_cprop): Replace declaration with that of...
	(make_pass_scev_cprop): ...new function.
	(pass_empty_loop): Replace declaration with that of...
	(make_pass_empty_loop): ...new function.
	(pass_record_bounds): Replace declaration with that of...
	(make_pass_record_bounds): ...new function.
	(pass_graphite): Replace declaration with that of...
	(make_pass_graphite): ...new function.
	(pass_graphite_transforms): Replace declaration with that of...
	(make_pass_graphite_transforms): ...new function.
	(pass_if_conversion): Replace declaration with that of...
	(make_pass_if_conversion): ...new function.
	(pass_loop_distribution): Replace declaration with that of...
	(make_pass_loop_distribution): ...new function.
	(pass_vectorize): Replace declaration with that of...
	(make_pass_vectorize): ...new function.
	(pass_slp_vectorize): Replace declaration with that of...
	(make_pass_slp_vectorize): ...new function.
	(pass_complete_unroll): Replace declaration with that of...
	(make_pass_complete_unroll): ...new function.
	(pass_complete_unrolli): Replace declaration with that of...
	(make_pass_complete_unrolli): ...new function.
	(pass_parallelize_loops): Replace declaration with that of...
	(make_pass_parallelize_loops): ...new function.
	(pass_loop_prefetch): Replace declaration with that of...
	(make_pass_loop_prefetch): ...new function.
	(pass_iv_optimize): Replace declaration with that of...
	(make_pass_iv_optimize): ...new function.
	(pass_tree_loop_done): Replace declaration with that of...
	(make_pass_tree_loop_done): ...new function.
	(pass_ch): Replace declaration with that of...
	(make_pass_ch): ...new function.
	(pass_ccp): Replace declaration with that of...
	(make_pass_ccp): ...new function.
	(pass_phi_only_cprop): Replace declaration with that of...
	(make_pass_phi_only_cprop): ...new function.
	(pass_build_ssa): Replace declaration with that of...
	(make_pass_build_ssa): ...new function.
	(pass_build_alias): Replace declaration with that of...
	(make_pass_build_alias): ...new function.
	(pass_build_ealias): Replace declaration with that of...
	(make_pass_build_ealias): ...new function.
	(pass_dominator): Replace declaration with that of...
	(make_pass_dominator): ...new function.
	(pass_dce): Replace declaration with that of...
	(make_pass_dce): ...new function.
	(pass_dce_loop): Replace declaration with that of...
	(make_pass_dce_loop): ...new function.
	(pass_cd_dce): Replace declaration with that of...
	(make_pass_cd_dce): ...new function.
	(pass_call_cdce): Replace declaration with that of...
	(make_pass_call_cdce): ...new function.
	(pass_merge_phi): Replace declaration with that of...
	(make_pass_merge_phi): ...new function.
	(pass_split_crit_edges): Replace declaration with that of...
	(make_pass_split_crit_edges): ...new function.
	(pass_pre): Replace declaration with that of...
	(make_pass_pre): ...new function.
	(pass_profile): Replace declaration with that of...
	(make_pass_profile): ...new function.
	(pass_strip_predict_hints): Replace declaration with that of...
	(make_pass_strip_predict_hints): ...new function.
	(pass_lower_complex_O0): Replace declaration with that of...
	(make_pass_lower_complex_O0): ...new function.
	(pass_lower_complex): Replace declaration with that of...
	(make_pass_lower_complex): ...new function.
	(pass_lower_vector): Replace declaration with that of...
	(make_pass_lower_vector): ...new function.
	(pass_lower_vector_ssa): Replace declaration with that of...
	(make_pass_lower_vector_ssa): ...new function.
	(pass_lower_omp): Replace declaration with that of...
	(make_pass_lower_omp): ...new function.
	(pass_diagnose_omp_blocks): Replace declaration with that of...
	(make_pass_diagnose_omp_blocks): ...new function.
	(pass_expand_omp): Replace declaration with that of...
	(make_pass_expand_omp): ...new function.
	(pass_expand_omp_ssa): Replace declaration with that of...
	(make_pass_expand_omp_ssa): ...new function.
	(pass_object_sizes): Replace declaration with that of...
	(make_pass_object_sizes): ...new function.
	(pass_strlen): Replace declaration with that of...
	(make_pass_strlen): ...new function.
	(pass_fold_builtins): Replace declaration with that of...
	(make_pass_fold_builtins): ...new function.
	(pass_stdarg): Replace declaration with that of...
	(make_pass_stdarg): ...new function.
	(pass_early_warn_uninitialized): Replace declaration with that of...
	(make_pass_early_warn_uninitialized): ...new function.
	(pass_late_warn_uninitialized): Replace declaration with that of...
	(make_pass_late_warn_uninitialized): ...new function.
	(pass_cse_reciprocals): Replace declaration with that of...
	(make_pass_cse_reciprocals): ...new function.
	(pass_cse_sincos): Replace declaration with that of...
	(make_pass_cse_sincos): ...new function.
	(pass_optimize_bswap): Replace declaration with that of...
	(make_pass_optimize_bswap): ...new function.
	(pass_optimize_widening_mul): Replace declaration with that of...
	(make_pass_optimize_widening_mul): ...new function.
	(pass_warn_function_return): Replace declaration with that of...
	(make_pass_warn_function_return): ...new function.
	(pass_warn_function_noreturn): Replace declaration with that of...
	(make_pass_warn_function_noreturn): ...new function.
	(pass_cselim): Replace declaration with that of...
	(make_pass_cselim): ...new function.
	(pass_phiopt): Replace declaration with that of...
	(make_pass_phiopt): ...new function.
	(pass_forwprop): Replace declaration with that of...
	(make_pass_forwprop): ...new function.
	(pass_phiprop): Replace declaration with that of...
	(make_pass_phiprop): ...new function.
	(pass_tree_ifcombine): Replace declaration with that of...
	(make_pass_tree_ifcombine): ...new function.
	(pass_dse): Replace declaration with that of...
	(make_pass_dse): ...new function.
	(pass_nrv): Replace declaration with that of...
	(make_pass_nrv): ...new function.
	(pass_rename_ssa_copies): Replace declaration with that of...
	(make_pass_rename_ssa_copies): ...new function.
	(pass_sink_code): Replace declaration with that of...
	(make_pass_sink_code): ...new function.
	(pass_fre): Replace declaration with that of...
	(make_pass_fre): ...new function.
	(pass_check_data_deps): Replace declaration with that of...
	(make_pass_check_data_deps): ...new function.
	(pass_copy_prop): Replace declaration with that of...
	(make_pass_copy_prop): ...new function.
	(pass_vrp): Replace declaration with that of...
	(make_pass_vrp): ...new function.
	(pass_uncprop): Replace declaration with that of...
	(make_pass_uncprop): ...new function.
	(pass_return_slot): Replace declaration with that of...
	(make_pass_return_slot): ...new function.
	(pass_reassoc): Replace declaration with that of...
	(make_pass_reassoc): ...new function.
	(pass_rebuild_cgraph_edges): Replace declaration with that of...
	(make_pass_rebuild_cgraph_edges): ...new function.
	(pass_remove_cgraph_callee_edges): Replace declaration with that of...
	(make_pass_remove_cgraph_callee_edges): ...new function.
	(pass_build_cgraph_edges): Replace declaration with that of...
	(make_pass_build_cgraph_edges): ...new function.
	(pass_local_pure_const): Replace declaration with that of...
	(make_pass_local_pure_const): ...new function.
	(pass_tracer): Replace declaration with that of...
	(make_pass_tracer): ...new function.
	(pass_warn_unused_result): Replace declaration with that of...
	(make_pass_warn_unused_result): ...new function.
	(pass_diagnose_tm_blocks): Replace declaration with that of...
	(make_pass_diagnose_tm_blocks): ...new function.
	(pass_lower_tm): Replace declaration with that of...
	(make_pass_lower_tm): ...new function.
	(pass_tm_init): Replace declaration with that of...
	(make_pass_tm_init): ...new function.
	(pass_tm_mark): Replace declaration with that of...
	(make_pass_tm_mark): ...new function.
	(pass_tm_memopt): Replace declaration with that of...
	(make_pass_tm_memopt): ...new function.
	(pass_tm_edges): Replace declaration with that of...
	(make_pass_tm_edges): ...new function.
	(pass_split_functions): Replace declaration with that of...
	(make_pass_split_functions): ...new function.
	(pass_feedback_split_functions): Replace declaration with that of...
	(make_pass_feedback_split_functions): ...new function.
	(pass_strength_reduction): Replace declaration with that of...
	(make_pass_strength_reduction): ...new function.
	(pass_ipa_lower_emutls): Replace declaration with that of...
	(make_pass_ipa_lower_emutls): ...new function.
	(pass_ipa_function_and_variable_visibility): Replace declaration with
	that of...
	(make_pass_ipa_function_and_variable_visibility): ...new function.
	(pass_ipa_tree_profile): Replace declaration with that of...
	(make_pass_ipa_tree_profile): ...new function.
	(pass_early_local_passes): Replace declaration with that of...
	(make_pass_early_local_passes): ...new function.
	(pass_ipa_whole_program_visibility): Replace declaration with that
	of...
	(make_pass_ipa_whole_program_visibility): ...new function.
	(pass_ipa_lto_gimple_out): Replace declaration with that of...
	(make_pass_ipa_lto_gimple_out): ...new function.
	(pass_ipa_increase_alignment): Replace declaration with that of...
	(make_pass_ipa_increase_alignment): ...new function.
	(pass_ipa_inline): Replace declaration with that of...
	(make_pass_ipa_inline): ...new function.
	(pass_ipa_free_lang_data): Replace declaration with that of...
	(make_pass_ipa_free_lang_data): ...new function.
	(pass_ipa_free_inline_summary): Replace declaration with that of...
	(make_pass_ipa_free_inline_summary): ...new function.
	(pass_ipa_cp): Replace declaration with that of...
	(make_pass_ipa_cp): ...new function.
	(pass_ipa_reference): Replace declaration with that of...
	(make_pass_ipa_reference): ...new function.
	(pass_ipa_pure_const): Replace declaration with that of...
	(make_pass_ipa_pure_const): ...new function.
	(pass_ipa_pta): Replace declaration with that of...
	(make_pass_ipa_pta): ...new function.
	(pass_ipa_lto_finish_out): Replace declaration with that of...
	(make_pass_ipa_lto_finish_out): ...new function.
	(pass_ipa_tm): Replace declaration with that of...
	(make_pass_ipa_tm): ...new function.
	(pass_ipa_profile): Replace declaration with that of...
	(make_pass_ipa_profile): ...new function.
	(pass_ipa_cdtor_merge): Replace declaration with that of...
	(make_pass_ipa_cdtor_merge): ...new function.
	(pass_cleanup_cfg_post_optimizing): Replace declaration with that
	of...
	(make_pass_cleanup_cfg_post_optimizing): ...new function.
	(pass_init_datastructures): Replace declaration with that of...
	(make_pass_init_datastructures): ...new function.
	(pass_fixup_cfg): Replace declaration with that of...
	(make_pass_fixup_cfg): ...new function.
	(pass_expand): Replace declaration with that of...
	(make_pass_expand): ...new function.
	(pass_instantiate_virtual_regs): Replace declaration with that of...
	(make_pass_instantiate_virtual_regs): ...new function.
	(pass_rtl_fwprop): Replace declaration with that of...
	(make_pass_rtl_fwprop): ...new function.
	(pass_rtl_fwprop_addr): Replace declaration with that of...
	(make_pass_rtl_fwprop_addr): ...new function.
	(pass_jump): Replace declaration with that of...
	(make_pass_jump): ...new function.
	(pass_jump2): Replace declaration with that of...
	(make_pass_jump2): ...new function.
	(pass_lower_subreg): Replace declaration with that of...
	(make_pass_lower_subreg): ...new function.
	(pass_cse): Replace declaration with that of...
	(make_pass_cse): ...new function.
	(pass_fast_rtl_dce): Replace declaration with that of...
	(make_pass_fast_rtl_dce): ...new function.
	(pass_ud_rtl_dce): Replace declaration with that of...
	(make_pass_ud_rtl_dce): ...new function.
	(pass_rtl_dce): Replace declaration with that of...
	(make_pass_rtl_dce): ...new function.
	(pass_rtl_dse1): Replace declaration with that of...
	(make_pass_rtl_dse1): ...new function.
	(pass_rtl_dse2): Replace declaration with that of...
	(make_pass_rtl_dse2): ...new function.
	(pass_rtl_dse3): Replace declaration with that of...
	(make_pass_rtl_dse3): ...new function.
	(pass_rtl_cprop): Replace declaration with that of...
	(make_pass_rtl_cprop): ...new function.
	(pass_rtl_pre): Replace declaration with that of...
	(make_pass_rtl_pre): ...new function.
	(pass_rtl_hoist): Replace declaration with that of...
	(make_pass_rtl_hoist): ...new function.
	(pass_rtl_store_motion): Replace declaration with that of...
	(make_pass_rtl_store_motion): ...new function.
	(pass_cse_after_global_opts): Replace declaration with that of...
	(make_pass_cse_after_global_opts): ...new function.
	(pass_rtl_ifcvt): Replace declaration with that of...
	(make_pass_rtl_ifcvt): ...new function.
	(pass_into_cfg_layout_mode): Replace declaration with that of...
	(make_pass_into_cfg_layout_mode): ...new function.
	(pass_outof_cfg_layout_mode): Replace declaration with that of...
	(make_pass_outof_cfg_layout_mode): ...new function.
	(pass_loop2): Replace declaration with that of...
	(make_pass_loop2): ...new function.
	(pass_rtl_loop_init): Replace declaration with that of...
	(make_pass_rtl_loop_init): ...new function.
	(pass_rtl_move_loop_invariants): Replace declaration with that of...
	(make_pass_rtl_move_loop_invariants): ...new function.
	(pass_rtl_unswitch): Replace declaration with that of...
	(make_pass_rtl_unswitch): ...new function.
	(pass_rtl_unroll_and_peel_loops): Replace declaration with that of...
	(make_pass_rtl_unroll_and_peel_loops): ...new function.
	(pass_rtl_doloop): Replace declaration with that of...
	(make_pass_rtl_doloop): ...new function.
	(pass_rtl_loop_done): Replace declaration with that of...
	(make_pass_rtl_loop_done): ...new function.
	(pass_web): Replace declaration with that of...
	(make_pass_web): ...new function.
	(pass_cse2): Replace declaration with that of...
	(make_pass_cse2): ...new function.
	(pass_df_initialize_opt): Replace declaration with that of...
	(make_pass_df_initialize_opt): ...new function.
	(pass_df_initialize_no_opt): Replace declaration with that of...
	(make_pass_df_initialize_no_opt): ...new function.
	(pass_reginfo_init): Replace declaration with that of...
	(make_pass_reginfo_init): ...new function.
	(pass_inc_dec): Replace declaration with that of...
	(make_pass_inc_dec): ...new function.
	(pass_stack_ptr_mod): Replace declaration with that of...
	(make_pass_stack_ptr_mod): ...new function.
	(pass_initialize_regs): Replace declaration with that of...
	(make_pass_initialize_regs): ...new function.
	(pass_combine): Replace declaration with that of...
	(make_pass_combine): ...new function.
	(pass_if_after_combine): Replace declaration with that of...
	(make_pass_if_after_combine): ...new function.
	(pass_ree): Replace declaration with that of...
	(make_pass_ree): ...new function.
	(pass_partition_blocks): Replace declaration with that of...
	(make_pass_partition_blocks): ...new function.
	(pass_match_asm_constraints): Replace declaration with that of...
	(make_pass_match_asm_constraints): ...new function.
	(pass_regmove): Replace declaration with that of...
	(make_pass_regmove): ...new function.
	(pass_split_all_insns): Replace declaration with that of...
	(make_pass_split_all_insns): ...new function.
	(pass_fast_rtl_byte_dce): Replace declaration with that of...
	(make_pass_fast_rtl_byte_dce): ...new function.
	(pass_lower_subreg2): Replace declaration with that of...
	(make_pass_lower_subreg2): ...new function.
	(pass_mode_switching): Replace declaration with that of...
	(make_pass_mode_switching): ...new function.
	(pass_sms): Replace declaration with that of...
	(make_pass_sms): ...new function.
	(pass_sched): Replace declaration with that of...
	(make_pass_sched): ...new function.
	(pass_ira): Replace declaration with that of...
	(make_pass_ira): ...new function.
	(pass_reload): Replace declaration with that of...
	(make_pass_reload): ...new function.
	(pass_clean_state): Replace declaration with that of...
	(make_pass_clean_state): ...new function.
	(pass_branch_prob): Replace declaration with that of...
	(make_pass_branch_prob): ...new function.
	(pass_value_profile_transformations): Replace declaration with that
	of...
	(make_pass_value_profile_transformations): ...new function.
	(pass_postreload_cse): Replace declaration with that of...
	(make_pass_postreload_cse): ...new function.
	(pass_gcse2): Replace declaration with that of...
	(make_pass_gcse2): ...new function.
	(pass_split_after_reload): Replace declaration with that of...
	(make_pass_split_after_reload): ...new function.
	(pass_branch_target_load_optimize1): Replace declaration with that
	of...
	(make_pass_branch_target_load_optimize1): ...new function.
	(pass_thread_prologue_and_epilogue): Replace declaration with that
	of...
	(make_pass_thread_prologue_and_epilogue): ...new function.
	(pass_stack_adjustments): Replace declaration with that of...
	(make_pass_stack_adjustments): ...new function.
	(pass_peephole2): Replace declaration with that of...
	(make_pass_peephole2): ...new function.
	(pass_if_after_reload): Replace declaration with that of...
	(make_pass_if_after_reload): ...new function.
	(pass_regrename): Replace declaration with that of...
	(make_pass_regrename): ...new function.
	(pass_cprop_hardreg): Replace declaration with that of...
	(make_pass_cprop_hardreg): ...new function.
	(pass_reorder_blocks): Replace declaration with that of...
	(make_pass_reorder_blocks): ...new function.
	(pass_branch_target_load_optimize2): Replace declaration with that
	of...
	(make_pass_branch_target_load_optimize2): ...new function.
	(pass_leaf_regs): Replace declaration with that of...
	(make_pass_leaf_regs): ...new function.
	(pass_split_before_sched2): Replace declaration with that of...
	(make_pass_split_before_sched2): ...new function.
	(pass_compare_elim_after_reload): Replace declaration with that of...
	(make_pass_compare_elim_after_reload): ...new function.
	(pass_sched2): Replace declaration with that of...
	(make_pass_sched2): ...new function.
	(pass_stack_regs): Replace declaration with that of...
	(make_pass_stack_regs): ...new function.
	(pass_stack_regs_run): Replace declaration with that of...
	(make_pass_stack_regs_run): ...new function.
	(pass_df_finish): Replace declaration with that of...
	(make_pass_df_finish): ...new function.
	(pass_compute_alignments): Replace declaration with that of...
	(make_pass_compute_alignments): ...new function.
	(pass_duplicate_computed_gotos): Replace declaration with that of...
	(make_pass_duplicate_computed_gotos): ...new function.
	(pass_variable_tracking): Replace declaration with that of...
	(make_pass_variable_tracking): ...new function.
	(pass_free_cfg): Replace declaration with that of...
	(make_pass_free_cfg): ...new function.
	(pass_machine_reorg): Replace declaration with that of...
	(make_pass_machine_reorg): ...new function.
	(pass_cleanup_barriers): Replace declaration with that of...
	(make_pass_cleanup_barriers): ...new function.
	(pass_delay_slots): Replace declaration with that of...
	(make_pass_delay_slots): ...new function.
	(pass_split_for_shorten_branches): Replace declaration with that of...
	(make_pass_split_for_shorten_branches): ...new function.
	(pass_split_before_regstack): Replace declaration with that of...
	(make_pass_split_before_regstack): ...new function.
	(pass_convert_to_eh_region_ranges): Replace declaration with that
	of...
	(make_pass_convert_to_eh_region_ranges): ...new function.
	(pass_shorten_branches): Replace declaration with that of...
	(make_pass_shorten_branches): ...new function.
	(pass_set_nothrow_function_flags): Replace declaration with that of...
	(make_pass_set_nothrow_function_flags): ...new function.
	(pass_dwarf2_frame): Replace declaration with that of...
	(make_pass_dwarf2_frame): ...new function.
	(pass_final): Replace declaration with that of...
	(make_pass_final): ...new function.
	(pass_rtl_seqabstr): Replace declaration with that of...
	(make_pass_rtl_seqabstr): ...new function.
	(pass_release_ssa_names): Replace declaration with that of...
	(make_pass_release_ssa_names): ...new function.
	(pass_early_inline): Replace declaration with that of...
	(make_pass_early_inline): ...new function.
	(pass_inline_parameters): Replace declaration with that of...
	(make_pass_inline_parameters): ...new function.
	(pass_update_address_taken): Replace declaration with that of...
	(make_pass_update_address_taken): ...new function.
	(pass_convert_switch): Replace declaration with that of...
	(make_pass_convert_switch): ...new function.
	* tree-profile.c (pass_ipa_tree_profile): Convert from a global struct
	to a subclass of simple_ipa_opt_pass along with...
	(pass_data_ipa_tree_profile): ...new pass_data instance and...
	(make_pass_ipa_tree_profile): ...new function.
	* tree-sra.c (pass_sra_early): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_sra_early): ...new pass_data instance and...
	(make_pass_sra_early): ...new function.
	(pass_sra): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_sra): ...new pass_data instance and...
	(make_pass_sra): ...new function.
	(pass_early_ipa_sra): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_early_ipa_sra): ...new pass_data instance and...
	(make_pass_early_ipa_sra): ...new function.
	* tree-ssa-ccp.c (pass_ccp): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_ccp): ...new pass_data instance and...
	(make_pass_ccp): ...new function.
	(pass_fold_builtins): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_fold_builtins): ...new pass_data instance and...
	(make_pass_fold_builtins): ...new function.
	* tree-ssa-copy.c (pass_copy_prop): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_copy_prop): ...new pass_data instance and...
	(make_pass_copy_prop): ...new function.
	* tree-ssa-copyrename.c (pass_rename_ssa_copies): Convert from a
	global struct to a subclass of gimple_opt_pass along with...
	(pass_data_rename_ssa_copies): ...new pass_data instance and...
	(make_pass_rename_ssa_copies): ...new function.
	* tree-ssa-dce.c (pass_dce): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_dce): ...new pass_data instance and...
	(make_pass_dce): ...new function.
	(pass_dce_loop): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_dce_loop): ...new pass_data instance and...
	(make_pass_dce_loop): ...new function.
	(pass_cd_dce): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_cd_dce): ...new pass_data instance and...
	(make_pass_cd_dce): ...new function.
	* tree-ssa-dom.c (pass_dominator): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_dominator): ...new pass_data instance and...
	(make_pass_dominator): ...new function.
	(pass_phi_only_cprop): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_phi_only_cprop): ...new pass_data instance and...
	(make_pass_phi_only_cprop): ...new function.
	* tree-ssa-dse.c (pass_dse): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_dse): ...new pass_data instance and...
	(make_pass_dse): ...new function.
	* tree-ssa-forwprop.c (pass_forwprop): Convert from a global struct to
	a subclass of gimple_opt_pass along with...
	(pass_data_forwprop): ...new pass_data instance and...
	(make_pass_forwprop): ...new function.
	* tree-ssa-ifcombine.c (pass_tree_ifcombine): Convert from a global
	struct to a subclass of gimple_opt_pass along with...
	(pass_data_tree_ifcombine): ...new pass_data instance and...
	(make_pass_tree_ifcombine): ...new function.
	* tree-ssa-loop-ch.c (pass_ch): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_ch): ...new pass_data instance and...
	(make_pass_ch): ...new function.
	* tree-ssa-loop.c (pass_tree_loop): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_tree_loop): ...new pass_data instance and...
	(make_pass_tree_loop): ...new function.
	(pass_tree_loop_init): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_tree_loop_init): ...new pass_data instance and...
	(make_pass_tree_loop_init): ...new function.
	(pass_lim): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_lim): ...new pass_data instance and...
	(make_pass_lim): ...new function.
	(pass_tree_unswitch): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_tree_unswitch): ...new pass_data instance and...
	(make_pass_tree_unswitch): ...new function.
	(pass_predcom): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_predcom): ...new pass_data instance and...
	(make_pass_predcom): ...new function.
	(pass_vectorize): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_vectorize): ...new pass_data instance and...
	(make_pass_vectorize): ...new function.
	(pass_graphite): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_graphite): ...new pass_data instance and...
	(make_pass_graphite): ...new function.
	(pass_graphite_transforms): Convert from a global struct to a subclass
	of gimple_opt_pass along with...
	(pass_data_graphite_transforms): ...new pass_data instance and...
	(make_pass_graphite_transforms): ...new function.
	(pass_check_data_deps): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_check_data_deps): ...new pass_data instance and...
	(make_pass_check_data_deps): ...new function.
	(pass_iv_canon): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_iv_canon): ...new pass_data instance and...
	(make_pass_iv_canon): ...new function.
	(pass_scev_cprop): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_scev_cprop): ...new pass_data instance and...
	(make_pass_scev_cprop): ...new function.
	(pass_record_bounds): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_record_bounds): ...new pass_data instance and...
	(make_pass_record_bounds): ...new function.
	(pass_complete_unroll): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_complete_unroll): ...new pass_data instance and...
	(make_pass_complete_unroll): ...new function.
	(pass_complete_unrolli): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_complete_unrolli): ...new pass_data instance and...
	(make_pass_complete_unrolli): ...new function.
	(pass_parallelize_loops): Convert from a global struct to a subclass
	of gimple_opt_pass along with...
	(pass_data_parallelize_loops): ...new pass_data instance and...
	(make_pass_parallelize_loops): ...new function.
	(pass_loop_prefetch): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_loop_prefetch): ...new pass_data instance and...
	(make_pass_loop_prefetch): ...new function.
	(pass_iv_optimize): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_iv_optimize): ...new pass_data instance and...
	(make_pass_iv_optimize): ...new function.
	(pass_tree_loop_done): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_tree_loop_done): ...new pass_data instance and...
	(make_pass_tree_loop_done): ...new function.
	* tree-ssa-math-opts.c (pass_cse_reciprocals): Convert from a global
	struct to a subclass of gimple_opt_pass along with...
	(pass_data_cse_reciprocals): ...new pass_data instance and...
	(make_pass_cse_reciprocals): ...new function.
	(pass_cse_sincos): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_cse_sincos): ...new pass_data instance and...
	(make_pass_cse_sincos): ...new function.
	(pass_optimize_bswap): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_optimize_bswap): ...new pass_data instance and...
	(make_pass_optimize_bswap): ...new function.
	(pass_optimize_widening_mul): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_optimize_widening_mul): ...new pass_data instance and...
	(make_pass_optimize_widening_mul): ...new function.
	* tree-ssa-phiopt.c (pass_phiopt): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_phiopt): ...new pass_data instance and...
	(make_pass_phiopt): ...new function.
	(pass_cselim): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_cselim): ...new pass_data instance and...
	(make_pass_cselim): ...new function.
	* tree-ssa-phiprop.c (pass_phiprop): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_phiprop): ...new pass_data instance and...
	(make_pass_phiprop): ...new function.
	* tree-ssa-pre.c (pass_pre): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_pre): ...new pass_data instance and...
	(make_pass_pre): ...new function.
	(pass_fre): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_fre): ...new pass_data instance and...
	(make_pass_fre): ...new function.
	* tree-ssa-reassoc.c (pass_reassoc): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_reassoc): ...new pass_data instance and...
	(make_pass_reassoc): ...new function.
	* tree-ssa-sink.c (pass_sink_code): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_sink_code): ...new pass_data instance and...
	(make_pass_sink_code): ...new function.
	* tree-ssa-strlen.c (pass_strlen): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_strlen): ...new pass_data instance and...
	(make_pass_strlen): ...new function.
	* tree-ssa-structalias.c (pass_build_alias): Convert from a global
	struct to a subclass of gimple_opt_pass along with...
	(pass_data_build_alias): ...new pass_data instance and...
	(make_pass_build_alias): ...new function.
	(pass_build_ealias): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_build_ealias): ...new pass_data instance and...
	(make_pass_build_ealias): ...new function.
	(pass_ipa_pta): Convert from a global struct to a subclass of
	simple_ipa_opt_pass along with...
	(pass_data_ipa_pta): ...new pass_data instance and...
	(make_pass_ipa_pta): ...new function.
	* tree-ssa-uncprop.c (pass_uncprop): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_uncprop): ...new pass_data instance and...
	(make_pass_uncprop): ...new function.
	* tree-ssa-uninit.c (pass_late_warn_uninitialized): Convert from a
	global struct to a subclass of gimple_opt_pass along with...
	(pass_data_late_warn_uninitialized): ...new pass_data instance and...
	(make_pass_late_warn_uninitialized): ...new function.
	* tree-ssa.c (pass_init_datastructures): Convert from a global struct
	to a subclass of gimple_opt_pass along with...
	(pass_data_init_datastructures): ...new pass_data instance and...
	(make_pass_init_datastructures): ...new function.
	(pass_early_warn_uninitialized): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_early_warn_uninitialized): ...new pass_data instance and...
	(make_pass_early_warn_uninitialized): ...new function.
	(pass_update_address_taken): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_update_address_taken): ...new pass_data instance and...
	(make_pass_update_address_taken): ...new function.
	* tree-ssanames.c (pass_release_ssa_names): Convert from a global
	struct to a subclass of gimple_opt_pass along with...
	(pass_data_release_ssa_names): ...new pass_data instance and...
	(make_pass_release_ssa_names): ...new function.
	* tree-stdarg.c (pass_stdarg): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_stdarg): ...new pass_data instance and...
	(make_pass_stdarg): ...new function.
	* tree-switch-conversion.c (pass_convert_switch): Convert from a
	global struct to a subclass of gimple_opt_pass along with...
	(pass_data_convert_switch): ...new pass_data instance and...
	(make_pass_convert_switch): ...new function.
	* tree-tailcall.c (pass_tail_recursion): Convert from a global struct
	to a subclass of gimple_opt_pass along with...
	(pass_data_tail_recursion): ...new pass_data instance and...
	(make_pass_tail_recursion): ...new function.
	(pass_tail_calls): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_tail_calls): ...new pass_data instance and...
	(make_pass_tail_calls): ...new function.
	* tree-vect-generic.c (pass_lower_vector): Convert from a global
	struct to a subclass of gimple_opt_pass along with...
	(pass_data_lower_vector): ...new pass_data instance and...
	(make_pass_lower_vector): ...new function.
	(pass_lower_vector_ssa): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_lower_vector_ssa): ...new pass_data instance and...
	(make_pass_lower_vector_ssa): ...new function.
	* tree-vectorizer.c (pass_slp_vectorize): Convert from a global struct
	to a subclass of gimple_opt_pass along with...
	(pass_data_slp_vectorize): ...new pass_data instance and...
	(make_pass_slp_vectorize): ...new function.
	(pass_ipa_increase_alignment): Convert from a global struct to a
	subclass of simple_ipa_opt_pass along with...
	(pass_data_ipa_increase_alignment): ...new pass_data instance and...
	(make_pass_ipa_increase_alignment): ...new function.
	* tree-vrp.c (pass_vrp): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_vrp): ...new pass_data instance and...
	(make_pass_vrp): ...new function.
	* tree.c (pass_ipa_free_lang_data): Convert from a global struct to a
	subclass of simple_ipa_opt_pass along with...
	(pass_data_ipa_free_lang_data): ...new pass_data instance and...
	(make_pass_ipa_free_lang_data): ...new function.
	* tsan.c (pass_tsan): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_tsan): ...new pass_data instance and...
	(make_pass_tsan): ...new function.
	(pass_tsan_O0): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_tsan_O0): ...new pass_data instance and...
	(make_pass_tsan_O0): ...new function.
	* var-tracking.c (pass_variable_tracking): Convert from a global
	struct to a subclass of rtl_opt_pass along with...
	(pass_data_variable_tracking): ...new pass_data instance and...
	(make_pass_variable_tracking): ...new function.
	* web.c (pass_web): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_web): ...new pass_data instance and...
	(make_pass_web): ...new function.
	* config/epiphany/epiphany.h (pass_mode_switch_use): Replace
	declaration with that of...
	(make_pass_mode_switch_use): ...new function.
	(pass_resolve_sw_modes): Replace declaration with that of...
	(make_pass_resolve_sw_modes): ...new function.
	* config/epiphany/mode-switch-use.c (pass_mode_switch_use): Convert
	from a global struct to a subclass of rtl_opt_pass along with...
	(pass_data_mode_switch_use): ...new pass_data instance and...
	(make_pass_mode_switch_use): ...new function.
	* config/epiphany/resolve-sw-modes.c (pass_resolve_sw_modes): Convert
	from a global struct to a subclass of rtl_opt_pass along with...
	(pass_data_resolve_sw_modes): ...new pass_data instance and...
	(make_pass_resolve_sw_modes): ...new function.
	* config/i386/i386.c (pass_insert_vzeroupper): Convert from a global
	struct to a subclass of rtl_opt_pass along with...
	(pass_data_insert_vzeroupper): ...new pass_data instance and...
	(make_pass_insert_vzeroupper): ...new function.
	* config/sparc/sparc.c (pass_work_around_errata): Convert from a
	global struct to a subclass of rtl_opt_pass along with...
	(pass_data_work_around_errata): ...new pass_data instance and...
	(make_pass_work_around_errata): ...new function.
	* config/mips/mips.c (pass_mips_machine_reorg2): Convert from a global
	struct to a subclass of rtl_opt_pass along with...
	(pass_data_mips_machine_reorg2): ...new pass_data instance and...
	(make_pass_mips_machine_reorg2): ...new function.

gcc/testsuite/

	Patch autogenerated by refactor_passes.py from
	https://github.com/davidmalcolm/gcc-refactoring-scripts
	revision 03fe39476a4c4ea450b49e087cfa817b5f92021e

	* gcc.dg/plugin/one_time_plugin.c (one_pass): Convert from a global
	struct to a subclass of gimple_opt_pass along with...
	(pass_data_one_pass): ...new pass_data instance and...
	(make_one_pass): ...new function.
	* gcc.dg/plugin/selfassign.c (pass_warn_self_assign): Convert from a
	global struct to a subclass of gimple_opt_pass along with...
	(pass_data_warn_self_assign): ...new pass_data instance and...
	(make_pass_warn_self_assign): ...new function.
	* g++.dg/plugin/dumb_plugin.c (pass_dumb_plugin_example): Convert from
	a global struct to a subclass of gimple_opt_pass along with...
	(pass_data_dumb_plugin_example): ...new pass_data instance and...
	(make_pass_dumb_plugin_example): ...new function.
	* g++.dg/plugin/selfassign.c (pass_warn_self_assign): Convert from a
	global struct to a subclass of gimple_opt_pass along with...
	(pass_data_warn_self_assign): ...new pass_data instance and...
	(make_pass_warn_self_assign): ...new function.

From-SVN: r201508
2013-08-05 20:16:05 +00:00
Jan Hubicka 12123452e4 cgraph.h (release_function_body): Declare.
* cgraph.h (release_function_body): Declare.
	* tree.c (free_lang_data_in_decl): Free, parameters and return values
	of unused delcarations.

From-SVN: r201413
2013-08-01 15:41:10 +00:00
Jan Hubicka d84db1ed8a gimple-fold.c (gimple_extract_devirt_binfo_from_cst): Use types_same_for_odr.
* gimple-fold.c (gimple_extract_devirt_binfo_from_cst): Use
	types_same_for_odr.
	* tree.c (decls_same_for_odr): New function.
	(same_for_edr): New function.
	(types_same_for_odr): New function.
	(get_binfo_at_offset): Use it.
	* tree.h (types_same_for_odr): Declare.

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

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

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

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

From-SVN: r200151
2013-06-17 15:08:24 +00:00
Marc Glisse 5d41848304 tree-ssa-forwprop.c (simplify_bitwise_binary, [...]): Generalize to complex and vector.
2013-06-13  Marc Glisse  <marc.glisse@inria.fr>

gcc/
	* tree-ssa-forwprop.c (simplify_bitwise_binary, associate_plusminus):
	Generalize to complex and vector.
	* tree.c (build_all_ones_cst): New function.
	* tree.h (build_all_ones_cst): Declare it.

gcc/testsuite/
	* gcc.dg/tree-ssa/forwprop-27.c: New testcase.

From-SVN: r200059
2013-06-13 08:21:01 +00:00
Martin Jambor 7d2fb5244b re PR middle-end/57347 (wrong code for bitfield on x86_64-linux at -Os and above)
2013-05-22  Martin Jambor  <mjambor@suse.cz>

	PR middle-end/57347
	* tree.h (contains_bitfld_component_ref_p): Declare.
	* tree-sra.c (contains_bitfld_comp_ref_p): Move...
	* tree.c (contains_bitfld_component_ref_p): ...here.  Adjust its caller.
	* ipa-prop.c (determine_known_aggregate_parts): Check that LHS does
	not access a bit-field.  Assert all final offsets are byte-aligned.

testsuite/
	* gcc.dg/ipa/pr57347.c: New test.

From-SVN: r199252
2013-05-23 15:20:41 +02:00
Jakub Jelinek 2e55d06281 tree.c (warn_deprecated_use): Print file:line using locus color.
* tree.c (warn_deprecated_use): Print file:line using locus color.
	* diagnostic.c (diagnostic_report_current_module): Print file:line
	and file:line:column using locus color.

From-SVN: r198900
2013-05-14 21:41:13 +02:00
Marc Glisse 640bfeb25c tree-vect-generic.c (uniform_vector_p): Move ...
2013-05-13  Marc Glisse  <marc.glisse@inria.fr>

gcc/
	* tree-vect-generic.c (uniform_vector_p): Move ...
	* tree.c (uniform_vector_p): ... here.
	* tree.h (uniform_vector_p): Declare it.
	* fold-const.c (fold_binary_loc) <shift>: Turn the second argument
	into a scalar.

gcc/testsuite/
	* gcc.dg/vector-shift-2.c: New testcase.

From-SVN: r198819
2013-05-13 09:30:50 +00:00
Marc Glisse a5e0cd1d9b stor-layout.c (element_precision): New function.
2013-05-10  Marc Glisse  <marc.glisse@inria.fr>

gcc/
	* stor-layout.c (element_precision): New function.
	* machmode.h (element_precision): Declare it.
	* tree.c (build_minus_one_cst): New function.
	(element_precision): Likewise.
	* tree.h (build_minus_one_cst): Declare new function.
	(element_precision): Likewise.
	* fold-const.c (operand_equal_p): Use element_precision.
	(fold_binary_loc): Handle vector types.
	* convert.c (convert_to_integer): Use element_precision.
	* gimple.c (iterative_hash_canonical_type): Handle complex and vectors
	separately.

gcc/c-family/
	* c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
	vectors.

gcc/testsuite/
	* gcc.dg/vector-shift.c: New testcase.

From-SVN: r198772
2013-05-10 11:15:14 +00:00
Jason Merrill a3409c0279 tree.c (build_constructor_va): New.
* tree.c (build_constructor_va): New.
	* tree.h: Declare it.

From-SVN: r198744
2013-05-09 12:43:27 -04:00
Marc Glisse 9a0ee7b028 tree.c (integer_all_onesp): Test that both components are all 1s.
2013-05-06  Marc Glisse  <marc.glisse@inria.fr>

	* tree.c (integer_all_onesp) <COMPLEX_CST>: Test that both
	components are all 1s.
	(integer_minus_onep): New function.
	* tree.h (integer_minus_onep): Declare it.
	* fold-const.c (fold_binary_loc) <MULT_EXPR>: Test
	integer_minus_onep instead of integer_all_onesp.

From-SVN: r198649
2013-05-06 21:14:59 +00:00
Eric Botcazou 966b587e0b stor-layout.c (skip_simple_constant_arithmetic): Move to...
* stor-layout.c (skip_simple_constant_arithmetic): Move to...
	* tree.c (skip_simple_constant_arithmetic): ...here and make public.
	(skip_simple_arithmetic): Tidy up.
	* tree.h (skip_simple_constant_arithmetic): Declare.
ada/
	* gcc-interface/decl.c (elaborate_expression_1): Skip only constant
	arithmetics when looking for a read-only variable in the expression.

From-SVN: r197815
2013-04-11 16:15:25 +00:00
Richard Biener bb313b932b passes.c (execute_todo): Do not call ggc_collect conditional here.
2013-04-10  Richard Biener  <rguenther@suse.de>

	* passes.c (execute_todo): Do not call ggc_collect conditional here.
	(execute_one_ipa_transform_pass): But unconditionally here.
	(execute_one_pass): And here.
	(init_optimization_passes): Remove reload pass.
	* tree-pass.h (TODO_ggc_collect): Remove.
	(pass_reload): Likewise.
	* ira.c (do_reload): Merge into ...
	(ira): ... this.
	(rest_of_handle_reload): Remove.
	(pass_reload): Likewise.
	* config/i386/i386.c (ix86_option_override): Refer to ira instead
	of reload for vzeroupper pass placement.
	* <everywhere>: Remove TODO_ggc_collect from todo_flags_start
	and todo_flags_finish of all passes.

	* g++.dg/pr55604.C: Use -fdump-rtl-ira.

From-SVN: r197671
2013-04-10 11:33:31 +00:00
Maxim Kuvyrkov 343881fd9e tree.c (type_hash_lookup, [...]): Make static.
* tree.c (type_hash_lookup, type_hash_add): Make static.
	* tree.h (type_hash_lookup, type_hash_add): Remove global declarations.

From-SVN: r197623
2013-04-09 09:47:33 +00:00
Richard Biener 839b422f08 tree.h (DECL_DEBUG_EXPR_IS_FROM): Rename to ...
2013-03-21  Richard Biener  <rguenther@suse.de>

	* tree.h (DECL_DEBUG_EXPR_IS_FROM): Rename to ...
	(DECL_HAS_DEBUG_EXPR_P): ... this.  Guard properly.
	* tree.c (copy_node_stat): Do not copy DECL_HAS_DEBUG_EXPR_P.
	* dwarf2out.c (add_var_loc_to_decl): Use DECL_HAS_DEBUG_EXPR_P
	instead of DECL_DEBUG_EXPR_IS_FROM.
	* gimplify.c (gimplify_modify_expr): Likewise.
	* tree-cfg.c (verify_expr_location_1): Likewise.
	* tree-complex.c (create_one_component_var): Likewise.
	* tree-sra.c (create_access_replacement): Likewise.
	* tree-ssa-live.c (clear_unused_block_pointer_1): Likewise.
	(clear_unused_block_pointer): Likewise.
	* tree-streamer-in.c (unpack_ts_decl_common_value_fields): Likewise.
	* tree-streamer-out.c (pack_ts_decl_common_value_fields): Likewise.
	* var-tracking.c (var_debug_decl): Likewise.
	(track_expr_p): Likewise.
	* tree-inline.c (add_local_variables): Likewise.  Set
	DECL_HAS_DEBUG_EXPR_P after copying it.
	* tree-diagnostic.c (default_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
	instead of DECL_DEBUG_EXPR_IS_FROM.  Guard properly.

	c/
	* c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
	instead of DECL_DEBUG_EXPR_IS_FROM.  Guard properly.

	cp/
	* error.c (cp_printer): Use DECL_HAS_DEBUG_EXPR_P instead of
	DECL_DEBUG_EXPR_IS_FROM.  Guard properly.

From-SVN: r196864
2013-03-21 11:53:39 +00:00
Jakub Jelinek 12d2dc5e67 re PR c/56566 (bogus "is narrower than values of its type" warning)
PR c/56566
	* tree.c (tree_int_cst_min_precision): For integer_zerop (value)
	return 1 even for !unsignedp.

	* c-c++-common/pr56566.c: New test.

From-SVN: r196767
2013-03-18 08:10:33 +01:00
Diego Novillo cd030c079e Remove zone allocator.
This patch removes the GC zone allocator.  It is not used and it
produces several regressions in the testsuite.  Furthermore, it
complicates things for the plan to implement manual GC markers
(http://gcc.gnu.org/wiki/cxx-conversion/gc-alternatives#Do_GC_marking_manually).

Tested on x86_64 with standard checking, --enable-checking=gc and
--enable-checking=release.

From-SVN: r195426
2013-01-24 10:13:46 -05:00
Richard Sandiford d1e082c2c2 Update copyright years in gcc/
From-SVN: r195098
2013-01-10 20:38:27 +00:00
Jason Merrill e78167f298 re PR c++/55804 (GCC omits required call to constructor)
PR c++/55804
	PR c++/55032
	PR c++/55245
	* tree.c (build_array_type_1): Revert earlier change.
	* cp/tree.c (build_cplus_array_type): Copy layout information
	to main variant if necessary.

From-SVN: r194811
2013-01-02 14:03:04 -05:00
Jason Merrill 0fe4913b32 re PR c++/55032 (Internal compiler error: in strip_typedefs, at cp/tree.c:1199)
PR c++/55032
	* tree.c (build_array_type_1): Re-layout if we found it in the
	hash table.

From-SVN: r194265
2012-12-06 15:20:34 -05:00
Eric Botcazou 67ae67ec94 fold-const.c (const_binop): Adjust comment.
* fold-const.c (const_binop): Adjust comment.
	(extract_muldiv_1): Likewise.
	(fold_comparison): Likewise.
	* stor-layout.c (place_field): Fix typo.
	* tree.c (double_int_fits_to_tree_p): Remove obsolete comment.
	(force_fit_type_double): Likewise.  Fix long line.

From-SVN: r193812
2012-11-26 12:01:07 +00:00
Diego Novillo 9771b26396 This patch rewrites the old VEC macro-based interface into a new one based on the template class 'vec'.
This patch rewrites the old VEC macro-based interface into a new one
based on the template class 'vec'.  The user-visible changes are
described in http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec.

I have tested the patch pretty extensively:

- Regular bootstraps on x86_64, ppc, ia64, sparc and hppa.
- Bootstraps with --enable-checking=release
- Bootstraps with --enable-checking=gc,gcac
- Basic builds on all targets (using contrib/config-list.mk).

We no longer access the vectors via VEC_* macros.  The pattern is
"VEC_operation (T, A, V, args)" becomes "V.operation (args)".

The only thing I could not do is create proper ctors and dtors for the
vec class.  Since these vectors are stored in unions, we
have to keep them as PODs (C++03 does not allow non-PODs in unions).

This means that creation and destruction must be explicit.  There is a
new method vec<type, allocation, layout>::create() and another vec<type,
allocation, layout>::destroy() to allocate the internal vector.

For vectors that must be pointers, there is a family of free functions
that implement the operations that need to tolerate NULL vectors.
These functions all start with the prefix 'vec_safe_'.  See the wiki
page for details.

The gengtype change removes the special handling for VEC() that used
to exist in gengtype. Additionally, it allows gengtype to recognize
templates of more than one argument and introduces the concept of an
undefined type (useful for template arguments that may or may not be
types).

When a TYPE_UNDEFINED is reached, gengtype will ignore it if it
happens inside a type marked with GTY((user)).  Otherwise, it will
emit an error.

Finally, gengtype rejects root types marked GTY((user)) that are not
first class pointers.

2012-11-16  Diego Novillo  <dnovillo@google.com>

	VEC API overhaul (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)

	* vec.c (register_overhead): Convert it into
	member function of vec_prefix.
	(release_overhead): Likewise.
	(calculate_allocation): Likewise.
	(vec_heap_free): Remove.
	(vec_gc_o_reserve_1): Remove.
	(vec_heap_o_reserve_1): Remove.
	(vec_stack_o_reserve_1): Remove.
	(vec_stack_o_reserve_exact): Remove.
	(register_stack_vec): New.
	(stack_vec_register_index): New.
	(unregister_stack_vec): New.
	(vec_assert_fail): Remove.
	* vec.h: Conditionally include ggc.h.  Document conditional
	hackery.
	Update top-level documentation.
	(ALONE_VEC_CHECK_INFO): Remove.
	(VEC_CHECK_INFO): Remove.
	(ALONE_VEC_CHECK_DECL): Remove.
	(VEC_CHECK_DECL): Remove.
	(ALONE_VEC_CHECK_PASS): Remove.
	(VEC_CHECK_PASS): Remove.
	(VEC_ASSERT): Remove.
	(vec_prefix): Add friends va_gc, va_gc_atomic, va_heap and
	va_stack.
	Mark fields alloc_ and num_ as protected.
	(struct vec_t): Remove.  Remove all function members.
	(struct vl_embed): Declare.
	(struct vl_ptr): Declare.
	(free): Remove.
	(reserve_exact): Remove.
	(reserve): Remove.
	(safe_splice): Remove.
	(safe_push): Remove.
	(safe_grow): Remove.
	(safe_grow_cleared): Remove.
	(safe_insert): Remove.
	(DEF_VEC_I): Remove.
	(DEF_VEC_ALLOC_I): Remove.
	(DEF_VEC_P): Remove.
	(DEF_VEC_ALLOC_P): Remove.
	(DEF_VEC_O): Remove.
	(DEF_VEC_ALLOC_O): Remove.
	(DEF_VEC_ALLOC_P_STACK): Remove.
	(DEF_VEC_ALLOC_O_STACK): Remove.
	(DEF_VEC_ALLOC_I_STACK): Remove.
	(DEF_VEC_A): Remove.
	(DEF_VEC_ALLOC_A): Remove.
	(vec_stack_p_reserve_exact_1): Remove.
	(vec_stack_o_reserve): Remove.
	(vec_stack_o_reserve_exact): Remove.
	(VEC_length): Remove.
	(VEC_empty): Remove.
	(VEC_address): Remove.
	(vec_address): Remove.
	(VEC_last): Remove.
	(VEC_index): Remove.
	(VEC_iterate): Remove.
	(VEC_embedded_size): Remove.
	(VEC_embedded_init): Remove.
	(VEC_free): Remove.
	(VEC_copy): Remove.
	(VEC_space): Remove.
	(VEC_reserve): Remove.
	(VEC_reserve_exact): Remove.
	(VEC_splice): Remove.
	(VEC_safe_splice): Remove.
	(VEC_quick_push): Remove.
	(VEC_safe_push): Remove.
	(VEC_pop): Remove.
	(VEC_truncate): Remove.
	(VEC_safe_grow): Remove.
	(VEC_replace): Remove.
	(VEC_quick_insert): Remove.
	(VEC_safe_insert): Remove.
	(VEC_ordered_remove): Remove.
	(VEC_unordered_remove): Remove.
	(VEC_block_remove): Remove.
	(VEC_lower_bound): Remove.
	(VEC_alloc): Remove.
	(VEC_qsort): Remove.

	(va_heap): Declare.
	(va_heap::default_layout): New typedef to vl_ptr.
	(va_heap::reserve): New.
	(va_heap::release): New.
	(va_gc): Declare.
	(va_gc::default_layout): New typedef to vl_embed.
	(va_gc::reserve): New.
	(va_gc::release): New.
	(va_gc_atomic): Declare.  Inherit from va_gc.
	(va_stack): Declare.
	(va_stack::default_layout): New typedef to vl_ptr.
	(va_stack::alloc): New.
	(va_stack::reserve): New.
	(va_stack::release): New.
	(register_stack_vec): Declare.
	(stack_vec_register_index): Declare.
	(unregister_stack_vec): Declare.

	(vec<T, A = va_heap, L = typename A::default_layout>): Declare
	empty vec template.
	(vec<T, A, vl_embed>): Partial specialization for embedded
	layout.
	(vec<T, A, vl_embed>::allocated): New.
	(vec<T, A, vl_embed>::length): New.
	(vec<T, A, vl_embed>::is_empty): New.
	(vec<T, A, vl_embed>::address): New.
	(vec<T, A, vl_embed>::operator[]): New.
	(vec<T, A, vl_embed>::last New.
	(vec<T, A, vl_embed>::space): New.
	(vec<T, A, vl_embed>::iterate): New.
	(vec<T, A, vl_embed>::iterate): New.
	(vec<T, A, vl_embed>::copy): New.
	(vec<T, A, vl_embed>::splice): New.
	(vec<T, A, vl_embed>::quick_push New.
	(vec<T, A, vl_embed>::pop New.
	(vec<T, A, vl_embed>::truncate): New.
	(vec<T, A, vl_embed>::quick_insert): New.
	(vec<T, A, vl_embed>::ordered_remove): New.
	(vec<T, A, vl_embed>::unordered_remove): New.
	(vec<T, A, vl_embed>::block_remove): New.
	(vec<T, A, vl_embed>::qsort): New.
	(vec<T, A, vl_embed>::lower_bound): New.
	(vec<T, A, vl_embed>::embedded_size): New.
	(vec<T, A, vl_embed>::embedded_init): New.
	(vec<T, A, vl_embed>::quick_grow): New.
	(vec<T, A, vl_embed>::quick_grow_cleared): New.
	(vec_safe_space): New.
	(vec_safe_length): New.
	(vec_safe_address): New.
	(vec_safe_is_empty): New.
	(vec_safe_reserve): New.
	(vec_safe_reserve_exact): New.
	(vec_alloc): New.
	(vec_free): New.
	(vec_safe_grow): New.
	(vec_safe_grow_cleared): New.
	(vec_safe_iterate): New.
	(vec_safe_push): New.
	(vec_safe_insert): New.
	(vec_safe_truncate): New.
	(vec_safe_copy): New.
	(vec_safe_splice): New.

	(vec<T, A, vl_ptr>): New partial specialization for the space
	efficient layout.
	(vec<T, A, vl_ptr>::exists): New.
	(vec<T, A, vl_ptr>::is_empty): New.
	(vec<T, A, vl_ptr>::length): New.
	(vec<T, A, vl_ptr>::address): New.
	(vec<T, A, vl_ptr>::operator[]): New.
	(vec<T, A, vl_ptr>::operator!=): New.
	(vec<T, A, vl_ptr>::operator==): New.
	(vec<T, A, vl_ptr>::last): New.
	(vec<T, A, vl_ptr>::space): New.
	(vec<T, A, vl_ptr>::iterate): New.
	(vec<T, A, vl_ptr>::copy): New.
	(vec<T, A, vl_ptr>::reserve): New.
	(vec<T, A, vl_ptr>::reserve_exact): New.
	(vec<T, A, vl_ptr>::splice): New.
	(vec<T, A, vl_ptr>::safe_splice): New.
	(vec<T, A, vl_ptr>::quick_push): New.
	(vec<T, A, vl_ptr>::safe_push): New.
	(vec<T, A, vl_ptr>::pop): New.
	(vec<T, A, vl_ptr>::truncate): New.
	(vec<T, A, vl_ptr>::safe_grow): New.
	(vec<T, A, vl_ptr>::safe_grow_cleared): New.
	(vec<T, A, vl_ptr>::quick_grow): New.
	(vec<T, A, vl_ptr>::quick_grow_cleared): New.
	(vec<T, A, vl_ptr>::quick_insert): New.
	(vec<T, A, vl_ptr>::safe_insert): New.
	(vec<T, A, vl_ptr>::ordered_remove): New.
	(vec<T, A, vl_ptr>::unordered_remove): New.
	(vec<T, A, vl_ptr>::block_remove): New.
	(vec<T, A, vl_ptr>::qsort): New.
	(vec<T, A, vl_ptr>::lower_bound): New.
	(vec_stack_alloc): Define.
	(FOR_EACH_VEC_SAFE_ELT): Define.
	* vecir.h: Remove.  Update all users.
	* vecprim.h: Remove.  Update all users.
	Move uchar to coretypes.h.

	* Makefile.in (VEC_H): Add $(GGC_H).
	Remove vecir.h and vecprim.h dependencies everywhere.

2012-11-16  Diego Novillo  <dnovillo@google.com>

	* gengtype-lex.l (VEC): Remove.
	Add characters in the set [\!\>\.-].
	* gengtype-parse.c (token_names): Remove "VEC".
	(require_template_declaration): Remove handling of VEC_TOKEN.
	(type): Likewise.
	Call create_user_defined_type when parsing GTY((user)).
	* gengtype-state.c (type_lineloc): handle TYPE_UNDEFINED.
	(write_state_undefined_type): New.
	(write_state_type): Call write_state_undefined_type for
	TYPE_UNDEFINED.
	(read_state_type): Call read_state_undefined_type for
	TYPE_UNDEFINED.
	* gengtype.c (dbgprint_count_type_at): Handle TYPE_UNDEFINED.
	(create_user_defined_type): Make extern.
	(type_for_name): Factor out of resolve_typedef.
	(create_undefined_type): New
	(resolve_typedef): Call it when we cannot find a previous
	typedef and the type is not a template.
	(find_structure): Accept TYPE_UNDEFINED.
	(set_gc_used_type): Add argument ALLOWED_UNDEFINED_TYPES,
	default to false.
	Emit an error for TYPE_UNDEFINED unless LEVEL is GC_UNUSED or
	ALLOWED_UNDEFINED_TYPES is set.
	Set ALLOWED_UNDEFINED_TYPES to true for TYPE_USER_STRUCT.
	(filter_type_name): Accept templates with more than one
	argument.
	(output_mangled_typename): Handle TYPE_UNDEFINED
	(walk_type): Likewise.
	(write_types_process_field): Likewise.
	(write_func_for_structure): If CHAIN_NEXT is set, ORIG_S
	should not be a user-defined type.
	(write_types_local_user_process_field): Handle TYPE_ARRAY,
	TYPE_NONE and TYPE_UNDEFINED.
	(write_types_local_process_field): Likewise.
	(contains_scalar_p): Return 0 for TYPE_USER_STRUCT.
	(write_root): Reject user-defined types that are not pointers.
	Handle TYPE_NONE, TYPE_UNDEFINED, TYPE_UNION, TYPE_LANG_STRUCT
	and TYPE_PARAM_STRUCT.
	(output_typename): Handle TYPE_NONE, TYPE_UNDEFINED, and
	TYPE_ARRAY.
	(dump_typekind): Handle TYPE_UNDEFINED.
	* gengtype.h (enum typekind): Add TYPE_UNDEFINED.
	(create_user_defined_type): Declare.
	(enum gty_token): Remove VEC_TOKEN.

2012-11-16  Diego Novillo  <dnovillo@google.com>

	Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)

	* coretypes.h (uchar): Define.
	* alias.c: Use new vec API in vec.h.
	* asan.c: Likewise.
	* attribs.c: Likewise.
	* basic-block.h: Likewise.
	* bb-reorder.c: Likewise.
	* builtins.c: Likewise.
	* calls.c: Likewise.
	* cfg.c: Likewise.
	* cfganal.c: Likewise.
	* cfgcleanup.c: Likewise.
	* cfgexpand.c: Likewise.
	* cfghooks.c: Likewise.
	* cfghooks.h: Likewise.
	* cfgloop.c: Likewise.
	* cfgloop.h: Likewise.
	* cfgloopanal.c: Likewise.
	* cfgloopmanip.c: Likewise.
	* cfgrtl.c: Likewise.
	* cgraph.c: Likewise.
	* cgraph.h: Likewise.
	* cgraphclones.c: Likewise.
	* cgraphunit.c: Likewise.
	* combine.c: Likewise.
	* compare-elim.c: Likewise.
	* coverage.c: Likewise.
	* cprop.c: Likewise.
	* data-streamer.h: Likewise.
	* dbxout.c: Likewise.
	* dce.c: Likewise.
	* df-core.c: Likewise.
	* df-problems.c: Likewise.
	* df-scan.c: Likewise.
	* dominance.c: Likewise.
	* domwalk.c: Likewise.
	* domwalk.h: Likewise.
	* dse.c: Likewise.
	* dwarf2cfi.c: Likewise.
	* dwarf2out.c: Likewise.
	* dwarf2out.h: Likewise.
	* emit-rtl.c: Likewise.
	* except.c: Likewise.
	* except.h: Likewise.
	* expr.c: Likewise.
	* expr.h: Likewise.
	* final.c: Likewise.
	* fold-const.c: Likewise.
	* function.c: Likewise.
	* function.h: Likewise.
	* fwprop.c: Likewise.
	* gcc.c: Likewise.
	* gcse.c: Likewise.
	* genattr.c: Likewise.
	* genattrtab.c: Likewise.
	* genautomata.c: Likewise.
	* genextract.c: Likewise.
	* genopinit.c: Likewise
	* ggc-common.c: Likewise.
	* ggc.h: Likewise.
	* gimple-low.c: Likewise.
	* gimple-ssa-strength-reduction.c: Likewise.
	* gimple-streamer-in.c: Likewise.
	* gimple.c: Likewise.
	* gimple.h: Likewise.
	* gimplify.c: Likewise.
	* graph.c: Likewise.
	* graphds.c: Likewise.
	* graphds.h: Likewise.
	* graphite-blocking.c: Likewise.
	* graphite-clast-to-gimple.c: Likewise.
	* graphite-dependences.c: Likewise.
	* graphite-interchange.c: Likewise.
	* graphite-optimize-isl.c: Likewise.
	* graphite-poly.c: Likewise.
	* graphite-poly.h: Likewise.
	* graphite-scop-detection.c: Likewise.
	* graphite-scop-detection.h: Likewise.
	* graphite-sese-to-poly.c: Likewise.
	* graphite.c: Likewise.
	* godump.c: Likewise.
	* haifa-sched.c: Likewise.
	* hw-doloop.c: Likewise.
	* hw-doloop.h: Likewise.
	* ifcvt.c: Likewise.
	* insn-addr.h: Likewise.
	* ipa-cp.c: Likewise.
	* ipa-inline-analysis.c: Likewise.
	* ipa-inline-transform.c: Likewise.
	* ipa-inline.c: Likewise.
	* ipa-inline.h: Likewise.
	* ipa-prop.c: Likewise.
	* ipa-prop.h: Likewise.
	* ipa-pure-const.c: Likewise.
	* ipa-ref-inline.h: Likewise.
	* ipa-ref.c: Likewise.
	* ipa-ref.h: Likewise.
	* ipa-reference.c: Likewise.
	* ipa-split.c: Likewise.
	* ipa-utils.c: Likewise.
	* ipa-utils.h: Likewise.
	* ipa.c: Likewise.
	* ira-build.c: Likewise.
	* ira-color.c: Likewise.
	* ira-emit.c: Likewise.
	* ira-int.h: Likewise.
	* ira.c: Likewise.
	* loop-invariant.c: Likewise.
	* loop-unroll.c: Likewise.
	* lower-subreg.c: Likewise.
	* lra-lives.c: Likewise.
	* lra.c: Likewise.
	* lto-cgraph.c: Likewise.
	* lto-section-out.c: Likewise.
	* lto-streamer-in.c: Likewise.
	* lto-streamer-out.c: Likewise.
	* lto-streamer.h: Likewise.
	* lto-symtab.c: Likewise.
	* mcf.c: Likewise.
	* modulo-sched.c: Likewise.
	* omp-low.c: Likewise.
	* opts-common.c: Likewise.
	* opts-global.c: Likewise.
	* opts.c: Likewise.
	* opts.h: Likewise.
	* passes.c: Likewise.
	* predict.c: Likewise.
	* print-tree.c: Likewise.
	* profile.c: Likewise.
	* profile.h: Likewise.
	* read-rtl.c: Likewise.
	* ree.c: Likewise.
	* reg-stack.c: Likewise.
	* regrename.c: Likewise.
	* regrename.h: Likewise.
	* reload.c: Likewise.
	* reload.h: Likewise.
	* reload1.c: Likewise.
	* rtl.h: Likewise.
	* sched-deps.c: Likewise.
	* sched-int.h: Likewise.
	* sdbout.c: Likewise.
	* sel-sched-dump.c: Likewise.
	* sel-sched-ir.c: Likewise.
	* sel-sched-ir.h: Likewise.
	* sel-sched.c: Likewise.
	* sese.c: Likewise.
	* sese.h: Likewise.
	* statistics.h: Likewise.
	* stmt.c: Likewise.
	* stor-layout.c: Likewise.
	* store-motion.c: Likewise.
	* tlink.c: Likewise.
	* toplev.c: Likewise.
	* trans-mem.c: Likewise.
	* tree-browser.c: Likewise.
	* tree-call-cdce.c: Likewise.
	* tree-cfg.c: Likewise.
	* tree-cfgcleanup.c: Likewise.
	* tree-chrec.c: Likewise.
	* tree-chrec.h: Likewise.
	* tree-complex.c: Likewise.
	* tree-data-ref.c: Likewise.
	* tree-data-ref.h: Likewise.
	* tree-dfa.c: Likewise.
	* tree-diagnostic.c: Likewise.
	* tree-dump.c: Likewise.
	* tree-eh.c: Likewise.
	* tree-emutls.c: Likewise.
	* tree-flow.h: Likewise.
	* tree-if-conv.c: Likewise.
	* tree-inline.c: Likewise.
	* tree-inline.h: Likewise.
	* tree-into-ssa.c: Likewise.
	* tree-iterator.c: Likewise.
	* tree-loop-distribution.c: Likewise.
	* tree-mudflap.c: Likewise.
	* tree-optimize.c: Likewise.
	* tree-outof-ssa.c: Likewise.
	* tree-parloops.c: Likewise.
	* tree-phinodes.c: Likewise.
	* tree-predcom.c: Likewise.
	* tree-pretty-print.c: Likewise.
	* tree-scalar-evolution.c: Likewise.
	* tree-sra.c: Likewise.
	* tree-ssa-address.c: Likewise.
	* tree-ssa-alias.c: Likewise.
	* tree-ssa-ccp.c: Likewise.
	* tree-ssa-coalesce.c: Likewise.
	* tree-ssa-dce.c: Likewise.
	* tree-ssa-dom.c: Likewise.
	* tree-ssa-forwprop.c: Likewise.
	* tree-ssa-live.c: Likewise.
	* tree-ssa-live.h: Likewise.
	* tree-ssa-loop-im.c: Likewise.
	* tree-ssa-loop-ivcanon.c: Likewise.
	* tree-ssa-loop-ivopts.c: Likewise.
	* tree-ssa-loop-manip.c: Likewise.
	* tree-ssa-loop-niter.c: Likewise.
	* tree-ssa-loop-prefetch.c: Likewise.
	* tree-ssa-math-opts.c: Likewise.
	* tree-ssa-operands.c: Likewise.
	* tree-ssa-phiopt.c: Likewise.
	* tree-ssa-phiprop.c: Likewise.
	* tree-ssa-pre.c: Likewise.
	* tree-ssa-propagate.c: Likewise.
	* tree-ssa-reassoc.c: Likewise.
	* tree-ssa-sccvn.c: Likewise.
	* tree-ssa-sccvn.h: Likewise.
	* tree-ssa-strlen.c: Likewise.
	* tree-ssa-structalias.c: Likewise.
	* tree-ssa-tail-merge.c: Likewise.
	* tree-ssa-threadedge.c: Likewise.
	* tree-ssa-threadupdate.c: Likewise.
	* tree-ssa-uncprop.c: Likewise.
	* tree-ssa-uninit.c: Likewise.
	* tree-ssa.c: Likewise.
	* tree-ssanames.c: Likewise.
	* tree-stdarg.c: Likewise.
	* tree-streamer-in.c: Likewise.
	* tree-streamer-out.c: Likewise.
	* tree-streamer.c: Likewise.
	* tree-streamer.h: Likewise.
	* tree-switch-conversion.c: Likewise.
	* tree-vect-data-refs.c: Likewise.
	* tree-vect-generic.c: Likewise.
	* tree-vect-loop-manip.c: Likewise.
	* tree-vect-loop.c: Likewise.
	* tree-vect-patterns.c: Likewise.
	* tree-vect-slp.c: Likewise.
	* tree-vect-stmts.c: Likewise.
	* tree-vectorizer.c: Likewise.
	* tree-vectorizer.h: Likewise.
	* tree-vrp.c: Likewise.
	* tree.c: Likewise.
	* tree.h: Likewise.
	* value-prof.c: Likewise.
	* value-prof.h: Likewise.
	* var-tracking.c: Likewise.
	* varasm.c: Likewise.
	* varpool.c: Likewise.
	* vmsdbgout.c: Likewise.
	* config/bfin/bfin.c: Likewise.
	* config/c6x/c6x.c: Likewise.
	* config/darwin.c: Likewise.
	* config/i386/i386.c: Likewise.
	* config/ia64/ia64.c: Likewise.
	* config/mep/mep.c: Likewise.
	* config/mips/mips.c: Likewise.
	* config/pa/pa.c: Likewise.
	* config/rs6000/rs6000-c.c: Likewise.
	* config/rs6000/rs6000.c: Likewise.
	* config/rx/rx.c: Likewise.
	* config/spu/spu-c.c: Likewise.
	* config/vms/vms.c: Likewise.
	* config/vxworks.c: Likewise.
	* config/epiphany/resolve-sw-modes.c: Likewise.

From-SVN: r193595
2012-11-17 21:54:30 -05:00
Jan Hubicka 229a6cdb5a tree.c (set_call_expr_flags): New function.
* tree.c (set_call_expr_flags): New function.
	(local_define_builtin): Use it.
	* tree.h (set_call_expr_flags): Declare.

From-SVN: r193506
2012-11-14 21:08:52 +00:00
Sharad Singhai 2b4e6bf1d5 invoke.texi: Update -fopt-info documentation.
2012-11-01  Sharad Singhai  <singhai@google.com>

    * doc/invoke.texi: Update -fopt-info documentation.
    * dumpfile.c: Move dump_flags here from passes.c.
    Rename opt_info_options to optinfo_verbosity_options.
    Add optgroup_options.
    (dump_files): Add field for optinfo_flags in the static initializer.
    (dump_register): Handle additional parameter for optgroup_flags.
    (opt_info_enable_passes): Renamed opt_info_enable_all. Handle
    optgroup_flags. Fix documentation.
    (opt_info_switch_p_1): Handle optgroup options.
    (opt_info_switch_p): Handle optgroup_flags. Warn on multiple files.
    * dumpfile.h (dump_register): Additional argument for optgroup_flags.
    All callers updated.
    (struct dump_file_info): Add field for optgroup_flags.
    Define OPTGROUP_* flags.
    * tree-pass.h (struct opt_pass): Add addtional field for optinfo_flags.
    All opt_pass static initializers updated.
    * opts-global.c (dump_remap_tree_vectorizer_verbose): Use 'all'
    instead of 'optall'.
    (handle_common_deferred_options): Fix typo in error message.
    * passes.c (register_one_dump_file): Add argument for optgroup_flags.
    Turn on OPTGROUP_IPA for IPA passes.
    Move dump_flags from here to dumpfile.c.
    * statistics.c (statistics_early_init): Use OPTGROUP_NONE in call to
    dump_register.

testsuite/ChangeLog

    * testsuite/gcc.dg/plugin/selfassign.c: Add opgtroup_flags initializer.
    * testsuite/gcc.dg/plugin/one_time_plugin.c: Likewise.
    * testsuite/g++.dg/plugin/selfassign.c: Likewise.
    * testsuite/g++.dg/plugin/dumb_plugin.c: Likewise.

From-SVN: r193061
2012-11-01 07:34:44 +00:00
Marc Glisse b72bdd9037 re PR middle-end/55027 (simplify vector multiplication by 1)
2012-10-29  Marc Glisse  <marc.glisse@inria.fr>

	PR middle-end/55027

gcc/
	* tree.c (real_zerop, real_onep, real_twop, real_minus_onep):
	Handle VECTOR_CST.

testsuite/
	* gcc.dg/pr55027.c: New testcase.

From-SVN: r192954
2012-10-29 17:16:51 +00:00
Marc Glisse 93100c6b5b re PR c++/54427 (Expose more vector extensions)
2012-10-25  Marc Glisse  <marc.glisse@inria.fr>

	PR c++/54427

gcc/
	* tree.c (signed_or_unsigned_type_for): Handle vectors.

gcc/cp/
	* typeck.c (build_x_conditional_expr): Handle VEC_COND_EXPR.
	* call.c (build_conditional_expr_1): Likewise.

gcc/c-family/
	* c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.

gcc/testsuite/
	* g++.dg/ext/vector19.C: New testcase.

From-SVN: r192808
2012-10-25 13:02:42 +00:00
Jakub Jelinek 848be0946c re PR debug/54828 (ICE in based_loc_descr at dwarf2out.c:10560 with -g -O0)
PR debug/54828
	* gimple.h (is_gimple_sizepos): New inline function.
	* gimplify.c (gimplify_one_sizepos): Use it.  Remove useless
	final assignment to expr variable.
	* tree.c (RETURN_TRUE_IF_VAR): Return true also if
	!TYPE_SIZES_GIMPLIFIED (type) and _t is going to be gimplified
	into a local temporary.

	* g++.dg/debug/pr54828.C: New test.

From-SVN: r192759
2012-10-24 11:08:56 +02:00
Jan Hubicka b7442c2fe0 tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Add edge_to_cancel parameter and use it to estimate code optimized out in the...
* tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Add edge_to_cancel
	parameter and use it to estimate code optimized out in the final iteration.
	(loop_edge_to_cancel): New function.
	(try_unroll_loop_completely): New IRRED_IVALIDATED parameter;
	handle unrolling loops with bounds given via max_loop_iteratins;
	handle unrolling non-inner loops when code size shrinks;
	tidy dump output; when the last iteration loop still stays
	as loop in the CFG forcongly redirect the latch to
	__builtin_unreachable.
	(canonicalize_loop_induction_variables): Add irred_invlaidated
	parameter; record niter bound derrived; dump
	max_loop_iterations bounds; call try_unroll_loop_completely
	even if no niter bound is given.
	(canonicalize_induction_variables): Handle irred_invalidated.
	(tree_unroll_loops_completely): Handle non-innermost loops;
	handle irred_invalidated.
	* cfgloop.h (unlop): Declare.
	* cfgloopmanip.c (unloop): Export.
	* tree.c (build_common_builtin_nodes): Build BULTIN_UNREACHABLE.

	* gcc.target/i386/l_fma_float_?.c: Update.
	* gcc.target/i386/l_fma_double_?.c: Update.
	* gfortran.dg/do_1.f90: XFAIL
	* gcc.dg/tree-ssa/cunroll-1.c: New testcase.
	* gcc.dg/tree-ssa/cunroll-2.c: New testcase.
	* gcc.dg/tree-ssa/cunroll-3.c: New testcase.
	* gcc.dg/tree-ssa/cunroll-4.c: New testcase.
	* gcc.dg/tree-ssa/cunroll-5.c: New testcase.
	* gcc.dg/tree-ssa/ldist-17.c: Block cunroll to make testcase still
	valid.

From-SVN: r192538
2012-10-17 17:12:05 +00:00
Dodji Seketeli e28d52cffb PR c++/53528 C++11 attribute support
This patch implements the c++-11 generalized attributes, described in
the N2761 paper[1].

The idea is to modify the front-end to accept the new attribute syntax
(including alignas expressions) and to build an internal
representation similar to the one we already have for GNU attributes.

This lets us re-use our existing GNU attribute mechanisms to support
the generalized c++11 attributes.

The patch does change the existing internal representation to support
scoped attribute (aka attributes with namespaces), which is a concept
that doesn't exist in GNU attributes.  I have thus put all existing
GNU extension attributes into the "gnu" namespace.  For instance, in
C++-11, the "unused" attribute would be represented as
"[[gnu::unused]]".  Because there is no syntax for scoped attributes
in C, writting "__attribute__((unused))" unconditionnally refers to
the "unused" attribute in the "gnu" namespace.

Note that this patch follows a conservative understanding of the
specification by disallowing attributes appertaining to types, unless
they apply to a type definition.

Tested on x86_64-unknown-linux-gnu and powerpc64-unknown-linux-gnu.

[1]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2761.pdf

gcc/
	* plugin.h (register_scoped_attributes): Declare new function.
	* tree.h (enu attribute_flags::ATTR_FLAG_CXX_11): New flag.
	(lookup_scoped_attribute_spec, cxx_11_attribute_p)
	(get_attribute_name, get_attribute_namespace): Declare new functions.
	(struct attribute_spec): Remove const qualifier from the members.
	* tree.c (comp_type_attributes, private_lookup_attribute)
	(lookup_ident_attribute, remove_attribute, merge_attribute)
	(attribute_hash_list, attribute_list_contained): Use
	get_attribute_name.
	* attribs.c (decl_attributes): Don't crash on error_mark_node.
	Forbid c++11 attributes appertaining to type-specifiers.
	(attribute_hash): Remove global variable.
	(attributes_table): New global variable.
	(find_attribute_namespace, register_scoped_attribute): New static
	functions.
	(register_scoped_attributes, lookup_scoped_attribute_spec)
	(cxx11_attribute_p, get_attribute_name, get_attribute_namespace):
	New public functions.
	(init_attributes): Register all the GNU attributes into the "gnu"
	namespace.
	(register_attribute): Use register_scoped_attribute to register
	the attribute into the "gnu" namespace.
	(lookup_attribute_spec): Use lookup_scoped_attribute_spec to
	lookup the attribute in the "gnu" namespace.
	(decl_attributes): Use new get_attribute_namespace and
	lookup_scoped_attribute_spec to consider attribute namespaces when
	looking up attributes.  When operating in c++-11 mode, pass flag
	ATTR_FLAG_CXX11 to the spec handler.

gcc/c-family/

	* c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
	new functions.
	* c-common.c (check_cxx_fundamental_alignment_constraints): New
	static function.
	(handle_aligned_attribute): In choose strictest alignment
	among many.  Use new check_cxx_fundamental_alignment_constraints.
	(handle_transparent_union_attribute): In c++11 attribute syntax,
	don't look through typedefs.

gcc/cp/

	* cp-tree.h (enum cpp0x_warn_str::CPP0X_ATTRIBUTES): New member.
	(enum cp_decl_spec::ds_std_attribute): New enumerator.
	(struct cp_decl_specifier_seq::std_attributes): New field.
	(cxx_alignas_expr, warn_misplaced_attr_for_class_type): Declare
	new functions.
	(check_tag_decl): Take an extra parameter for explicit
	instantiations.
	* decl.c (warn_misplaced_attr_for_class_type): Extract from ...
	(check_tag_decl): ... here.  Add check for c++11 attributes being
	applied to an explicit instantiation.  Take an extra parameter for
	explicit instantiations.
	(grokdeclarator): Make sure a c++11 attribute after an array
	declarator appertains to the array, an attribute after a function
	declarator appertains to the function type, an attribute after a
	declarator-id appertains to the entity being declared, and an
	attribute after a pointer declarator appertains to the pointer.
	* decl2.c (is_late_template_attribute): Use get_attribute_name.
	* error.c (maybe_warn_cpp0x): Support
	CPP0X_GENERALIZED_ATTRIBUTES.
	* parser.c (cp_next_tokens_can_be_attribute_p)
	(cp_next_tokens_can_be_gnu_attribute_p)
	(cp_next_tokens_can_be_std_attribute_p)
	(cp_nth_tokens_can_be_attribute_p)
	(cp_nth_tokens_can_be_gnu_attribute_p)
	(cp_nth_tokens_can_be_std_attribute_p)
	(cp_parser_gnu_attribute_list, cp_parser_std_attribute)
	(cp_parser_std_attribute_spec, cp_parser_std_attribute_spec_seq)
	(cp_parser_attributes_opt, cp_parser_std_attribute_list): New
	static functions.
	(cp_parser_gnu_attributes_opt): Replace cp_parser_attributes_opt.
	(cp_parser_gnu_attribute_list): Replace cp_parser_attribute_list.
	(cp_parser_postfix_expression): Disallow "[[" tokens here.
	(cp_parser_label_for_labeled_statement): Use take an extra
	parameter for attributes.
	(cp_parser_block_declaration): Use
	cp_nth_tokens_can_be_std_attribute_p here.
	(cp_parser_decl_specifier_seq): Likewise.  Store C++11 attributes
	that appears in in decl specifiers in cp_decl_specifier_seq::std_attributes.
	declaration.  Emit proper warning about misplaced c++11 attributes
	for class type.
	(cp_parser_explicit_instantiation): Adjust call to check_tag_decl.
	(cp_parser_init_declarator):  Parsing attributes here is no more a
	GNU extension in c++-11.
	(cp_parser_type_specifier_seq): Use
	cp_next_tokens_can_be_attribute_p.
	(cp_parser_direct_declarator): Likewise.  Hang c++11 attributes
	following the declarator to its syntactic construct.  It'll later
	be applied to the proper appertaining entity by grokdeclarator.
	(cp_parser_ptr_operator): Likewise.
	(make_declarator): Initialize cp_declarator::std_attribute.
	(make_pointer_declarator, make_reference_declarator)
	(make_ptrmem_declarator, cp_parser_make_indirect_declarator): Take
	attributes that appertain to the pointer/reference in argument.
	(cp_parser_ptr_operator): Take an out parameter for c++11
	attributes.  Update comments.
	(cp_parser_new_declarator_opt)
	(cp_parser_conversion_declarator_opt): Adjust.
	(cp_parser_declarator): Likewise.  Handle C++11 attributes.
	Rename attributes to gnu_attribute for better legibility.
	(cp_parser_simple_declaration): Update comment.
	(cp_parser_class_specifier_1): Parse GNU attributes specifically
	(cp_parser_enum_specifier): Accept only gnu attributes after the
	specifier.
	(cp_parser_member_declaration): Don't clear attributes -- intended
	for the entity being declared -- too early because check_tag_decl
	needs them.
	(cp_parser_statement): Update comment.  Parse optional c++11
	attributes at the beginning of the relevant kind of statements and
	ignore them, for now, unless when calling
	cp_parser_label_for_labeled_statement.
	(cp_parser_label_for_labeled_statement): Take c++11 attributes
	in parameter.
	* semantics.c (potential_constant_expression_1): Likewise.
	* typeck.c (fundamental_alignment_p, cxx_alignas_expr): New public
	functions.

gcc/testsuite/

	* g++.dg/cpp0x/gen-attrs-1.C: New test.
	* g++.dg/cpp0x/gen-attrs-2.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-2-1.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-3.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-4.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-5.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-6.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-7.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-8.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-9.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-10.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-11.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-12.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-13.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-14.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-15.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-16.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-17.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-18.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-19.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-20.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-21.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-22.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-23.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-24.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-25.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-26.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-27.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-28.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-29.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-30.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-31.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-32.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-33.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-34.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-35.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-36.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-36-1.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-37.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-38.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-39.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-39-1.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-40.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-41.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-42.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-43.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-44.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-45.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-46.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-47.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-47-1.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-48.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-49.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-50.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-51.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-52.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-53.C: Likewise.

From-SVN: r192199
2012-10-08 11:29:05 +02:00
Marc Glisse ae22ac3c62 tree.c (truth_type_for): New function.
2012-09-29  Marc Glisse  <marc.glisse@inria.fr>

	* tree.c (truth_type_for): New function.
	* tree.h (truth_type_for): Declare.
	* gimple-fold.c (and_comparisons_1): Call it.
	(or_comparisons_1): Likewise.
	* tree-ssa-forwprop.c (forward_propagate_into_cond): Don't use
	boolean_type_node for vectors.

From-SVN: r191848
2012-09-29 08:23:23 +00:00
Dehao Chen 5368224f42 Integrate lexical block into source_location.
gcc:
	2012-09-19  Dehao Chen  <dehao@google.com>

	* toplev.c (general_init): Init block_locations.
	* tree.c (tree_set_block): New.
	(tree_block): Change to use LOCATION_BLOCK.
	* tree.h (TREE_SET_BLOCK): New.
	* final.c (reemit_insn_block_notes): Change to use LOCATION_BLOCK.
	(final_start_function): Likewise.
	* input.c (expand_location_1): Likewise.
	* input.h (LOCATION_LOCUS): New.
	(LOCATION_BLOCK): New.
	(IS_UNKNOWN_LOCATION): New.
	* fold-const.c (expr_location_or): Change to use new location.
	* reorg.c (emit_delay_sequence): Likewise.
	(try_merge_delay_insns): Likewise.
	* modulo-sched.c (dump_insn_location): Likewise.
	* lto-streamer-out.c (lto_output_location_bitpack): Likewise.
	* lto-cgraph.c (output_node_opt_summary): Likewise.
	* jump.c (rtx_renumbered_equal_p): Likewise.
	* ifcvt.c (noce_try_move): Likewise.
	(noce_try_store_flag): Likewise.
	(noce_try_store_flag_constants): Likewise.
	(noce_try_addcc): Likewise.
	(noce_try_store_flag_mask): Likewise.
	(noce_try_cmove): Likewise.
	(noce_try_cmove_arith): Likewise.
	(noce_try_minmax): Likewise.
	(noce_try_abs): Likewise.
	(noce_try_sign_mask): Likewise.
	(noce_try_bitop): Likewise.
	(noce_process_if_block): Likewise.
	(cond_move_process_if_block): Likewise.
	(find_cond_trap): Likewise.
	* ipa-prop.c (ipa_set_jf_constant): Likewise.
	(ipa_write_jump_function): Likewise.
	* dwarf2out.c (add_src_coords_attributes): Likewise.
	* expr.c (expand_expr_real): Likewise.
	* tree-parloops.c (create_loop_fn): Likewise.
	* recog.c (peep2_attempt): Likewise.
	* function.c (free_after_compilation): Likewise.
	(expand_function_end): Likewise.
	(set_insn_locations): Likewise.
	(thread_prologue_and_epilogue_insns): Likewise.
	* print-rtl.c (print_rtx): Likewise.
	* profile.c (branch_prob): Likewise.
	* trans-mem.c (ipa_tm_scan_irr_block): Likewise.
	* gimplify.c (gimplify_call_expr): Likewise.
	* except.c (duplicate_eh_regions_1): Likewise.
	* emit-rtl.c (try_split): Likewise.
	(make_insn_raw): Likewise.
	(make_debug_insn_raw): Likewise.
	(make_jump_insn_raw): Likewise.
	(make_call_insn_raw): Likewise.
	(emit_pattern_after_setloc): Likewise.
	(emit_pattern_after): Likewise.
	(emit_debug_insn_after): Likewise.
	(emit_pattern_before): Likewise.
	(emit_insn_before_setloc): Likewise.
	(emit_jump_insn_before): Likewise.
	(emit_call_insn_before_setloc): Likewise.
	(emit_call_insn_before): Likeise.
	(emit_debug_insn_before_setloc): Likewise.
	(emit_copy_of_insn_after): Likewise.
	(insn_locators_alloc): Remove.
	(insn_locators_finalize): Remove.
	(insn_locators_free): Remove.
	(set_curr_insn_source_location): Remove.
	(get_curr_insn_source_location): Remove.
	(set_curr_insn_block): Remove.
	(get_curr_insn_block): Remove.
	(locator_scope): Remove.
	(insn_scope): Change to use new location.
	(locator_location): Remove.
	(insn_line): Change to use new location.
	(locator_file): Remove.
	(insn_file): Change to use new location.
	(locator_eq): Remove.
	(insn_locations_init): New.
	(insn_locations_finalize): New.
	(set_curr_insn_location): New.
	(curr_insn_location): New.
	* cfgexpand.c (gimple_assign_rhs_to_tree): Change to use new location.
	(expand_gimple_cond): Likewise.
	(expand_call_stmt): Likewise.
	(expand_gimple_stmt_1): Likewise.
	(expand_gimple_basic_block): Likewise.
	(construct_exit_block): Likewise.
	(gimple_expand_cfg): Likewise.
	* cfgcleanup.c (try_forward_edges): Likewise.
	* tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
	(dump_scope_block): Likewise.
	(remove_unused_locals): Likewise.
	* rtl.c (rtx_equal_p_cb): Likewise.
	(rtx_equal_p): Likewise.
	* rtl.h (XUINT): New.
	(INSN_LOCATOR): Remove.
	(CURR_INSN_LOCATION): Remove.
	(INSN_LOCATION): New.
	(INSN_HAS_LOCATION): New.
	* tree-inline.c (remap_gimple_op_r): Change to use new location.
	(copy_tree_body_r): Likewise.
	(copy_phis_for_bb): Likewise.
	(expand_call_inline): Likewise.
	* tree-streamer-in.c (lto_input_ts_exp_tree_pointers): Likewise.
	* tree-streamer-out.c (write_ts_decl_minimal_tree_pointers): Likewise.
	* gimple-streamer-out.c (output_gimple_stmt): Likewise.
	* combine.c (try_combine): Likewise.
	* tree-outof-ssa.c (set_location_for_edge): Likewise.
	(insert_partition_copy_on_edge): Likewise.
	(insert_value_copy_on_edge): Likewise.
	(insert_rtx_to_part_on_edge): Likewise.
	(insert_part_to_rtx_on_edge): Likewise.
	* basic-block.h (edge_def): Remove field.
	* gimple.h (gimple_statement_base): Remove field.
	(gimple_bb): Change to use new location.
	(gimple_set_block): Likewise.
	(gimple_has_location): Likewise.
	* tree-cfg.c (make_cond_expr_edges): Likewise.
	(make_goto_expr_edges): Likewise.
	(gimple_can_merge_blocks_p): Likewise.
	(move_stmt_op): Likewise.
	(move_block_to_fn): Likewise.
	* config/alpha/alpha.c (alpha_output_mi_thunk_osf): Likewise.
	* config/sparc/sparc.c (sparc_output_mi_thunk): Likewise.
	* config/i386/i386.c (x86_output_mi_thunk): Likewise.
	* config/tilegx/tilegx.c (tilegx_output_mi_thunk): Likewise.
	* config/sh/sh.c (sh_output_mi_thunk): Likewise.
	* config/ia64/ia64.c (ia64_output_mi_thunk): Likewise.
	* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise.
	* config/score/score.c (score_output_mi_thunk): Likewise.
	* config/tilepro/tilepro.c (tilepro_asm_output_mi_thunk): Likewise.
	* config/mips/mips.c (mips_output_mi_thunk): Likewise.
	* cfgrtl.c (unique_locus_on_edge_between_p): Likewise.
	(unique_locus_on_edge_between_p): Likewise.
	(emit_nop_for_unique_locus_between): Likewise.
	(force_nonfallthru_and_redirect): Likewise.
	(fixup_reorder_chain): Likewise.
	(cfg_layout_merge_blocks): Likewise.
	* stmt.c (emit_case_nodes): Likewise.

gcc/lto:
	2012-09-19  Dehao Chen  <dehao@google.com>

	* lto/lto.c (lto_fixup_prevailing_decls): Remove tree.exp.block field.

libcpp:
	2012-09-19  Dehao Chen  <dehao@google.com>

	* include/line-map.h (MAX_SOURCE_LOCATION): New value.
	(location_adhoc_data_fini): New.
	(get_combined_adhoc_loc): New.
	(get_data_from_adhoc_loc): New.
	(get_location_from_adhoc_loc): New.
	(location_adhoc_data_map): New.
	(COMBINE_LOCATION_DATA): New.
	(IS_ADHOC_LOC): New.
	(expanded_location): New field.
	(line_maps): New field.
	* line-map.c (location_adhoc_data): New.
	(location_adhoc_data_hash): New.
	(location_adhoc_data_eq): New.
	(location_adhoc_data_update): New.
	(get_combined_adhoc_loc): New.
	(get_data_from_adhoc_loc): New.
	(get_location_from_adhoc_loc): New.
	(location_adhoc_data_init): New.
	(location_adhoc_data_fini): New.
	(linemap_init): Initialize location_adhoc_data.
	(linemap_lookup): Change to use new location.
	(linemap_ordinary_map_lookup): Likewise.
	(linemap_macro_map_lookup): Likewise.
	(linemap_macro_map_loc_to_def_point): Likewise.
	(linemap_macro_map_loc_unwind_toward_spel): Likewise.
	(linemap_get_expansion_line): Likewise.
	(linemap_get_expansion_filename): Likewise.
	(linemap_location_in_system_header_p): Likewise.
	(linemap_location_from_macro_expansion_p): Likewise.
	(linemap_macro_loc_to_spelling_point): Likewise.
	(linemap_macro_loc_to_def_point): Likewise.
	(linemap_macro_loc_to_exp_point): Likewise.
	(linemap_resolve_location): Likewise.
	(linemap_unwind_toward_expansion): Likewise.
	(linemap_unwind_to_first_non_reserved_loc): Likewise.
	(linemap_expand_location): Likewise.
	(linemap_dump_location): Likewise.
	(linemap_line_start): Likewise.

From-SVN: r191494
2012-09-19 19:56:42 +00:00
Diego Novillo f32682ca25 Remove unnecessary VEC function overloads.
Several VEC member functions that accept an element 'T' used to have
two overloads: one taking 'T', the second taking 'T *'.

This used to be needed because of the interface dichotomy between
vectors of objects and vectors of pointers.  In the past, vectors of
pointers would use pass-by-value semantics, but vectors of objects
would use pass-by-reference semantics.  This is no longer necessary,
but the distinction had remained.

The main side-effect of this change is some code reduction in code
that manipulates vectors of objects.  For instance,

-  struct iterator_use *iuse;
-
-  iuse = VEC_safe_push (iterator_use, heap, iterator_uses, NULL);
-  iuse->iterator = iterator;
-  iuse->ptr = ptr;
+  struct iterator_use iuse = {iterator, ptr};
+  VEC_safe_push (iterator_use, heap, iterator_uses, iuse);

Compile time performance was not affected.

Tested on x86_64 and ppc64.

Also built all-gcc on all targets using VEC routines: arm, bfin, c6x,
epiphany, ia64, mips, sh, spu, and vms.

2012-09-10  Diego Novillo  <dnovillo@google.com>

	* vec.h (vec_t::quick_push): Remove overload that accepts 'T *'.
	Update all users.
	(vec_t::safe_push): Likewise.
	(vec_t::quick_insert): Likewise.
	(vec_t::lower_bound): Likewise.
	(vec_t::safe_insert): Likewise.
	(vec_t::replace): Change second argument to 'T &'.

From-SVN: r191165
2012-09-10 20:04:13 -04:00
Lawrence Crowl 27bcd47cfa Modify gcc/*.[hc] double_int call sites to use the new interface.
This change entailed adding a few new methods to double_int.

The change results in a 0.163% time improvement with a 70% confidence.

Tested on x86_64.


Index: gcc/ChangeLog

2012-09-06  Lawrence Crowl  <crowl@google.com>

	* double-int.h (double_int::operator &=): New.
	(double_int::operator ^=): New.
	(double_int::operator |=): New.
	(double_int::mul_with_sign): Modify overflow parameter to bool*.
	(double_int::add_with_sign): New.
	(double_int::ule): New.
	(double_int::sle): New.
	(binary double_int::operator *): Remove parameter name.
	(binary double_int::operator +): Likewise.
	(binary double_int::operator -): Likewise.
	(binary double_int::operator &): Likewise.
	(double_int::operator |): Likewise.
	(double_int::operator ^): Likewise.
	(double_int::and_not): Likewise.
	(double_int::from_shwi): Tidy formatting.
	(double_int::from_uhwi): Likewise.
	(double_int::from_uhwi): Likewise.
	* double-int.c (double_int::mul_with_sign): Modify overflow parameter
	to bool*.
	(double_int::add_with_sign): New.
	(double_int::ule): New.
	(double_int::sle): New.
	* builtins.c: Modify to use the new double_int interface.
	* cgraph.c: Likewise.
	* combine.c: Likewise.
	* dwarf2out.c: Likewise.
	* emit-rtl.c: Likewise.
	* expmed.c: Likewise.
	* expr.c: Likewise.
	* fixed-value.c: Likewise.
	* fold-const.c: Likewise.
	* gimple-fold.c: Likewise.
	* gimple-ssa-strength-reduction.c: Likewise.
	* gimplify-rtx.c: Likewise.
	* ipa-prop.c: Likewise.
	* loop-iv.c: Likewise.
	* optabs.c: Likewise.
	* stor-layout.c: Likewise.
	* tree-affine.c: Likewise.
	* tree-cfg.c: Likewise.
	* tree-dfa.c: Likewise.
	* tree-flow-inline.h: Likewise.
	* tree-object-size.c: Likewise.
	* tree-predcom.c: Likewise.
	* tree-pretty-print.c: Likewise.
	* tree-sra.c: Likewise.
	* tree-ssa-address.c: Likewise.
	* tree-ssa-alias.c: Likewise.
	* tree-ssa-ccp.c: Likewise.
	* tree-ssa-forwprop.c: Likewise.
	* tree-ssa-loop-ivopts.c: Likewise.
	* tree-ssa-loop-niter.c: Likewise.
	* tree-ssa-phiopt.c: Likewise.
	* tree-ssa-pre.c: Likewise.
	* tree-ssa-sccvn: Likewise.
	* tree-ssa-structalias.c: Likewise.
	* tree-ssa.c: Likewise.
	* tree-switch-conversion.c: Likewise.
	* tree-vect-loop-manip.c: Likewise.
	* tree-vrp.c: Likewise.
	* tree.h: Likewise.
	* tree.c: Likewise.
	* varasm.c: Likewise.

From-SVN: r191047
2012-09-07 00:06:35 +00:00
Jakub Jelinek b6b27e9830 tree.c (copy_node_stat): Clear DECL_STRUCT_FUNCTION.
* tree.c (copy_node_stat): Clear DECL_STRUCT_FUNCTION.
fortran/
	* trans-decl.c (trans_function_start, generate_coarray_init,
	create_main_function, gfc_generate_constructors): Call
	allocate_struct_function instead of init_function_start.

From-SVN: r190619
2012-08-23 12:02:40 +02:00
Diego Novillo 0823efedd0 backport: As described in http://gcc.gnu.org/ml/gcc/2012-08/msg00015.html...
Merge from cxx-conversion branch (http://gcc.gnu.org/wiki/cxx-conversion).

As described in http://gcc.gnu.org/ml/gcc/2012-08/msg00015.html, this patch
changes the default bootstrap process so that stage 1 always builds with a C++
compiler.

Other than the bootstrap change, the patch makes no functional changes to the
compiler.  Everything should build as it does now in trunk.  The main
changes in this patch are:

1- Configuration changes.
2- Re-write of VEC.
3- Re-write of gengtype to support C++ templates and
   user-provided marking functions.
4- New hash table class.
5- Re-write double_int.
6- Implement tree macros as inline functions so they can be
   called from gdb.

As discussed before, several of these changes do not fully change
the call sites to use the new APIs.

The bootstrap changes have already been tested on a wide range of
targets (http://gcc.gnu.org/wiki/CppBuildStatus).  Additionally,
I have tested the merged trunk on: x86_64-unknown-linux-gnu,
mips64el-unknown-linux-gnu, powerpc64-unknown-linux-gnu,
i686-pc-linux-gnu, and ia64-unknown-linux-gnu.

ChangeLog
2012-08-14   Diego Novillo  <dnovillo@google.com>

	Merge from cxx-conversion branch.

	* Makefile.tpl (STAGE[+id+]_CXXFLAGS): Remove
	POSTSTAGE1_CONFIGURE_FLAGS.
	* Makefile.in: Regenerate.
	* configure.ac (ENABLE_BUILD_WITH_CXX): Remove.  Update all users.
	Force C++ when bootstrapping.
	* configure: Regenerate.


libcpp/ChangeLog
2012-08-14   Diego Novillo  <dnovillo@google.com>

	Merge from cxx-conversion branch.  Configury.

	* Makefile.in: Remove all handlers of ENABLE_BUILD_WITH_CXX.
	* configure.ac: Likewise.
	* configure: Regenerate.

2012-08-14   Lawrence Crowl  <crowl@google.com>

	Merge from cxx-conversion branch.  New C++ hash table.

	* include/symtab.h (typedef struct ht hash_table): Change the typedef
	name to cpp_hash_table.  Update all users of the typedef.

gcc/ChangeLog
2012-08-14   Diego Novillo  <dnovillo@google.com>

	Merge from cxx-conversion branch.  Configury.

	* configure.ac (CXX_FOR_BUILD): Define and substitute.
	(BUILD_CXXFLAGS): Define.
	Remove all handlers of ENABLE_BUILD_WITH_CXX.
	Force all build to be with C++.
	* Makefile.in (BUILD_CXXFLAGS): Use it.
	Remove all handlers of ENABLE_BUILD_WITH_CXX.
	* configure: Regenerate.
	* config.in: Regenerate.
	* doc/install.texi: Remove documentation for --enable-build-with-cxx
	and --enable-build-poststage1-with-cxx.

2012-08-14   Diego Novillo  <dnovillo@google.com>

	Merge from cxx-conversion branch.  Re-implement VEC in C++.

	* vec.c (vec_heap_free): Convert into a template function.
	(vec_gc_o_reserve_1): Make extern.
	(vec_gc_p_reserve): Remove.
	(vec_gc_p_reserve_exact): Remove.
	(vec_gc_o_reserve): Remove.
	(vec_gc_o_reserve_exact): Remove.
	(vec_heap_o_reserve_1): Make extern.
	(vec_heap_p_reserve): Remove.
	(vec_heap_p_reserve_exact): Remove.
	(vec_heap_o_reserve): Remove.
	(vec_heap_o_reserve_exact): Remove.
	(vec_stack_p_reserve): Remove.
	(vec_stack_p_reserve_exact): Remove.
	* vec.h (VEC_CHECK_INFO, VEC_CHECK_DECL, VEC_CHECK_PASS,
	VEC_ASSERT, VEC_ASSERT_FAIL, vec_assert_fail): Move earlier
	in the file.
	(VEC): Define to vec_t<T>.
	(vec_allocation_t): Define.
	(struct vec_prefix): Move earlier in the file.
	(vec_t<T>): New template.
	(DEF_VEC_I, DEF_VECL_ALLOC_I, DEF_VEC_P, DEF_VEC_ALLOC_P,
	DEF_VEC_O, DEF_VEC_ALLOC_P, DEF_VEC_O, DEF_VEC_ALLOC_O,
	DEF_VEC_ALLOC_P_STACK, DEF_VEC_ALLOC_O_STACK,
	DEF_VEC_ALLOC_I_STACK): Expand to 'struct vec_swallow_trailing_semi'.
	(DEF_VEC_A): Provide template instantiations for
	GC/PCH markers that do not traverse the vector.
	(vec_stack_p_reserve): Remove.
	(vec_stack_p_reserve_exact): Remove.
	(vec_stack_p_reserve_exact_1): Remove.
	(vec_stack_o_reserve): Remove.
	(vec_stack_o_reserve_exact): Remove.
	(vec_stack_free): Re-write as a template function.
	(vec_reserve): New template function.
	(vec_reserve_exact): New template function.
	(vec_heap_free): New template function if GATHER_STATISTICS is
	defined.  Otherwise, macro that expands to free().
	(VEC_length_1): New template function.
	(VEC_length): Call it.
	(VEC_empty_1): New template function.
	(VEC_empty): Call it.
	(VEC_address_1): New template function.
	(VEC_address): Call it.
	(VEC_last_1): New template function.
	(VEC_last): Call it.  Change return type to T&.
	Change all users that used VEC_Os.
	(VEC_index_1): New template function.
	(VEC_index): Call it.  Return a T& instead of a T*.
	Update all callers that were using VEC_O before.
	(VEC_iterate_1): New template function.
	(VEC_iterate): Call it.
	(VEC_embedded_size_1): New template function.
	(VEC_embedded_size): Call it.
	(VEC_embedded_init_1): New template function.
	(VEC_embedded_init): Call it.
	(VEC_alloc_1): New template function.
	(VEC_alloc): Call it.  If A is 'stack', call XALLOCAVAR to
	do the allocation.
	(VEC_free_1): New template function.
	(VEC_free): Call it.
	(VEC_copy_1): New template function.
	(VEC_copy): Call it.
	(VEC_space_1): New template function
	(VEC_space): Call it.
	(VEC_reserve_1): New template function.
	(VEC_reserve): Call it.
	(VEC_reserve_exact_1): New template function.
	(VEC_reserve_exact): Call it.
	(VEC_splice_1): New template function.
	(VEC_splice): Call it.
	(VEC_safe_splice_1): New template function.
	(VEC_safe_splice): Call it.
	(VEC_quick_push_1): New template function.  Create two overloads, one
	accepting T, the other accepting T *.  Update all callers
	where T and T * are ambiguous.
	(VEC_quick_push): Call it.
	(VEC_safe_push_1): New template function. Create two overloads, one
	accepting T, the other accepting T *.  Update all callers
	where T and T * are ambiguous.
	(VEC_safe_push): Call it.
	(VEC_pop_1): New template function.
	(VEC_pop): Call it.
	(VEC_truncate_1): New template function.
	(VEC_truncate): Call it.
	(VEC_safe_grow_1): New template function.
	(VEC_safe_grow): Call it.
	(VEC_safe_grow_cleared_1): New template function.
	(VEC_safe_grow_cleared): Call it.
	(VEC_replace_1): New template function.
	(VEC_replace): Call it.  Always accept T instead of T*.
	Update all callers that used VEC_Os.
	(VEC_quick_insert_1): New template function.
	(VEC_quick_insert): Call it.
	(VEC_safe_insert_1): New template function.
	(VEC_safe_insert): Call it.
	(VEC_ordered_remove_1): New template function.
	(VEC_ordered_remove): Call it.
	(VEC_unordered_remove_1): New template function.
	(VEC_unordered_remove): Call it.
	(VEC_block_remove_1): New template function.
	(VEC_block_remove): Call it.
	(VEC_lower_bound_1): New template function.
	(VEC_lower_bound): Call it.
	(VEC_OP): Remove.
	(DEF_VEC_FUNC_P): Remove.
	(DEF_VEC_ALLOC_FUNC_P): Remove.
	(DEF_VEC_NONALLOC_FUNCS_P): Remove.
	(DEF_VEC_FUNC_O): Remove.
	(DEF_VEC_ALLOC_FUNC_O): Remove.
	(DEF_VEC_NONALLOC_FUNCS_O): Remove.
	(DEF_VEC_ALLOC_FUNC_I): Remove.
	(DEF_VEC_NONALLOC_FUNCS_I): Remove.
	(DEF_VEC_ALLOC_FUNC_P_STACK): Remove.
	(DEF_VEC_ALLOC_FUNC_O_STACK): Remove.
	(DEF_VEC_ALLOC_FUNC_I_STACK): Remove.
	(vec_reserve_exact): New template function.

	* gengtype-lex.l (DEF_VEC_ALLOC_[IOP]/{EOID}): Remove.
	* gengtype-parse.c (token_names): Remove DEF_VEC_ALLOC_[IOP].
	(typedef_name): Emit vec_t<C1> instead of VEC_C1_C2.
	(def_vec_alloc): Remove.  Update all callers.
	* gengtype.c (filter_type_name): New.
	(output_mangled_typename): Call it.
	(write_func_for_structure): Likewise.
	(write_types): Likewise.
	(write_root): Likewise.
	(write_typed_alloc_def): Likewise.
	(note_def_vec): Emit vec_t<TYPE_NAME> instead of VEC_TYPE_NAME_base.
	(note_def_vec_alloc): Remove.
	* gengtype.h (note_def_vec_alloc): Remove.
	(DEFVEC_ALLOC): Remove token code.

	* df-scan.c (df_bb_verify): Remove call to df_free_collection_rec
	inside the insn traversal loop.
	* gimplify.c (gimplify_compound_lval): Rename STACK to EXPR_STACK.
	* ipa-inline.c (inline_small_functions): Rename HEAP to EDGE_HEAP.
	* reg-stack.c (stack): Rename to STACK_PTR.  Update all users.
	* tree-vrp.c (stack): Rename to EQUIV_STACK.  Update all users.

	* config/bfin/bfin.c (hwloop_optimize): Update some calls to
	VEC_* for vectors of non-pointers.
	* config/c6x/c6x.c (try_rename_operands): Likewise.
	(reshuffle_units): Likewise.
	* config/mips/mips.c (mips_multi_start): Likewise.
	(mips_multi_add): Likewise.
	(mips_multi_copy_insn): Likewise.
	(mips_multi_set_operand): Likewise.
	* hw-doloop.c (discover_loop): Likewise.
	(discover_loops): Likewise.
	(reorg_loops): Likewise.

2012-08-14   Diego Novillo  <dnovillo@google.com>

	Merge from cxx-conversion branch.  C++ support in gengtype.

	* coretypes.h (gt_pointer_operator): Move from ...
	* ggc.h: ... here.
	* doc/gty.texi: Document support for C++ templates and
	user-provided markers.
	* gcc/gengtype-lex.l: Update copyright year.
	Remove support for recognizing DEF_VEC_O, DEF_VEC_P and
	DEFVEC_I.
	* gengtype-parse.c: Update copyright year.
	(token_names): Remove DEF_VEC_O, DEF_VEC_P and DEF_VEC_I.
	(require_template_declaration): New.
	(typedef_name): Call it.
	(type): Replace IS_UNION with KIND. Replace all users.
	(def_vec): Remove.  Update all users.
	* gengtype-state.c (type_lineloc): Handle TYPE_USER_STRUCT.
	(write_state_user_struct_type): New.
	(write_state_type): Call it.
	(read_state_user_struct_type): New.
	(read_state_type): Call it.
	* gengtype.c: Update copyright year.
	(dump_pair): Move declaration to the top.
	(dump_type): Likewise.
	(dump_type_list): Likewise.
	(dbgprint_count_type_at): Handle TYPE_USER_STRUCT.
	(create_user_defined_type): New.
	(resolve_typedef): Call it.
	(new_structure): Replace argument ISUNION with KIND.
	Change users to refer to KIND directly.
	Update all callers.
	(find_structure): Likewise.
	(set_gc_used_type): Handle TYPE_USER_STRUCT.
	(create_file): Update HDR to include new copyright year.
	(struct walk_type_data): Add field IN_PTR_FIELD.
	(output_mangled_typename): Handle TYPE_USER_STRUCT.
	(walk_type): Set D->IN_PTR_FIELD when walking a TYPE_POINTER.
	Clear it afterwards.
	Handle TYPE_USER_STRUCT.
	(write_types_process_field): Handle TYPE_USER_STRUCT.
	(get_type_specifier): Move earlier in the file.
	(write_type_decl): New.
	(write_marker_function_name): New.
	(write_user_func_for_structure_ptr): New.
	(write_user_func_for_structure_body): New.
	(write_user_marking_functions): New.
	(write_func_for_structure): Call write_marker_function_name
	and write_type_decl.
	Do not call walk_type for TYPE_USER_STRUCT. Emit a call to the user
	function directly.
	Call write_user_marking_functions on TYPE_USER_STRUCTs.
	(write_types_local_user_process_field): New.
	(write_pch_user_walking_for_structure_body): New.
	(write_pch_user_walking_functions): New.
	(write_types_local_process_field): Handle TYPE_USER_STRUCT.
	(write_local_func_for_structure): Do not call walk_type for
	TYPE_USER_STRUCT. Instead, emit the call to gt_pch_nx directly.
	Call write_pch_user_walking_functions for TYPE_USER_STRUCTs.
	(write_root): Handle TYPE_USER_STRUCT.
	(vec_prefix_type): Remove.  Update all users.
	(note_def_vec): Remove.  Update all users.
	(dump_typekind): Handle TYPE_USER_STRUCT.
	(dump_type): Initialize SEEN_TYPES, if needed.
	Handle TYPE_USER_STRUCT.
	(dump_everything): Do not initialize SEEN_TYPES.
	* gengtype.h: Update copyright year.
	(enum typekind): Add TYPE_USER_STRUCT.
	(union_or_struct_p): Rename from UNION_OR_STRUCT_P.
	Convert into function.
	Add an overload taking const_type_p.
	Update all callers.
	(new_structure): Change second field to type enum typekind.
	Update all users.
	(find_structure): Likewise.
	(note_def_vec): Remove.
	(DEFVEC_OP): Remove.
	(DEFVEC_I): Remove.
	* ggc-page.c (gt_ggc_mx): Add entry points for marking
	'const char *&', 'unsigned char *&' and 'unsigned char&'.
	* ggc-zone.c (gt_ggc_mx): Add entry points for marking
	'const char *&' and 'unsigned char *&'.
	* stringpool.c (gt_pch_nx): Add entry points for marking
	'const char *&', 'unsigned char *&' and 'unsigned char&'.
	Add an entry point for the overload taking arguments 'unsigned char
	*', 'gt_pointer_operator' and 'void *'.
	* vec.h (struct vec_prefix): Remove GTY marker.
	(struct vec_t): Remove GTY((length)) attribute from field 'vec'.
	(gt_ggc_mx (vec_t<T> *)): New template function.
	(gt_pch_nx (vec_t<T> *)): New template function.
	(gt_pch_nx (vec_t<T *> *, gt_pointer_operator, void *)): New template
	function.
	(gt_pch_nx (vec_t<T> *, gt_pointer_operator, void *)): New template
	function.

	* basic-block.h (struct edge_def): Mark GTY((user)).
	Remove all GTY markers from fields.
	(gt_ggc_mx): Declare.
	(gt_pch_nx): Declare.
	* tree-cfg.c (gt_ggc_mx): New.
	(gt_pch_nx): New.

	* gengtype-lex.l (USER_GTY): Add pattern for "user".
	* gengtype-parse.c (option): Handle USER_GTY.
	(opts_have): New.
	(type): Call it.
	If the keyword 'user' is used, do not walk the fields
	of the structure.
	* gengtype.h (USER_GTY): Add.
	* doc/gty.texi: Update.

2012-08-14   Lawrence Crowl  <crowl@google.com>

	Merge cxx-conversion branch.  Implement C++ hash table.

	* hash-table.h: New. Implementation borrowed from libiberty/hashtab.c.
	* hash-table.c: Likewise.
	* tree-ssa-tail-merge.c: Include hash-table.h instead of hashtab.h.
	(static htab_t same_succ_htab): Change type to hash_table;
	move specification of helper functions from create call to declaration.
	Change users to invoke member functions.
	(same_succ_print_traverse): Make extern ssa_.... Change callers.
	Remove void* casting.
	(same_succ_hash): Likewise.
	(same_succ_equal): Likewise.
	(same_succ_delete): Likewise.
	* tree-ssa-threadupdate.c: Include hash-table.h.
	(struct local_info): Rename to ssa_local_info_t to avoid overloading
	the type name local_info with the variable name local_info.
	(static htab_t redirection_data): Change type to hash_table.
	Move specification of helper functions from create call to declaration.
	Change users to invoke member functions.
	(redirection_data_hash): Make extern ssa_.... Change callers.
	Remove void* casting.
	(redirection_data_eq): Likewise.
	(fix_duplicate_block_edges): Likewise.
	(create_duplicates): Likewise.
	(fixup_template_block): Likewise.
	(redirect_edges): Likewise.
	(lookup_redirection_data): Change types associated with the hash table
	from void* to their actual type. Remove unnecessary casts.
	* tree-ssa-ccp.c: Include hash-table.h.
	(typedef gimple_htab): New.  Uses hash_table.  Replace specific uses
	of htab_t with gimple_htab.  Change users to invoke member functions.
	Move specification of helper functions from create call to declaration.
	* tree-ssa-coalesce.c: Include hash-table.h instead of hashtab.h.
	(hash_ssa_name_by_var): Make extern. Remove void* casting.
	(eq_ssa_name_by_var): Likewise.
	(coalesce_ssa_name): Change type of local static htab_t ssa_name_hash
	to hash_table. Change users to invoke member functions.
	Move specification of helper functions from create call to declaration.
	* coverage.c: Include hash-table.h instead of hashtab.h.
	(static htab_t counts_hash): Change type to hash_table;
	move specification of helper functions from create call to declaration.
	Change users to invoke member functions.
	(htab_counts_entry_hash): Make extern. Rename with coverage_... instead
	of htab_... Remove void* casting.
	(htab_counts_entry_eq): Likewise.
	(htab_counts_entry_del): Likewise.
	* tree-ssa-pre.c: Include hash-table.h instead of hashtab.h.
	(static htab_t expression_to_id): Change type to hash_table.
	Move specification of helper functions from create call to declaration.
	Change users to invoke member functions.
	(static htab_t phi_translate_table): Likewise.
	(pre_expr_eq): Make extern ssa_.... Change callers.
	Remove void* casting.
	(pre_expr_hash): Likewise.
	(expr_pred_trans_hash): Likewise.
	(expr_pred_trans_eq): Likewise.
	(alloc_expression_id): Change types associated with the hash table
	from void* to their actual type. Remove unnecessary casts.
	(lookup_expression_id): Likewise.
	(phi_trans_lookup): Likewise.
	(phi_trans_add): Likewise.
	* stringpool.c: Rename uses of libcpp typedef hash_table to
	cpp_hash_table.
	* Makefile.in: Add hash-table.o to OBJS-libcommon-target.
	Add $(HASH_TABLE_H). Add new dependences on $(HASH_TABLE_H).

2012-08-14   Lawrence Crowl  <crowl@google.com>

	Merge from cxx-conversion branch.  Re-write double_int in C++.

	* hash-table.h
	(typedef double_int): Change to struct (POD).
	(double_int::make): New overloads for int to double-int conversion.
	(double_int::mask): New.
	(double_int::max_value): New.
	(double_int::min_value): New.
	(double_int::operator ++): New.
	(double_int::operator --): New.
	(double_int::operator *=): New.
	(double_int::operator +=): New.
	(double_int::operator -=): New.
	(double_int::to_signed): New.
	(double_int::to_unsigned): New.
	(double_int::fits_unsigned): New.
	(double_int::fits_signed): New.
	(double_int::fits): New.
	(double_int::trailing_zeros): New.
	(double_int::popcount): New.
	(double_int::multiple_of): New.
	(double_int::set_bit): New.
	(double_int::mul_with_sign): New.
	(double_int::operator * (binary)): New.
	(double_int::operator + (binary)): New.
	(double_int::operator - (binary)): New.
	(double_int::operator - (unary)): New.
	(double_int::operator ~ (unary)): New.
	(double_int::operator & (binary)): New.
	(double_int::operator | (binary)): New.
	(double_int::operator ^ (binary)): New.
	(double_int::and_not): New.
	(double_int::lshift): New.
	(double_int::rshift): New.
	(double_int::alshift): New.
	(double_int::arshift): New.
	(double_int::llshift): New.
	(double_int::lrshift): New.
	(double_int::lrotate): New.
	(double_int::rrotate): New.
	(double_int::div): New.
	(double_int::sdiv): New.
	(double_int::udiv): New.
	(double_int::mod): New.
	(double_int::smod): New.
	(double_int::umod): New.
	(double_int::divmod): New.
	(double_int::sdivmod): New.
	(double_int::udivmod): New.
	(double_int::ext): New.
	(double_int::zext): New.
	(double_int::sext): New.
	(double_int::is_zero): New.
	(double_int::is_one): New.
	(double_int::is_minus_one): New.
	(double_int::is_negative): New.
	(double_int::cmp): New.
	(double_int::ucmp): New.
	(double_int::scmp): New.
	(double_int::ult): New.
	(double_int::ugt): New.
	(double_int::slt): New.
	(double_int::sgt): New.
	(double_int::max): New.
	(double_int::smax): New.
	(double_int::umax): New.
	(double_int::min): New.
	(double_int::smin): New.
	(double_int::umin): New.
	(double_int::operator ==): New.
	(double_int::operator !=): New.
	(shwi_to_double_int): Change implementation to use member function.
	(double_int_minus_one): Likewise.
	(double_int_zero): Likewise.
	(double_int_one): Likewise.
	(double_int_two): Likewise.
	(double_int_ten): Likewise.
	(uhwi_to_double_int): Likewise.
	(double_int_to_shwi): Likewise.
	(double_int_to_uhwi): Likewise.
	(double_int_fits_in_uhwi_p): Likewise.
	(double_int_fits_in_shwi_p): Likewise.
	(double_int_fits_in_hwi_p): Likewise.
	(double_int_mul): Likewise.
	(double_int_mul_with_sign): Likewise.
	(double_int_add): Likewise.
	(double_int_sub): Likewise.
	(double_int_neg): Likewise.
	(double_int_div): Likewise.
	(double_int_sdiv): Likewise.
	(double_int_udiv): Likewise.
	(double_int_mod): Likewise.
	(double_int_smod): Likewise.
	(double_int_umod): Likewise.
	(double_int_divmod): Likewise.
	(double_int_sdivmod): Likewise.
	(double_int_udivmod): Likewise.
	(double_int_multiple_of): Likewise.
	(double_int_setbit): Likewise.
	(double_int_ctz): Likewise.
	(double_int_not): Likewise.
	(double_int_ior): Likewise.
	(double_int_and): Likewise.
	(double_int_and_not): Likewise.
	(double_int_xor): Likewise.
	(double_int_lshift): Likewise.
	(double_int_rshift): Likewise.
	(double_int_lrotate): Likewise.
	(double_int_rrotate): Likewise.
	(double_int_cmp): Likewise.
	(double_int_scmp): Likewise.
	(double_int_ucmp): Likewise.
	(double_int_max): Likewise.
	(double_int_smax): Likewise.
	(double_int_umax): Likewise.
	(double_int_min): Likewise.
	(double_int_smin): Likewise.
	(double_int_umin): Likewise.
	(double_int_ext): Likewise.
	(double_int_sext): Likewise.
	(double_int_zext): Likewise.
	(double_int_mask): Likewise.
	(double_int_max_value): Likewise.
	(double_int_min_value): Likewise.
	(double_int_zero_p): Likewise.
	(double_int_one_p): Likewise.
	(double_int_minus_one_p): Likewise.
	(double_int_equal_p): Likewise.
	(double_int_popcount): Likewise.
	* hash-table.c
	(double_int_mask): Reuse implementation for double_int::mask.
	(double_int_max_value): Likewise.
	(double_int_min_value): Likewise.
	(double_int_ext): Likewise.
	(double_int_zext): Likewise.
	(double_int_sext): Likewise.
	(double_int_mul_with_sign): Likewise.
	(double_int_divmod): Likewise.
	(double_int_sdivmod): Likewise.
	(double_int_udivmod): Likewise.
	(double_int_div): Likewise.
	(double_int_sdiv): Likewise.
	(double_int_udiv): Likewise.
	(double_int_mod): Likewise.
	(double_int_smod): Likewise.
	(double_int_umod): Likewise.
	(double_int_multiple_of): Likewise.
	(double_int_lshift): Likewise.
	(double_int_rshift): Likewise.
	(double_int_lrotate): Likewise.
	(double_int_rrotate): Likewise.
	(double_int_cmp): Likewise.
	(double_int_ucmp): Likewise.
	(double_int_scmp): Likewise.
	(double_int_max): Likewise.
	(double_int_smax): Likewise.
	(double_int_umax): Likewise.
	(double_int_min): Likewise.
	(double_int_smin): Likewise.
	(double_int_umin): Likewise.
	(double_int_min): Likewise.
	(double_int_min): Likewise.
	(double_int_min): Likewise.
	(double_int_min): Likewise.
	(double_int_min): Likewise.
	(double_int_min): Likewise.
	(double_int::alshift): New.
	(double_int::arshift): New.
	(double_int::llshift): New.
	(double_int::lrshift): New.
	(double_int::ult): New.
	(double_int::ugt): New.
	(double_int::slt): New.
	(double_int::sgt): New.
	(double_int_setbit): Reuse implementation for double_int::set_bit,
	which avoids a name conflict with a macro.
	(double_int_double_int_ctz): Reuse implementation for
	double_int::trailing_zeros.
	(double_int_fits_in_shwi_p): Reuse implementation for
	double_int::fits_signed.
	(double_int_fits_in_hwi_p): Reuse implementation for double_int::fits.
	(double_int_mul): Reuse implementation for binary
	double_int::operator *.
	(double_int_add): Likewise.
	(double_int_sub): Likewise.
	(double_int_neg): Reuse implementation for unary
	double_int::operator -.
	(double_int_max_value): Likewise.
	* fixed-value.c: Change to use member functions introduced above.

2012-08-14   Lawrence Crowl  <crowl@google.com>

	Merge cxx-conversion branch.  Support tree macro calling
	from gdb.

	* tree.h (tree_check): New.
	(TREE_CHECK): Use inline function above instead of __extension__.
	(tree_not_check): New.
	(TREE_NOT_CHECK): Use inline function above instead of __extension__.
	(tree_check2): New.
	(TREE_CHECK2): Use inline function above instead of __extension__.
	(tree_not_check2): New.
	(TREE_NOT_CHECK2): Use inline function above instead of __extension__.
	(tree_check3): New.
	(TREE_CHECK3): Use inline function above instead of __extension__.
	(tree_not_check3): New.
	(TREE_NOT_CHECK3): Use inline function above instead of __extension__.
	(tree_check4): New.
	(TREE_CHECK4): Use inline function above instead of __extension__.
	(tree_not_check4): New.
	(TREE_NOT_CHECK4): Use inline function above instead of __extension__.
	(tree_check5): New.
	(TREE_CHECK5): Use inline function above instead of __extension__.
	(tree_not_check5): New.
	(TREE_NOT_CHECK5): Use inline function above instead of __extension__.
	(contains_struct_check): New.
	(CONTAINS_STRUCT_CHECK): Use inline function above instead of
	__extension__.
	(tree_class_check): New.
	(TREE_CLASS_CHECK): Use inline function above instead of __extension__.
	(tree_range_check): New.
	(TREE_RANGE_CHECK): Use inline function above instead of __extension__.
	(omp_clause_subcode_check): New.
	(OMP_CLAUSE_SUBCODE_CHECK): Use inline function above instead of
	__extension__.
	(omp_clause_range_check): New.
	(OMP_CLAUSE_RANGE_CHECK): Use inline function above instead of
	__extension__.
	(expr_check): New.
	(EXPR_CHECK): Use inline function above instead of __extension__.
	(non_type_check): New.
	(NON_TYPE_CHECK): Use inline function above instead of __extension__.
	(tree_vec_elt_check): New.
	(TREE_VEC_ELT_CHECK): Use inline function above instead of
	__extension__.
	(omp_clause_elt_check): New.
	(OMP_CLAUSE_ELT_CHECK): Use inline function above instead of
	__extension__.
	(tree_operand_check): New.
	(TREE_OPERAND_CHECK): Use inline function above instead of
	__extension__.
	(tree_operand_check_code): New.
	(TREE_OPERAND_CHECK_CODE): Use inline function above instead of
	__extension__.
	(TREE_CHAIN): Simplify implementation.
	(TREE_TYPE): Simplify implementation.
	(tree_operand_length): Move for compilation dependences.
	* gdbinit.in: (macro define __FILE__): New.
	(macro define __LINE__): New.
	(skip "tree.h"): New.

gcc/cp/ChangeLog
2012-08-14   Diego Novillo  <dnovillo@google.com>

	Merge from cxx-conversion branch.  Re-write VEC in C++.

	* call.c (add_function_candidate): Remove const qualifier
	from call to VEC_index.

2012-08-14   Diego Novillo  <dnovillo@google.com>

	Merge from cxx-conversion branch.  Configury.

	* go-c.h: Remove all handlers of ENABLE_BUILD_WITH_CXX.
	* go-gcc.cc: Likewise.
	* go-system.h: Likewise.

From-SVN: r190402
2012-08-14 21:56:07 -04:00
Jakub Jelinek eb87c7c489 re PR c/53968 (integer undefined behaviors in GCC)
PR c/53968
	* tree.c (integer_pow2p): Avoid undefined signed overflows.
	* simplify-rtx.c (neg_const_int): Likewise.
	* expr.c (fixup_args_size_notes): Likewise.
	* stor-layout.c (set_min_and_max_values_for_integral_type): Likewise.
	* double-int.c (mul_double_wide_with_sign): Likewise.
	(double_int_mask): Likewise.
	* tree-ssa-loop-ivopts.c (get_address_cost): Likewise.

From-SVN: r190342
2012-08-13 14:39:54 +02:00
Richard Guenther 70b5e7dc73 tree.h (SSA_NAME_VAR): Return NULL_TREE if an IDENTIFIER_NODE is recorded as var.
2012-08-10  Richard Guenther  <rguenther@suse.de>

	* tree.h (SSA_NAME_VAR): Return NULL_TREE if an IDENTIFIER_NODE
	is recorded as var.
	(SSA_NAME_IDENTIFIER): Return the IDENTIFIER_NODE of the SSA_NAME
	or its SSA_NAME_VAR.
	(SET_SSA_NAME_VAR_OR_IDENTIFIER): New setter.
	* tree-ssanames.c (make_ssa_name_fn): Handle creating anonymous
	SSA names by passing a type instead of a variable decl.
	(release_ssa_name): Use SET_SSA_NAME_VAR_OR_IDENTIFIER.
	(copy_ssa_name_fn): Handle anonymous SSA names.
	(replace_ssa_name_symbol): Use SET_SSA_NAME_VAR_OR_IDENTIFIER.
	* tree-flow-inline.h (make_temp_ssa_name): New inline function.
	* tree-pretty-print.c (dump_generic_node): Use SSA_NAME_IDENTIFIER,
	dump SSA names without a name as <anon>.
	* cfgexpand.c (expand_used_vars): Assing anonymous SSA names we are
	going to expand a decl.
	(gimple_expand_cfg): Assign all SSA names of a partition the
	decl we created for its leader.
	* tree-ssa.c (target_for_debug_bind): Handle SSA_NAMEs.
	(verify_ssa_name): Handle anonymous SSA names.
	(verify_def): Likewise.
	* tree-predcom.c (eliminate_temp_copies): Likewise.
	* tree-ssa-copyrename.c (copy_rename_partition_coalesce): Likewise.
	* tree-ssa-live.c (var_map_base_init): Compute conflicts for
	anonymous SSA names with the same type.
	(mark_all_vars_used_1): Handle anonymous SSA names.
	(verify_live_on_entry): Likewise.
	* tree-ssa-coalesce.c (abnormal_corrupt): Remove.
	(create_outofssa_var_map): Adjust with respect to conflicts we
	compute for anonymous SSA names.  Do not restrict abnormal
	coalescing.
	(coalesce_partitions): Do not restrict abnormal coalescing.
	Assert we only ever coalesce variables we computed conflicts for.
	* tree-ssa-ter.c (process_replaceable): Do not restrict TER
	of anonymous names.
	* expr.c (expand_expr_real_1): Handle anonymous SSA names
	expanded from IVOPTs by creating a raw REG here.
	* tree-cfg.c (replace_ssa_name): Handle anonymous SSA names.
	(dump_function_to_file): Dump anonymous SSA names alongside
	with their types in the variable list.
	(verify_gimple_return): Guard use of SSA_NAME_VAR.
	* tree-into-ssa.c (mark_for_renaming): Handle a NULL symbol.
	(rewrite_into_ssa): Make SSA names anonymous.
	* tree-ssa-structalias.c (alias_get_name): Rewrite.
	* tree-ssa-uninit.c (ssa_undefined_value_p): Handle anonymous
	SSA names.
	(warn_uninitialized_phi): Likewise.
	* tree-ssa-loop-ivopts.c (prepare_decl_rtl): Defer expanding
	anonymous SSA names to the expander.
	(determine_iv_cost): Anonymous SSA names are artificial.
	* tree-ssa-loop-manip.c (tree_transform_and_unroll_loop):
	Handle anonymous SSA names.
	* lto-streamer-out.c (output_ssa_names): Stream SSA_NAME_VAR
	or if NULL, the type of the SSA name.
	* tree-inline.c (remap_ssa_name): Handle anonymous SSA names,
	remap names as anonymous where appropriate.
	(insert_init_stmt): Pass SSA names down to insert_init_debug_bind.
	* tree-ssa-uncprop.c (uncprop_into_successor_phis): Adjust
	according to what we create conflicts for in out-of-SSA
	coalescing.
	* tree-parloops.c (separate_decls_in_region_name): Handle
	anonymous SSA names.
	(add_field_for_name): Likewise.
	* tree.c (get_name): Handle SSA names.
	* tree-ssa-loop-im.c (gen_lsm_tmp_name): Defer to get_name for
	SSA_NAMEs.
	* tree-vect-loop-manip.c (adjust_debug_stmts): Use
	virtual_operand_p.
	* tree-sra.c (create_access_replacement): Give up generating
	a DECL_DEBUG_EXPR for SSA names in the memory reference.
	(replace_removed_params_ssa_names): Guard use of SSA_NAME_VAR.
	* tree-complex.c (get_component_ssa_name): Handle anonymous
	SSA names.
	(set_component_ssa_name): Likewise.
	* tree-ssa-sccvn.c (visit_reference_op_load): Likewise.
	* tree-object-size.c (collect_object_sizes_for): Handle
	uninitialized SSA names properly.
	* ipa-inline-analysis.c (eliminated_by_inlining_prob): Guard use of
	SSA_NAME_VAR.
	* ipa-split.c (test_nonssa_use): Likewise.
	(consider_split): Likewise.
	(mark_nonssa_use): Likewise.

	c-family/
	* c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.

	cp/
	* error.c (dump_expr): Likewise.

	* g++.dg/plugin/selfassign.c: Adjust.
	* gcc.dg/plugin/selfassign.c: Likewise.
	* gcc.dg/strlenopt-11.c: Likewise.
	* gcc.dg/strlenopt-13.c: Likewise.
	* gcc.dg/no-strict-overflow-4.c: Likewise.
	* gcc.dg/strict-overflow-4.c: Likewise.
	* gcc.dg/tree-ssa/alias-11.c: Likewise.
	* gcc.dg/tree-ssa/alias-6.c: Likewise.
	* gcc.dg/tree-ssa/asm-3.c: Likewise.
	* gcc.dg/tree-ssa/pr18908.c: Likewise.
	* gcc.dg/tree-ssa/pr19431.c: Likewise.
	* gcc.dg/tree-ssa/ssa-pre-21.c: Likewise.
	* gcc.dg/tree-ssa/phi-opt-10.c: Likewise.
	* gcc.dg/tree-ssa/phi-opt-7.c: Likewise.
	* gcc.dg/tree-ssa/slsr-27.c: Likewise.
	* gcc.dg/tree-ssa/slsr-28.c: Likewise.
	* gcc.dg/tree-ssa/slsr-29.c: Likewise.
	* gcc.dg/pr46309.c: Likewise.
	* gcc.dg/tree-ssa/loop-5.c: Likewise.

From-SVN: r190284
2012-08-10 08:29:29 +00:00
Richard Guenther 6b4a85ad6f tree-call-cdce.c (check_pow): Simplify.
2012-08-08  Richard Guenther  <rguenther@suse.de>

	* tree-call-cdce.c (check_pow): Simplify.
	(gen_conditions_for_pow_int_base): Likewise.
	* tree-ssa-dom.c (propagate_rhs_into_lhs): Do not handle
	virtual operands here.
	* tree-ssa-operands.c (get_name_decl): Remove unused function.
	* gimplify.c (gimple_regimplify_operands): Remove dead code.
	* tree-vrp.c (get_value_range): Move SSA_NAME_VAR access.
	* tree-parloops.c (create_phi_for_local_result): Use copy_ssa_name.
	* value-prof.c (gimple_ic): Use duplicate_ssa_name.
	(gimple_stringop_fixed_value): Likewise.
	* tree.c (needs_to_live_in_memory): Remove SSA name handling.
	* tree-stdarg.c (find_va_list_reference): Store SSA_NAME_VERSIONs
	in the bitmap alongside shifted DECL_UIDs.
	(va_list_counter_struct_op): Likewise.
	(va_list_ptr_read): Likewise.
	(va_list_ptr_write): Likewise.
	(check_va_list_escapes): Likewise.
	(check_all_va_list_escapes): Likewise.
	(execute_optimize_stdarg): Likewise.
	* tree-outof-ssa.c (insert_backedge_copies): Use copy_ssa_name.

From-SVN: r190229
2012-08-08 14:40:30 +00:00
Michael Matz 5f564b8f56 tree-complex.c (init_parameter_lattice_values): Don't call var_ann.
* tree-complex.c (init_parameter_lattice_values): Don't call var_ann.
	* tree-dfa.c (struct dfa_stats_d): Remove num_var_anns member.
	(dump_dfa_stats): Don't dump stats about var anns.
	(collect_dfa_stats): Don't collect them.
	(add_referenced_var_1): Don't set var annotation pointers.
	(remove_referenced_var): Ditto, and only remove it it's in the
	hash table.

	* tree-flow-inline.h (var_ann): Remove.
	* tree-flow.h (struct var_ann_d, var_ann_t): Remove.

	* tree-inline.c (remapped_type): Remove.
	(can_be_nonlocal): Most variable will be considered live here,
	return false earlier.
	(remap_decls): Don't call var_ann, all variables will be considered
	referenced here.
	(copy_debug_stmt): Ditto, and use is_global_var.

	* tree-into-ssa.c (rewrite_debug_stmt_uses): Use get_current_def to
	determine if a variable was referred to, not var_ann.
	* tree-ssa-live.c (remove_unused_scope_block_p): Don't check var_ann.
	(remove_unused_locals): Ditto.
	* tree-ssa.c (delete_tree_ssa): Don't free/clear var ann pointers.
	* tree-tailcall.c (arg_needs_copy_p): Don't check var_ann.
	* tree.c (copy_node_stat): Don't clear var ann pointer.
	* tree.h (tree_result_decl, tree_parm_decl, tree_var_decl): Remove
	ann member.
	(DECL_VAR_ANN_PTR): Remove.

	* tree-flow.h (struct var_ann_d): Rename used member.
	(set_is_used): Don't declare.
	* tree-flow-inline.h (clear_is_used): Remove.
	(set_is_used, is_used_p): Move to ...
	* tree-ssa-live.c (set_is_used, is_used_p): ... here, and use
	on the side bitmap.
	(usedvars): New bitmap.
	(dump_scope_block): Don't dump unusedness.
	(remove_unused_locals): Allocate and free usedvars.
	* tree-nrv.c (tree_nrv): Don't clear used flags here.

	* tree-flow.h (struct var_ann_d): Remove base_var_processed and
	base_index members.
	* tree-ssa-live.h (struct _var_map): Remove basevars member.
	(VAR_ANN_BASE_INDEX): Remove.
	* tree-ssa-live.c (var_map_base_init): Use a hash table instead
	of var annotation to compress index space.  Don't deal with above
	removed members.
	(var_map_base_fini): Don't free basevars.
	(init_var_map): Don't clear basevars.

From-SVN: r190039
2012-08-01 14:58:38 +00:00
Eric Botcazou ea814c6675 expr.c (expand_expr_real_1): Do not expand operand #1 and #2 of BIT_FIELD_REF for ignored results.
* expr.c (expand_expr_real_1): Do not expand operand #1 and #2
	of BIT_FIELD_REF for ignored results.
	* fold-const.c (fold_ternary_loc) <BIT_FIELD_REF>: Check that the
	CONSTRUCTOR has vector type before using vector accessors on it.
	* gimplify.c (gimplify_compound_lval): Do not gimplify operand #1 and
	#2 of BIT_FIELD_REF.
	(gimplify_expr) <BIT_FIELD_REF>: Likewise.
	* tree-nested.c (convert_nonlocal_reference_op) <BIT_FIELD_REF>: Do
	not process operand #1 and #2.
	(convert_local_reference_op): Likewise.
	* tree-ssa-pre.c (create_component_ref_by_pieces_1): Remove superfluous
	breaks throughout.
	<BIT_FIELD_REF>: Reuse operand #1 and #2 directly.
	* tree.c (stabilize_reference) <BIT_FIELD_REF>: Do not stabilize
	operand #1 and #2.
	(UPDATE_FLAGS): Do not consider operand #2 of BIT_FIELD_REF.
	(build6_stat): Delete.
	* tree.h (build6_stat, build6, build6_stat_loc, build6_loc): Likewise.
ada/
	* gcc-interface/utils2.c (gnat_stabilize_reference) <BIT_FIELD_REF>: Do
	not stabilize operand #1 and #2.

From-SVN: r189864
2012-07-25 19:43:15 +00:00
Steven Bosscher 7aa6d18a7c sbitmap.h (SBITMAP_ELT_BITS): Use "1u" trick as for BITMAP_WORD_BITS.
gcc/
	* sbitmap.h (SBITMAP_ELT_BITS): Use "1u" trick as for BITMAP_WORD_BITS.
	Move test to check that there is a popcount function for the the number
	of bits in SBITMAP_ELT_BITS to sbitmap.c.
	* sbitmap.c: Test SBITMAP_ELT_BITS, not HOST_BITS_PER_WIDEST_FAST_INT.
	MEM_STAT_INFO): Define in terms of their ALONE counterparts.

	* configure.ac (GATHER_STATISTICS): Always define, non-zero if enabled.
	* configure: Regenerate.
	* statistics.h (GATHER_STATISTICS): Error out if it is not defined.
	(GCC_MEM_STAT_ARGUMENTS): New define.
	(ALONE_MEM_STAT_DECL): Define in terms of GCC_MEM_STAT_ARGUMENTS.
	(ALONE_FINAL_MEM_STAT_DECL, ALONE_FINAL_PASS_MEM_STAT): New defines.
	(MEM_STAT_DECL, FINAL_MEM_STAT_DECL, PASS_MEM_STAT, FINAL_PASS_MEM_STAT,
	* ggc-internal.h (ggc_record_overhead): Use FINAL_MEM_STAT_DECL.
	* ggc.h (ggc_record_overhead, ggc_free_overhead,
	ggc_prune_overhead_list): Remove internal prototypes, they are defined
	already in ggc-internal.h.
	* ggc-common.c (struct loc_descriptor): Remove #ifdef GATHER_STATISTICS
	wrappers.
	(add_statistics): Likewise.
	(dump_ggc_loc_statistics): Likewise. Return if GATHER_STATISTICS is 0. 
	* ggc-zone.c (struct page_entry): Remove #ifdef GATHER_STATISTICS
	wrappers around "survived" and "stats" members.
	(alloc_large_page): Always initialize survived.
	(ggc_internal_alloc_zone_stat): Likewise.
	Remove #ifdef GATHER_STATISTICS wrappers.  Record overhead if
	GATHER_STATISTICS is non-0.
	(ggc_free): Convert #ifdef GATHER_STATISTICS to if-code.
	(sweep_pages): Always increase survived.
	(ggc_collect_1): Convert #ifdef GATHER_STATISTICS to if-code.
	(calculate_average_page_survival): Always define.
	(ggc_collect): Convert #ifdef GATHER_STATISTICS to if-code.
	(ggc_print_statistics): Likewise.
	(ggc_pch_read): Likewise.
	* ggc-page.c (struct globals): Always define "stats" member.
	(ggc_internal_alloc_stat): Convert #ifdef GATHER_STATISTICS to if-code.
	(ggc_free): Likewise.
	(ggc_collec): Likewise.
	(ggc_print_statistics): Likewise.
	* bitmap.h (struct bitmap_head_def): Always define "desc" member.
	(bitmap_initialize_stat): Convert #ifdef GATHER_STATISTICS to if-code.
	* gimple.h (enum gimple_alloc_kind): Always define.
	(gimple_alloc_kind): Likewise.
	* tree-flow.h (phinodes_print_statistics): Always define.
	(ssanames_print_statistics): Likewise.
	* vec.h (vec_heap_free): Always define.
	(VEC_stack_alloc): Define if GATHER_STATISTICS is non-0.
	* alloc-pool.c (alloc_pool_descriptor): Always define.
	(create_alloc_pool): Convert #ifdef GATHER_STATISTICS to if-code.
	(empty_alloc_pool): Likewise.
	(pool_alloc): Likewise.
	(pool_free): Likewise.
	(dump_alloc_pool_statistics): Likewise.
	(print_statistics): Always define.
	* bitmap.c (struct bitmap_descriptor): Always define.
	(bitmap_register): Pass ALONE_FINAL_PASS_MEM_STAT.
	(register_overhead): Always define.
	(bitmap_element_free): Convert #ifdef GATHER_STATISTICS to if-code.
	(bitmap_element_allocate): Likewise.
	(bitmap_elt_clear_from): Likewise.
	(bitmap_obstack_alloc_stat): Likewise.
	(bitmap_gc_alloc_stat): Likewise.
	(bitmap_obstack_free): Likewise.
	(bitmap_find_bit): Likewise.
	(bitmap_ior_and_into):  Likewise.
	(bitmap_print): Likewise.
	(dump_bitmap_statistics): Likewise. Return if GATHER_STATISTICS is 0.
	* gimple.c (gimple_alloc_counts, gimple_alloc_sizes): Always define.
	(gimple_alloc_kind_names): Likewise.
	(gimple_alloc_stat): Convert #ifdef GATHER_STATISTICS to if-code.
	(dump_gimple_statistics): Likewise. Return if GATHER_STATISTICS is 0.
	* rtl.c (rtx_alloc_counts, rtx_alloc_sizes, rtvec_alloc_counts,
	rtvec_alloc_sizes): Always define.
	(rvec_alloc): Convert #ifdef GATHER_STATISTICS to if-code.
	(rtx_alloc_stat): Likewise.
	(dump_rtx_statistics): Likewise. Return if GATHER_STATISTICS is 0.
	* tree.c (_obstack_allocated_p, tree_code_counts, tree_node_counts,
	tree_node_sizes, tree_node_kind_names): Always define.
	(record_node_allocation_statistics): Convert #ifdef GATHER_STATISTICS
	to if-code.
	(type_hash_canon): Likewise.
	(dump_tree_statistics): Likewise.
	* tree-ssanames.c (ssa_name_nodes_reused, ssa_name_nodes_created):
	Always define.
	(ssanames_print_statistics): Likewise.
	(make_ssa_name_fn): Convert #ifdef GATHER_STATISTICS to if-code.
	* tree-phinodes.c (phi_nodes_reused, phi_nodes_created): Always define.
	(phinodes_print_statistics): Likewise.
	(allocate_phi_node): Convert #ifdef GATHER_STATISTICS to if-code.
	* vec.c (struct vec_descriptor): Always define.
	(hash_descriptor, eq_descriptor, ptr_hash_entry, hash_ptr, eq_ptr,
	vec_descriptor, rester_overhead, free_overhead): Likewise.
	(cmp_statistic): Likewise.
	(vec_heap_free): Convert #ifdef GATHER_STATISTICS to if-code.
	(vec_heap_o_reserve_1): Likewise.
	(dump_vec_loc_statistics): Likewise.

cp/
	* cp/class.c (n_vtables, n_vtable_entries, n_vtable_searches,
	n_vtable_elems, n_convert_harshness, n_compute_conversion_costs,
	n_inner_fields_searched): Always define.
	(build_primary_vtable): Convert #ifdef GATHER_STATISTICS to if-code.
	(print_class_statistics): Convert #ifdef GATHER_STATISTICS to if-code.
	* cp/tree.c (depth_reached): Always define global.
	(cxx_print_statistics): Convert #ifdef GATHER_STATISTICS to if-code.
	* cp/pt.c (depth_reached): Always define.
	(push_tinst_level): Convert #ifdef GATHER_STATISTICS to if-code.
	* cp/search.c (n_fields_searched, n_calls_lookup_field,
	n_calls_lookup_field_1, n_calls_lookup_fnfields,
	n_calls_lookup_fnfields_1, n_calls_get_base_type,
	n_outer_fields_searched, n_contexts_saved): Always define.
	(lookup_field_1): Convert #ifdef GATHER_STATISTICS to if-code.
	(lookup_member): Likewise.
	(lookup_fnfields_idx_nolazy): Likewise.
	(print_search_statistics): Likewise.
	(reinit_search_statistics): Unconditionally re-set counters.
	* cp/lex.c (retrofit_lang_decl): Convert #ifdef GATHER_STATISTICS
	to if-code.
	(cxx_dup_lang_specific_decl): Likewise.
	(copy_lang_type): Likewise.
	(cxx_make_type): Likewise.

From-SVN: r189803
2012-07-24 09:49:56 +00:00
Steven Bosscher 7ee2468b92 system.h (dump_file): Do not define.
gcc/
	* system.h (dump_file): Do not define.
	* tree-pass.h: Include dumpfile.h, which is a new file containing...
	(enum tree_dump_index, TDF_*, get_dump_file_name, dump_enabled_p,
	dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p,
	dump_flag_name, dump_file, dump_flags, dump_file_name,
	get_dump_file_info, struct dump_file_info): all of this, moved to...
	* dumpfile.h: Here, new file.
	* tree-dump.h: Include dumpfile.h, but not tree-pass.h.
	(dump_stmt): Remove prototype for C++ specific function.
	(dump_enumerated_decls): Move prototype from here...
	* tree-flow.h (dump_enumerated_decls): ... to here.
	(get_ref_base_and_extent) Move prototype from here ...
	* tree.h (get_ref_base_and_extent) ... to here.
	* tree-ssa-live.c: Do not inclde tree-pretty-print.h, because
	gimple-pretty-print.h is enough.  Do not include tree-dump.h,
	include timevar.h and dumpfile.h instead.
	(struct numbered_tree_d, compare_decls_by_uid,
	dump_enumerated_decls_push, dump_enumerated_decls): Move from here ...
	* tree-dfa.c:(struct numbered_tree_d, compare_decls_by_uid,
	dump_enumerated_decls_push, dump_enumerated_decls):... to here.
	Do not include timevar.h.
	* tree.c: Do not include timevar.h.
	* tree-cfg.c: Do not include langhooks.h, tree-pretty-print.h, and
	timevar.h.
	(dump_cfg_stats): Use current_function_name.
	(gimple_cfg2vcg): Likewise.
	(dump_function_to_file): Likewise.
	* df-scan.c: Do not include tree-pass.h and timevar.h.
	Include dumpfile.h.
	(df_entry_block_bitmap_verify, df_exit_block_bitmap_verify): Do not
	use print_current_pass.
	* df-problems.c: Include dumpfile.h.
	Always define REG_DEAD_DEBUGGING, avoid #ifdef code, because it
	leads to errors in the code not selected.
	(df_note_compute): Do not print_rtl_with_bb here.  Fix compilation
	bug if REG_DEAD_DEBUGGING is not 0, get_insns is not available here.
	* lcm.c: Include dumpfile.h.
	Remove obsolete include of insn-attr.h.
	* dojump.c (do_compare_rtx_and_jump): Remove failure printing for
	missing probability notes.
	* stmt.c: Include dumpfile.h.
	(emit_case_decision_tree): Re-enable printing expand details only
	if TDF_DETAILS.
	* alias.c, auto-inc-dec.c, bb-reorder.c, caller-save.c, cfg.c, 
	cfgcleanup.c, cfgexpand.c, cfgloop.c, cfgloopmanip.c, cgraph.c, 
	cgraphclones.c, cgraphunit.c, combine.c, combine-stack-adj.c, 
	coverage.c, cprop.c, cse.c, cselib.c, dbgcnt.c, dce.c, df-core.c, 
	dse.c, dwarf2out.c, emit-rtl.c, except.c, expr.c, final.c, 
	function.c, fwprop.c, gcse.c, gimple-fold.c, 
	gimple-pretty-print.c, gimple-ssa-strength-reduction.c, 
	gimplify.c, graphite-blocking.c, graphite-clast-to-gimple.c, 
	graphite-dependences.c, graphite-interchange.c, 
	graphite-optimize-isl.c, graphite-poly.c, 
	graphite-sese-to-poly.c, haifa-sched.c, hw-doloop.c, ifcvt.c, 
	ipa.c, ipa-cp.c, ipa-inline-analysis.c, ipa-inline.c, 
	ipa-inline-transform.c, ipa-prop.c, ipa-pure-const.c, 
	ipa-reference.c, ipa-split.c, ipa-utils.c, ira.c, ira-emit.c, 
	jump.c, loop-doloop.c, loop-init.c, loop-invariant.c, loop-iv.c, 
	loop-unroll.c, loop-unswitch.c, lower-subreg.c, 
	lto-section-out.c, lto-streamer-in.c, matrix-reorg.c, mcf.c, 
	mode-switching.c, modulo-sched.c, omega.c, omp-low.c, passes.c, 
	plugin.c, postreload.c, postreload-gcse.c, predict.c, print-rtl.c, 
	print-tree.c, profile.c, recog.c, ree.c, regcprop.c, reginfo.c, 
	regmove.c, regrename.c, reg-stack.c, reload1.c, reorg.c, 
	sched-rgn.c, sched-vis.c, sel-sched.c, sel-sched-ir.c, 
	store-motion.c, tracer.c, trans-mem.c, tree-affine.c, 
	tree-call-cdce.c, tree-cfgcleanup.c, tree-chrec.c, 
	tree-data-ref.c, tree-diagnostic.c, tree-dump.c,
	tree-eh.c, tree-flow-inline.h, tree-if-conv.c, tree-into-ssa.c, 
	tree-mudflap.c, tree-nrv.c, tree-object-size.c, 
	tree-optimize.c, tree-outof-ssa.c, tree-predcom.c, 
	tree-pretty-print.c, tree-profile.c, tree-scalar-evolution.c, 
	tree-sra.c, tree-ssa-address.c, tree-ssa-alias.c, tree-ssa.c, 
	tree-ssa-ccp.c, tree-ssa-coalesce.c, tree-ssa-copy.c, 
	tree-ssa-copyrename.c,, tree-ssa-dce.c, tree-ssa-dom.c, 
	tree-ssa-dse.c, tree-ssa-forwprop.c, tree-ssa-ifcombine.c, 
	tree-ssa-loop.c, tree-ssa-loop-ch.c, tree-ssa-loop-im.c, 
	tree-ssa-loop-ivcanon.c, tree-ssa-loop-ivopts.c, 
	tree-ssa-loop-manip.c, tree-ssa-loop-niter.c, 
	tree-ssa-loop-prefetch.c, tree-ssa-loop-unswitch.c, 
	tree-ssa-math-opts.c, tree-ssa-operands.c, tree-ssa-phiopt.c, 
	tree-ssa-phiprop.c, tree-ssa-pre.c, tree-ssa-propagate.c, 
	tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-ssa-sink.c, 
	tree-ssa-structalias.c, tree-ssa-tail-merge.c, tree-ssa-ter.c, 
	tree-ssa-threadedge.c, tree-ssa-threadupdate.c, 
	tree-ssa-uncprop.c, tree-ssa-uninit.c, 
	tree-switch-conversion.c, tree-tailcall.c, 
	tree-vect-data-refs.c, tree-vect-loop.c, 
	tree-vect-loop-manip.c, tree-vectorizer.c, 
	tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, 
	tree-vrp.c, value-prof.c, var-tracking.c, web.c: Include tree-pass.h
	only if needed.  If tree-pass.h is included, do not include timevar.h
	and dumpfile.h.  If tree-pass.h is not included but dump_file, or
	dump_flags, or the TDF_* flags are used, include dumpfile.h.
	If gimple-pretty-print.h is included, don't include tree-pretty-print.h.
	Remove assorted unnecessary includes.

	* config/mn10300/mn10300.c, config/c6x/c6x.c, config/ia64/ia64.c,
	config/arm/arm.c, config/bfin/bfin.c, config/frv/frv.c,
	config/spu/spu.c, config/mep/mep.c, config/i386/i386.c:
	Include dumpfile.h.
	* config/rl78/rl78.c: Include dumpfile.h instead of tree-pass.h.
	* arm/t-arm, avr/t-avr, i386/t-i386, ia64/t-ia64, mep/t-mep,
	spu/t-spu-elf: Fix dependencies.

c-family/
	* c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
	* c-ada-spec.c: Likewise.
	* c-dump.c (dump_stmt): Move to cp/dump.c, the only user.

c/
	* c-decl.c: Include dumpfile.h instead of tree-dump.h.
	* Make-lang.in: Fix dependencies.

cp/
	* dump.c (dump_stmt): Moved here from c-dump.c.
	* optimize.c: Include dumpfile.h instead of tree-dump.h.
	* class.c: Likewise.
	* decl2.c: Likewise.
	* Make-lang.in: Fix dependencies.

fortran/
	* f95-lang.c: Include dumpfile.h instead of tree-dump.h.
	* Make-lang.in: Fix dependencies.

java/
	* java-gimplify.c Include dumpfile.h instead of tree-dump.h
	* Make-lang.in: Fix dependencies.

lto/
	* lto.c: Do not include timevar.h.
	* Make-lang.in: Fix dependencies.

ada/
	* gcc-interface/utils.c: Include timevar.h.
	* Make-lang.in: Fix dependencies.

From-SVN: r189519
2012-07-16 11:32:42 +00:00
Richard Henderson 3f30a9a6aa Add VEC_WIDEN_MULT_EVEN/ODD_EXPR
* tree.def (VEC_WIDEN_MULT_EVEN_EXPR, VEC_WIDEN_MULT_ODD_EXPR): New.
        * cfgexpand.c (expand_debug_expr): Handle them.
        * expr.c (expand_expr_real_2): Likewise.
        * fold-const.c (fold_binary_loc): Likewise.
        * gimple-pretty-print.c (dump_binary_rhs): Likewise.
        * optabs.c (optab_for_tree_code): Likewise.
        * tree-cfg.c (verify_gimple_assign_binary): Likewise.
        * tree-inline.c (estimate_operator_cost): Likewise.
        * tree-pretty-print.c (dump_generic_node): Likewise.
        * tree.c (commutative_tree_code): Likewise.
        * tree-vect-generic.c (expand_vector_operations_1): Likewise.
        Handle type change before looking up optab.
        * optabs.h (OTI_vec_widen_umult_even, OTI_vec_widen_umult_odd): New.
        (OTI_vec_widen_smult_even, OTI_vec_widen_smult_odd): New.
        (vec_widen_umult_even_optab, vec_widen_umult_odd_optab): New.
        (vec_widen_smult_even_optab, vec_widen_smult_odd_optab): New.
        * genopinit.c (optabs): Initialize them.
        * doc/md.texi: Document them.

From-SVN: r189403
2012-07-10 01:23:39 -07:00