1. 01 Jan, 2019 1 commit
  2. 27 Dec, 2018 1 commit
    • ipa-devirt.c (polymorphic_call_target_d): Add n_odr_types. · f7293b9d
      	* ipa-devirt.c (polymorphic_call_target_d): Add n_odr_types.
      	(polymorphic_call_target_hasher::hash): Hash it.
      	(polymorphic_call_target_hasher::equal): Compare it.
      	(possible_polymorphic_call_targets): Set it.
      	* tree.c (free_lang_data): Rebuild type inheritance graph even on
      	non-LTO path.
      
      	* g++.dg/ipa/devirt-53.C: New testcase.
      
      From-SVN: r267438
      Jan Hubicka committed
  3. 24 Dec, 2018 1 commit
  4. 22 Dec, 2018 1 commit
    • tree.c: (obj_type_ref_class): Move to... · 4611c03d
      	* tree.c: (obj_type_ref_class): Move to...
      	* ipa-devirt.c (obj_type_ref_class): Move to here; lookup main
      	odr type.
      	(get_odr_type): Compensate for type simplification.
      
      	* g++.dg/ipa/devirt-30.C: Add dg-do.
      	* g++.dg/lto/devirt-1_0.C: New testcase.
      	* g++.dg/lto/devirt-2_0.C: New testcase.
      	* g++.dg/lto/devirt-3_0.C: New testcase.
      	* g++.dg/lto/devirt-4_0.C: New testcase.
      	* g++.dg/lto/devirt-5_0.C: New testcase.
      	* g++.dg/lto/devirt-6_0.C: New testcase.
      	* g++.dg/lto/devirt-13_0.C: New testcase.
      	* g++.dg/lto/devirt-14_0.C: New testcase.
      	* g++.dg/lto/devirt-19_0.C: New testcase.
      	* g++.dg/lto/devirt-22_0.C: New testcase.
      	* g++.dg/lto/devirt-23_0.C: New testcase.
      	* g++.dg/lto/devirt-30_0.C: New testcase.
      	* g++.dg/lto/devirt-34_0.C: New testcase.
      
      From-SVN: r267359
      Jan Hubicka committed
  5. 19 Dec, 2018 1 commit
    • C++: more location wrapper nodes (PR c++/43064, PR c++/43486) · dfd7fdca
      This is v6 of the patch, as posted to:
        https://gcc.gnu.org/ml/gcc-patches/2018-12/msg01331.html
      
      
      The C++ frontend gained various location wrapper nodes in r256448 (GCC 8).
      That patch:
        https://gcc.gnu.org/ml/gcc-patches/2018-01/msg00799.html
      added wrapper nodes around all nodes with !CAN_HAVE_LOCATION_P for:
      
      * arguments at callsites, and for
      
      * typeid, alignof, sizeof, and offsetof.
      
      This is a followup to that patch, adding many more location wrappers
      to the C++ frontend.  It adds location wrappers for nodes with
      !CAN_HAVE_LOCATION_P to:
      
      * all literal nodes (in cp_parser_primary_expression)
      
      * all id-expression nodes (in finish_id_expression), except within a
        decltype.
      
      * all mem-initializer nodes within a mem-initializer-list
        (in cp_parser_mem_initializer)
      
      However, the patch also adds some suppressions: regions in the parser
      for which wrapper nodes will not be created:
      
      * within a template-parameter-list or template-argument-list (in
        cp_parser_template_parameter_list and cp_parser_template_argument_list
        respectively), to avoid encoding the spelling location of the nodes
        in types.  For example, "array<10>" and "array<10>" are the same type,
        despite the fact that the two different "10" tokens are spelled in
        different locations in the source.
      
      * within a gnu-style attribute (none of are handlers are set up to cope
        with location wrappers yet)
      
      * within various OpenMP clauses
      
      The patch enables various improvements to locations for bad
      initializations, for -Wchar-subscripts, and enables various other
      improvements in the followup patch.
      
      For example, given the followup buggy mem-initializer:
      
      class X {
        X() : bad(42),
              good(42)
        { }
        void* bad;
        int good;
      };
      
      previously, our diagnostic was on the final close parenthesis of the
      mem-initializer-list, leaving it unclear where the problem is:
      
      t.cc: In constructor 'X::X()':
      t.cc:3:16: error: invalid conversion from 'int' to 'void*' [-fpermissive]
          3 |         good(42)
            |                ^
            |                |
            |                int
      
      whereas with the patch we highlight which expression is bogus:
      
      t.cc: In constructor 'X::X()':
      t.cc:2:13: error: invalid conversion from 'int' to 'void*' [-fpermissive]
          2 |   X() : bad(42),
            |             ^~
            |             |
            |             int
      
      Similarly, the diagnostic for this bogus initialization:
      
      i.cc:1:44: error: initializer-string for array of chars is too long [-fpermissive]
          1 | char test[3][4] = { "ok", "too long", "ok" };
            |                                            ^
      
      is improved by the patch so that it indicates which string is too long:
      
      i.cc:1:27: error: initializer-string for array of chars is too long [-fpermissive]
          1 | char test[3][4] = { "ok", "too long", "ok" };
            |                           ^~~~~~~~~~
      
      
      gcc/c-family/ChangeLog:
      	PR c++/43064
      	PR c++/43486
      	* c-common.c (unsafe_conversion_p): Fold any location wrapper.
      	(verify_tree): Handle location wrappers.
      	(c_common_truthvalue_conversion): Strip any location wrapper.
      	Handle CONST_DECL.
      	(fold_offsetof): Strip any location wrapper.
      	(complete_array_type): Likewise for initial_value.
      	(convert_vector_to_array_for_subscript): Call fold_for_warn on the
      	index before checking for INTEGER_CST.
      	* c-pretty-print.c (c_pretty_printer::primary_expression): Don't
      	print parentheses around location wrappers.
      	* c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
      	before checking for INTEGER_CST.
      	(warn_tautological_bitwise_comparison): Call
      	tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
      	before checking for INTEGER_CST.
      	(readonly_error): Strip any location wrapper.
      	(warn_array_subscript_with_type_char): Strip location wrappers
      	before checking for INTEGER_CST.  Use the location of the index if
      	available.
      
      gcc/ChangeLog:
      	PR c++/43064
      	PR c++/43486
      	* convert.c: Include "selftest.h".
      	(preserve_any_location_wrapper): New function.
      	(convert_to_pointer_maybe_fold): Update to handle location
      	wrappers.
      	(convert_to_real_maybe_fold): Likewise.
      	(convert_to_integer_1): Strip expr when using TREE_OVERFLOW.
      	Handle location wrappers when checking for INTEGER_CST.
      	(convert_to_integer_maybe_fold): Update to handle location
      	wrappers.
      	(convert_to_complex_maybe_fold): Likewise.
      	(selftest::test_convert_to_integer_maybe_fold): New functions.
      	(selftest::convert_c_tests): New function.
      	* convert.h (preserve_any_location_wrapper): New decl.
      	* fold-const.c (size_binop_loc): Strip location wrappers when
      	using TREE_OVERFLOW.
      	(operand_equal_p): Strip any location wrappers.
      	(integer_valued_real_p): Strip any location wrapper.
      	* selftest-run-tests.c (selftest::run_tests): Call
      	selftest::convert_c_tests.
      	* selftest.h (selftest::convert_c_tests): New decl.
      	* tree.c (build_complex): Assert that REAL and IMAG are constants.
      	(integer_zerop): Look through location wrappers.
      	(integer_onep): Likewise.
      	(integer_each_onep): Likewise.
      	(integer_all_onesp): Likewise.
      	(integer_minus_onep): Likewise.
      	(integer_pow2p): Likewise.
      	(integer_nonzerop): Likewise.
      	(integer_truep): Likewise.
      	(fixed_zerop): Likewise.
      	(real_zerop): Likewise.
      	(real_onep): Likewise.
      	(real_minus_onep): Likewise.
      	(tree_int_cst_equal): Likewise.
      	(simple_cst_equal): Treat location wrappers with non-equal source
      	locations as being unequal.
      	(uniform_integer_cst_p): Look through location wrappers.
      	(maybe_wrap_with_location): Don't create wrappers if any
      	auto_suppress_location_wrappers are active.
      	(suppress_location_wrappers): New variable.
      	(selftest::test_predicates): New test.
      	(selftest::tree_c_tests): Call it.
      	* tree.h (CONSTANT_CLASS_OR_WRAPPER_P): New macro.
      	(suppress_location_wrappers): New decl.
      	(class auto_suppress_location_wrappers): New class.
      
      gcc/cp/ChangeLog:
      	PR c++/43064
      	PR c++/43486
      	* call.c (build_conditional_expr_1): Strip location wrappers when
      	checking for CONST_DECL.
      	(conversion_null_warnings): Use location of "expr" if available.
      	* class.c (fixed_type_or_null): Handle location wrappers.
      	* constexpr.c (potential_constant_expression_1): Likewise.
      	* cvt.c (ignore_overflows): Strip location wrappers when
      	checking for INTEGER_CST, and re-wrap the result if present.
      	(ocp_convert): Call fold_for_warn before checking for INTEGER_CST.
      	* decl.c (reshape_init_r): Strip any location wrapper.
      	(undeduced_auto_decl): Likewise.
      	* expr.c (mark_discarded_use): Likewise for expr.
      	* init.c (build_aggr_init): Likewise before checking init for
      	DECL_P.
      	(warn_placement_new_too_small): Call fold_for_warn on adj before
      	checking for CONSTANT_CLASS_P, and on nelts.  Strip any location
      	wrapper from op0 and on oper before checking for VAR_P.
      	* parser.c (cp_parser_primary_expression): Call
      	maybe_add_location_wrapper on numeric and string literals.
      	(cp_parser_postfix_expression): Strip any location wrapper when
      	checking for DECL_IS_BUILTIN_CONSTANT_P.
      	(cp_parser_unary_expression): Ensure that folding of NEGATE_EXPR
      	around a constant happens in the presence of location wrappers and
      	returns a wrapped result.
      	(cp_parser_has_attribute_expression): Strip any location wrapper
      	from "oper".
      	(cp_parser_binary_expression): Strip any location wrapper when
      	checking for DECL_P on the lhs.
      	(cp_parser_decltype): Strip any location wrapper from result of
      	cp_parser_decltype_expr.
      	(cp_parser_mem_initializer): Add location wrappers to the
      	parenthesized expression list.
      	(cp_parser_template_parameter_list): Don't create wrapper nodes
      	within a template-parameter-list.
      	(cp_parser_template_argument_list): Don't create wrapper nodes
      	within a template-argument-list.
      	(cp_parser_parameter_declaration): Strip location wrappers from
      	default arguments.
      	(cp_parser_gnu_attribute_list): Don't create wrapper nodes.
      	(cp_parser_std_attribute_spec_seq): Likewise.
      	(cp_parser_omp_all_clauses): Don't create wrapper nodes within
      	OpenMP clauses.
      	(cp_parser_omp_for_loop): Likewise.
      	(cp_parser_omp_declare_reduction_exprs): Likewise.
      	* pt.c (convert_nontype_argument_function): Strip location
      	wrappers from fn_no_ptr before checking for FUNCTION_DECL.
      	(tsubst_default_argument): Move note about which callsite led to
      	instantiation to after the check_default_argument call.
      	(do_auto_deduction): Likewise from init before checking for
      	DECL_P.
      	* semantics.c (force_paren_expr): Likewise from expr before
      	checking for DECL_P.
      	(finish_parenthesized_expr): Likewise from expr before
      	checking for STRING_CST.
      	(perform_koenig_lookup): Likewise from fn.
      	(finish_call_expr): Likewise.
      	(finish_id_expression): Rename to...
      	(finish_id_expression_1): ...this, calling
      	maybe_add_location_wrapper on the result.
      	(capture_decltype): Use lookup_name_real rather than value_member
      	when looking up decl within the capture-list.
      	* tree.c (cp_stabilize_reference): Strip any location wrapper.
      	(builtin_valid_in_constant_expr_p): Likewise.
      	(strip_typedefs_expr): Strip any location wrapper before checking
      	for decls or constants.
      	(is_overloaded_fn): Likewise.
      	(maybe_get_fns): Likewise.
      	(selftest::test_lvalue_kind): Verify lvalue_p.
      	* typeck.c (cxx_sizeof_expr): Strip any location wrapper.
      	(cxx_alignof_expr): Likewise.
      	(is_bitfield_expr_with_lowered_type): Handle location wrappers.
      	(cp_build_array_ref): Call maybe_constant_value on "idx".
      	(cp_build_binary_op): Strip location wrapper from first_arg before
      	checking for PARM_DECL.  Likewise for op1 before checking for
      	INTEGER_CST in two places.  Likewise for orig_op0 and orig_op1
      	when checking for STRING_CST.
      	(cp_build_addr_expr_1): Likewise for arg when checking for
      	FUNCTION_DECL.
      	(cp_build_modify_expr): Likewise for newrhs when checking for
      	STRING_CST.
      	(convert_for_assignment): Don't strip location wrappers when
      	stripping NON_LVALUE_EXPR.
      	(maybe_warn_about_returning_address_of_local): Strip location
      	wrapper from whats_returned before checking for DECL_P.
      	(can_do_nrvo_p): Strip location wrapper from retval.
      	(treat_lvalue_as_rvalue_p): Likewise.
      	(check_return_expr): Likewise.
      	* typeck2.c (cxx_incomplete_type_diagnostic): Strip location
      	wrapper from value before checking for VAR_P or PARM_DECL.
      	(digest_init_r): Strip location wrapper from init.  When
      	copying "init", also copy the wrapped node.
      
      gcc/objc/ChangeLog:
      	PR c++/43064
      	PR c++/43486
      	* objc-act.c (objc_maybe_build_component_ref): Strip any location
      	wrapper before checking for UOBJC_SUPER_decl and self_decl.
      	(objc_finish_message_expr): Strip any location wrapper.
      	(gen_declaration): Strip location wrappers from "w".
      
      gcc/testsuite/ChangeLog:
      	PR c++/43064
      	PR c++/43486
      	* c-c++-common/pr51712.c (valid2): Mark xfail as passing on C++.
      	* g++.dg/cpp0x/constexpr-47969.C: Update column of expected error.
      	* g++.dg/cpp0x/constexpr-ex2.C: Likewise.
      	* g++.dg/cpp0x/scoped_enum2.C: Likewise.
      	* g++.dg/cpp1z/decomp48.C: Update expected location of warning
      	for named local variables to use that of the local variable.
      	* g++.dg/ext/vla1.C: Update column.
      	* g++.dg/init/array43.C: Update expected column to be that of the
      	initializer.
      	* g++.dg/init/initializer-string-too-long.C: New test.
      	* g++.dg/init/new44.C: Add "-ftrack-macro-expansion=0".
      	* g++.dg/init/pr43064-1.C: New test.
      	* g++.dg/init/pr43064-2.C: New test.
      	* g++.dg/init/pr43064-3.C: New test.
      	* g++.dg/other/fold1.C: Update column of expected error.
      	* g++.dg/parse/crash36.C: Likewise.
      	* g++.dg/plugin/diagnostic-test-expressions-1.C: Add negative
      	integer and float expressions.
      	* g++.dg/template/defarg6.C: Move expected error to the default
      	argument; add expected message about where instantiated.
      	* g++.dg/wrappers/Wparentheses.C: New test.
      	* g++.old-deja/g++.bugs/900402_02.C: Update column of expected
      	error.
      
      From-SVN: r267272
      David Malcolm committed
  6. 29 Nov, 2018 1 commit
    • re PR target/88152 (optimize SSE & AVX char compares with subsequent movmskb) · f06e47d7
      	PR target/88152
      	* tree.h (build_uniform_cst, uniform_integer_cst_p): Declare.
      	* tree.c (build_uniform_cst, uniform_integer_cst_p): New functions.
      	* match.pd (define_predicates): Add uniform_integer_cst_p.
      	(cmp @0 INTEGER_CST@1, cmp (convert?@2 @0) INTEGER_CST@1): Adjust
      	so that it works also for vector comparisons with uniform constants
      	with INTEGER_CST element.
      
      	* g++.dg/tree-ssa/pr88152-1.C: New test.
      	* g++.dg/tree-ssa/pr88152-2.C: New test.
      
      From-SVN: r266620
      Jakub Jelinek committed
  7. 23 Nov, 2018 1 commit
    • PR tree-optimization/87756 - missing unterminated argument warning using address… · 70c70369
      PR tree-optimization/87756 - missing unterminated argument warning using address of a constant character
      
      gcc/ChangeLog:
      
      	PR tree-optimization/87756
      	* expr.c (string_constant): Synthesize a string literal from
      	the address of a constant character.
      	* tree.c (build_string_literal): Add an argument.
      	* tree.h (build_string_literal): Same.
      
      gcc/testsuite/ChangeLog:
      
      	PR tree-optimization/87756
      	* gcc.dg/builtin-memchr-2.c: New test.
      	* gcc.dg/builtin-memchr-3.c: Same.
      	* gcc.dg/warn-sprintf-no-nul-2.c: Same.
      
      From-SVN: r266418
      Martin Sebor committed
  8. 22 Nov, 2018 1 commit
    • re PR c++/87229 (ICE: tree code 'call_expr' is not supported in LTO streams) · 7f29dafe
      2018-11-22  Richard Biener  <rguenther@suse.de>
      
      	PR lto/87229
      	PR lto/88112
      	* lto-streamer-out.c (lto_is_streamable): Allow CALL_EXPRs
      	which can appear in size expressions.
      	* tree-streamer-in.c (unpack_ts_base_value_fields): Stream
      	CALL_EXPR_BY_DESCRIPTOR.
      	(streamer_read_tree_bitfields): Stream CALL_EXPR_IFN.
      	* tree-streamer-out.c (pack_ts_base_value_fields): Stream
      	CALL_EXPR_BY_DESCRIPTOR.
      	(streamer_write_tree_bitfields): Stream CALL_EXPR_IFN.
      
      	Revert
      	PR lto/87229
      	* tree.c (free_lang_data_in_one_sizepos): Free non-gimple-val
      	sizepos values.
      
      From-SVN: r266372
      Richard Biener committed
  9. 21 Nov, 2018 1 commit
    • re PR ipa/87957 (ICE tree check: expected tree that contains ‘decl minimal’… · 7424b7c1
      re PR ipa/87957 (ICE tree check: expected tree that contains ‘decl minimal’ structure, have ‘identifier_node’ in warn_odr, at ipa-devirt.c:1051 since r265519)
      
      
      	PR lto/87957
      	* tree.c (fld_decl_context): Break out from ...
      	(free_lang_data_in_decl): ... here; free TREE_PUBLIC, TREE_PRIVATE
      	DECL_ARTIFICIAL of TYPE_DECL; do not free TREE_TYPE of TYPE_DECL.
      	(fld_incomplete_type_of): Build copy of TYP_DECL.
      	* ipa-devirt.c (free_enum_values): Rename to ...
      	(free_odr_warning_data): ... this one; free also duplicated TYPE_DECLs
      	and TREE_TYPEs of TYPE_DECLs.
      	(get_odr_type): Initialize odr_vtable_hash if needed.
      
      From-SVN: r266350
      Jan Hubicka committed
  10. 20 Nov, 2018 2 commits
  11. 19 Nov, 2018 1 commit
  12. 15 Nov, 2018 1 commit
    • PR c++/87541 - ICE using a constant decl as an attribute alloc_size argument · 1d249509
      PR c++/87541 - ICE using a constant decl as an attribute alloc_size argument
      PR c++/87542 - bogus error on attribute format with a named constant argument
      
      gcc/ChangeLog:
      
      	PR c++/87541
      	PR c++/87542
      	* tree.c (type_argument_type): New function.
      	* tree.h (type_argument_type): Declare it.
      	* gcc/doc/extend.texi (alloc_align): Update and clarify.
      	(alloc_size, nonnull, sentinel): Same.
      
      gcc/c-family/ChangeLog:
      
      	PR c++/87541
      	PR c++/87542
      	* c-attribs.c (positional_argument): New function.
      	(handle_alloc_size_attribute): Use it and simplify.
      	(handle_alloc_align_attribute): Same.
      	(handle_assume_aligned_attribute): Same.
      	(handle_nonnull_attribute): Same.
      	* c-common.c (check_function_arguments): Pass fntype to
      	check_function_format.
      	* c-common.h (check_function_format): Add an argument.
      	(PosArgFlags, positional_argument): Declare new type and function.
      	* c-format.c (decode_format_attr): Add arguments.
      	(check_format_string, get_constant): Same.
      	(convert_format_name_to_system_name): Adjust.
      
      gcc/testsuite/ChangeLog:
      
      	PR c++/87541
      	PR c++/87542
      	* g++.dg/ext/attr-alloc_size.C: New test.
      	* c-c++-common/pr71574.c: Adjust diagnostics.
      	* c-c++-common/attributes-1.c: Same.
      	* gcc.dg/attr-alloc_align-2.c: Same.
      	* gcc.dg/attr-alloc_align-4.c: New test.
      	* gcc.dg/attr-alloc_size-2.c: Adjust diagnostics.
      	* gcc.dg/attr-alloc_size.c: Same.
      	* gcc.dg/attr-assume_aligned-4.c: New test.
      	* gcc.dg/format/attr-3.c: Adjust diagnostics.
      	* gcc.dg/nonnull-2.c: Same.
      	* gcc.dg/torture/pr80612.c: Same.
      	* obj-c++.dg/attributes/method-format-1.mm: Same.
      	* obj-c++.dg/attributes/method-nonnull-1.mm: Same.
      	* objc.dg/attributes/method-format-1.m: same.
      	* objc.dg/attributes/method-nonnull-1.m: Same.
      
      From-SVN: r266195
      Martin Sebor committed
  13. 09 Nov, 2018 1 commit
  14. 08 Nov, 2018 1 commit
    • builtin-types.def (BT_FN_VOID_BOOL, [...]): New. · 28567c40
      	* builtin-types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
      	BT_FN_UINT_UINT_PTR_PTR, BT_FN_UINT_OMPFN_PTR_UINT_UINT,
      	BT_FN_BOOL_UINT_LONGPTR_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
      	BT_FN_BOOL_UINT_ULLPTR_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR,
      	BT_FN_BOOL_LONG_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
      	BT_FN_BOOL_BOOL_ULL_ULL_ULL_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR): New.
      	* gengtype.c (open_base_files): Add omp-general.h.
      	* gimple.c (gimple_build_omp_critical):
      	(gimple_build_omp_taskgroup): Add CLAUSES argument.  Call
      	gimple_omp_taskgroup_set_clauses.
      	(gimple_build_omp_atomic_load): Add mo argument, call
      	gimple_omp_atomic_set_memory_order.
      	(gimple_build_omp_atomic_store): Likewise.
      	(gimple_copy): Adjust handling of GIMPLE_OMP_TASKGROUP.
      	* gimple.def (GIMPLE_OMP_TASKGROUP): Use GSS_OMP_SINGLE_LAYOUT
      	instead of GSS_OMP.
      	(GIMPLE_OMP_TEAMS): Use GSS_OMP_PARALLEL_LAYOUT instead
      	of GSS_OMP_SINGLE_LAYOUT, adjust comments.
      	* gimple.h (enum gf_mask): Add GF_OMP_TEAMS_HOST, GF_OMP_TASK_TASKWAIT
      	and GF_OMP_ATOMIC_MEMORY_ORDER.  Remove GF_OMP_ATOMIC_SEQ_CST, use
      	different value for GF_OMP_ATOMIC_NEED_VALUE.
      	(struct gimple_statement_omp_taskreg): Add GIMPLE_OMP_TEAMS to
      	comments.
      	(struct gimple_statement_omp_single_layout): And remove here.
      	(struct gomp_teams): Inherit from gimple_statement_omp_taskreg rather
      	than gimple_statement_omp_single_layout.
      	(is_a_helper <gimple_statement_omp_taskreg *>::test): Allow
      	GIMPLE_OMP_TEAMS.
      	(is_a_helper <const gimple_statement_omp_taskreg *>::test): Likewise.
      	(gimple_omp_subcode): Formatting fix.
      	(gimple_omp_teams_child_fn, gimple_omp_teams_child_fn_ptr,
      	gimple_omp_teams_set_child_fn, gimple_omp_teams_data_arg,
      	gimple_omp_teams_data_arg_ptr, gimple_omp_teams_set_data_arg,
      	gimple_omp_teams_host, gimple_omp_teams_set_host,
      	gimple_omp_task_taskwait_p, gimple_omp_task_set_taskwait_p,
      	gimple_omp_taskgroup_clauses, gimple_omp_taskgroup_clauses_ptr,
      	gimple_omp_taskgroup_set_clauses): New inline functions.
      	(gimple_build_omp_atomic_load): Add enum omp_memory_order argument.
      	(gimple_build_omp_atomic_store): Likewise.
      	(gimple_omp_atomic_seq_cst_p): Remove.
      	(gimple_omp_atomic_memory_order): New function.
      	(gimple_omp_atomic_set_seq_cst): Remove.
      	(gimple_omp_atomic_set_memory_order): New function.
      	(gimple_build_omp_taskgroup): Add clauses argument.
      	* gimple-pretty-print.c (dump_gimple_omp_taskgroup): New function.
      	(dump_gimple_omp_task): Print taskwait with depend clauses.
      	(dump_gimple_omp_atomic_load, dump_gimple_omp_atomic_store): Use
      	dump_omp_atomic_memory_order.
      	(pp_gimple_stmt_1): Handle GIMPLE_OMP_TASKGROUP.
      	* gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP_ALLOC_ONLY,
      	GOVD_MAP_FROM_ONLY and GOVD_NONTEMPORAL.
      	(enum omp_region_type): Reserve bits 1 and 2 for auxiliary flags,
      	renumber values of most of ORT_* enumerators, add ORT_HOST_TEAMS,
      	ORT_COMBINED_HOST_TEAMS, ORT_TASKGROUP, ORT_TASKLOOP and
      	ORT_UNTIED_TASKLOOP enumerators.
      	(enum gimplify_defaultmap_kind): New.
      	(struct gimplify_omp_ctx): Remove target_map_scalars_firstprivate and
      	target_map_pointers_as_0len_arrays members, add defaultmap.
      	(new_omp_context): Initialize defaultmap member.
      	(gimple_add_tmp_var): Handle ORT_TASKGROUP like ORT_WORKSHARE.
      	(maybe_fold_stmt): Don't fold even in host teams regions.
      	(omp_firstprivatize_variable): Handle ORT_TASKGROUP like
      	ORT_WORKSHARE.  Test ctx->defaultmap[GDMK_SCALAR] instead of
      	ctx->omp_firstprivatize_variable.
      	(omp_add_variable): Don't add private/firstprivate for VLAs in
      	ORT_TASKGROUP.
      	(omp_default_clause): Print "taskloop" rather than "task" if
      	ORT_*TASKLOOP.
      	(omp_notice_variable): Handle ORT_TASKGROUP like ORT_WORKSHARE.
      	Handle new defaultmap clause kinds.
      	(omp_is_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.  Allow simd
      	iterator to be lastprivate or private.  Fix up diagnostics if linear
      	is used on collapse>1 simd iterator.
      	(omp_check_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.
      	(gimplify_omp_depend): New function.
      	(gimplify_scan_omp_clauses): Add shared clause on parallel for
      	combined parallel master taskloop{, simd} if taskloop has
      	firstprivate, lastprivate or reduction clause.  Handle
      	OMP_CLAUSE_REDUCTION_TASK diagnostics.  Adjust tests for
      	ORT_COMBINED_TEAMS.  Gimplify depend clauses with iterators.  Handle
      	cancel and simd OMP_CLAUSE_IF_MODIFIERs.  Handle
      	OMP_CLAUSE_NONTEMPORAL.  Handle new defaultmap clause kinds.  Handle
      	OMP_CLAUSE_{TASK,IN}_REDUCTION.  Diagnose invalid conditional
      	lastprivate.
      	(gimplify_adjust_omp_clauses_1): Ignore GOVD_NONTEMPORAL.  Handle
      	GOVD_MAP_ALLOC_ONLY and GOVD_MAP_FROM_ONLY.  
      	(gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_NONTEMPORAL.  Handle
      	OMP_CLAUSE_{TASK,IN}_REDUCTION.
      	(gimplify_omp_task): Handle taskwait with depend clauses.
      	(gimplify_omp_for): Add shared clause on parallel for combined
      	parallel master taskloop{, simd} if taskloop has firstprivate,
      	lastprivate or reduction clause.  Use ORT_TASKLOOP or
      	ORT_UNTIED_TASKLOOP instead of ORT_TASK or ORT_UNTIED_TASK.  Adjust
      	tests for ORT_COMBINED_TEAMS.  Handle C++ range for loops with
      	NULL TREE_PURPOSE in OMP_FOR_ORIG_DECLS.  Firstprivatize
      	__for_end and __for_range temporaries on OMP_PARALLEL for
      	distribute parallel for{, simd}.  Move OMP_CLAUSE_REDUCTION
      	and OMP_CLAUSE_IN_REDUCTION from taskloop to the task construct
      	sandwiched in between two taskloops.
      	(computable_teams_clause): Test ctx->defaultmap[GDMK_SCALAR]
      	instead of ctx->omp_firstprivatize_variable.
      	(gimplify_omp_workshare): Set ort to ORT_HOST_TEAMS or
      	ORT_COMBINED_HOST_TEAMS if not inside of target construct.  If
      	host teams, use gimplify_and_return_first etc. for body like
      	for target or target data constructs, and at the end call
      	gimple_omp_teams_set_host on the GIMPLE_OMP_TEAMS object.
      	(gimplify_omp_atomic): Use OMP_ATOMIC_MEMORY_ORDER instead
      	of OMP_ATOMIC_SEQ_CST, pass it as new argument to
      	gimple_build_omp_atomic_load and gimple_build_omp_atomic_store, remove
      	gimple_omp_atomic_set_seq_cst calls.
      	(gimplify_expr) <case OMP_TASKGROUP>: Move handling into a separate
      	case, handle taskgroup clauses.
      	* lto-streamer-out.c (hash_tree): Handle
      	OMP_CLAUSE_{TASK,IN}_REDUCTION.
      	* Makefile.in (GTFILES): Add omp-general.h.
      	* omp-builtins.def (BUILT_IN_GOMP_TASKWAIT_DEPEND,
      	BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_START,
      	BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_START,
      	BUILT_IN_GOMP_LOOP_START, BUILT_IN_GOMP_LOOP_ORDERED_START,
      	BUILT_IN_GOMP_LOOP_DOACROSS_START,
      	BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_NEXT,
      	BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
      	BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_START,
      	BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_START,
      	BUILT_IN_GOMP_LOOP_ULL_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_START,
      	BUILT_IN_GOMP_LOOP_ULL_DOACROSS_START,
      	BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_NEXT,
      	BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
      	BUILT_IN_GOMP_PARALLEL_LOOP_NONMONOTONIC_RUNTIME,
      	BUILT_IN_GOMP_PARALLEL_LOOP_MAYBE_NONMONOTONIC_RUNTIME,
      	BUILT_IN_GOMP_PARALLEL_REDUCTIONS, BUILT_IN_GOMP_SECTIONS2_START,
      	BUILT_IN_GOMP_TEAMS_REG, BUILT_IN_GOMP_TASKGROUP_REDUCTION_REGISTER,
      	BUILT_IN_GOMP_TASKGROUP_REDUCTION_UNREGISTER,
      	BUILT_IN_GOMP_TASK_REDUCTION_REMAP,
      	BUILT_IN_GOMP_WORKSHARE_TASK_REDUCTION_UNREGISTER): New builtins.
      	* omp-expand.c (workshare_safe_to_combine_p): Return false for
      	non-worksharing loops.
      	(omp_adjust_chunk_size): Don't adjust anything if chunk_size is zero.
      	(determine_parallel_type): Don't combine parallel with worksharing
      	which has _reductemp_ clause.
      	(expand_parallel_call): Emit the GOMP_*nonmonotonic_runtime* or
      	GOMP_*maybe_nonmonotonic_runtime* builtins instead of GOMP_*runtime*
      	if there is nonmonotonic modifier or if there is no modifier and no
      	ordered clause.  For dynamic and guided schedule without monotonic
      	and nonmonotonic modifier, default to nonmonotonic.
      	(expand_omp_for): Likewise.  Adjust expand_omp_for_generic caller, use
      	GOMP_loop{,_ull}{,_ordered,_doacross}_start builtins if there are
      	task reductions.
      	(expand_task_call): Add GOMP_TASK_FLAG_REDUCTION flag to flags if
      	there are any reduction clauses.
      	(expand_taskwait_call): New function.
      	(expand_teams_call): New function.
      	(expand_omp_taskreg): Allow GIMPLE_OMP_TEAMS and call
      	expand_teams_call for it.  Formatting fix.  Handle taskwait with
      	depend clauses.
      	(expand_omp_for_generic): Add SCHED_ARG argument.  Handle expansion
      	of worksharing loops with task reductions.
      	(expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Handle
      	expansion of worksharing loops with task reductions.
      	(expand_omp_sections): Handle expansion of sections with task
      	reductions.
      	(expand_omp_synch): For host teams call expand_omp_taskreg.
      	(omp_memory_order_to_memmodel): New function.
      	(expand_omp_atomic_load, expand_omp_atomic_store,
      	expand_omp_atomic_fetch_op): Use it and gimple_omp_atomic_memory_order
      	instead of gimple_omp_atomic_seq_cst_p.
      	(build_omp_regions_1, omp_make_gimple_edges): Treat taskwait with
      	depend clauses as a standalone directive.
      	* omp-general.c (enum omp_requires): New variable.
      	(omp_extract_for_data): Initialize have_reductemp member.  Allow
      	NE_EXPR even in OpenMP loops, transform them into LT_EXPR or
      	GT_EXPR loops depending on incr sign.  Formatting fixes.
      	* omp-general.h (struct omp_for_data): Add have_reductemp member.
      	(enum omp_requires): New enum.
      	(omp_requires_mask): Declare.
      	* omp-grid.c (grid_eliminate_combined_simd_part): Formatting fix.
      	Fix comment typos.
      	* omp-low.c (struct omp_context): Add task_reductions and
      	task_reduction_map fields.
      	(is_host_teams_ctx): New function.
      	(is_taskreg_ctx): Return true also if is_host_teams_ctx.
      	(use_pointer_for_field): Use is_global_var instead of
      	TREE_STATIC || DECL_EXTERNAL, and apply only if not privatized
      	in outer contexts.
      	(build_outer_var_ref): Ignore taskgroup outer contexts.
      	(delete_omp_context): Release task_reductions and task_reduction_map.
      	(scan_sharing_clauses): Don't add any fields for reduction clause on
      	taskloop.  Handle OMP_CLAUSE__REDUCTEMP_.  Handle
      	OMP_CLAUSE_{IN,TASK}_REDUCTION and OMP_CLAUSE_REDUCTION with task
      	modifier.  Don't ignore shared clauses in is_host_teams_ctx contexts.
      	Handle OMP_CLAUSE_NONTEMPORAL.
      	(add_taskreg_looptemp_clauses): Add OMP_CLAUSE__REDUCTEMP_ clause if
      	needed.
      	(scan_omp_parallel): Add _reductemp_ clause if there are any reduction
      	clauses with task modifier.
      	(scan_omp_task): Handle taskwait with depend clauses.
      	(finish_taskreg_scan): Move field corresponding to _reductemp_ clause
      	first.  Move also OMP_CLAUSE__REDUCTEMP_ clause in front if present.
      	Handle GIMPLE_OMP_TEAMS like GIMPLE_OMP_PARALLEL.
      	(scan_omp_for): Fix comment formatting.
      	(scan_omp_teams): Handle host teams constructs.
      	(check_omp_nesting_restrictions): Allow teams with no outer
      	OpenMP context.  Adjust diagnostics for teams strictly nested into
      	some explicit OpenMP construct other than target.  Allow OpenMP atomics
      	inside of simd regions.
      	(scan_omp_1_stmt): Call scan_sharing_clauses for taskgroups.
      	(scan_omp_1_stmt) <case GIMPLE_OMP_TEAMS>: Temporarily bump
      	taskreg_nesting_level while scanning host teams construct.
      	(task_reduction_read): New function.
      	(lower_rec_input_clauses): Handle OMP_CLAUSE_REDUCTION on taskloop
      	construct.  Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE__REDUCTEMP_
      	clauses.  Handle OMP_CLAUSE_REDUCTION with task modifier.  Remove
      	second argument create_tmp_var if it is NULL.  Don't ignore shared
      	clauses in is_host_teams_ctx contexts.  Handle
      	OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE on OMP_CLAUSE_FIRSTPRIVATE
      	clauses.
      	(lower_reduction_clauses): Ignore reduction clauses with task
      	modifier.  Remove second argument create_tmp_var if it is NULL.
      	Initialize OMP_ATOMIC_MEMORY_ORDER to relaxed.
      	(lower_send_clauses): Ignore reduction clauses with task modifier.
      	Handle OMP_CLAUSE__REDUCTEMP_.  Don't send anything for
      	OMP_CLAUSE_REDUCTION on taskloop.  Handle OMP_CLAUSE_IN_REDUCTION.
      	(maybe_add_implicit_barrier_cancel): Add OMP_RETURN argument, don't
      	rely that it is the last stmt in body so far.  Ignore outer taskgroup
      	contexts.
      	(omp_task_reductions_find_first, omp_task_reduction_iterate,
      	lower_omp_task_reductions): New functions.
      	(lower_omp_sections): Handle reduction clauses with taskgroup
      	modifiers.  Adjust maybe_add_implicit_barrier_cancel caller.
      	(lower_omp_single): Adjust maybe_add_implicit_barrier_cancel caller.
      	(lower_omp_for): Likewise.  Handle reduction clauses with taskgroup
      	modifiers.
      	(lower_omp_taskgroup): Handle taskgroup reductions.
      	(create_task_copyfn): Copy over OMP_CLAUSE__REDUCTEMP_ pointer.
      	Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE_REDUCTION clauses.
      	(lower_depend_clauses): If there are any
      	OMP_CLAUSE_DEPEND_DEPOBJ or OMP_CLAUSE_DEPEND_MUTEXINOUTSET
      	depend clauses, use a new array format.  If OMP_CLAUSE_DEPEND_LAST is
      	seen, assume lowering is done already and return early.  Set kind
      	on artificial depend clause to OMP_CLAUSE_DEPEND_LAST.
      	(lower_omp_taskreg): Handle reduction clauses with task modifier on
      	parallel construct.  Handle reduction clause on taskloop construct.
      	Handle taskwait with depend clauses.
      	(lower_omp_1): Use lower_omp_taskreg instead of lower_omp_teams
      	for host teams constructs.
      	* tree.c (omp_clause_num_ops): Add in_reduction, task_reduction,
      	nontemporal and _reductemp_ clause entries.
      	(omp_clause_code_name): Likewise.
      	(walk_tree_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION,
      	OMP_CLAUSE_NONTEMPORAL and OMP_CLAUSE__REDUCTEMP_.
      	* tree-core.h (enum omp_clause_code): Add
      	OMP_CLAUSE_{{IN,TASK}_REDUCTION,NONTEMPORAL,_REDUCTEMP_}.
      	(enum omp_clause_defaultmap_kind, enum omp_memory_order): New.
      	(struct tree_base): Add omp_atomic_memory_order field into union.
      	Remove OMP_ATOMIC_SEQ_CST comment.
      	(enum omp_clause_depend_kind): Add OMP_CLAUSE_DEPEND_MUTEXINOUTSET
      	and OMP_CLAUSE_DEPEND_DEPOBJ.
      	(struct tree_omp_clause): Add subcode.defaultmap_kind.
      	* tree.def (OMP_TASKGROUP): Add another operand, move next to other
      	OpenMP constructs with body and clauses operands.
      	* tree.h (OMP_BODY): Use OMP_MASTER instead of OMP_TASKGROUP.
      	(OMP_CLAUSES): Use OMP_TASKGROUP instead of OMP_SINGLE.
      	(OMP_TASKGROUP_CLAUSES): Define.
      	(OMP_CLAUSE_DECL): Use OMP_CLAUSE__REDUCTEMP_ instead of
      	OMP_CLAUSE__LOOPTEMP_.
      	(OMP_ATOMIC_SEQ_CST): Remove.
      	(OMP_ATOMIC_MEMORY_ORDER, OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE,
      	OMP_CLAUSE_LASTPRIVATE_CONDITIONAL): Define.
      	(OMP_CLAUSE_REDUCTION_CODE, OMP_CLAUSE_REDUCTION_INIT,
      	OMP_CLAUSE_REDUCTION_MERGE, OMP_CLAUSE_REDUCTION_PLACEHOLDER,
      	OMP_CLAUSE_REDUCTION_DECL_PLACEHOLDER,
      	OMP_CLAUSE_REDUCTION_OMP_ORIG_REF): Handle
      	OMP_CLAUSE_{,IN_,TASK_}REDUCTION.
      	(OMP_CLAUSE_REDUCTION_TASK, OMP_CLAUSE_REDUCTION_INSCAN,
      	OMP_CLAUSE_DEFAULTMAP_KIND, OMP_CLAUSE_DEFAULTMAP_CATEGORY,
      	OMP_CLAUSE_DEFAULTMAP_BEHAVIOR, OMP_CLAUSE_DEFAULTMAP_SET_KIND):
      	Define.
      	* tree-inline.c (remap_gimple_stmt): Remap taskgroup clauses.
      	* tree-nested.c (convert_nonlocal_omp_clauses): Handle
      	OMP_CLAUSE__REDUCTEMP_, OMP_CLAUSE_NONTEMPORAL.
      	(convert_local_omp_clauses): Likewise.  Remove useless test.
      	* tree-parloops.c (create_call_for_reduction_1): Pass
      	OMP_MEMORY_ORDER_RELAXED as new argument to
      	dump_gimple_omp_atomic_load and dump_gimple_omp_atomic_store.
      	* tree-pretty-print.c (dump_omp_iterators): New function.
      	(dump_omp_clause): Handle OMP_CLAUSE__REDUCTEMP_,
      	OMP_CLAUSE_NONTEMPORAL, OMP_CLAUSE_{TASK,IN}_REDUCTION.  Print
      	reduction modifiers.  Handle OMP_CLAUSE_DEPEND_DEPOBJ and
      	OMP_CLAUSE_DEPEND_MUTEXINOUTSET.  Print iterators in depend clauses.
      	Print __internal__ for OMP_CLAUSE_DEPEND_LAST.  Handle cancel and
      	simd OMP_CLAUSE_IF_MODIFIERs.  Handle new kinds of
      	OMP_CLAUSE_DEFAULTMAP. Print conditional: for
      	OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
      	(dump_omp_atomic_memory_order): New function.
      	(dump_generic_node): Use it.  Print taskgroup clauses.  Print
      	taskwait with depend clauses.
      	* tree-pretty-print.h (dump_omp_atomic_memory_order): Declare.
      	* tree-streamer-in.c (unpack_ts_omp_clause_value_fields):
      	Handle OMP_CLAUSE_{TASK,IN}_REDUCTION.
      	* tree-streamer-out.c (pack_ts_omp_clause_value_fields,
      	write_ts_omp_clause_tree_pointers): Likewise.
      gcc/c-family/
      	* c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
      	(c_finish_omp_atomic): Replace bool SEQ_CST argument with
      	enum omp_memory_order MEMORY_ORDER.
      	(c_finish_omp_flush): Add MO argument.
      	(c_omp_depend_t_p, c_finish_omp_depobj): Declare.
      	(c_finish_omp_for): Add FINAL_P argument.
      	* c-omp.c: Include memmodel.h.
      	(c_finish_omp_taskgroup): Add CLAUSES argument.  Set
      	OMP_TASKGROUP_CLAUSES to it.
      	(c_finish_omp_atomic): Replace bool SEQ_CST argument with
      	enum omp_memory_order MEMORY_ORDER.  Set OMP_ATOMIC_MEMORY_ORDER
      	instead of OMP_ATOMIC_SEQ_CST.
      	(c_omp_depend_t_p, c_finish_omp_depobj): New functions.
      	(c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
      	__atomic_thread_fence call with the given value.
      	(check_omp_for_incr_expr): Formatting fixes.
      	(c_finish_omp_for): Add FINAL_P argument.  Allow NE_EXPR
      	even in OpenMP loops, diagnose if NE_EXPR and incr expression
      	is not constant expression 1 or -1.  Transform NE_EXPR loops
      	with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
      	(c_omp_check_loop_iv_r): Look for orig decl of C++ range for
      	loops too.
      	(c_omp_split_clauses): Add support for combined
      	#pragma omp parallel master and
      	#pragma omp {,parallel }master taskloop{, simd} constructs.
      	Handle OMP_CLAUSE_IN_REDUCTION.  Handle OMP_CLAUSE_REDUCTION_TASK.
      	Handle OMP_CLAUSE_NONTEMPORAL.  Handle splitting OMP_CLAUSE_IF
      	also to OMP_SIMD.  Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
      	(c_omp_predetermined_sharing): Don't return
      	OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
      	* c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
      	PRAGMA_OMP_REQUIRES.
      	* c-pragma.h (enum pragma_kind): Likewise.
      	(enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
      	and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
      gcc/c/
      	* c-parser.c: Include memmode.h.
      	(c_parser_omp_depobj, c_parser_omp_requires): New functions.
      	(c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
      	(c_parser_omp_clause_name): Handle nontemporal, in_reduction and
      	task_reduction clauses.
      	(c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
      	For OMP_CLAUSE_DEPEND, parse clause operands as either an array
      	section, or lvalue assignment expression.
      	(c_parser_omp_clause_if): Handle cancel and simd modifiers.
      	(c_parser_omp_clause_lastprivate): Parse optional
      	conditional: modifier.
      	(c_parser_omp_clause_hint): Require constant integer expression rather
      	than just integer expression.
      	(c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
      	clause.
      	(c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
      	Parse reduction modifiers.  Pass KIND to c_parser_omp_variable_list.
      	(c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
      	functions.
      	(c_parser_omp_clause_depend): Parse iterator modifier and handle
      	iterators.  Parse mutexinoutset and depobj kinds.
      	(c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
      	callers.
      	(c_parser_omp_all_clauses): Likewise.  Handle
      	PRAGMA_OMP_CLAUSE_NONTEMPORAL and
      	PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
      	(c_parser_omp_atomic): Parse hint and memory order clauses.  Handle
      	default memory order from requires directive if any.  Adjust
      	c_finish_omp_atomic caller.
      	(c_parser_omp_critical): Allow comma in between (name) and hint clause.
      	(c_parser_omp_flush): Parse flush with memory-order-clause.
      	(c_parser_omp_for_loop): Allow NE_EXPR even in
      	OpenMP loops, adjust c_finish_omp_for caller.
      	(OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
      	(c_parser_omp_master): Add p_name, mask and cclauses arguments.
      	Allow to be called while parsing combined parallel master.
      	Parse combined master taskloop{, simd}.
      	(c_parser_omp_parallel): Parse combined
      	parallel master{, taskloop{, simd}} constructs.
      	(OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
      	(OMP_TASKGROUP_CLAUSE_MASK): Define.
      	(c_parser_omp_taskgroup): Add LOC argument.  Parse taskgroup clauses.
      	(OMP_TASKWAIT_CLAUSE_MASK): Define.
      	(c_parser_omp_taskwait): Handle taskwait with depend clauses.
      	(c_parser_omp_teams): Force a BIND_EXPR with BLOCK
      	around teams body.  Use SET_EXPR_LOCATION.
      	(c_parser_omp_target_data): Allow target data
      	with only use_device_ptr clauses.
      	(c_parser_omp_target): Use SET_EXPR_LOCATION.  Set
      	OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
      	(c_parser_omp_requires): New function.
      	(c_finish_taskloop_clauses): New function.
      	(OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
      	(c_parser_omp_taskloop): Use c_finish_taskloop_clauses.  Add forward
      	declaration.  Disallow in_reduction clause when combined with parallel
      	master.
      	(c_parser_omp_construct): Adjust c_parser_omp_master and
      	c_parser_omp_taskgroup callers.
      	* c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
      	other than cancel.
      	(handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
      	like OMP_CLAUSE_REDUCTION.
      	(handle_omp_array_sections): Likewise.  Call save_expr on array
      	reductions before calling build_index_type.  Handle depend clauses
      	with iterators.
      	(struct c_find_omp_var_s): New type.
      	(c_find_omp_var_r, c_omp_finish_iterators): New functions.
      	(c_finish_omp_clauses): Don't diagnose nonmonotonic clause
      	with static, runtime or auto schedule kinds.  Call save_expr for whole
      	array reduction sizes.  Diagnose reductions with zero sized elements
      	or variable length structures.  Diagnose nogroup clause used with
      	reduction clause(s).  Handle depend clause with
      	OMP_CLAUSE_DEPEND_DEPOBJ.  Diagnose bit-fields.  Require
      	omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
      	some different type for other kinds.  Use build_unary_op with
      	ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
      	Handle depend clauses with iterators.  Remove no longer needed special
      	case that predetermined const qualified vars may be specified in
      	firstprivate clause.  Complain if const qualified vars are mentioned
      	in data-sharing clauses other than firstprivate or shared.  Use
      	error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
      	error.  Formatting fix.  Handle OMP_CLAUSE_NONTEMPORAL and
      	OMP_CLAUSE_{IN,TASK}_REDUCTION.  Allow any lvalue as
      	OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
      gcc/cp/
      	* constexpr.c (potential_constant_expression_1): Handle OMP_DEPOBJ.
      	* cp-gimplify.c (cp_genericize_r): Handle
      	OMP_CLAUSE_{IN,TASK}_REDUCTION.
      	(cxx_omp_predetermined_sharing_1): Don't return
      	OMP_CLAUSE_DEFAULT_SHARED for const qualified decls with no mutable
      	member.  Return OMP_CLAUSE_DEFAULT_FIRSTPRIVATE for this pointer.
      	* cp-objcp-common.c (cp_common_init_ts): Handle OMP_DEPOBJ.
      	* cp-tree.def (OMP_DEPOBJ): New tree code.
      	* cp-tree.h (OMP_ATOMIC_DEPENDENT_P): Return true also for first
      	argument being OMP_CLAUSE.
      	(OMP_DEPOBJ_DEPOBJ, OMP_DEPOBJ_CLAUSES): Define.
      	(cp_convert_omp_range_for, cp_finish_omp_range_for): Declare.
      	(finish_omp_atomic): Add LOC, CLAUSES and MO arguments.  Remove
      	SEQ_CST argument.
      	(finish_omp_for_block): Declare.
      	(finish_omp_flush): Add MO argument.
      	(finish_omp_depobj): Declare.
      	* cxx-pretty-print.c (cxx_pretty_printer::statement): Handle
      	OMP_DEPOBJ.
      	* dump.c (cp_dump_tree): Likewise.
      	* lex.c (cxx_init): Likewise.
      	* parser.c: Include memmodel.h.
      	(cp_parser_for): Pass false as new is_omp argument to
      	cp_parser_range_for.
      	(cp_parser_range_for): Add IS_OMP argument, return before finalizing
      	if it is true.
      	(cp_parser_omp_clause_name): Handle nontemporal, in_reduction and
      	task_reduction clauses.
              (cp_parser_omp_var_list_no_open): Handle
      	OMP_CLAUSE_{IN,TASK}_REDUCTION.  For OMP_CLAUSE_DEPEND, parse clause
      	operands as either an array section, or lvalue assignment expression.
      	(cp_parser_omp_clause_if): Handle cancel and simd modifiers.
      	(cp_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
      	clause.
      	(cp_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
      	Parse reduction modifiers.  Pass KIND to c_parser_omp_variable_list.
      	(cp_parser_omp_clause_lastprivate, cp_parser_omp_iterators): New
      	functions.
      	(cp_parser_omp_clause_depend): Parse iterator modifier and handle
      	iterators.  Parse mutexinoutset and depobj kinds.
      	(cp_parser_oacc_all_clauses): Adjust cp_parser_omp_clause_reduction
      	callers.
      	(cp_parser_omp_all_clauses): Likewise.  Handle
      	PRAGMA_OMP_CLAUSE_NONTEMPORAL and
      	PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.  Call
      	cp_parser_omp_clause_lastprivate for OpenMP lastprivate clause.
      	(cp_parser_omp_atomic): Pass pragma_tok->location as
      	LOC to finish_omp_atomic.  Parse hint and memory order clauses.
      	Handle default memory order from requires directive if any.  Adjust
      	finish_omp_atomic caller.
      	(cp_parser_omp_critical): Allow comma in between (name) and hint
      	clause.
      	(cp_parser_omp_depobj): New function.
      	(cp_parser_omp_flush): Parse flush with memory-order-clause.
      	(cp_parser_omp_for_cond): Allow NE_EXPR even in OpenMP loops.
      	(cp_convert_omp_range_for, cp_finish_omp_range_for): New functions.
      	(cp_parser_omp_for_loop): Parse C++11 range for loops among omp
      	loops.  Handle OMP_CLAUSE_IN_REDUCTION like OMP_CLAUSE_REDUCTION.
      	(OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
      	(cp_parser_omp_simd, cp_parser_omp_for): Call keep_next_level before
      	begin_omp_structured_block and call finish_omp_for_block on
      	finish_omp_structured_block result.
      	(cp_parser_omp_master): Add p_name, mask and cclauses arguments.
      	Allow to be called while parsing combined parallel master.
      	Parse combined master taskloop{, simd}.
      	(cp_parser_omp_parallel): Parse combined
      	parallel master{, taskloop{, simd}} constructs.
      	(cp_parser_omp_single): Use SET_EXPR_LOCATION.
      	(OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
      	(OMP_TASKWAIT_CLAUSE_MASK): Define.
      	(cp_parser_omp_taskwait): Handle taskwait with depend clauses.
      	(OMP_TASKGROUP_CLAUSE_MASK): Define.
      	(cp_parser_omp_taskgroup): Parse taskgroup clauses, adjust
      	c_finish_omp_taskgroup caller.
      	(cp_parser_omp_distribute): Call keep_next_level before
      	begin_omp_structured_block and call finish_omp_for_block on
      	finish_omp_structured_block result.
      	(cp_parser_omp_teams): Force a BIND_EXPR with BLOCK around teams
      	body.
      	(cp_parser_omp_target_data): Allow target data with only
      	use_device_ptr clauses.
      	(cp_parser_omp_target): Set OMP_REQUIRES_TARGET_USED bit in
      	omp_requires_mask.
      	(cp_parser_omp_requires): New function.
      	(OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
      	(cp_parser_omp_taskloop): Add forward declaration.  Disallow
      	in_reduction clause when combined with parallel master.  Call
      	keep_next_level before begin_omp_structured_block and call
      	finish_omp_for_block on finish_omp_structured_block result.
      	(cp_parser_omp_construct): Adjust cp_parser_omp_master caller.
      	(cp_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
      	* pt.c (tsubst_omp_clause_decl): Add iterators_cache argument.
      	Adjust recursive calls.  Handle iterators.
      	(tsubst_omp_clauses): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION and
      	OMP_CLAUSE_NONTEMPORAL.  Adjust tsubst_omp_clause_decl callers.
      	(tsubst_decomp_names):
      	(tsubst_omp_for_iterator): Change orig_declv into a reference.
      	Handle range for loops.  Move orig_declv handling after declv/initv
      	handling.
      	(tsubst_expr): Force a BIND_EXPR with BLOCK around teams body.
      	Adjust finish_omp_atomic caller.  Call keep_next_level before
      	begin_omp_structured_block.  Call cp_finish_omp_range_for for range
      	for loops and use {begin,finish}_omp_structured_block instead of
      	{push,pop}_stmt_list if there are any range for loops.  Call
      	finish_omp_for_block on finish_omp_structured_block result.
      	Handle OMP_DEPOBJ.  Handle taskwait with depend clauses.  For
      	OMP_ATOMIC call tsubst_omp_clauses on clauses if any, adjust
      	finish_omp_atomic caller.  Use OMP_ATOMIC_MEMORY_ORDER rather
      	than OMP_ATOMIC_SEQ_CST.  Handle clauses on OMP_TASKGROUP.
      	(dependent_omp_for_p): Always return true for range for loops if
      	processing_template_decl.  Return true if class type iterator
      	does not have INTEGER_CST increment.
      	* semantics.c: Include memmodel.h.
      	(handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
      	like OMP_CLAUSE_REDUCTION.
      	(handle_omp_array_sections): Likewise.  Call save_expr on array
      	reductions before calling build_index_type.  Handle depend clauses
      	with iterators.
      	(finish_omp_reduction_clause): Call save_expr for whole array
      	reduction sizes.  Don't mark OMP_CLAUSE_DECL addressable if it has
      	reference type.  Do mark decl_placeholder addressable if needed.
      	Use error_at with OMP_CLAUSE_LOCATION (c) as first argument instead
      	of error.
      	(cp_omp_finish_iterators): New function.
      	(finish_omp_clauses): Don't diagnose nonmonotonic clause with static,
      	runtime or auto schedule kinds.  Diagnose nogroup clause used with
      	reduction clause(s).  Handle depend clause with
      	OMP_CLAUSE_DEPEND_DEPOBJ.  Diagnose bit-fields.  Require
      	omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
      	some different type for other kinds.  Use cp_build_addr_expr
      	and cp_build_indirect_ref instead of cxx_mark_addressable.
      	Handle depend clauses with iterators.  Only handle static data members
      	in the special case that const qualified vars may be specified in
      	firstprivate clause.  Complain if const qualified vars without mutable
      	members are mentioned in data-sharing clauses other than firstprivate
      	or shared.  Use error_at with OMP_CLAUSE_LOCATION (c) as first
      	argument instead of error.  Diagnose more than one nontemporal clause
      	refering to the same variable.  Use error_at rather than error for
      	priority and hint clause diagnostics.  Fix pasto for hint clause.
      	Diagnose hint expression that doesn't fold into INTEGER_CST.
      	Diagnose if clause with modifier other than cancel.  Handle
      	OMP_CLAUSE_{IN,TASK}_REDUCTION like OMP_CLAUSE_REDUCTION.  Allow any
      	lvalue as OMP_CLAUSE_DEPEND operand (besides array section), adjust
      	diagnostics.
      	(handle_omp_for_class_iterator): Don't create a new TREE_LIST if one
      	has been created already for range for, just fill TREE_PURPOSE and
      	TREE_VALUE.  Call cp_fully_fold on incr.
      	(finish_omp_for): Don't check cond/incr if cond is global_namespace.
      	Pass to c_omp_check_loop_iv_exprs orig_declv if non-NULL.  Don't
      	use IS_EMPTY_STMT on NULL pre_body.  Adjust c_finish_omp_for caller.
      	(finish_omp_for_block): New function.
      	(finish_omp_atomic): Add LOC argument, pass it through
      	to c_finish_omp_atomic and set it as location of OMP_ATOMIC* trees.
      	Remove SEQ_CST argument.  Add CLAUSES and MO arguments.  Adjust
      	c_finish_omp_atomic caller.  Stick clauses if any into first argument
      	of wrapping OMP_ATOMIC.
      	(finish_omp_depobj): New function.
      	(finish_omp_flush): Add MO argument, if not
      	MEMMODEL_LAST, emit __atomic_thread_fence call with the given value.
      	(finish_omp_cancel): Diagnose if clause with modifier other than
      	cancel.
      gcc/fortran/
      	* trans-openmp.c (gfc_trans_omp_clauses): Use
      	OMP_CLAUSE_DEFAULTMAP_SET_KIND.
      	(gfc_trans_omp_atomic): Set OMP_ATOMIC_MEMORY_ORDER
      	rather than OMP_ATOMIC_SEQ_CST.
      	(gfc_trans_omp_taskgroup): Build OMP_TASKGROUP using
      	make_node instead of build1_loc.
      	* types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
      	BT_FN_UINT_UINT_PTR_PTR, BT_FN_UINT_OMPFN_PTR_UINT_UINT,
      	BT_FN_BOOL_UINT_LONGPTR_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
      	BT_FN_BOOL_UINT_ULLPTR_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR,
      	BT_FN_BOOL_LONG_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
      	BT_FN_BOOL_BOOL_ULL_ULL_ULL_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR): New.
      	(BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_PTR): Formatting fix.
      gcc/testsuite/
      	* c-c++-common/gomp/atomic-17.c: New test.
      	* c-c++-common/gomp/atomic-18.c: New test.
      	* c-c++-common/gomp/atomic-19.c: New test.
      	* c-c++-common/gomp/atomic-20.c: New test.
      	* c-c++-common/gomp/atomic-21.c: New test.
      	* c-c++-common/gomp/atomic-22.c: New test.
      	* c-c++-common/gomp/clauses-1.c (r2): New variable.
      	(foo): Add ntm argument and test if and nontemporal clauses on
      	constructs with simd.
      	(bar): Put taskloop simd inside of taskgroup with task_reduction,
      	use in_reduction clause instead of reduction.  Add another
      	taskloop simd without nogroup clause, but with reduction clause and
      	a new in_reduction.  Add ntm and i3 arguments.  Test if and
      	nontemporal clauses on constructs with simd.  Change if clauses on
      	some constructs from specific to the particular constituents to one
      	without a modifier.  Add new tests for combined host teams and for
      	new parallel master and {,parallel }master taskloop{, simd} combined
      	constructs.
      	(baz): New function with host teams tests.
      	* gcc.dg/gomp/combined-1.c: Moved to ...
      	* c-c++-common/gomp/combined-1.c: ... here.  Adjust expected library
      	call.
      	* c-c++-common/gomp/combined-2.c: New test.
      	* c-c++-common/gomp/combined-3.c: New test.
      	* c-c++-common/gomp/critical-1.c: New test.
      	* c-c++-common/gomp/critical-2.c: New test.
      	* c-c++-common/gomp/default-1.c: New test.
      	* c-c++-common/gomp/defaultmap-1.c: New test.
      	* c-c++-common/gomp/defaultmap-2.c: New test.
      	* c-c++-common/gomp/defaultmap-3.c: New test.
      	* c-c++-common/gomp/depend-5.c: New test.
      	* c-c++-common/gomp/depend-6.c: New test.
      	* c-c++-common/gomp/depend-iterator-1.c: New test.
      	* c-c++-common/gomp/depend-iterator-2.c: New test.
      	* c-c++-common/gomp/depobj-1.c: New test.
      	* c-c++-common/gomp/flush-1.c: New test.
      	* c-c++-common/gomp/flush-2.c: New test.
      	* c-c++-common/gomp/for-1.c: New test.
      	* c-c++-common/gomp/for-2.c: New test.
      	* c-c++-common/gomp/for-3.c: New test.
      	* c-c++-common/gomp/for-4.c: New test.
      	* c-c++-common/gomp/for-5.c: New test.
      	* c-c++-common/gomp/for-6.c: New test.
      	* c-c++-common/gomp/for-7.c: New test.
      	* c-c++-common/gomp/if-1.c (foo): Add some further tests.
      	* c-c++-common/gomp/if-2.c (foo): Likewise.  Expect slightly different
      	diagnostics wording in one case.
      	* c-c++-common/gomp/if-3.c: New test.
      	* c-c++-common/gomp/master-combined-1.c: New test.
      	* c-c++-common/gomp/master-combined-2.c: New test.
      	* c-c++-common/gomp/nontemporal-1.c: New test.
      	* c-c++-common/gomp/nontemporal-2.c: New test.
      	* c-c++-common/gomp/reduction-task-1.c: New test.
      	* c-c++-common/gomp/reduction-task-2.c: New test.
      	* c-c++-common/gomp/requires-1.c: New test.
      	* c-c++-common/gomp/requires-2.c: New test.
      	* c-c++-common/gomp/requires-3.c: New test.
      	* c-c++-common/gomp/requires-4.c: New test.
      	* c-c++-common/gomp/schedule-modifiers-1.c (bar): Don't expect
      	diagnostics for nonmonotonic modifier with static, runtime or auto
      	schedule kinds.
      	* c-c++-common/gomp/simd7.c: New test.
      	* c-c++-common/gomp/target-data-1.c: New test.
      	* c-c++-common/gomp/taskloop-reduction-1.c: New test.
      	* c-c++-common/gomp/taskwait-depend-1.c: New test.
      	* c-c++-common/gomp/teams-1.c: New test.
      	* c-c++-common/gomp/teams-2.c: New test.
      	* gcc.dg/gomp/appendix-a/a.24.1.c: Update from OpenMP examples.  Add
      	shared(c) clause.
      	* gcc.dg/gomp/atomic-5.c (f1): Add another expected error.
      	* gcc.dg/gomp/clause-1.c: Adjust expected diagnostics for const
      	qualified vars without mutable member no longer being predeterined
      	shared.
      	* gcc.dg/gomp/sharing-1.c: Likewise.
      	* g++.dg/gomp/clause-3.C: Likewise.
      	* g++.dg/gomp/member-2.C: Likewise.
      	* g++.dg/gomp/predetermined-1.C: Likewise.
      	* g++.dg/gomp/private-1.C: Likewise.
      	* g++.dg/gomp/sharing-1.C: Likewise.
      	* g++.dg/gomp/sharing-2.C: Likewise.  Add a few tests with aggregate
      	const static data member without mutable elements.
      	* gcc.dg/gomp/for-4.c: Expected nonmonotonic functions in the dumps.
      	* gcc.dg/gomp/for-5.c: Likewise.
      	* gcc.dg/gomp/for-6.c: Change expected library call.
      	* gcc.dg/gomp/pr39495-2.c (foo): Don't expect errors on !=.
      	* gcc.dg/gomp/reduction-2.c: New test.
      	* gcc.dg/gomp/simd-1.c: New test.
      	* gcc.dg/gomp/teams-1.c: Adjust expected diagnostic lines.
      	* g++.dg/gomp/atomic-18.C: New test.
      	* g++.dg/gomp/atomic-19.C: New test.
      	* g++.dg/gomp/atomic-5.C (f1): Adjust expected lines of read-only
      	variable messages.  Add another expected error.
      	* g++.dg/gomp/critical-3.C: New test.
      	* g++.dg/gomp/depend-iterator-1.C: New test.
      	* g++.dg/gomp/depend-iterator-2.C: New test.
      	* g++.dg/gomp/depobj-1.C: New test.
      	* g++.dg/gomp/doacross-1.C: New test.
      	* g++.dg/gomp/for-21.C: New test.
      	* g++.dg/gomp/for-4.C: Expected nonmonotonic functions in the dumps.
      	* g++.dg/gomp/for-5.C: Likewise.
      	* g++.dg/gomp/for-6.C: Change expected library call.
      	* g++.dg/gomp/loop-4.C: New test.
      	* g++.dg/gomp/pr33372-1.C: Adjust location of the expected
      	diagnostics.
      	* g++.dg/gomp/pr33372-3.C: Likewise.
      	* g++.dg/gomp/pr39495-2.C (foo): Don't expect errors on !=.
      	* g++.dg/gomp/simd-2.C: New test.
      	* g++.dg/gomp/tpl-atomic-2.C: Adjust expected diagnostic lines.
      include/
      	* gomp-constants.h (GOMP_TASK_FLAG_REDUCTION,
      	GOMP_DEPEND_IN, GOMP_DEPEND_OUT, GOMP_DEPEND_INOUT,
      	GOMP_DEPEND_MUTEXINOUTSET): Define.
      libgomp/
      	* affinity.c (gomp_display_affinity_place): New function.
      	* affinity-fmt.c: New file.
      	* alloc.c (gomp_aligned_alloc, gomp_aligned_free): New functions.
      	* config/linux/affinity.c (gomp_display_affinity_place): New function.
      	* config/nvptx/icv-device.c (omp_get_num_teams, omp_get_team_num):
      	Move these functions to ...
      	* config/nvptx/teams.c: ... here.  New file.
      	* config/nvptx/target.c (omp_pause_resource, omp_pause_resource_all):
      	New functions.
      	* config/nvptx/team.c (gomp_team_start, gomp_pause_host): New
      	functions.
      	* configure.ac: Check for aligned_alloc, posix_memalign, memalign
      	and _aligned_malloc.
      	(HAVE_UNAME, HAVE_GETHOSTNAME, HAVE_GETPID): Add new tests.
      	* configure.tgt: Add -DUSING_INITIAL_EXEC_TLS to XCFLAGS for Linux.
      	* env.c (gomp_display_affinity_var, gomp_affinity_format_var,
      	gomp_affinity_format_len): New variables.
      	(parse_schedule): Parse monotonic and nonmonotonic modifiers in
      	OMP_SCHEDULE variable.  Set GFS_MONOTONIC for monotonic schedules.
      	(handle_omp_display_env): Display monotonic/nonmonotonic schedule
      	modifiers.  Display (non-default) chunk sizes.  Print
      	OMP_DISPLAY_AFFINITY and OMP_AFFINITY_FORMAT.
      	(initialize_env): Don't call pthread_attr_setdetachstate.  Handle
      	OMP_DISPLAY_AFFINITY and OMP_AFFINITY_FORMAT env vars.
      	* fortran.c: Include stdio.h and string.h.
      	(omp_pause_resource, omp_pause_resource_all): Add ialias_redirect.
      	(omp_get_schedule_, omp_get_schedule_8_): Mask off GFS_MONOTONIC bit.
      	(omp_set_affinity_format_, omp_get_affinity_format_,
      	omp_display_affinity_, omp_capture_affinity_, omp_pause_resource_,
      	omp_pause_resource_all_): New functions.
      	* icv.c (omp_set_schedule): Mask off omp_sched_monotonic bit in
      	switch.
      	* icv-device.c (omp_get_num_teams, omp_get_team_num): Move these
      	functions to ...
      	* teams.c: ... here.  New file.
      	* libgomp_g.h: Include gstdint.h.
      	(GOMP_loop_nonmonotonic_runtime_start,
      	GOMP_loop_maybe_nonmonotonic_runtime_start, GOMP_loop_start,
      	GOMP_loop_ordered_start, GOMP_loop_nonmonotonic_runtime_next,
      	GOMP_loop_maybe_nonmonotonic_runtime_next, GOMP_loop_doacross_start,
      	GOMP_parallel_loop_nonmonotonic_runtime,
      	GOMP_parallel_loop_maybe_nonmonotonic_runtime,
      	GOMP_loop_ull_nonmonotonic_runtime_start,
      	GOMP_loop_ull_maybe_nonmonotonic_runtime_start, GOMP_loop_ull_start,
      	GOMP_loop_ull_ordered_start, GOMP_loop_ull_nonmonotonic_runtime_next,
      	GOMP_loop_ull_maybe_nonmonotonic_runtime_next,
      	GOMP_loop_ull_doacross_start, GOMP_parallel_reductions,
      	GOMP_taskwait_depend, GOMP_taskgroup_reduction_register,
      	GOMP_taskgroup_reduction_unregister, GOMP_task_reduction_remap,
      	GOMP_workshare_task_reduction_unregister, GOMP_sections2_start,
      	GOMP_teams_reg): Declare.
      	* libgomp.h (GOMP_HAVE_EFFICIENT_ALIGNED_ALLOC): Define unless
      	gomp_aligned_alloc uses fallback implementation.
      	(gomp_aligned_alloc, gomp_aligned_free): Declare.
      	(enum gomp_schedule_type): Add GFS_MONOTONIC.
      	(struct gomp_doacross_work_share): Add extra field.
      	(struct gomp_work_share): Add task_reductions field.
      	(struct gomp_taskgroup): Add workshare and reductions fields.
      	(GOMP_NEEDS_THREAD_HANDLE): Define if needed.
      	(gomp_thread_handle): New typedef.
      	(gomp_display_affinity_place, gomp_set_affinity_format,
      	gomp_display_string, gomp_display_affinity,
      	gomp_display_affinity_thread): Declare.
      	(gomp_doacross_init, gomp_doacross_ull_init): Add size_t argument.
      	(gomp_parallel_reduction_register, gomp_workshare_taskgroup_start,
      	gomp_workshare_task_reduction_register): Declare.
      	(gomp_team_start): Add taskgroup argument.
      	(gomp_pause_host): Declare.
      	(gomp_init_work_share, gomp_work_share_start): Change bool argument
      	to size_t.
      	(gomp_thread_self, gomp_thread_to_pthread_t): New inline functions.
      	* libgomp.map (GOMP_5.0): Export GOMP_loop_start,
      	GOMP_loop_ordered_start, GOMP_loop_doacross_start,
      	GOMP_loop_ull_start, GOMP_loop_ull_ordered_start,
      	GOMP_loop_ull_doacross_start,
      	GOMP_workshare_task_reduction_unregister, GOMP_sections2_start,
      	GOMP_loop_maybe_nonmonotonic_runtime_next,
      	GOMP_loop_maybe_nonmonotonic_runtime_start,
      	GOMP_loop_nonmonotonic_runtime_next,
      	GOMP_loop_nonmonotonic_runtime_start,
      	GOMP_loop_ull_maybe_nonmonotonic_runtime_next,
      	GOMP_loop_ull_maybe_nonmonotonic_runtime_start,
      	GOMP_loop_ull_nonmonotonic_runtime_next,
      	GOMP_loop_ull_nonmonotonic_runtime_start,
      	GOMP_parallel_loop_maybe_nonmonotonic_runtime,
      	GOMP_parallel_loop_nonmonotonic_runtime, GOMP_parallel_reductions,
      	GOMP_taskgroup_reduction_register,
      	GOMP_taskgroup_reduction_unregister, GOMP_task_reduction_remap,
      	GOMP_teams_reg and GOMP_taskwait_depend.
      	(OMP_5.0): Export omp_pause_resource{,_all}{,_},
      	omp_{capture,display}_affinity{,_}, and
      	omp_[gs]et_affinity_format{,_}.
      	* loop.c: Include string.h.
      	(GOMP_loop_runtime_next): Add ialias.
      	(GOMP_taskgroup_reduction_register): Add ialias_redirect.
      	(gomp_loop_static_start, gomp_loop_dynamic_start,
      	gomp_loop_guided_start, gomp_loop_ordered_static_start,
      	gomp_loop_ordered_dynamic_start, gomp_loop_ordered_guided_start,
      	gomp_loop_doacross_static_start, gomp_loop_doacross_dynamic_start,
      	gomp_loop_doacross_guided_start): Adjust gomp_work_share_start
      	or gomp_doacross_init callers.
      	(gomp_adjust_sched, GOMP_loop_start, GOMP_loop_ordered_start,
      	GOMP_loop_doacross_start): New functions.
      	(GOMP_loop_runtime_start, GOMP_loop_ordered_runtime_start,
      	GOMP_loop_doacross_runtime_start, GOMP_parallel_loop_runtime_start):
      	Mask off GFS_MONOTONIC bit.
      	(GOMP_loop_maybe_nonmonotonic_runtime_next,
      	GOMP_loop_maybe_nonmonotonic_runtime_start,
      	GOMP_loop_nonmonotonic_runtime_next,
      	GOMP_loop_nonmonotonic_runtime_start,
      	GOMP_parallel_loop_maybe_nonmonotonic_runtime,
      	GOMP_parallel_loop_nonmonotonic_runtime): New aliases or wrapper
      	functions.
      	(gomp_parallel_loop_start): Pass NULL as taskgroup to
      	gomp_team_start.
      	* loop_ull.c: Include string.h.
      	(GOMP_loop_ull_runtime_next): Add ialias.
      	(GOMP_taskgroup_reduction_register): Add ialias_redirect.
      	(gomp_loop_ull_static_start, gomp_loop_ull_dynamic_start,
      	gomp_loop_ull_guided_start, gomp_loop_ull_ordered_static_start,
      	gomp_loop_ull_ordered_dynamic_start,
      	gomp_loop_ull_ordered_guided_start,
      	gomp_loop_ull_doacross_static_start,
      	gomp_loop_ull_doacross_dynamic_start,
      	gomp_loop_ull_doacross_guided_start): Adjust gomp_work_share_start
      	and gomp_doacross_ull_init callers.
      	(gomp_adjust_sched, GOMP_loop_ull_start, GOMP_loop_ull_ordered_start,
      	GOMP_loop_ull_doacross_start): New functions.
      	(GOMP_loop_ull_runtime_start,
      	GOMP_loop_ull_ordered_runtime_start,
      	GOMP_loop_ull_doacross_runtime_start): Mask off GFS_MONOTONIC bit.
      	(GOMP_loop_ull_maybe_nonmonotonic_runtime_next,
      	GOMP_loop_ull_maybe_nonmonotonic_runtime_start,
      	GOMP_loop_ull_nonmonotonic_runtime_next,
      	GOMP_loop_ull_nonmonotonic_runtime_start): Likewise.
      	* Makefile.am (libgomp_la_SOURCES): Add teams.c and affinity-fmt.c.
      	* omp.h.in (enum omp_sched_t): Add omp_sched_monotonic.
      	(omp_pause_resource_t, omp_depend_t): New typedefs.
      	(enum omp_lock_hint_t): Renamed to ...
      	(enum omp_sync_hint_t): ... this.  Define omp_sync_hint_*
      	enumerators using numbers and omp_lock_hint_* as their aliases.
      	(omp_lock_hint_t): New typedef.  Rename to ...
      	(omp_sync_hint_t): ... this.
      	(omp_init_lock_with_hint, omp_init_nest_lock_with_hint): Use
      	omp_sync_hint_t instead of omp_lock_hint_t.
      	(omp_pause_resource, omp_pause_resource_all, omp_set_affinity_format,
      	omp_get_affinity_format, omp_display_affinity, omp_capture_affinity):
      	Declare.
      	(omp_target_is_present, omp_target_disassociate_ptr):
      	Change first argument from void * to const void *.
      	(omp_target_memcpy, omp_target_memcpy_rect): Change second argument
      	from void * to const void *.
      	(omp_target_associate_ptr): Change first and second arguments from
      	void * to const void *.
      	* omp_lib.f90.in (omp_pause_resource_kind, omp_pause_soft,
      	omp_pause_hard): New parameters.
      	(omp_pause_resource, omp_pause_resource_all, omp_set_affinity_format,
      	omp_get_affinity_format, omp_display_affinity, omp_capture_affinity):
      	New interfaces.
      	* omp_lib.h.in (omp_pause_resource_kind, omp_pause_soft,
      	omp_pause_hard): New parameters.
      	(omp_pause_resource, omp_pause_resource_all, omp_set_affinity_format,
      	omp_get_affinity_format, omp_display_affinity, omp_capture_affinity):
      	New externals.
      	* ordered.c (gomp_doacross_init, gomp_doacross_ull_init): Add
      	EXTRA argument.  If not needed to prepare array, if extra is 0,
      	clear ws->doacross, otherwise allocate just doacross structure and
      	extra payload.  If array is needed, allocate also extra payload.
      	(GOMP_doacross_post, GOMP_doacross_wait, GOMP_doacross_ull_post,
      	GOMP_doacross_ull_wait): Handle doacross->array == NULL like
      	doacross == NULL.
      	* parallel.c (GOMP_parallel_start): Pass NULL as taskgroup to
      	gomp_team_start.
      	(GOMP_parallel): Likewise.  Formatting fix.
      	(GOMP_parallel_reductions): New function.
      	(GOMP_cancellation_point): If taskgroup has workshare
      	flag set, check cancelled of prev taskgroup if any.
      	(GOMP_cancel): If taskgroup has workshare flag set, set cancelled
      	on prev taskgroup if any.
      	* sections.c: Include string.h.
      	(GOMP_taskgroup_reduction_register): Add ialias_redirect.
      	(GOMP_sections_start): Adjust gomp_work_share_start caller.
      	(GOMP_sections2_start): New function.
      	(GOMP_parallel_sections_start, GOMP_parallel_sections):
      	Pass NULL as taskgroup to gomp_team_start.
      	* single.c (GOMP_single_start, GOMP_single_copy_start): Adjust
      	gomp_work_share_start callers.
      	* target.c (GOMP_target_update_ext, GOMP_target_enter_exit_data):
      	If taskgroup has workshare flag set, check cancelled on prev
      	taskgroup if any.  Guard all cancellation tests with
      	gomp_cancel_var test.
      	(omp_target_is_present, omp_target_disassociate_ptr):
      	Change ptr argument from void * to const void *.
      	(omp_target_memcpy): Change src argument from void * to const void *.
      	(omp_target_memcpy_rect): Likewise.
      	(omp_target_memcpy_rect_worker): Likewise.  Use const char * casts
      	instead of char * where needed.
      	(omp_target_associate_ptr): Change host_ptr and device_ptr arguments
      	from void * to const void *.
      	(omp_pause_resource, omp_pause_resource_all): New functions.
      	* task.c (gomp_task_handle_depend): Handle new depend array format
      	in addition to the old.  Handle mutexinoutset kinds the same as
      	inout for now, handle unspecified kinds.
      	(gomp_create_target_task): If taskgroup has workshare flag set, check
      	cancelled on prev taskgroup if any.  Guard all cancellation tests with
      	gomp_cancel_var test.  Handle new depend array format count in
      	addition to the old.
      	(GOMP_task): Likewise.  Adjust function comment.
      	(gomp_task_run_pre): If taskgroup has workshare flag set, check
      	cancelled on prev taskgroup if any.  Guard all cancellation tests with
      	gomp_cancel_var test.
      	(GOMP_taskwait_depend): New function.
      	(gomp_task_maybe_wait_for_dependencies): Handle new depend array
      	format in addition to the old.  Handle mutexinoutset kinds the same as
      	inout for now, handle unspecified kinds.  Fix a function comment typo.
      	(gomp_taskgroup_init): New function.
      	(GOMP_taskgroup_start): Use it.
      	(gomp_reduction_register, gomp_create_artificial_team,
      	GOMP_taskgroup_reduction_register,
      	GOMP_taskgroup_reduction_unregister, GOMP_task_reduction_remap,
      	gomp_parallel_reduction_register,
      	gomp_workshare_task_reduction_register,
      	gomp_workshare_taskgroup_start,
      	GOMP_workshare_task_reduction_unregister): New functions.
      	* taskloop.c (GOMP_taskloop): If taskgroup has workshare flag set,
      	check cancelled on prev taskgroup if any.  Guard all cancellation
      	tests with gomp_cancel_var test.  Handle GOMP_TASK_FLAG_REDUCTION flag
      	by calling GOMP_taskgroup_reduction_register.
      	* team.c (gomp_thread_attr): Remove comment.
      	(struct gomp_thread_start_data): Add handle field.
      	(gomp_thread_start): Call pthread_detach.
      	(gomp_new_team): Adjust gomp_init_work_share caller.
      	(gomp_free_pool_helper): Call pthread_detach.
      	(gomp_team_start): Add taskgroup argument, initialize implicit
      	tasks' taskgroup field to that.  Don't call
      	pthread_attr_setdetachstate.  Handle OMP_DISPLAY_AFFINITY env var.
      	(gomp_team_end): Determine nesting by thr->ts.level != 0
      	rather than thr->ts.team != NULL.
      	(gomp_pause_pool_helper, gomp_pause_host): New functions.
      	* work.c (alloc_work_share): Use gomp_aligned_alloc instead of
      	gomp_malloc if GOMP_HAVE_EFFICIENT_ALIGNED_ALLOC is defined.
      	(gomp_init_work_share): Change ORDERED argument from bool to size_t,
      	if more than 1 allocate also extra payload at the end of array.  Never
      	keep ordered_team_ids NULL, set it to inline_ordered_team_ids instead.
      	(gomp_work_share_start): Change ORDERED argument from bool to size_t,
      	return true instead of ws.
      	* Makefile.in: Regenerated.
      	* configure: Regenerated.
      	* config.h.in: Regenerated.
      	* testsuite/libgomp.c/cancel-for-2.c (foo): Use cancel modifier
      	in some cases.
      	* testsuite/libgomp.c-c++-common/cancel-parallel-1.c: New test.
      	* testsuite/libgomp.c-c++-common/cancel-taskgroup-3.c: New test.
      	* testsuite/libgomp.c-c++-common/depend-iterator-1.c: New test.
      	* testsuite/libgomp.c-c++-common/depend-iterator-2.c: New test.
      	* testsuite/libgomp.c-c++-common/depend-mutexinout-1.c: New test.
      	* testsuite/libgomp.c-c++-common/depend-mutexinout-2.c: New test.
      	* testsuite/libgomp.c-c++-common/depobj-1.c: New test.
      	* testsuite/libgomp.c-c++-common/display-affinity-1.c: New test.
      	* testsuite/libgomp.c-c++-common/for-10.c: New test.
      	* testsuite/libgomp.c-c++-common/for-11.c: New test.
      	* testsuite/libgomp.c-c++-common/for-12.c: New test.
      	* testsuite/libgomp.c-c++-common/for-13.c: New test.
      	* testsuite/libgomp.c-c++-common/for-14.c: New test.
      	* testsuite/libgomp.c-c++-common/for-15.c: New test.
      	* testsuite/libgomp.c-c++-common/for-2.h: If CONDNE macro is defined,
      	define a different N(test), don't define N(f0) to N(f14), but instead
      	define N(f20) to N(f34) using != comparisons.
      	* testsuite/libgomp.c-c++-common/for-7.c: New test.
      	* testsuite/libgomp.c-c++-common/for-8.c: New test.
      	* testsuite/libgomp.c-c++-common/for-9.c: New test.
      	* testsuite/libgomp.c-c++-common/master-combined-1.c: New test.
      	* testsuite/libgomp.c-c++-common/pause-1.c: New test.
      	* testsuite/libgomp.c-c++-common/pause-2.c: New test.
      	* testsuite/libgomp.c-c++-common/pr66199-10.c: New test.
      	* testsuite/libgomp.c-c++-common/pr66199-11.c: New test.
      	* testsuite/libgomp.c-c++-common/pr66199-12.c: New test.
      	* testsuite/libgomp.c-c++-common/pr66199-13.c: New test.
      	* testsuite/libgomp.c-c++-common/pr66199-14.c: New test.
      	* testsuite/libgomp.c-c++-common/simd-1.c: New test.
      	* testsuite/libgomp.c-c++-common/taskloop-reduction-1.c: New test.
      	* testsuite/libgomp.c-c++-common/taskloop-reduction-2.c: New test.
      	* testsuite/libgomp.c-c++-common/taskloop-reduction-3.c: New test.
      	* testsuite/libgomp.c-c++-common/taskloop-reduction-4.c: New test.
      	* testsuite/libgomp.c-c++-common/task-reduction-11.c: New test.
      	* testsuite/libgomp.c-c++-common/task-reduction-12.c: New test.
      	* testsuite/libgomp.c-c++-common/task-reduction-1.c: New test.
      	* testsuite/libgomp.c-c++-common/task-reduction-2.c: New test.
      	* testsuite/libgomp.c-c++-common/task-reduction-3.c: New test.
      	* testsuite/libgomp.c-c++-common/task-reduction-4.c: New test.
      	* testsuite/libgomp.c-c++-common/task-reduction-5.c: New test.
      	* testsuite/libgomp.c-c++-common/task-reduction-6.c: New test.
      	* testsuite/libgomp.c-c++-common/task-reduction-7.c: New test.
      	* testsuite/libgomp.c-c++-common/task-reduction-8.c: New test.
      	* testsuite/libgomp.c-c++-common/task-reduction-9.c: New test.
      	* testsuite/libgomp.c-c++-common/taskwait-depend-1.c: New test.
      	* testsuite/libgomp.c++/depend-1.C: New test.
      	* testsuite/libgomp.c++/depend-iterator-1.C: New test.
      	* testsuite/libgomp.c++/depobj-1.C: New test.
      	* testsuite/libgomp.c++/for-16.C: New test.
      	* testsuite/libgomp.c++/for-21.C: New test.
      	* testsuite/libgomp.c++/for-22.C: New test.
      	* testsuite/libgomp.c++/for-23.C: New test.
      	* testsuite/libgomp.c++/for-24.C: New test.
      	* testsuite/libgomp.c++/for-25.C: New test.
      	* testsuite/libgomp.c++/for-26.C: New test.
      	* testsuite/libgomp.c++/taskloop-reduction-1.C: New test.
      	* testsuite/libgomp.c++/taskloop-reduction-2.C: New test.
      	* testsuite/libgomp.c++/taskloop-reduction-3.C: New test.
      	* testsuite/libgomp.c++/taskloop-reduction-4.C: New test.
      	* testsuite/libgomp.c++/task-reduction-10.C: New test.
      	* testsuite/libgomp.c++/task-reduction-11.C: New test.
      	* testsuite/libgomp.c++/task-reduction-12.C: New test.
      	* testsuite/libgomp.c++/task-reduction-13.C: New test.
      	* testsuite/libgomp.c++/task-reduction-14.C: New test.
      	* testsuite/libgomp.c++/task-reduction-15.C: New test.
      	* testsuite/libgomp.c++/task-reduction-16.C: New test.
      	* testsuite/libgomp.c++/task-reduction-17.C: New test.
      	* testsuite/libgomp.c++/task-reduction-18.C: New test.
      	* testsuite/libgomp.c++/task-reduction-19.C: New test.
      	* testsuite/libgomp.c/task-reduction-1.c: New test.
      	* testsuite/libgomp.c++/task-reduction-1.C: New test.
      	* testsuite/libgomp.c/task-reduction-2.c: New test.
      	* testsuite/libgomp.c++/task-reduction-2.C: New test.
      	* testsuite/libgomp.c++/task-reduction-3.C: New test.
      	* testsuite/libgomp.c++/task-reduction-4.C: New test.
      	* testsuite/libgomp.c++/task-reduction-5.C: New test.
      	* testsuite/libgomp.c++/task-reduction-6.C: New test.
      	* testsuite/libgomp.c++/task-reduction-7.C: New test.
      	* testsuite/libgomp.c++/task-reduction-8.C: New test.
      	* testsuite/libgomp.c++/task-reduction-9.C: New test.
      	* testsuite/libgomp.c/teams-1.c: New test.
      	* testsuite/libgomp.c/teams-2.c: New test.
      	* testsuite/libgomp.c/thread-limit-4.c: New test.
      	* testsuite/libgomp.c/thread-limit-5.c: New test.
      	* testsuite/libgomp.fortran/display-affinity-1.f90: New test.
      
      From-SVN: r265930
      Jakub Jelinek committed
  15. 07 Nov, 2018 4 commits
  16. 06 Nov, 2018 6 commits
  17. 05 Nov, 2018 1 commit
    • Come up with SIZE_AMOUNT and use it in memory statistics and sort stats. · 40ce7fa6
      2018-11-05  Martin Liska  <mliska@suse.cz>
      
      	* alloc-pool.h (struct pool_usage): Use SIZE_AMOUNT.
      	* bitmap.h (struct bitmap_usage): Likewise.
      	* ggc-common.c (SCALE): Remove.
      	(LABEL): Likewise.
      	(struct ggc_usage): Use SIZE_AMOUNT. And update
      	compare method.
      	* ggc-page.c (SCALE): Remove.
      	(STAT_LABEL): Remove.
      	(ggc_print_statistics): Use SIZE_AMOUNT.
      	* gimple.h (SCALE): Remove.
      	(LABEL): Likewise.
      	* input.c (ONE_K): Remove.
      	(ONE_M): Likewise.
      	(SCALE): Likewise.
      	(STAT_LABEL): Likewise.
      	(FORMAT_AMOUNT): Likewise.
      	(dump_line_table_statistics): Use SIZE_AMOUNT.
      	* mem-stats.h (struct mem_usage): Likewise.
      	* rtl.c (dump_rtx_statistics): Likewise.
      	(rtx_alloc_counts): Change type to size_t.
      	(rtx_alloc_sizes): Likewise.
      	(rtx_count_cmp): New.
      	(dump_rtx_statistics): Sort first based on counts.
      	* tree.c (tree_nodes_cmp): New.
      	(tree_codes_cmp): New.
      	(dump_tree_statistics): Sort first based on counts.
      	* system.h (ONE_K): New.
      	(ONE_M): Likewise.
      	(SIZE_SCALE): Likewise.
      	(SIZE_LABEL): Likewise.
      	(SIZE_AMOUNT): Likewise.
      	* tree-cfg.c (dump_cfg_stats): Use SIZE_AMOUNT.
      	* tree-dfa.c (dump_dfa_stats): Likewise.
      	* tree-phinodes.c (phinodes_print_statistics): Likewise.
      	* tree-ssanames.c (ssanames_print_statistics): Likewise.
      	* tree.c (dump_tree_statistics): Likewise.
      	* vec.c (struct vec_usage): Likewise.
      	* trans-mem.c (tm_mangle): Enlarge buffer in order to not
      	trigger a -Werror=format-overflow with
      	--enable-gather-detailed-stats.
      
      From-SVN: r265800
      Martin Liska committed
  18. 01 Nov, 2018 1 commit
  19. 30 Oct, 2018 1 commit
    • * tree.c · 3487ab63
      	(free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
      	head in file.
      	(free_lang_data_in_type): Forward declare.
      	(fld_type_variant_equal_p): New function.
      	(fld_type_variant): New function
      	(fld_incomplete_types): New hash.
      	(fld_incomplete_type_of): New function
      	(fld_simplfied-type): New function.
      	(free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
      	(free_lang_data): Allocate and free fld_incomplete_type; update call
      	of free_lang_data_in_decl.
      
      From-SVN: r265638
      Jan Hubicka committed
  20. 26 Oct, 2018 1 commit
  21. 05 Oct, 2018 1 commit
    • tree-core.h (tree_block::abstract_flag): Remove. · 700adeb6
      2018-10-05  Richard Biener  <rguenther@suse.de>
      
      	* tree-core.h (tree_block::abstract_flag): Remove.
      	(tree_block::block_num): Make full 32bits.
      	* tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
      	* tree.h (BLOCK_ABSTRACT): Remove.
      	* dwarf2out.c (gen_lexical_block_die): Remove dead code
      	resulting from BLOCK_ABSTRACT being always false.
      	(gen_inlined_subroutine_die): Likewise.
      	(gen_block_die): Likewise.
      	* tree.c (block_ultimate_origin): Likewise.
      	* tree-pretty-print.c (dump_block_node): Remove code dealing
      	with BLOCK_ABSTRACT.
      	* tree-ssa-live.c (dump_scope_block): Likewise.
      	* tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
      	* tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
      
      From-SVN: r264868
      Richard Biener committed
  22. 04 Oct, 2018 1 commit
  23. 02 Oct, 2018 1 commit
  24. 01 Oct, 2018 1 commit
  25. 28 Sep, 2018 1 commit
    • tree.h (BLOCK_ORIGIN): New. · dc16b007
      2018-09-28  Richard Biener  <rguenther@suse.de>
      
      	* tree.h (BLOCK_ORIGIN): New.
      	* omp-expand.c (grid_expand_target_grid_body): Assign
      	BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
      	* tree-inline.c (remap_block): Likewise.
      
      	* auto-profile.c (get_function_decl_from_block): Simplify
      	by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
      	* langhooks.c (lhd_print_error_function): Likewise.
      	* optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
      	Likewise.
      	* tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
      	* tree.c (block_nonartificial_location): Likewise.
      	(block_ultimate_origin): Likewise.
      	* tree-pretty-print.c (percent_K_format): Likewise.  Remove
      	no longer needed LTO case.
      
      	cp/
      	* error.c (cp_print_error_function): Simplify by eliding
      	the BLOCK_ABSTRACT_ORIGIN chasing.
      
      From-SVN: r264689
      Richard Biener committed
  26. 26 Sep, 2018 1 commit
    • tree.c (zerop): Change return type to bool. · d89fde46
      gcc/ChangeLog:
      
      	* tree.c (zerop): Change return type to bool.
      	(integer_zerop, integer_onep, integer_each_onep): Same.
      	(integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
      	(integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
      	(real_onep, real_minus_onep, chain_index): Same.
      	(print_type_hash_statistics, type_list_equal): Same.
      	* tree.h (zerop): Same.
      	(zerop, integer_zerop, integer_onep, integer_each_onep): Same.
      	(integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
      	(integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
      	(real_onep, real_minus_onep, chain_index): Same.
      	(print_type_hash_statistics, type_list_equal): Same.
      
      From-SVN: r264653
      Martin Sebor committed
  27. 30 Aug, 2018 1 commit
  28. 29 Aug, 2018 1 commit
  29. 27 Aug, 2018 1 commit
    • Come up with fndecl_built_in_p. · 3d78e008
      2018-08-27  Martin Liska  <mliska@suse.cz>
      
      	* builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
      	* builtins.c (is_builtin_fn): Likewise.
      	* attribs.c (diag_attr_exclusions): Use new function
              fndecl_built_in_p and remove check for FUNCTION_DECL if
              possible.
      	(builtin_mathfn_code): Likewise.
      	(fold_builtin_expect): Likewise.
      	(fold_call_expr): Likewise.
      	(fold_builtin_call_array): Likewise.
      	(fold_call_stmt): Likewise.
      	(set_builtin_user_assembler_name): Likewise.
      	(is_simple_builtin): Likewise.
      	* calls.c (gimple_alloca_call_p): Likewise.
      	(maybe_warn_nonstring_arg): Likewise.
      	* cfgexpand.c (expand_call_stmt): Likewise.
      	* cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
      	(cgraph_edge::verify_corresponds_to_fndecl): Likewise.
      	(cgraph_node::verify_node): Likewise.
      	* cgraphclones.c (build_function_decl_skip_args): Likewise.
      	(cgraph_node::create_clone): Likewise.
      	* config/arm/arm.c (arm_insert_attributes): Likewise.
      	* config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
      	* dse.c (scan_insn): Likewise.
      	* expr.c (expand_expr_real_1): Likewise.
      	* fold-const.c (operand_equal_p): Likewise.
      	(fold_binary_loc): Likewise.
      	* gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
      	* gimple-low.c (lower_stmt): Likewise.
      	* gimple-pretty-print.c (dump_gimple_call): Likewise.
      	* gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Likewise.
      	* gimple.c (gimple_build_call_from_tree): Likewise.
      	(gimple_call_builtin_p): Likewise.
      	(gimple_call_combined_fn): Likewise.
      	* gimplify.c (gimplify_call_expr): Likewise.
      	(gimple_boolify): Likewise.
      	(gimplify_modify_expr): Likewise.
      	(gimplify_addr_expr): Likewise.
      	* hsa-gen.c (gen_hsa_insns_for_call): Likewise.
      	* ipa-cp.c (determine_versionability): Likewise.
      	* ipa-fnsummary.c (compute_fn_summary): Likewise.
      	* ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
      	* ipa-split.c (visit_bb): Likewise.
      	(split_function): Likewise.
      	* ipa-visibility.c (cgraph_externally_visible_p): Likewise.
      	* lto-cgraph.c (input_node): Likewise.
      	* lto-streamer-out.c (write_symbol): Likewise.
      	* omp-low.c (setjmp_or_longjmp_p): Likewise.
      	(lower_omp_1): Likewise.
      	* predict.c (strip_predict_hints): Likewise.
      	* print-tree.c (print_node): Likewise.
      	* symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
      	* trans-mem.c (is_tm_irrevocable): Likewise.
      	(is_tm_load): Likewise.
      	(is_tm_simple_load): Likewise.
      	(is_tm_store): Likewise.
      	(is_tm_simple_store): Likewise.
      	(is_tm_abort): Likewise.
      	(tm_region_init_1): Likewise.
      	* tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
      	* tree-cfg.c (verify_gimple_call): Likewise.
      	(move_stmt_r): Likewise.
      	(stmt_can_terminate_bb_p): Likewise.
      	* tree-eh.c (lower_eh_constructs_2): Likewise.
      	* tree-if-conv.c (if_convertible_stmt_p): Likewise.
      	* tree-inline.c (remap_gimple_stmt): Likewise.
      	(copy_bb): Likewise.
      	(estimate_num_insns): Likewise.
      	(fold_marked_statements): Likewise.
      	* tree-sra.c (scan_function): Likewise.
      	* tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
      	(optimize_stack_restore): Likewise.
      	(pass_fold_builtins::execute): Likewise.
      	* tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
      	(mark_all_reaching_defs_necessary_1): Likewise.
      	* tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
      	* tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
      	(pass_forwprop::execute): Likewise.
      	* tree-ssa-loop-im.c (stmt_cost): Likewise.
      	* tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
      	* tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
      	* tree-ssa-strlen.c (get_string_length): Likewise.
      	* tree-ssa-structalias.c (handle_lhs_call): Likewise.
      	(find_func_aliases_for_call): Likewise.
      	* tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
      	* tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
      	* tree-tailcall.c (find_tail_calls): Likewise.
      	* tree.c (need_assembler_name_p): Likewise.
      	(free_lang_data_in_decl): Likewise.
      	(get_call_combined_fn): Likewise.
      	* ubsan.c (is_ubsan_builtin_p): Likewise.
      	* varasm.c (incorporeal_function_p): Likewise.
      	* tree.h (DECL_BUILT_IN): Remove and replace with
              fndecl_built_in_p.
      	(DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
      	(fndecl_built_in_p): New.
      2018-08-27  Martin Liska  <mliska@suse.cz>
      
      	* gcc-interface/decl.c (update_profile): Use new function
              fndecl_built_in_p and remove check for FUNCTION_DECL if
              possible.
      	* gcc-interface/gigi.h (call_is_atomic_load): Likewise.
      	* gcc-interface/utils.c (gnat_pushdecl): Likewise.
      2018-08-27  Martin Liska  <mliska@suse.cz>
      
      	* c-common.c (check_function_restrict): Use new function
              fndecl_built_in_p and remove check for FUNCTION_DECL if
              possible.
      	(check_builtin_function_arguments): Likewise.
      	(reject_gcc_builtin): Likewise.
      	* c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
      2018-08-27  Martin Liska  <mliska@suse.cz>
      
      	* c-decl.c (locate_old_decl): Use new function
              fndecl_built_in_p and remove check for FUNCTION_DECL if
              possible.
      	(diagnose_mismatched_decls): Likewise.
      	(merge_decls): Likewise.
      	(warn_if_shadowing): Likewise.
      	(pushdecl): Likewise.
      	(implicitly_declare): Likewise.
      	* c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
      	* c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
      	* c-typeck.c (build_function_call_vec): Likewise.
      	(convert_arguments): Likewise.
      2018-08-27  Martin Liska  <mliska@suse.cz>
      
      	* call.c (build_call_a): Use new function
              fndecl_built_in_p and remove check for FUNCTION_DECL if
              possible.
      	(build_cxx_call): Likewise.
      	* constexpr.c (constexpr_fn_retval): Likewise.
      	(cxx_eval_builtin_function_call): Likewise.
      	(cxx_eval_call_expression): Likewise.
      	(potential_constant_expression_1): Likewise.
      	* cp-gimplify.c (cp_gimplify_expr): Likewise.
      	(cp_fold): Likewise.
      	* decl.c (decls_match): Likewise.
      	(validate_constexpr_redeclaration): Likewise.
      	(duplicate_decls): Likewise.
      	(make_rtl_for_nonlocal_decl): Likewise.
      	* name-lookup.c (consider_binding_level): Likewise.
      	(cp_emit_debug_info_for_using): Likewise.
      	* semantics.c (finish_call_expr): Likewise.
      	* tree.c (builtin_valid_in_constant_expr_p): Likewise.
      2018-08-27  Martin Liska  <mliska@suse.cz>
      
      	* go-gcc.cc (Gcc_backend::call_expression): Use new function
              fndecl_built_in_p and remove check for FUNCTION_DECL if
              possible.
      2018-08-27  Martin Liska  <mliska@suse.cz>
      
      	* lto-lang.c (handle_const_attribute): Use new function
              fndecl_built_in_p and remove check for FUNCTION_DECL if
              possible.
      	* lto-symtab.c (lto_symtab_merge_p): Likewise.
      	(lto_symtab_merge_decls_1): Likewise.
      	(lto_symtab_merge_symbols): Likewise.
      	* lto.c (lto_maybe_register_decl): Likewise.
      	(read_cgraph_and_symbols): Likewise.
      
      From-SVN: r263880
      Martin Liska committed
  30. 21 Aug, 2018 2 commits