summaryrefslogtreecommitdiff
path: root/gcc/omp-expand.c
AgeCommit message (Collapse)Author
2020-04-23OpenACC: Avoid ICE in type-cast 'async', 'wait' clausesAndrew Stubbs
2020-04-23 Andrew Stubbs <ams@codesourcery.com> Thomas Schwinge <thomas@codesourcery.com> PR middle-end/93488 gcc/ * omp-expand.c (expand_omp_target): Use force_gimple_operand_gsi on t_async and the wait arguments. gcc/testsuite/ * c-c++-common/goacc/pr93488.c: New file. Reviewed-by: Thomas Schwinge <thomas@codesourcery.com>
2020-02-25typo fix: Fix probablity, becuse, sucessor and destinarion typos [PR93912]Jakub Jelinek
2020-02-25 Jakub Jelinek <jakub@redhat.com> PR other/93912 * config/sh/sh.c (expand_cbranchdi4): Fix comment typo, probablity -> probability. * cfghooks.c (verify_flow_info): Likewise. * predict.c (combine_predictions_for_bb): Likewise. * bb-reorder.c (connect_better_edge_p): Likewise. Fix comment typo, sucessor -> successor. (find_traces_1_round): Fix comment typo, destinarion -> destination. * omp-expand.c (expand_oacc_for): Fix comment typo, sucessors -> successors. * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Fix dump message typo, sucessors -> successors. c/ * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability): Rename last argument from probablity to probability.
2020-01-01Update copyright years.Jakub Jelinek
From-SVN: r279813
2019-11-12Add OpenACC 2.6 `serial' construct supportMaciej W. Rozycki
The `serial' construct (cf. section 2.5.3 of the OpenACC 2.6 standard) is equivalent to a `parallel' construct with clauses `num_gangs(1) num_workers(1) vector_length(1)' implied. These clauses are therefore not supported with the `serial' construct. All the remaining clauses accepted with `parallel' are also accepted with `serial'. The `serial' construct is implemented like `parallel', except for hardcoding dimensions rather than taking them from the relevant clauses, in `expand_omp_target'. Separate codes are used to denote the `serial' construct throughout the middle end, even though the mapping of `serial' to an equivalent `parallel' construct could have been done in the individual language frontends. In particular, this allows to distinguish between compute constructs in warnings, error messages, dumps etc. 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com> Tobias Burnus <tobias@codesourcery.com> Frederik Harwath <frederik@codesourcery.com> Thomas Schwinge <thomas@codesourcery.com> gcc/ * gimple.h (gf_mask): Add GF_OMP_TARGET_KIND_OACC_SERIAL enumeration constant. (is_gimple_omp_oacc): Handle GF_OMP_TARGET_KIND_OACC_SERIAL. (is_gimple_omp_offloaded): Likewise. * gimplify.c (omp_region_type): Add ORT_ACC_SERIAL enumeration constant. Adjust the value of ORT_NONE accordingly. (is_gimple_stmt): Handle OACC_SERIAL. (oacc_default_clause): Handle ORT_ACC_SERIAL. (gomp_needs_data_present): Likewise. (gimplify_adjust_omp_clauses): Likewise. (gimplify_omp_workshare): Handle OACC_SERIAL. (gimplify_expr): Likewise. * omp-expand.c (expand_omp_target): Handle GF_OMP_TARGET_KIND_OACC_SERIAL. (build_omp_regions_1, omp_make_gimple_edges): Likewise. * omp-low.c (is_oacc_parallel): Rename function to... (is_oacc_parallel_or_serial): ... this. Handle GF_OMP_TARGET_KIND_OACC_SERIAL. (scan_sharing_clauses): Adjust accordingly. (scan_omp_for): Likewise. (lower_oacc_head_mark): Likewise. (convert_from_firstprivate_int): Likewise. (lower_omp_target): Likewise. (check_omp_nesting_restrictions): Handle GF_OMP_TARGET_KIND_OACC_SERIAL. (lower_oacc_reductions): Likewise. (lower_omp_target): Likewise. * tree.def (OACC_SERIAL): New tree code. * tree-pretty-print.c (dump_generic_node): Handle OACC_SERIAL. * doc/generic.texi (OpenACC): Document OACC_SERIAL. gcc/c-family/ * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration constant. * c-pragma.c (oacc_pragmas): Add "serial" entry. gcc/c/ * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro. (c_parser_oacc_kernels_parallel): Rename function to... (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL. (c_parser_omp_construct): Update accordingly. gcc/cp/ * constexpr.c (potential_constant_expression_1): Handle OACC_SERIAL. * parser.c (OACC_SERIAL_CLAUSE_MASK): New macro. (cp_parser_oacc_kernels_parallel): Rename function to... (cp_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL. (cp_parser_omp_construct): Update accordingly. (cp_parser_pragma): Handle PRAGMA_OACC_SERIAL. Fix alphabetic order. * pt.c (tsubst_expr): Handle OACC_SERIAL. gcc/fortran/ * gfortran.h (gfc_statement): Add ST_OACC_SERIAL_LOOP, ST_OACC_END_SERIAL_LOOP, ST_OACC_SERIAL and ST_OACC_END_SERIAL enumeration constants. (gfc_exec_op): Add EXEC_OACC_SERIAL_LOOP and EXEC_OACC_SERIAL enumeration constants. * match.h (gfc_match_oacc_serial): New prototype. (gfc_match_oacc_serial_loop): Likewise. * dump-parse-tree.c (show_omp_node, show_code_node): Handle EXEC_OACC_SERIAL_LOOP and EXEC_OACC_SERIAL. * match.c (match_exit_cycle): Handle EXEC_OACC_SERIAL_LOOP. * openmp.c (OACC_SERIAL_CLAUSES): New macro. (gfc_match_oacc_serial_loop): New function. (gfc_match_oacc_serial): Likewise. (oacc_is_loop): Handle EXEC_OACC_SERIAL_LOOP. (resolve_omp_clauses): Handle EXEC_OACC_SERIAL. (oacc_code_to_statement): Handle EXEC_OACC_SERIAL and EXEC_OACC_SERIAL_LOOP. (gfc_resolve_oacc_directive): Likewise. * parse.c (decode_oacc_directive) <'s'>: Add case for "serial" and "serial loop". (next_statement): Handle ST_OACC_SERIAL_LOOP and ST_OACC_SERIAL. (gfc_ascii_statement): Likewise. Handle ST_OACC_END_SERIAL_LOOP and ST_OACC_END_SERIAL. (parse_oacc_structured_block): Handle ST_OACC_SERIAL. (parse_oacc_loop): Handle ST_OACC_SERIAL_LOOP and ST_OACC_END_SERIAL_LOOP. (parse_executable): Handle ST_OACC_SERIAL_LOOP and ST_OACC_SERIAL. (is_oacc): Handle EXEC_OACC_SERIAL_LOOP and EXEC_OACC_SERIAL. * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Likewise. * st.c (gfc_free_statement): Likewise. * trans-openmp.c (gfc_trans_oacc_construct): Handle EXEC_OACC_SERIAL. (gfc_trans_oacc_combined_directive): Handle EXEC_OACC_SERIAL_LOOP. (gfc_trans_oacc_directive): Handle EXEC_OACC_SERIAL_LOOP and EXEC_OACC_SERIAL. * trans.c (trans_code): Likewise. gcc/testsuite/ * c-c++-common/goacc/parallel-dims.c: New test. * gfortran.dg/goacc/parallel-dims.f90: New test. libgomp/ * testsuite/libgomp.oacc-c-c++-common/parallel-dims.c: New test. * testsuite/libgomp.oacc-fortran/parallel-dims-aux.c: New test. * testsuite/libgomp.oacc-fortran/parallel-dims.f89: New test. * testsuite/libgomp.oacc-fortran/parallel-dims-2.f90: New test. Reviewed-by: Thomas Schwinge <thomas@codesourcery.com> Co-Authored-By: Frederik Harwath <frederik@codesourcery.com> Co-Authored-By: Thomas Schwinge <thomas@codesourcery.com> Co-Authored-By: Tobias Burnus <tobias@codesourcery.com> From-SVN: r278082
2019-11-05hsa-brig.c: Include alloc-pool.hJan Hubicka
* hsa-brig.c: Include alloc-pool.h * hsa-dump.c: Likewise. * hsa-gen.c: Likewise. * hse-regalloc.c: Likewise. * ipa-hsa.c: Likewise. * ipa-predicate.c: Likewise. * ipa-reference.c: Likewise. * ipa-sra.c: Likewise. * omp-expand.c: Likewise. * omp-general.c: Likewise. * omp-low.c: Likewise. * sumbol-summary.h (function_summary_base): Add allocator. (function_summary<T *>::function_summary): Update construction. (fast_function_summary<T *, V>::fast_function_summary): Likewise. (call_summary_base): Add allcator. (call_summary<T *>::call_summary): Update construction. (fast_call_summary<T *, V>::fast_call_summary): Likewise. From-SVN: r277821
2019-09-26function.c (gimplify_parameters): Use build_clobber function.Jakub Jelinek
* function.c (gimplify_parameters): Use build_clobber function. * tree-ssa.c (execute_update_addresses_taken): Likewise. * tree-inline.c (expand_call_inline): Likewise. * tree-sra.c (clobber_subtree): Likewise. * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise. * omp-low.c (lower_rec_simd_input_clauses, lower_rec_input_clauses, lower_omp_single, lower_depend_clauses, lower_omp_taskreg, lower_omp_target): Likewise. * omp-expand.c (expand_omp_for_generic): Likewise. * omp-offload.c (ompdevlow_adjust_simt_enter): Likewise. From-SVN: r276165
2019-07-17gimple.h (enum gf_mask): Remove GF_OMP_FOR_SIMD...Jakub Jelinek
* gimple.h (enum gf_mask): Remove GF_OMP_FOR_SIMD, change GF_OMP_FOR_KIND_SIMD to a value serially after other kinds, divide GF_OMP_FOR_KIND_MASK, GF_OMP_FOR_COMBINED, GF_OMP_FOR_COMBINED_INTO, GF_OMP_FOR_GRID_PHONY, GF_OMP_FOR_GRID_INTRA_GROUP and GF_OMP_FOR_GRID_GROUP_ITER by two. * omp-grid.c (grid_process_grid_body, grid_eliminate_combined_simd_part): Use GF_OMP_FOR_KIND_SIMD instead of GF_OMP_FOR_SIMD, don't test & GF_OMP_FOR_SIMD but == GF_OMP_FOR_KIND_SIMD. * omp-low.c (build_outer_var_ref, scan_sharing_clauses, check_omp_nesting_restrictions, scan_omp_1_stmt, lower_rec_input_clauses, lower_lastprivate_conditional_clauses, lower_lastprivate_clauses, lower_reduction_clauses, lower_omp_scan, omp_find_scan): Likewise. * omp-expand.c (expand_omp_for): Likewise. * omp-general.c (omp_extract_for_data): Likewise. From-SVN: r273544
2019-07-09PR c++/61339 - add mismatch between struct and class [-Wmismatched-tags] to ↵Martin Sebor
non-bugs gcc/c/ChangeLog: PR c++/61339 * c-decl.c (xref_tag): Change class-key of PODs to struct and others to class. (field_decl_cmp): Same. * c-parser.c (c_parser_struct_or_union_specifier): Same. * c-tree.h: Same. * gimple-parser.c (c_parser_gimple_compound_statement): Same. gcc/c-family/ChangeLog: PR c++/61339 * c-opts.c (handle_deferred_opts): : Change class-key of PODs to struct and others to class. * c-pretty-print.h: Same. gcc/cp/ChangeLog: PR c++/61339 * cp-tree.h: Change class-key of PODs to struct and others to class. * search.c: Same. * semantics.c (finalize_nrv_r): Same. gcc/lto/ChangeLog: PR c++/61339 * lto-common.c (lto_splay_tree_new): : Change class-key of PODs to struct and others to class. (mentions_vars_p): Same. (register_resolution): Same. (lto_register_var_decl_in_symtab): Same. (lto_register_function_decl_in_symtab): Same. (cmp_tree): Same. (lto_read_decls): Same. gcc/ChangeLog: PR c++/61339 * auto-profile.c: Change class-key of PODs to struct and others to class. * basic-block.h: Same. * bitmap.c (bitmap_alloc): Same. * bitmap.h: Same. * builtins.c (expand_builtin_prefetch): Same. (expand_builtin_interclass_mathfn): Same. (expand_builtin_strlen): Same. (expand_builtin_mempcpy_args): Same. (expand_cmpstr): Same. (expand_builtin___clear_cache): Same. (expand_ifn_atomic_bit_test_and): Same. (expand_builtin_thread_pointer): Same. (expand_builtin_set_thread_pointer): Same. * caller-save.c (setup_save_areas): Same. (replace_reg_with_saved_mem): Same. (insert_restore): Same. (insert_save): Same. (add_used_regs): Same. * cfg.c (get_bb_copy): Same. (set_loop_copy): Same. * cfg.h: Same. * cfganal.h: Same. * cfgexpand.c (alloc_stack_frame_space): Same. (add_stack_var): Same. (add_stack_var_conflict): Same. (add_scope_conflicts_1): Same. (update_alias_info_with_stack_vars): Same. (expand_used_vars): Same. * cfghooks.c (redirect_edge_and_branch_force): Same. (delete_basic_block): Same. (split_edge): Same. (make_forwarder_block): Same. (force_nonfallthru): Same. (duplicate_block): Same. (lv_flush_pending_stmts): Same. * cfghooks.h: Same. * cfgloop.c (flow_loops_cfg_dump): Same. (flow_loop_nested_p): Same. (superloop_at_depth): Same. (get_loop_latch_edges): Same. (flow_loop_dump): Same. (flow_loops_dump): Same. (flow_loops_free): Same. (flow_loop_nodes_find): Same. (establish_preds): Same. (flow_loop_tree_node_add): Same. (flow_loop_tree_node_remove): Same. (flow_loops_find): Same. (find_subloop_latch_edge_by_profile): Same. (find_subloop_latch_edge_by_ivs): Same. (mfb_redirect_edges_in_set): Same. (form_subloop): Same. (merge_latch_edges): Same. (disambiguate_multiple_latches): Same. (disambiguate_loops_with_multiple_latches): Same. (flow_bb_inside_loop_p): Same. (glb_enum_p): Same. (get_loop_body_with_size): Same. (get_loop_body): Same. (fill_sons_in_loop): Same. (get_loop_body_in_dom_order): Same. (get_loop_body_in_custom_order): Same. (release_recorded_exits): Same. (get_loop_exit_edges): Same. (num_loop_branches): Same. (remove_bb_from_loops): Same. (find_common_loop): Same. (delete_loop): Same. (cancel_loop): Same. (verify_loop_structure): Same. (loop_preheader_edge): Same. (loop_exit_edge_p): Same. (single_exit): Same. (loop_exits_to_bb_p): Same. (loop_exits_from_bb_p): Same. (get_loop_location): Same. (record_niter_bound): Same. (get_estimated_loop_iterations_int): Same. (max_stmt_executions_int): Same. (likely_max_stmt_executions_int): Same. (get_estimated_loop_iterations): Same. (get_max_loop_iterations): Same. (get_max_loop_iterations_int): Same. (get_likely_max_loop_iterations): Same. * cfgloop.h (simple_loop_desc): Same. (get_loop): Same. (loop_depth): Same. (loop_outer): Same. (loop_iterator::next): Same. (loop_outermost): Same. * cfgloopanal.c (mark_irreducible_loops): Same. (num_loop_insns): Same. (average_num_loop_insns): Same. (expected_loop_iterations_unbounded): Same. (expected_loop_iterations): Same. (mark_loop_exit_edges): Same. (single_likely_exit): Same. * cfgloopmanip.c (fix_bb_placement): Same. (fix_bb_placements): Same. (remove_path): Same. (place_new_loop): Same. (add_loop): Same. (scale_loop_frequencies): Same. (scale_loop_profile): Same. (create_empty_if_region_on_edge): Same. (create_empty_loop_on_edge): Same. (loopify): Same. (unloop): Same. (fix_loop_placements): Same. (copy_loop_info): Same. (duplicate_loop): Same. (duplicate_subloops): Same. (loop_redirect_edge): Same. (can_duplicate_loop_p): Same. (duplicate_loop_to_header_edge): Same. (mfb_keep_just): Same. (has_preds_from_loop): Same. (create_preheader): Same. (create_preheaders): Same. (lv_adjust_loop_entry_edge): Same. (loop_version): Same. * cfgloopmanip.h: Same. * cgraph.h: Same. * cgraphbuild.c: Same. * combine.c (make_extraction): Same. * config/i386/i386-features.c: Same. * config/i386/i386-features.h: Same. * config/i386/i386.c (ix86_emit_outlined_ms2sysv_save): Same. (ix86_emit_outlined_ms2sysv_restore): Same. (ix86_noce_conversion_profitable_p): Same. (ix86_init_cost): Same. (ix86_simd_clone_usable): Same. * configure.ac: Same. * coretypes.h: Same. * data-streamer-in.c (string_for_index): Same. (streamer_read_indexed_string): Same. (streamer_read_string): Same. (bp_unpack_indexed_string): Same. (bp_unpack_string): Same. (streamer_read_uhwi): Same. (streamer_read_hwi): Same. (streamer_read_gcov_count): Same. (streamer_read_wide_int): Same. * data-streamer.h (streamer_write_bitpack): Same. (bp_unpack_value): Same. (streamer_write_char_stream): Same. (streamer_write_hwi_in_range): Same. (streamer_write_record_start): Same. * ddg.c (create_ddg_dep_from_intra_loop_link): Same. (add_cross_iteration_register_deps): Same. (build_intra_loop_deps): Same. * df-core.c (df_analyze): Same. (loop_post_order_compute): Same. (loop_inverted_post_order_compute): Same. * df-problems.c (df_rd_alloc): Same. (df_rd_simulate_one_insn): Same. (df_rd_local_compute): Same. (df_rd_init_solution): Same. (df_rd_confluence_n): Same. (df_rd_transfer_function): Same. (df_rd_free): Same. (df_rd_dump_defs_set): Same. (df_rd_top_dump): Same. (df_lr_alloc): Same. (df_lr_reset): Same. (df_lr_local_compute): Same. (df_lr_init): Same. (df_lr_confluence_n): Same. (df_lr_free): Same. (df_lr_top_dump): Same. (df_lr_verify_transfer_functions): Same. (df_live_alloc): Same. (df_live_reset): Same. (df_live_init): Same. (df_live_confluence_n): Same. (df_live_finalize): Same. (df_live_free): Same. (df_live_top_dump): Same. (df_live_verify_transfer_functions): Same. (df_mir_alloc): Same. (df_mir_reset): Same. (df_mir_init): Same. (df_mir_confluence_n): Same. (df_mir_free): Same. (df_mir_top_dump): Same. (df_word_lr_alloc): Same. (df_word_lr_reset): Same. (df_word_lr_init): Same. (df_word_lr_confluence_n): Same. (df_word_lr_free): Same. (df_word_lr_top_dump): Same. (df_md_alloc): Same. (df_md_simulate_one_insn): Same. (df_md_reset): Same. (df_md_init): Same. (df_md_free): Same. (df_md_top_dump): Same. * df-scan.c (df_insn_delete): Same. (df_insn_rescan): Same. (df_notes_rescan): Same. (df_sort_and_compress_mws): Same. (df_install_mws): Same. (df_refs_add_to_chains): Same. (df_ref_create_structure): Same. (df_ref_record): Same. (df_def_record_1): Same. (df_find_hard_reg_defs): Same. (df_uses_record): Same. (df_get_conditional_uses): Same. (df_get_call_refs): Same. (df_recompute_luids): Same. (df_get_entry_block_def_set): Same. (df_entry_block_defs_collect): Same. (df_get_exit_block_use_set): Same. (df_exit_block_uses_collect): Same. (df_mws_verify): Same. (df_bb_verify): Same. * df.h (df_scan_get_bb_info): Same. * doc/tm.texi: Same. * dse.c (record_store): Same. * dumpfile.h: Same. * emit-rtl.c (const_fixed_hasher::equal): Same. (set_mem_attributes_minus_bitpos): Same. (change_address): Same. (adjust_address_1): Same. (offset_address): Same. * emit-rtl.h: Same. * except.c (dw2_build_landing_pads): Same. (sjlj_emit_dispatch_table): Same. * explow.c (allocate_dynamic_stack_space): Same. (emit_stack_probe): Same. (probe_stack_range): Same. * expmed.c (store_bit_field_using_insv): Same. (store_bit_field_1): Same. (store_integral_bit_field): Same. (extract_bit_field_using_extv): Same. (extract_bit_field_1): Same. (emit_cstore): Same. * expr.c (emit_block_move_via_cpymem): Same. (expand_cmpstrn_or_cmpmem): Same. (set_storage_via_setmem): Same. (emit_single_push_insn_1): Same. (expand_assignment): Same. (store_constructor): Same. (expand_expr_real_2): Same. (expand_expr_real_1): Same. (try_casesi): Same. * flags.h: Same. * function.c (try_fit_stack_local): Same. (assign_stack_local_1): Same. (assign_stack_local): Same. (cut_slot_from_list): Same. (insert_slot_to_list): Same. (max_slot_level): Same. (move_slot_to_level): Same. (temp_address_hasher::equal): Same. (remove_unused_temp_slot_addresses): Same. (assign_temp): Same. (combine_temp_slots): Same. (update_temp_slot_address): Same. (preserve_temp_slots): Same. * function.h: Same. * fwprop.c: Same. * gcc-rich-location.h: Same. * gcov.c: Same. * genattrtab.c (check_attr_test): Same. (check_attr_value): Same. (convert_set_attr_alternative): Same. (convert_set_attr): Same. (check_defs): Same. (copy_boolean): Same. (get_attr_value): Same. (expand_delays): Same. (make_length_attrs): Same. (min_fn): Same. (make_alternative_compare): Same. (simplify_test_exp): Same. (tests_attr_p): Same. (get_attr_order): Same. (clear_struct_flag): Same. (gen_attr): Same. (compares_alternatives_p): Same. (gen_insn): Same. (gen_delay): Same. (find_attrs_to_cache): Same. (write_test_expr): Same. (walk_attr_value): Same. (write_attr_get): Same. (eliminate_known_true): Same. (write_insn_cases): Same. (write_attr_case): Same. (write_attr_valueq): Same. (write_attr_value): Same. (write_dummy_eligible_delay): Same. (next_comma_elt): Same. (find_attr): Same. (make_internal_attr): Same. (copy_rtx_unchanging): Same. (gen_insn_reserv): Same. (check_tune_attr): Same. (make_automaton_attrs): Same. (handle_arg): Same. * genextract.c (gen_insn): Same. (VEC_char_to_string): Same. * genmatch.c (print_operand): Same. (lower): Same. (parser::parse_operation): Same. (parser::parse_capture): Same. (parser::parse_c_expr): Same. (parser::parse_simplify): Same. (main): Same. * genoutput.c (output_operand_data): Same. (output_get_insn_name): Same. (compare_operands): Same. (place_operands): Same. (process_template): Same. (validate_insn_alternatives): Same. (validate_insn_operands): Same. (gen_expand): Same. (note_constraint): Same. * genpreds.c (write_one_predicate_function): Same. (add_constraint): Same. (process_define_register_constraint): Same. (write_lookup_constraint_1): Same. (write_lookup_constraint_array): Same. (write_insn_constraint_len): Same. (write_reg_class_for_constraint_1): Same. (write_constraint_satisfied_p_array): Same. * genrecog.c (optimize_subroutine_group): Same. * gensupport.c (process_define_predicate): Same. (queue_pattern): Same. (remove_from_queue): Same. (process_rtx): Same. (is_predicable): Same. (change_subst_attribute): Same. (subst_pattern_match): Same. (alter_constraints): Same. (alter_attrs_for_insn): Same. (shift_output_template): Same. (alter_output_for_subst_insn): Same. (process_one_cond_exec): Same. (subst_dup): Same. (process_define_cond_exec): Same. (mnemonic_htab_callback): Same. (gen_mnemonic_attr): Same. (read_md_rtx): Same. * ggc-page.c: Same. * gimple-loop-interchange.cc (dump_reduction): Same. (dump_induction): Same. (loop_cand::~loop_cand): Same. (free_data_refs_with_aux): Same. (tree_loop_interchange::interchange_loops): Same. (tree_loop_interchange::map_inductions_to_loop): Same. (tree_loop_interchange::move_code_to_inner_loop): Same. (compute_access_stride): Same. (compute_access_strides): Same. (proper_loop_form_for_interchange): Same. (tree_loop_interchange_compute_ddrs): Same. (prune_datarefs_not_in_loop): Same. (prepare_data_references): Same. (pass_linterchange::execute): Same. * gimple-loop-jam.c (bb_prevents_fusion_p): Same. (unroll_jam_possible_p): Same. (fuse_loops): Same. (adjust_unroll_factor): Same. (tree_loop_unroll_and_jam): Same. * gimple-loop-versioning.cc (loop_versioning::~loop_versioning): Same. (loop_versioning::expensive_stmt_p): Same. (loop_versioning::version_for_unity): Same. (loop_versioning::dump_inner_likelihood): Same. (loop_versioning::find_per_loop_multiplication): Same. (loop_versioning::analyze_term_using_scevs): Same. (loop_versioning::record_address_fragment): Same. (loop_versioning::analyze_expr): Same. (loop_versioning::analyze_blocks): Same. (loop_versioning::prune_conditions): Same. (loop_versioning::merge_loop_info): Same. (loop_versioning::add_loop_to_queue): Same. (loop_versioning::decide_whether_loop_is_versionable): Same. (loop_versioning::make_versioning_decisions): Same. (loop_versioning::implement_versioning_decisions): Same. * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::record_ranges_from_phis): Same. * gimple-ssa-store-merging.c (split_store::split_store): Same. (count_multiple_uses): Same. (split_group): Same. (imm_store_chain_info::output_merged_store): Same. (pass_store_merging::process_store): Same. * gimple-ssa-strength-reduction.c (slsr_process_phi): Same. * gimple-ssa-warn-alloca.c (adjusted_warn_limit): Same. (is_max): Same. (alloca_call_type): Same. (pass_walloca::execute): Same. * gimple-streamer-in.c (input_phi): Same. (input_gimple_stmt): Same. * gimple-streamer.h: Same. * godump.c (go_force_record_alignment): Same. (go_format_type): Same. (go_output_type): Same. (go_output_fndecl): Same. (go_output_typedef): Same. (keyword_hash_init): Same. (find_dummy_types): Same. * graph.c (draw_cfg_nodes_no_loops): Same. (draw_cfg_nodes_for_loop): Same. * hard-reg-set.h (hard_reg_set_iter_next): Same. * hsa-brig.c: Same. * hsa-common.h (hsa_internal_fn_hasher::equal): Same. * hsa-dump.c (dump_hsa_cfun): Same. * hsa-gen.c (gen_function_def_parameters): Same. * hsa-regalloc.c (dump_hsa_cfun_regalloc): Same. * input.c (dump_line_table_statistics): Same. (test_lexer): Same. * input.h: Same. * internal-fn.c (get_multi_vector_move): Same. (expand_load_lanes_optab_fn): Same. (expand_GOMP_SIMT_ENTER_ALLOC): Same. (expand_GOMP_SIMT_EXIT): Same. (expand_GOMP_SIMT_LAST_LANE): Same. (expand_GOMP_SIMT_ORDERED_PRED): Same. (expand_GOMP_SIMT_VOTE_ANY): Same. (expand_GOMP_SIMT_XCHG_BFLY): Same. (expand_GOMP_SIMT_XCHG_IDX): Same. (expand_addsub_overflow): Same. (expand_neg_overflow): Same. (expand_mul_overflow): Same. (expand_call_mem_ref): Same. (expand_mask_load_optab_fn): Same. (expand_scatter_store_optab_fn): Same. (expand_gather_load_optab_fn): Same. * ipa-cp.c (ipa_get_parm_lattices): Same. (print_all_lattices): Same. (ignore_edge_p): Same. (build_toporder_info): Same. (free_toporder_info): Same. (push_node_to_stack): Same. (ipcp_lattice<valtype>::set_contains_variable): Same. (set_agg_lats_to_bottom): Same. (ipcp_bits_lattice::meet_with): Same. (set_single_call_flag): Same. (initialize_node_lattices): Same. (ipa_get_jf_ancestor_result): Same. (ipcp_verify_propagated_values): Same. (propagate_scalar_across_jump_function): Same. (propagate_context_across_jump_function): Same. (propagate_bits_across_jump_function): Same. (ipa_vr_operation_and_type_effects): Same. (propagate_vr_across_jump_function): Same. (set_check_aggs_by_ref): Same. (set_chain_of_aglats_contains_variable): Same. (merge_aggregate_lattices): Same. (agg_pass_through_permissible_p): Same. (propagate_aggs_across_jump_function): Same. (call_passes_through_thunk_p): Same. (propagate_constants_across_call): Same. (devirtualization_time_bonus): Same. (good_cloning_opportunity_p): Same. (context_independent_aggregate_values): Same. (gather_context_independent_values): Same. (perform_estimation_of_a_value): Same. (estimate_local_effects): Same. (value_topo_info<valtype>::add_val): Same. (add_all_node_vals_to_toposort): Same. (value_topo_info<valtype>::propagate_effects): Same. (ipcp_propagate_stage): Same. (ipcp_discover_new_direct_edges): Same. (same_node_or_its_all_contexts_clone_p): Same. (cgraph_edge_brings_value_p): Same. (gather_edges_for_value): Same. (create_specialized_node): Same. (find_more_scalar_values_for_callers_subset): Same. (find_more_contexts_for_caller_subset): Same. (copy_plats_to_inter): Same. (intersect_aggregates_with_edge): Same. (find_aggregate_values_for_callers_subset): Same. (cgraph_edge_brings_all_agg_vals_for_node): Same. (decide_about_value): Same. (decide_whether_version_node): Same. (spread_undeadness): Same. (identify_dead_nodes): Same. (ipcp_store_vr_results): Same. * ipa-devirt.c (final_warning_record::grow_type_warnings): Same. * ipa-fnsummary.c (ipa_fn_summary::account_size_time): Same. (redirect_to_unreachable): Same. (edge_set_predicate): Same. (evaluate_conditions_for_known_args): Same. (evaluate_properties_for_edge): Same. (ipa_fn_summary_t::duplicate): Same. (ipa_call_summary_t::duplicate): Same. (dump_ipa_call_summary): Same. (ipa_dump_fn_summary): Same. (eliminated_by_inlining_prob): Same. (set_cond_stmt_execution_predicate): Same. (set_switch_stmt_execution_predicate): Same. (compute_bb_predicates): Same. (will_be_nonconstant_expr_predicate): Same. (phi_result_unknown_predicate): Same. (analyze_function_body): Same. (compute_fn_summary): Same. (estimate_edge_devirt_benefit): Same. (estimate_edge_size_and_time): Same. (estimate_calls_size_and_time): Same. (estimate_node_size_and_time): Same. (remap_edge_change_prob): Same. (remap_edge_summaries): Same. (ipa_merge_fn_summary_after_inlining): Same. (ipa_fn_summary_generate): Same. (inline_read_section): Same. (ipa_fn_summary_read): Same. (ipa_fn_summary_write): Same. * ipa-fnsummary.h: Same. * ipa-hsa.c (ipa_hsa_read_section): Same. * ipa-icf-gimple.c (func_checker::compare_loops): Same. * ipa-icf.c (sem_function::param_used_p): Same. * ipa-inline-analysis.c (do_estimate_edge_time): Same. * ipa-inline.c (edge_badness): Same. (inline_small_functions): Same. * ipa-polymorphic-call.c (ipa_polymorphic_call_context::stream_out): Same. * ipa-predicate.c (predicate::remap_after_duplication): Same. (predicate::remap_after_inlining): Same. (predicate::stream_out): Same. * ipa-predicate.h: Same. * ipa-profile.c (ipa_profile_read_summary): Same. * ipa-prop.c (ipa_get_param_decl_index_1): Same. (count_formal_params): Same. (ipa_dump_param): Same. (ipa_alloc_node_params): Same. (ipa_print_node_jump_functions_for_edge): Same. (ipa_print_node_jump_functions): Same. (ipa_load_from_parm_agg): Same. (get_ancestor_addr_info): Same. (ipa_compute_jump_functions_for_edge): Same. (ipa_analyze_virtual_call_uses): Same. (ipa_analyze_stmt_uses): Same. (ipa_analyze_params_uses_in_bb): Same. (update_jump_functions_after_inlining): Same. (try_decrement_rdesc_refcount): Same. (ipa_impossible_devirt_target): Same. (update_indirect_edges_after_inlining): Same. (combine_controlled_uses_counters): Same. (ipa_edge_args_sum_t::duplicate): Same. (ipa_write_jump_function): Same. (ipa_write_indirect_edge_info): Same. (ipa_write_node_info): Same. (ipa_read_edge_info): Same. (ipa_prop_read_section): Same. (read_replacements_section): Same. * ipa-prop.h (ipa_get_param_count): Same. (ipa_get_param): Same. (ipa_get_type): Same. (ipa_get_param_move_cost): Same. (ipa_set_param_used): Same. (ipa_get_controlled_uses): Same. (ipa_set_controlled_uses): Same. (ipa_get_cs_argument_count): Same. * ipa-pure-const.c (analyze_function): Same. (pure_const_read_summary): Same. * ipa-ref.h: Same. * ipa-reference.c (ipa_reference_read_optimization_summary): Same. * ipa-split.c (test_nonssa_use): Same. (dump_split_point): Same. (dominated_by_forbidden): Same. (split_part_set_ssa_name_p): Same. (find_split_points): Same. * ira-build.c (finish_loop_tree_nodes): Same. (low_pressure_loop_node_p): Same. * ira-color.c (ira_reuse_stack_slot): Same. * ira-int.h: Same. * ira.c (setup_reg_equiv): Same. (print_insn_chain): Same. (ira): Same. * loop-doloop.c (doloop_condition_get): Same. (add_test): Same. (record_reg_sets): Same. (doloop_optimize): Same. * loop-init.c (loop_optimizer_init): Same. (fix_loop_structure): Same. * loop-invariant.c (merge_identical_invariants): Same. (compute_always_reached): Same. (find_exits): Same. (may_assign_reg_p): Same. (find_invariants_bb): Same. (find_invariants_body): Same. (replace_uses): Same. (can_move_invariant_reg): Same. (free_inv_motion_data): Same. (move_single_loop_invariants): Same. (change_pressure): Same. (mark_ref_regs): Same. (calculate_loop_reg_pressure): Same. * loop-iv.c (biv_entry_hasher::equal): Same. (iv_extend_to_rtx_code): Same. (check_iv_ref_table_size): Same. (clear_iv_info): Same. (latch_dominating_def): Same. (iv_get_reaching_def): Same. (iv_constant): Same. (iv_subreg): Same. (iv_extend): Same. (iv_neg): Same. (iv_add): Same. (iv_mult): Same. (get_biv_step): Same. (record_iv): Same. (analyzed_for_bivness_p): Same. (record_biv): Same. (iv_analyze_biv): Same. (iv_analyze_expr): Same. (iv_analyze_def): Same. (iv_analyze_op): Same. (iv_analyze): Same. (iv_analyze_result): Same. (biv_p): Same. (eliminate_implied_conditions): Same. (simplify_using_initial_values): Same. (shorten_into_mode): Same. (canonicalize_iv_subregs): Same. (determine_max_iter): Same. (check_simple_exit): Same. (find_simple_exit): Same. (get_simple_loop_desc): Same. * loop-unroll.c (report_unroll): Same. (decide_unrolling): Same. (unroll_loops): Same. (loop_exit_at_end_p): Same. (decide_unroll_constant_iterations): Same. (unroll_loop_constant_iterations): Same. (compare_and_jump_seq): Same. (unroll_loop_runtime_iterations): Same. (decide_unroll_stupid): Same. (unroll_loop_stupid): Same. (referenced_in_one_insn_in_loop_p): Same. (reset_debug_uses_in_loop): Same. (analyze_iv_to_split_insn): Same. * lra-eliminations.c (lra_debug_elim_table): Same. (setup_can_eliminate): Same. (form_sum): Same. (lra_get_elimination_hard_regno): Same. (lra_eliminate_regs_1): Same. (eliminate_regs_in_insn): Same. (update_reg_eliminate): Same. (init_elimination): Same. (lra_eliminate): Same. * lra-int.h: Same. * lra-lives.c (initiate_live_solver): Same. * lra-remat.c (create_remat_bb_data): Same. * lra-spills.c (lra_spill): Same. * lra.c (lra_set_insn_recog_data): Same. (lra_set_used_insn_alternative_by_uid): Same. (init_reg_info): Same. (expand_reg_info): Same. * lto-cgraph.c (output_symtab): Same. (read_identifier): Same. (get_alias_symbol): Same. (input_node): Same. (input_varpool_node): Same. (input_ref): Same. (input_edge): Same. (input_cgraph_1): Same. (input_refs): Same. (input_symtab): Same. (input_offload_tables): Same. (output_cgraph_opt_summary): Same. (input_edge_opt_summary): Same. (input_cgraph_opt_section): Same. * lto-section-in.c (lto_free_raw_section_data): Same. (lto_create_simple_input_block): Same. (lto_free_function_in_decl_state_for_node): Same. * lto-streamer-in.c (lto_tag_check_set): Same. (lto_location_cache::revert_location_cache): Same. (lto_location_cache::input_location): Same. (lto_input_location): Same. (stream_input_location_now): Same. (lto_input_tree_ref): Same. (lto_input_eh_catch_list): Same. (input_eh_region): Same. (lto_init_eh): Same. (make_new_block): Same. (input_cfg): Same. (fixup_call_stmt_edges): Same. (input_struct_function_base): Same. (input_function): Same. (lto_read_body_or_constructor): Same. (lto_read_tree_1): Same. (lto_read_tree): Same. (lto_input_scc): Same. (lto_input_tree_1): Same. (lto_input_toplevel_asms): Same. (lto_input_mode_table): Same. (lto_reader_init): Same. (lto_data_in_create): Same. * lto-streamer-out.c (output_cfg): Same. * lto-streamer.h: Same. * modulo-sched.c (duplicate_insns_of_cycles): Same. (generate_prolog_epilog): Same. (mark_loop_unsched): Same. (dump_insn_location): Same. (loop_canon_p): Same. (sms_schedule): Same. * omp-expand.c (expand_omp_for_ordered_loops): Same. (expand_omp_for_generic): Same. (expand_omp_for_static_nochunk): Same. (expand_omp_for_static_chunk): Same. (expand_omp_simd): Same. (expand_omp_taskloop_for_inner): Same. (expand_oacc_for): Same. (expand_omp_atomic_pipeline): Same. (mark_loops_in_oacc_kernels_region): Same. * omp-offload.c (oacc_xform_loop): Same. * omp-simd-clone.c (simd_clone_adjust): Same. * optabs-query.c (get_traditional_extraction_insn): Same. * optabs.c (expand_vector_broadcast): Same. (expand_binop_directly): Same. (expand_twoval_unop): Same. (expand_twoval_binop): Same. (expand_unop_direct): Same. (emit_indirect_jump): Same. (emit_conditional_move): Same. (emit_conditional_neg_or_complement): Same. (emit_conditional_add): Same. (vector_compare_rtx): Same. (expand_vec_perm_1): Same. (expand_vec_perm_const): Same. (expand_vec_cond_expr): Same. (expand_vec_series_expr): Same. (maybe_emit_atomic_exchange): Same. (maybe_emit_sync_lock_test_and_set): Same. (expand_atomic_compare_and_swap): Same. (expand_atomic_load): Same. (expand_atomic_store): Same. (maybe_emit_op): Same. (valid_multiword_target_p): Same. (create_integer_operand): Same. (maybe_legitimize_operand_same_code): Same. (maybe_legitimize_operand): Same. (create_convert_operand_from_type): Same. (can_reuse_operands_p): Same. (maybe_legitimize_operands): Same. (maybe_gen_insn): Same. (maybe_expand_insn): Same. (maybe_expand_jump_insn): Same. (expand_insn): Same. * optabs.h (create_expand_operand): Same. (create_fixed_operand): Same. (create_output_operand): Same. (create_input_operand): Same. (create_convert_operand_to): Same. (create_convert_operand_from): Same. * optinfo.h: Same. * poly-int.h: Same. * predict.c (optimize_insn_for_speed_p): Same. (optimize_loop_for_size_p): Same. (optimize_loop_for_speed_p): Same. (optimize_loop_nest_for_speed_p): Same. (get_base_value): Same. (predicted_by_loop_heuristics_p): Same. (predict_extra_loop_exits): Same. (predict_loops): Same. (predict_paths_for_bb): Same. (predict_paths_leading_to): Same. (propagate_freq): Same. (pass_profile::execute): Same. * predict.h: Same. * profile-count.c (profile_count::differs_from_p): Same. (profile_probability::differs_lot_from_p): Same. * profile-count.h: Same. * profile.c (branch_prob): Same. * regrename.c (free_chain_data): Same. (mark_conflict): Same. (create_new_chain): Same. (merge_overlapping_regs): Same. (init_rename_info): Same. (merge_chains): Same. (regrename_analyze): Same. (regrename_do_replace): Same. (scan_rtx_reg): Same. (record_out_operands): Same. (build_def_use): Same. * regrename.h: Same. * reload.h: Same. * reload1.c (init_reload): Same. (maybe_fix_stack_asms): Same. (copy_reloads): Same. (count_pseudo): Same. (count_spilled_pseudo): Same. (find_reg): Same. (find_reload_regs): Same. (select_reload_regs): Same. (spill_hard_reg): Same. (fixup_eh_region_note): Same. (set_reload_reg): Same. (allocate_reload_reg): Same. (compute_reload_subreg_offset): Same. (reload_adjust_reg_for_icode): Same. (emit_input_reload_insns): Same. (emit_output_reload_insns): Same. (do_input_reload): Same. (inherit_piecemeal_p): Same. * rtl.h: Same. * sanopt.c (maybe_get_dominating_check): Same. (maybe_optimize_ubsan_ptr_ifn): Same. (can_remove_asan_check): Same. (maybe_optimize_asan_check_ifn): Same. (sanopt_optimize_walker): Same. * sched-deps.c (add_dependence_list): Same. (chain_to_prev_insn): Same. (add_insn_mem_dependence): Same. (create_insn_reg_set): Same. (maybe_extend_reg_info_p): Same. (sched_analyze_reg): Same. (sched_analyze_1): Same. (get_implicit_reg_pending_clobbers): Same. (chain_to_prev_insn_p): Same. (deps_analyze_insn): Same. (deps_start_bb): Same. (sched_free_deps): Same. (init_deps): Same. (init_deps_reg_last): Same. (free_deps): Same. * sched-ebb.c: Same. * sched-int.h: Same. * sched-rgn.c (add_branch_dependences): Same. (concat_insn_mem_list): Same. (deps_join): Same. (sched_rgn_compute_dependencies): Same. * sel-sched-ir.c (reset_target_context): Same. (copy_deps_context): Same. (init_id_from_df): Same. (has_dependence_p): Same. (change_loops_latches): Same. (bb_top_order_comparator): Same. (make_region_from_loop_preheader): Same. (sel_init_pipelining): Same. (get_loop_nest_for_rgn): Same. (make_regions_from_the_rest): Same. (sel_is_loop_preheader_p): Same. * sel-sched-ir.h (inner_loop_header_p): Same. (get_all_loop_exits): Same. * selftest.h: Same. * sese.c (sese_build_liveouts): Same. (sese_insert_phis_for_liveouts): Same. * sese.h (defined_in_sese_p): Same. * sreal.c (sreal::stream_out): Same. * sreal.h: Same. * streamer-hooks.h: Same. * target-globals.c (save_target_globals): Same. * target-globals.h: Same. * target.def: Same. * target.h: Same. * targhooks.c (default_has_ifunc_p): Same. (default_empty_mask_is_expensive): Same. (default_init_cost): Same. * targhooks.h: Same. * toplev.c: Same. * tree-affine.c (aff_combination_mult): Same. (aff_combination_expand): Same. (aff_combination_constant_multiple_p): Same. * tree-affine.h: Same. * tree-cfg.c (build_gimple_cfg): Same. (replace_loop_annotate_in_block): Same. (replace_uses_by): Same. (remove_bb): Same. (dump_cfg_stats): Same. (gimple_duplicate_sese_region): Same. (gimple_duplicate_sese_tail): Same. (move_block_to_fn): Same. (replace_block_vars_by_duplicates): Same. (move_sese_region_to_fn): Same. (print_loops_bb): Same. (print_loop): Same. (print_loops): Same. (debug): Same. (debug_loops): Same. * tree-cfg.h: Same. * tree-chrec.c (chrec_fold_plus_poly_poly): Same. (chrec_fold_multiply_poly_poly): Same. (chrec_evaluate): Same. (chrec_component_in_loop_num): Same. (reset_evolution_in_loop): Same. (is_multivariate_chrec): Same. (chrec_contains_symbols): Same. (nb_vars_in_chrec): Same. (chrec_convert_1): Same. (chrec_convert_aggressive): Same. * tree-chrec.h: Same. * tree-core.h: Same. * tree-data-ref.c (dump_data_dependence_relation): Same. (canonicalize_base_object_address): Same. (data_ref_compare_tree): Same. (prune_runtime_alias_test_list): Same. (get_segment_min_max): Same. (create_intersect_range_checks): Same. (conflict_fn_no_dependence): Same. (object_address_invariant_in_loop_p): Same. (analyze_ziv_subscript): Same. (analyze_siv_subscript_cst_affine): Same. (analyze_miv_subscript): Same. (analyze_overlapping_iterations): Same. (build_classic_dist_vector_1): Same. (add_other_self_distances): Same. (same_access_functions): Same. (build_classic_dir_vector): Same. (subscript_dependence_tester_1): Same. (subscript_dependence_tester): Same. (access_functions_are_affine_or_constant_p): Same. (get_references_in_stmt): Same. (loop_nest_has_data_refs): Same. (graphite_find_data_references_in_stmt): Same. (find_data_references_in_bb): Same. (get_base_for_alignment): Same. (find_loop_nest_1): Same. (find_loop_nest): Same. * tree-data-ref.h (dr_alignment): Same. (ddr_dependence_level): Same. * tree-if-conv.c (fold_build_cond_expr): Same. (add_to_predicate_list): Same. (add_to_dst_predicate_list): Same. (phi_convertible_by_degenerating_args): Same. (idx_within_array_bound): Same. (all_preds_critical_p): Same. (pred_blocks_visited_p): Same. (predicate_bbs): Same. (build_region): Same. (if_convertible_loop_p_1): Same. (is_cond_scalar_reduction): Same. (predicate_scalar_phi): Same. (remove_conditions_and_labels): Same. (combine_blocks): Same. (version_loop_for_if_conversion): Same. (versionable_outer_loop_p): Same. (ifcvt_local_dce): Same. (tree_if_conversion): Same. (pass_if_conversion::gate): Same. * tree-if-conv.h: Same. * tree-inline.c (maybe_move_debug_stmts_to_successors): Same. * tree-loop-distribution.c (bb_top_order_cmp): Same. (free_rdg): Same. (stmt_has_scalar_dependences_outside_loop): Same. (copy_loop_before): Same. (create_bb_after_loop): Same. (const_with_all_bytes_same): Same. (generate_memset_builtin): Same. (generate_memcpy_builtin): Same. (destroy_loop): Same. (build_rdg_partition_for_vertex): Same. (compute_access_range): Same. (data_ref_segment_size): Same. (latch_dominated_by_data_ref): Same. (compute_alias_check_pairs): Same. (fuse_memset_builtins): Same. (finalize_partitions): Same. (find_seed_stmts_for_distribution): Same. (prepare_perfect_loop_nest): Same. * tree-parloops.c (lambda_transform_legal_p): Same. (loop_parallel_p): Same. (reduc_stmt_res): Same. (add_field_for_name): Same. (create_call_for_reduction_1): Same. (replace_uses_in_bb_by): Same. (transform_to_exit_first_loop_alt): Same. (try_transform_to_exit_first_loop_alt): Same. (transform_to_exit_first_loop): Same. (num_phis): Same. (gen_parallel_loop): Same. (gather_scalar_reductions): Same. (get_omp_data_i_param): Same. (try_create_reduction_list): Same. (oacc_entry_exit_single_gang): Same. (parallelize_loops): Same. * tree-pass.h: Same. * tree-predcom.c (determine_offset): Same. (last_always_executed_block): Same. (split_data_refs_to_components): Same. (suitable_component_p): Same. (valid_initializer_p): Same. (find_looparound_phi): Same. (insert_looparound_copy): Same. (add_looparound_copies): Same. (determine_roots_comp): Same. (predcom_tmp_var): Same. (initialize_root_vars): Same. (initialize_root_vars_store_elim_1): Same. (initialize_root_vars_store_elim_2): Same. (finalize_eliminated_stores): Same. (initialize_root_vars_lm): Same. (remove_stmt): Same. (determine_unroll_factor): Same. (execute_pred_commoning_cbck): Same. (base_names_in_chain_on): Same. (combine_chains): Same. (pcom_stmt_dominates_stmt_p): Same. (try_combine_chains): Same. (prepare_initializers_chain_store_elim): Same. (prepare_initializers_chain): Same. (prepare_initializers): Same. (prepare_finalizers_chain): Same. (prepare_finalizers): Same. (insert_init_seqs): Same. * tree-scalar-evolution.c (loop_phi_node_p): Same. (compute_overall_effect_of_inner_loop): Same. (add_to_evolution_1): Same. (add_to_evolution): Same. (follow_ssa_edge_binary): Same. (follow_ssa_edge_expr): Same. (backedge_phi_arg_p): Same. (follow_ssa_edge_in_condition_phi_branch): Same. (follow_ssa_edge_in_condition_phi): Same. (follow_ssa_edge_inner_loop_phi): Same. (follow_ssa_edge): Same. (analyze_evolution_in_loop): Same. (analyze_initial_condition): Same. (interpret_loop_phi): Same. (interpret_condition_phi): Same. (interpret_rhs_expr): Same. (interpret_expr): Same. (interpret_gimple_assign): Same. (analyze_scalar_evolution_1): Same. (analyze_scalar_evolution): Same. (analyze_scalar_evolution_for_address_of): Same. (get_instantiated_value_entry): Same. (loop_closed_phi_def): Same. (instantiate_scev_name): Same. (instantiate_scev_poly): Same. (instantiate_scev_binary): Same. (instantiate_scev_convert): Same. (instantiate_scev_not): Same. (instantiate_scev_r): Same. (instantiate_scev): Same. (resolve_mixers): Same. (initialize_scalar_evolutions_analyzer): Same. (scev_reset_htab): Same. (scev_reset): Same. (derive_simple_iv_with_niters): Same. (simple_iv_with_niters): Same. (expression_expensive_p): Same. (final_value_replacement_loop): Same. * tree-scalar-evolution.h (block_before_loop): Same. * tree-ssa-address.h: Same. * tree-ssa-dce.c (find_obviously_necessary_stmts): Same. * tree-ssa-dom.c (edge_info::record_simple_equiv): Same. (record_edge_info): Same. * tree-ssa-live.c (var_map_base_fini): Same. (remove_unused_locals): Same. * tree-ssa-live.h: Same. * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Same. (pass_ch_vect::execute): Same. (pass_ch::process_loop_p): Same. * tree-ssa-loop-im.c (mem_ref_hasher::hash): Same. (movement_possibility): Same. (outermost_invariant_loop): Same. (stmt_cost): Same. (determine_max_movement): Same. (invariantness_dom_walker::before_dom_children): Same. (move_computations): Same. (may_move_till): Same. (force_move_till_op): Same. (force_move_till): Same. (memref_free): Same. (record_mem_ref_loc): Same. (set_ref_stored_in_loop): Same. (mark_ref_stored): Same. (sort_bbs_in_loop_postorder_cmp): Same. (sort_locs_in_loop_postorder_cmp): Same. (analyze_memory_references): Same. (mem_refs_may_alias_p): Same. (find_ref_loc_in_loop_cmp): Same. (rewrite_mem_ref_loc::operator): Same. (first_mem_ref_loc_1::operator): Same. (sm_set_flag_if_changed::operator): Same. (execute_sm_if_changed_flag_set): Same. (execute_sm): Same. (hoist_memory_references): Same. (ref_always_accessed::operator): Same. (refs_independent_p): Same. (record_dep_loop): Same. (ref_indep_loop_p_1): Same. (ref_indep_loop_p): Same. (can_sm_ref_p): Same. (find_refs_for_sm): Same. (loop_suitable_for_sm): Same. (store_motion_loop): Same. (store_motion): Same. (fill_always_executed_in): Same. * tree-ssa-loop-ivcanon.c (constant_after_peeling): Same. (estimated_unrolled_size): Same. (loop_edge_to_cancel): Same. (remove_exits_and_undefined_stmts): Same. (remove_redundant_iv_tests): Same. (unloop_loops): Same. (estimated_peeled_sequence_size): Same. (try_peel_loop): Same. (canonicalize_loop_induction_variables): Same. (canonicalize_induction_variables): Same. * tree-ssa-loop-ivopts.c (iv_inv_expr_hasher::equal): Same. (name_info): Same. (stmt_after_inc_pos): Same. (contains_abnormal_ssa_name_p): Same. (niter_for_exit): Same. (find_bivs): Same. (mark_bivs): Same. (find_givs_in_bb): Same. (find_induction_variables): Same. (find_interesting_uses_cond): Same. (outermost_invariant_loop_for_expr): Same. (idx_find_step): Same. (add_candidate_1): Same. (add_iv_candidate_derived_from_uses): Same. (alloc_use_cost_map): Same. (prepare_decl_rtl): Same. (generic_predict_doloop_p): Same. (computation_cost): Same. (determine_common_wider_type): Same. (get_computation_aff_1): Same. (get_use_type): Same. (determine_group_iv_cost_address): Same. (iv_period): Same. (difference_cannot_overflow_p): Same. (may_eliminate_iv): Same. (determine_set_costs): Same. (cheaper_cost_pair): Same. (compare_cost_pair): Same. (iv_ca_cand_for_group): Same. (iv_ca_recount_cost): Same. (iv_ca_set_remove_invs): Same. (iv_ca_set_no_cp): Same. (iv_ca_set_add_invs): Same. (iv_ca_set_cp): Same. (iv_ca_add_group): Same. (iv_ca_cost): Same. (iv_ca_compare_deps): Same. (iv_ca_delta_reverse): Same. (iv_ca_delta_commit): Same. (iv_ca_cand_used_p): Same. (iv_ca_delta_free): Same. (iv_ca_new): Same. (iv_ca_free): Same. (iv_ca_dump): Same. (iv_ca_extend): Same. (iv_ca_narrow): Same. (iv_ca_prune): Same. (cheaper_cost_with_cand): Same. (iv_ca_replace): Same. (try_add_cand_for): Same. (get_initial_solution): Same. (try_improve_iv_set): Same. (find_optimal_iv_set_1): Same. (create_new_iv): Same. (rewrite_use_compare): Same. (remove_unused_ivs): Same. (determine_scaling_factor): Same. * tree-ssa-loop-ivopts.h: Same. * tree-ssa-loop-manip.c (create_iv): Same. (compute_live_loop_exits): Same. (add_exit_phi): Same. (add_exit_phis): Same. (find_uses_to_rename_use): Same. (find_uses_to_rename_def): Same. (find_uses_to_rename_in_loop): Same. (rewrite_into_loop_closed_ssa): Same. (check_loop_closed_ssa_bb): Same. (split_loop_exit_edge): Same. (ip_end_pos): Same. (ip_normal_pos): Same. (copy_phi_node_args): Same. (gimple_duplicate_loop_to_header_edge): Same. (can_unroll_loop_p): Same. (determine_exit_conditions): Same. (scale_dominated_blocks_in_loop): Same. (niter_for_unrolled_loop): Same. (tree_transform_and_unroll_loop): Same. (rewrite_all_phi_nodes_with_iv): Same. * tree-ssa-loop-manip.h: Same. * tree-ssa-loop-niter.c (number_of_iterations_ne_max): Same. (number_of_iterations_ne): Same. (assert_no_overflow_lt): Same. (assert_loop_rolls_lt): Same. (number_of_iterations_lt): Same. (adjust_cond_for_loop_until_wrap): Same. (tree_simplify_using_condition): Same. (simplify_using_initial_conditions): Same. (simplify_using_outer_evolutions): Same. (loop_only_exit_p): Same. (ssa_defined_by_minus_one_stmt_p): Same. (number_of_iterations_popcount): Same. (number_of_iterations_exit): Same. (find_loop_niter): Same. (finite_loop_p): Same. (chain_of_csts_start): Same. (get_val_for): Same. (loop_niter_by_eval): Same. (derive_constant_upper_bound_ops): Same. (do_warn_aggressive_loop_optimizations): Same. (record_estimate): Same. (get_cst_init_from_scev): Same. (record_nonwrapping_iv): Same. (idx_infer_loop_bounds): Same. (infer_loop_bounds_from_ref): Same. (infer_loop_bounds_from_array): Same. (infer_loop_bounds_from_pointer_arith): Same. (infer_loop_bounds_from_signedness): Same. (bound_index): Same. (discover_iteration_bound_by_body_walk): Same. (maybe_lower_iteration_bound): Same. (estimate_numbers_of_iterations): Same. (estimated_loop_iterations): Same. (estimated_loop_iterations_int): Same. (max_loop_iterations): Same. (max_loop_iterations_int): Same. (likely_max_loop_iterations): Same. (likely_max_loop_iterations_int): Same. (estimated_stmt_executions_int): Same. (max_stmt_executions): Same. (likely_max_stmt_executions): Same. (estimated_stmt_executions): Same. (stmt_dominates_stmt_p): Same. (nowrap_type_p): Same. (loop_exits_before_overflow): Same. (scev_var_range_cant_overflow): Same. (scev_probably_wraps_p): Same. (free_numbers_of_iterations_estimates): Same. * tree-ssa-loop-niter.h: Same. * tree-ssa-loop-prefetch.c (release_mem_refs): Same. (idx_analyze_ref): Same. (analyze_ref): Same. (gather_memory_references_ref): Same. (mark_nontemporal_store): Same. (emit_mfence_after_loop): Same. (may_use_storent_in_loop_p): Same. (mark_nontemporal_stores): Same. (should_unroll_loop_p): Same. (volume_of_dist_vector): Same. (add_subscript_strides): Same. (self_reuse_distance): Same. (insn_to_prefetch_ratio_too_small_p): Same. * tree-ssa-loop-split.c (split_at_bb_p): Same. (patch_loop_exit): Same. (find_or_create_guard_phi): Same. (easy_exit_values): Same. (connect_loop_phis): Same. (connect_loops): Same. (compute_new_first_bound): Same. (split_loop): Same. (tree_ssa_split_loops): Same. * tree-ssa-loop-unswitch.c (tree_ssa_unswitch_loops): Same. (is_maybe_undefined): Same. (tree_may_unswitch_on): Same. (simplify_using_entry_checks): Same. (tree_unswitch_single_loop): Same. (tree_unswitch_loop): Same. (tree_unswitch_outer_loop): Same. (empty_bb_without_guard_p): Same. (used_outside_loop_p): Same. (get_vop_from_header): Same. (hoist_guard): Same. * tree-ssa-loop.c (gate_oacc_kernels): Same. (get_lsm_tmp_name): Same. * tree-ssa-loop.h: Same. * tree-ssa-reassoc.c (add_repeat_to_ops_vec): Same. (build_and_add_sum): Same. (no_side_effect_bb): Same. (get_ops): Same. (linearize_expr): Same. (should_break_up_subtract): Same. (linearize_expr_tree): Same. * tree-ssa-scopedtables.c: Same. * tree-ssa-scopedtables.h: Same. * tree-ssa-structalias.c (condense_visit): Same. (label_visit): Same. (dump_pred_graph): Same. (perform_var_substitution): Same. (move_complex_constraints): Same. (remove_preds_and_fake_succs): Same. * tree-ssa-threadupdate.c (dbds_continue_enumeration_p): Same. (determine_bb_domination_status): Same. (duplicate_thread_path): Same. (thread_through_all_blocks): Same. * tree-ssa-threadupdate.h: Same. * tree-streamer-in.c (streamer_read_string_cst): Same. (input_identifier): Same. (unpack_ts_type_common_value_fields): Same. (unpack_ts_block_value_fields): Same. (unpack_ts_translation_unit_decl_value_fields): Same. (unpack_ts_omp_clause_value_fields): Same. (streamer_read_tree_bitfields): Same. (streamer_alloc_tree): Same. (lto_input_ts_common_tree_pointers): Same. (lto_input_ts_vector_tree_pointers): Same. (lto_input_ts_poly_tree_pointers): Same. (lto_input_ts_complex_tree_pointers): Same. (lto_input_ts_decl_minimal_tree_pointers): Same. (lto_input_ts_decl_common_tree_pointers): Same. (lto_input_ts_decl_non_common_tree_pointers): Same. (lto_input_ts_decl_with_vis_tree_pointers): Same. (lto_input_ts_field_decl_tree_pointers): Same. (lto_input_ts_function_decl_tree_pointers): Same. (lto_input_ts_type_common_tree_pointers): Same. (lto_input_ts_type_non_common_tree_pointers): Same. (lto_input_ts_list_tree_pointers): Same. (lto_input_ts_vec_tree_pointers): Same. (lto_input_ts_exp_tree_pointers): Same. (lto_input_ts_block_tree_pointers): Same. (lto_input_ts_binfo_tree_pointers): Same. (lto_input_ts_constructor_tree_pointers): Same. (lto_input_ts_omp_clause_tree_pointers): Same. (streamer_read_tree_body): Same. * tree-streamer.h: Same. * tree-switch-conversion.c (bit_test_cluster::is_beneficial): Same. * tree-vect-data-refs.c (vect_get_smallest_scalar_type): Same. (vect_analyze_possibly_independent_ddr): Same. (vect_analyze_data_ref_dependence): Same. (vect_compute_data_ref_alignment): Same. (vect_enhance_data_refs_alignment): Same. (vect_analyze_data_ref_access): Same. (vect_check_gather_scatter): Same. (vect_find_stmt_data_reference): Same. (vect_create_addr_base_for_vector_ref): Same. (vect_setup_realignment): Same. (vect_supportable_dr_alignment): Same. * tree-vect-loop-manip.c (rename_variables_in_bb): Same. (adjust_phi_and_debug_stmts): Same. (vect_set_loop_mask): Same. (add_preheader_seq): Same. (vect_maybe_permute_loop_masks): Same. (vect_set_loop_masks_directly): Same. (vect_set_loop_condition_masked): Same. (vect_set_loop_condition_unmasked): Same. (slpeel_duplicate_current_defs_from_edges): Same. (slpeel_add_loop_guard): Same. (slpeel_can_duplicate_loop_p): Same. (create_lcssa_for_virtual_phi): Same. (iv_phi_p): Same. (vect_update_ivs_after_vectorizer): Same. (vect_gen_vector_loop_niters_mult_vf): Same. (slpeel_update_phi_nodes_for_loops): Same. (slpeel_update_phi_nodes_for_guard1): Same. (find_guard_arg): Same. (slpeel_update_phi_nodes_for_guard2): Same. (slpeel_update_phi_nodes_for_lcssa): Same. (vect_do_peeling): Same. (vect_create_cond_for_alias_checks): Same. (vect_loop_versioning): Same. * tree-vect-loop.c (vect_determine_vf_for_stmt): Same. (vect_inner_phi_in_double_reduction_p): Same. (vect_analyze_scalar_cycles_1): Same. (vect_fixup_scalar_cycles_with_patterns): Same. (vect_get_loop_niters): Same. (bb_in_loop_p): Same. (vect_get_max_nscalars_per_iter): Same. (vect_verify_full_masking): Same. (vect_compute_single_scalar_iteration_cost): Same. (vect_analyze_loop_form_1): Same. (vect_analyze_loop_form): Same. (vect_active_double_reduction_p): Same. (vect_analyze_loop_operations): Same. (neutral_op_for_slp_reduction): Same. (vect_is_simple_reduction): Same. (vect_model_reduction_cost): Same. (get_initial_def_for_reduction): Same. (get_initial_defs_for_reduction): Same. (vect_create_epilog_for_reduction): Same. (vectorize_fold_left_reduction): Same. (vectorizable_reduction): Same. (vectorizable_induction): Same. (vectorizable_live_operation): Same. (loop_niters_no_overflow): Same. (vect_get_loop_mask): Same. (vect_transform_loop_stmt): Same. (vect_transform_loop): Same. * tree-vect-patterns.c (vect_reassociating_reduction_p): Same. (vect_determine_precisions): Same. (vect_pattern_recog_1): Same. * tree-vect-slp.c (vect_analyze_slp_instance): Same. * tree-vect-stmts.c (stmt_vectype): Same. (process_use): Same. (vect_init_vector_1): Same. (vect_truncate_gather_scatter_offset): Same. (get_group_load_store_type): Same. (vect_build_gather_load_calls): Same. (vect_get_strided_load_store_ops): Same. (vectorizable_simd_clone_call): Same. (vectorizable_store): Same. (permute_vec_elements): Same. (vectorizable_load): Same. (vect_transform_stmt): Same. (supportable_widening_operation): Same. * tree-vectorizer.c (vec_info::replace_stmt): Same. (vec_info::free_stmt_vec_info): Same. (vect_free_loop_info_assumptions): Same. (vect_loop_vectorized_call): Same. (set_uid_loop_bbs): Same. (vectorize_loops): Same. * tree-vectorizer.h (STMT_VINFO_BB_VINFO): Same. * tree.c (add_tree_to_fld_list): Same. (fld_type_variant_equal_p): Same. (fld_decl_context): Same. (fld_incomplete_type_of): Same. (free_lang_data_in_binfo): Same. (need_assembler_name_p): Same. (find_decls_types_r): Same. (get_eh_types_for_runtime): Same. (find_decls_types_in_eh_region): Same. (find_decls_types_in_node): Same. (assign_assembler_name_if_needed): Same. * value-prof.c (stream_out_histogram_value): Same. * value-prof.h: Same. * var-tracking.c (use_narrower_mode): Same. (prepare_call_arguments): Same. (vt_expand_loc_callback): Same. (resolve_expansions_pending_recursion): Same. (vt_expand_loc): Same. * varasm.c (const_hash_1): Same. (compare_constant): Same. (tree_output_constant_def): Same. (simplify_subtraction): Same. (get_pool_constant): Same. (output_constant_pool_2): Same. (output_constant_pool_1): Same. (mark_constants_in_pattern): Same. (mark_constant_pool): Same. (get_section_anchor): Same. * vr-values.c (compare_range_with_value): Same. (vr_values::extract_range_from_phi_node): Same. * vr-values.h: Same. * web.c (unionfind_union): Same. * wide-int.h: Same. From-SVN: r273311
2019-07-04omp-expand.c (expand_omp_for_static_nochunk): Don't emit GOMP_loop_start at ↵Jakub Jelinek
the start of second worksharing loop in a scan. * omp-expand.c (expand_omp_for_static_nochunk): Don't emit GOMP_loop_start at the start of second worksharing loop in a scan. For nowait, don't emit GOMP_loop_end_nowait at the end of first worksharing loop in a scan even if there are conditional lastprivates, and do emit GOMP_loop_end_nowait at the end of second worksharing loop. * testsuite/libgomp.c/scan-9.c: New test. * testsuite/libgomp.c/scan-10.c: New test. From-SVN: r273095
2019-07-03tree-core.h (enum omp_clause_code): Add OMP_CLAUSE__SCANTEMP_ clause.Jakub Jelinek
* tree-core.h (enum omp_clause_code): Add OMP_CLAUSE__SCANTEMP_ clause. * tree.h (OMP_CLAUSE_DECL): Use OMP_CLAUSE__SCANTEMP_ instead of OMP_CLAUSE__CONDTEMP_ as range's upper bound. (OMP_CLAUSE__SCANTEMP__ALLOC, OMP_CLAUSE__SCANTEMP__CONTROL): Define. * tree.c (omp_clause_num_ops, omp_clause_code_name): Add OMP_CLAUSE__SCANTEMP_ entry. (walk_tree_1): Handle OMP_CLAUSE__SCANTEMP_. * tree-pretty-print.c (dump_omp_clause): Likewise. * tree-nested.c (convert_nonlocal_omp_clauses, convert_local_omp_clauses): Likewise. * omp-general.h (struct omp_for_data): Add have_scantemp and have_nonctrl_scantemp members. * omp-general.c (omp_extract_for_data): Initialize them. * omp-low.c (struct omp_context): Add scan_exclusive member. (scan_omp_1_stmt): Don't unnecessarily mask gimple_omp_for_kind result again with GF_OMP_FOR_KIND_MASK. Initialize also ctx->scan_exclusive. (lower_rec_simd_input_clauses): Use ctx->scan_exclusive instead of !ctx->scan_inclusive. (lower_rec_input_clauses): Simplify gimplification of dtors using gimplify_and_add. For non-is_simd test OMP_CLAUSE_REDUCTION_INSCAN rather than rvarp. Handle OMP_CLAUSE_REDUCTION_INSCAN in worksharing loops. Don't add barrier for reduction_omp_orig_ref if ctx->scan_??xclusive. (lower_reduction_clauses): Don't do anything for ctx->scan_??xclusive. (lower_omp_scan): Use ctx->scan_exclusive instead of !ctx->scan_inclusive. Handle worksharing loops with inscan reductions. Use new_vard != new_var instead of repeated omp_is_reference calls. (omp_find_scan, lower_omp_for_scan): New functions. (lower_omp_for): Call lower_omp_for_scan for worksharing loops with inscan reductions. * omp-expand.c (expand_omp_scantemp_alloc): New function. (expand_omp_for_static_nochunk): Handle fd->have_nonctrl_scantemp and fd->have_scantemp. * c-c++-common/gomp/scan-3.c (f1): Don't expect a sorry message. * c-c++-common/gomp/scan-5.c (foo): Likewise. * testsuite/libgomp.c++/scan-1.C: New test. * testsuite/libgomp.c++/scan-2.C: New test. * testsuite/libgomp.c++/scan-3.C: New test. * testsuite/libgomp.c++/scan-4.C: New test. * testsuite/libgomp.c++/scan-5.C: New test. * testsuite/libgomp.c++/scan-6.C: New test. * testsuite/libgomp.c++/scan-7.C: New test. * testsuite/libgomp.c++/scan-8.C: New test. * testsuite/libgomp.c/scan-1.c: New test. * testsuite/libgomp.c/scan-2.c: New test. * testsuite/libgomp.c/scan-3.c: New test. * testsuite/libgomp.c/scan-4.c: New test. * testsuite/libgomp.c/scan-5.c: New test. * testsuite/libgomp.c/scan-6.c: New test. * testsuite/libgomp.c/scan-7.c: New test. * testsuite/libgomp.c/scan-8.c: New test. From-SVN: r272958
2019-07-03omp-expand.c (expand_omp_for_static_nochunk, [...]): For nowait worksharing ↵Jakub Jelinek
loop with conditional lastprivate clause(s)... * omp-expand.c (expand_omp_for_static_nochunk, expand_omp_for_static_chunk): For nowait worksharing loop with conditional lastprivate clause(s), emit GOMP_loop_end_nowait call at the end. * c-c++-common/gomp/lastprivate-conditional-5.c: New test. From-SVN: r272956
2019-06-05omp-expand.c (struct omp_region): Add has_lastprivate_conditional member.Jakub Jelinek
* omp-expand.c (struct omp_region): Add has_lastprivate_conditional member. (expand_parallel_call): If region->inner->has_lastprivate_conditional, treat it like explicit monotonic schedule modifier. (expand_omp_for): Initialize has_lastprivate_conditional. If fd.lastprivate_conditional != 0, treat it like explicit monotonic schedule modifier. From-SVN: r271949
2019-06-04gimplify.c (gimplify_scan_omp_clauses): Don't sorry_at on lastprivate ↵Jakub Jelinek
conditional on combined for simd. * gimplify.c (gimplify_scan_omp_clauses): Don't sorry_at on lastprivate conditional on combined for simd. * omp-low.c (struct omp_context): Add combined_into_simd_safelen0 member. (lower_rec_input_clauses): For gimple_omp_for_combined_into_p max_vf 1 constructs, don't remove lastprivate_conditional_map, but instead set ctx->combined_into_simd_safelen0 and adjust hash_map, so that it points to parent construct temporaries. (lower_lastprivate_clauses): Handle ctx->combined_into_simd_safelen0 like !ctx->lastprivate_conditional_map. (lower_omp_1) <case GIMPLE_ASSIGN>: If up->combined_into_simd_safelen0, use up->outer context instead of up. * omp-expand.c (expand_omp_for_generic): Perform cond_var bump even if gimple_omp_for_combined_p. (expand_omp_for_static_nochunk): Likewise. (expand_omp_for_static_chunk): Add forgotten cond_var bump that was probably moved over into expand_omp_for_generic rather than being copied there. gcc/cp/ * cp-tree.h (CP_OMP_CLAUSE_INFO): Allow for any clauses up to _condvar_ instead of only up to linear. gcc/testsuite/ * c-c++-common/gomp/lastprivate-conditional-2.c (foo): Don't expect a sorry_at on any of the clauses. libgomp/ * testsuite/libgomp.c-c++-common/lastprivate-conditional-7.c: New test. * testsuite/libgomp.c-c++-common/lastprivate-conditional-8.c: New test. * testsuite/libgomp.c-c++-common/lastprivate-conditional-9.c: New test. * testsuite/libgomp.c-c++-common/lastprivate-conditional-10.c: New test. From-SVN: r271907
2019-05-31tree.h (OMP_CLAUSE__CONDTEMP__ITER): Define.Jakub Jelinek
* tree.h (OMP_CLAUSE__CONDTEMP__ITER): Define. * gimplify.c (gimplify_scan_omp_clauses): Allow lastprivate conditional on OMP_SIMD if not nested inside of worksharing loop that also has lastprivate conditional clause for the same decl. (gimplify_omp_for): Add _condtemp_ clauses to OMP_SIMD if needed. * omp-low.c (scan_sharing_clauses): Handle OMP_CLAUSE__CONDTEMP_ also on simd. (lower_rec_input_clauses): Likewise. Handle lastprivate conditional on simd construct. (lower_lastprivate_conditional_clauses): Handle lastprivate conditional on simd construct. (lower_lastprivate_clauses): Likewise. (lower_omp_sections): Call lower_lastprivate_conditional_clauses before calling lower_rec_input_clauses. (lower_omp_for): Likewise. (lower_omp_1): Use first rather than second OMP_CLAUSE__CONDTEMP_ clause on simd construct. * omp-expand.c (expand_omp_simd): Initialize cond_var if OMP_CLAUSE__CONDTEMP_ clause is present. * c-c++-common/gomp/lastprivate-conditional-2.c (foo): Don't expect a sorry on lastprivate conditional on simd construct. * gcc.dg/vect/vect-simd-6.c: New test. * gcc.dg/vect/vect-simd-7.c: New test. From-SVN: r271825
2019-05-30gimplify.c (enum gimplify_omp_var_data): Add GOVD_CONDTEMP.Jakub Jelinek
* gimplify.c (enum gimplify_omp_var_data): Add GOVD_CONDTEMP. (gimplify_adjust_omp_clauses_1): Handle GOVD_CONDTEMP. (gimplify_omp_for): If worksharing loop with lastprivate conditional is nested inside of parallel region, add _condtemp_ clause to both. * tree-nested.c (convert_nonlocal_omp_clauses, convert_local_omp_clauses): Ignore OMP_CLAUSE__CONDTEMP_ instead of assertion failure. * omp-general.h (struct omp_for_data): Add have_pointer_condtemp member. * omp-general.c (omp_extract_for_data): Compute it. * omp-low.c (scan_sharing_clauses): Handle OMP_CLAUSE__CONDTEMP_. (lower_rec_input_clauses): Likewise. (lower_lastprivate_conditional_clauses): If OMP_CLAUSE__CONDTEMP_ clause is already present, just add one further one after it. (lower_lastprivate_clauses): Handle cond_ptr with array type. (lower_send_shared_vars): Clear _condtemp_ vars. (lower_omp_1) <case GIMPLE_ASSIGN>: Handle target data like critical or section or taskgroup. * omp-expand.c (determine_parallel_type): Disallow combining only if first OMP_CLAUSE__CONDTEMP_ has pointer type. Disallow combining of parallel sections if OMP_CLAUSE__CONDTEMP_ is present. (expand_omp_for_generic, expand_omp_for_static_nochunk, expand_omp_for_static_chunk, expand_omp_for): Use fd->have_pointer_condtemp instead of fd->lastprivate_conditional to determine if a special set of API routines are needed and if condtemp needs to be initialized, while always initialize cond_var if fd->lastprivate_conditional is non-zero. From-SVN: r271791
2019-05-27gimplify.c (gimplify_scan_omp_clauses): Allow lastprivate conditional on ↵Jakub Jelinek
sections construct. * gimplify.c (gimplify_scan_omp_clauses): Allow lastprivate conditional on sections construct. * omp-low.c (lower_lastprivate_conditional_clauses): Handle sections construct. (lower_omp_sections): Handle lastprivate conditional. (lower_omp_1) <case GIMPLE_ASSIGN>: Handle sections construct with lastprivate_conditional_map. * omp-expand.c (expand_omp_sections): Handle lastprivate conditional. libgomp/ * testsuite/libgomp.c-c++-common/lastprivate_conditional_4.c: New test. From-SVN: r271673
2019-05-24tree-core.h (enum omp_clause_code): Add OMP_CLAUSE__CONDTEMP_.Jakub Jelinek
* tree-core.h (enum omp_clause_code): Add OMP_CLAUSE__CONDTEMP_. * tree.h (OMP_CLAUSE_DECL): Use OMP_CLAUSE__CONDTEMP_ instead of OMP_CLAUSE__REDUCTEMP_. * tree.c (omp_clause_num_ops, omp_clause_code_name): Add OMP_CLAUSE__CONDTEMP_. (walk_tree_1): Handle OMP_CLAUSE__CONDTEMP_. * tree-pretty-print.c (dump_omp_clause): Likewise. * tree-nested.c (convert_nonlocal_omp_clauses, convert_local_omp_clauses): Likewise. * gimplify.c (enum gimplify_omp_var_data): Use hexadecimal constants instead of decimal. Add GOVD_LASTPRIVATE_CONDITIONAL. (gimplify_scan_omp_clauses): Don't reject lastprivate conditional on OMP_FOR. (gimplify_omp_for): Warn and disable conditional modifier from lastprivate on loop iterators. * omp-general.h (struct omp_for_data): Add lastprivate_conditional member. * omp-general.c (omp_extract_for_data): Initialize it. * omp-low.c (struct omp_context): Add lastprivate_conditional_map member. (delete_omp_context): Delete it. (lower_lastprivate_conditional_clauses): New function. (lower_lastprivate_clauses): Add BODY_P and CSTMT_LIST arguments, handle lastprivate conditional clauses. (lower_reduction_clauses): Add CLIST argument, emit it into the critical section if any. (lower_omp_sections): Adjust lower_lastprivate_clauses and lower_reduction_clauses callers. (lower_omp_for_lastprivate): Add CLIST argument, pass it through to lower_lastprivate_clauses. (lower_omp_for): Call lower_lastprivate_conditional_clauses, adjust lower_omp_for_lastprivate and lower_reduction_clauses callers, emit clist into a critical section if not emitted there already by lower_reduction_clauses. (lower_omp_taskreg, lower_omp_teams): Adjust lower_reduction_clauses callers. (lower_omp_1): Handle GIMPLE_ASSIGNs storing into lastprivate conditional variables. * omp-expand.c (determine_parallel_type): Punt if OMP_CLAUSE__CONDTEMP_ clause is present. (expand_omp_for_generic, expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Handle lastprivate conditional. (expand_omp_for): Handle fd.lastprivate_conditional like fd.have_reductemp. gcc/testsuite/ * c-c++-common/gomp/lastprivate-conditional-2.c (foo): Don't expect sorry for omp for. * c-c++-common/gomp/lastprivate-conditional-3.c: New test. libgomp/ * testsuite/libgomp.c-c++-common/lastprivate-conditional-1.c: New test. * testsuite/libgomp.c-c++-common/lastprivate-conditional-2.c: New test. From-SVN: r271610
2019-05-20cfgloop.h (struct loop): Add simdlen member.Jakub Jelinek
* cfgloop.h (struct loop): Add simdlen member. * cfgloopmanip.c (copy_loop_info): Copy simdlen as well. * omp-expand.c (expand_omp_simd): Set it if simdlen clause is present. * tree-vect-loop.c (vect_analyze_loop): Pass loop->simdlen != 0 as new argument to autovectorize_vector_sizes target hook. If loop->simdlen, pick up vector size where the vectorization factor is equal to loop->simd, and if there is none, fall back to the first successful one. (vect_transform_loop): Adjust autovectorize_vector_sizes target hook caller. * omp-low.c (omp_clause_aligned_alignment): Likewise. * omp-general.c (omp_max_vf): Likewise. * optabs-query.c (can_vec_mask_load_store_p): Likewise. * tree-vect-slp.c (vect_slp_bb): Likewise. * target.def (autovectorize_vector_sizes): Add ALL argument and document it. * doc/tm.texi: Adjust documentation. * targhooks.c (default_autovectorize_vector_sizes): Add bool argument. * targhooks.h (default_autovectorize_vector_sizes): Likewise. * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes): Add bool argument. * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise. * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise. * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise. * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise. If true and TARGET_AVX512F or TARGET_AVX, push 3 or 2 sizes even if preferred vector size is not 512-bit or 256-bit, just put those unpreferred ones last. * gcc.target/i386/avx512f-simd-1.c: New test. From-SVN: r271403
2019-05-15omp-low.c (lower_rec_input_clauses): For if (0) or simdlen (1) set max_vf to 1.Jakub Jelinek
* omp-low.c (lower_rec_input_clauses): For if (0) or simdlen (1) set max_vf to 1. * omp-expand.c (expand_omp_simd): For if (0) or simdlen (1) clear safelen_int and set loop->dont_vectorize. * c-c++-common/gomp/simd8.c: New test. From-SVN: r271270
2019-03-07re PR translation/79999 (possible typo in gimplify.c: depend(sink:))Jakub Jelinek
PR translation/79999 * gimplify.c (gimplify_omp_ordered): Reword diagnostics to talk about depend clause with source (or sink) modifier. * omp-expand.c (expand_omp_ordered_sink): Likewise. * c-c++-common/gomp/doacross-1.c: Adjust expected diagnostics. * c-c++-common/gomp/doacross-3.c: New test. From-SVN: r269468
2019-01-01Update copyright years.Jakub Jelinek
From-SVN: r267494
2018-12-28For libgomp OpenACC entry points, redefine the "device" argument to "flags"Thomas Schwinge
... so that we're then able to use this for other flags in addition to "GOACC_FLAG_HOST_FALLBACK". gcc/ * omp-expand.c (expand_omp_target): Restructure OpenACC vs. OpenMP code paths. Update for libgomp OpenACC entry points change. include/ * gomp-constants.h (GOACC_FLAG_HOST_FALLBACK) (GOACC_FLAGS_MARSHAL_OP, GOACC_FLAGS_UNMARSHAL): Define. libgomp/ * oacc-parallel.c (GOACC_parallel_keyed, GOACC_parallel) (GOACC_data_start, GOACC_enter_exit_data, GOACC_update) (GOACC_declare): Redefine the "device" argument to "flags". From-SVN: r267448
2018-12-21re PR middle-end/85594 (ICE during expand when compiling with -fwrapv -fopenmp)Jakub Jelinek
PR middle-end/85594 PR middle-end/88553 * omp-expand.c (extract_omp_for_update_vars): Regimplify the condition if needed. (expand_omp_for_generic): Don't clobber t temporary for ordered loops. * gcc.dg/gomp/pr85594.c: New test. * gcc.dg/gomp/pr88553.c: New test. From-SVN: r267339
2018-11-19re PR debug/87039 (DW_OP_fbreg used without a frame base on a C++ code w/ ↵Jakub Jelinek
-fopenmp) PR debug/87039 * omp-expand.c: Don't include debug.h. (adjust_context_and_scope): Add REGION argument. Find DECL_CONTEXT from innermost outer parallel, task, teams or target that has a child_fn set, or, if there is no such outer region, use current_function_decl. Do the DECL_CONTEXT adjustment regardless of whether a suitable BLOCK is found or not. (expand_parallel_call, expand_teams_call): Don't call adjust_context_and_scope here. (grid_expand_target_grid_body): Revert 2017-01-25 changes. (expand_omp_taskreg, expand_omp_target): Likewise. Call adjust_context_and_scope. * dwarf2out.c (dwarf2out_early_global_decl): For decl_function_context recurse instead of calling dwarf2out_decl. * g++.dg/gomp/pr78363-4.C: New test. * g++.dg/gomp/pr78363-5.C: New test. * g++.dg/gomp/pr78363-6.C: New test. * g++.dg/gomp/pr78363-7.C: New test. From-SVN: r266272
2018-11-13Eliminate source_location in favor of location_tDavid Malcolm
Historically GCC used location_t, while libcpp used source_location. This inconsistency has been annoying me for a while, so this patch removes source_location in favor of location_t throughout (as the latter is shorter). gcc/ChangeLog: * builtins.c: Replace "source_location" with "location_t". * diagnostic-show-locus.c: Likewise. * diagnostic.c: Likewise. * dumpfile.c: Likewise. * gcc-rich-location.h: Likewise. * genmatch.c: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * input.c: Likewise. * input.h: Likewise. Eliminate the typedef. * omp-expand.c: Likewise. * selftest.h: Likewise. * substring-locations.h (get_source_location_for_substring): Rename to.. (get_location_within_string): ...this. * tree-cfg.c: Replace "source_location" with "location_t". * tree-cfgcleanup.c: Likewise. * tree-diagnostic.c: Likewise. * tree-into-ssa.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-phinodes.c: Likewise. * tree-phinodes.h: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa.c: Likewise. * tree-ssa.h: Likewise. * tree-vect-loop-manip.c: Likewise. gcc/c-family/ChangeLog: * c-common.c (c_get_substring_location): Update for renaming of get_source_location_for_substring to get_location_within_string. * c-lex.c: Replace "source_location" with "location_t". * c-opts.c: Likewise. * c-ppoutput.c: Likewise. gcc/c/ChangeLog: * c-decl.c: Replace "source_location" with "location_t". * c-tree.h: Likewise. * c-typeck.c: Likewise. * gimple-parser.c: Likewise. gcc/cp/ChangeLog: * call.c: Replace "source_location" with "location_t". * cp-tree.h: Likewise. * cvt.c: Likewise. * name-lookup.c: Likewise. * parser.c: Likewise. * typeck.c: Likewise. gcc/fortran/ChangeLog: * cpp.c: Replace "source_location" with "location_t". * gfortran.h: Likewise. gcc/go/ChangeLog: * go-gcc-diagnostics.cc: Replace "source_location" with "location_t". * go-gcc.cc: Likewise. * go-linemap.cc: Likewise. * go-location.h: Likewise. * gofrontend/README: Likewise. gcc/jit/ChangeLog: * jit-playback.c: Replace "source_location" with "location_t". gcc/testsuite/ChangeLog: * g++.dg/plugin/comment_plugin.c: Replace "source_location" with "location_t". * gcc.dg/plugin/diagnostic_plugin_test_show_locus.c: Likewise. libcc1/ChangeLog: * libcc1plugin.cc: Replace "source_location" with "location_t". (plugin_context::get_source_location): Rename to... (plugin_context::get_location_t): ...this. * libcp1plugin.cc: Likewise. libcpp/ChangeLog: * charset.c: Replace "source_location" with "location_t". * directives-only.c: Likewise. * directives.c: Likewise. * errors.c: Likewise. * expr.c: Likewise. * files.c: Likewise. * include/cpplib.h: Likewise. Rename MAX_SOURCE_LOCATION to MAX_LOCATION_T. * include/line-map.h: Likewise. * init.c: Likewise. * internal.h: Likewise. * lex.c: Likewise. * line-map.c: Likewise. * location-example.txt: Likewise. * macro.c: Likewise. * pch.c: Likewise. * traditional.c: Likewise. From-SVN: r266085
2018-11-08builtin-types.def (BT_FN_VOID_BOOL, [...]): New.Jakub Jelinek
* 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
2018-10-30Avoid unnecessarily numbering cloned symbols.Michael Ploujnikov
2018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com> * cgraph.h (clone_function_name_1): Replaced by new clone_function_name_numbered that takes name as string; for privatize_symbol_name_1 use only. (clone_function_name): Renamed to clone_function_name_numbered to be explicit about numbering. (clone_function_name): New two-argument function that does not number its output. (clone_function_name): New three-argument function that takes a number to append to its output. * cgraphclones.c (duplicate_thunk_for_node): (clone_function_name_1): Renamed. (clone_function_name_numbered): Two new functions. (clone_function_name): Improved documentation. (cgraph_node::create_virtual_clone): Use clone_function_name_numbered. * config/rs6000/rs6000.c (make_resolver_func): Ditto. * final.c (final_scan_insn_1): Use the new clone_function_name without numbering. * multiple_target.c (create_dispatcher_calls): Ditto. (create_target_clone): Ditto. * omp-expand.c (grid_expand_target_grid_body): Ditto. * omp-low.c (create_omp_child_function_name): Ditto. * omp-simd-clone.c (simd_clone_create): Ditto. * symtab.c (simd_symtab_node::noninterposable_alias): Use the new clone_function_name without numbering. 2018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com> * lto-partition.c (privatize_symbol_name_1): Use clone_function_name_numbered. 2018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com> * gcc.dg/tree-prof/cold_partition_label.c: Update for cold section names without numbers. * gcc.dg/tree-prof/section-attr-1.c: Ditto. * gcc.dg/tree-prof/section-attr-2.c: Ditto. * gcc.dg/tree-prof/section-attr-3.c: Ditto. From-SVN: r265621
2018-09-28tree.h (BLOCK_ORIGIN): New.Richard Biener
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
2018-04-26re PR middle-end/85450 (ICE: invalid types in nop conversion during GIMPLE ↵Richard Biener
pass: ompexp) 2018-04-26 Richard Biener <rguenther@suse.de> PR middle-end/85450 * tree-cfg.c (verify_gimple_assign_unary): Restore proper checking of integer<->pointer conversions. * omp-expand.c (expand_omp_for_static_nochunk): Avoid sign-/zero-extending pointer types. (expand_omp_for_static_chunk): Likewise. From-SVN: r259667
2018-04-16[openacc] Fix ICE when compiling tile loop containing infinite loopCesar Philippidis
2018-04-16 Cesar Philippidis <cesar@codesourcery.com> Tom de Vries <tom@codesourcery.com> PR middle-end/84955 * omp-expand.c (expand_oacc_for): Add dummy false branch for tiled basic blocks without omp continue statements. * testsuite/libgomp.oacc-c-c++-common/pr84955.c: New test. * testsuite/libgomp.oacc-fortran/pr84955.f90: New test. Co-Authored-By: Tom de Vries <tom@codesourcery.com> From-SVN: r259406
2018-04-12Revert 259346.Cesar Philippidis
gcc/ * lto-streamer-out.c (output_function): Revert 259346. * omp-expand.c (expand_oacc_for): Likewise. libgomp/ * testsuite/libgomp.oacc-c-c++-common/pr84955.c: Revert 259346. * testsuite/libgomp.oacc-fortran/pr84955.f90:Likewise. From-SVN: r259351
2018-04-12re PR middle-end/84955 (Incorrect OpenACC tile expansion)Cesar Philippidis
PR middle-end/84955 gcc/ * lto-streamer-out.c (output_function): Fix CFG loop state before streaming out. * omp-expand.c (expand_oacc_for): Handle calls to internal functions like regular functions. libgomp/ * testsuite/libgomp.oacc-c-c++-common/pr84955.c: New test. * testsuite/libgomp.oacc-fortran/pr84955.f90: New test. Co-Authored-By: Richard Biener <rguenther@suse.de> From-SVN: r259346
2018-02-07[openacc] Fix diff_type in expand_oacc_collapse_initTom de Vries
2018-02-07 Tom de Vries <tom@codesourcery.com> PR libgomp/84217 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large enough. * c-c++-common/goacc/pr84217.c: New test. * gfortran.dg/goacc/pr84217.f90: New test. * testsuite/libgomp.oacc-c-c++-common/pr84217.c: New test. From-SVN: r257443
2018-01-23re PR tree-optimization/83957 (ICE: Segmentation fault (in gimple_phi_arg))Jakub Jelinek
PR tree-optimization/83957 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove semicolon after for body surrounded by braces. * gcc.dg/autopar/pr83957.c: New test. From-SVN: r256967
2018-01-15re PR middle-end/83837 (libgomp.fortran/pointer[12].f90 FAIL)Jakub Jelinek
PR middle-end/83837 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val type rather than type addr's type points to. (expand_omp_atomic_mutex): Likewise. (expand_omp_atomic): Likewise. From-SVN: r256710
2018-01-03Update copyright years.Jakub Jelinek
From-SVN: r256169
2018-01-03poly_int: omp_max_vfRichard Sandiford
This patch makes omp_max_vf return a polynomial vectorization factor. We then need to be able to stash a polynomial value in OMP_CLAUSE_SAFELEN_EXPR too: /* If max_vf is non-zero, then we can use only a vectorization factor up to the max_vf we chose. So stick it into the safelen clause. */ For now the cfgloop safelen is still constant though. 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org> Alan Hayward <alan.hayward@arm.com> David Sherwood <david.sherwood@arm.com> gcc/ * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int. * omp-general.c (omp_max_vf): Likewise. * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf. (expand_omp_simd): Handle polynomial safelen. * omp-low.c (omplow_simd_context): Add a default constructor. (omplow_simd_context::max_vf): Change from int to poly_uint64. (lower_rec_simd_input_clauses): Update accordingly. (lower_rec_input_clauses): Likewise. Co-Authored-By: Alan Hayward <alan.hayward@arm.com> Co-Authored-By: David Sherwood <david.sherwood@arm.com> From-SVN: r256129
2017-12-30Prune removed funcs from offload tableTom de Vries
2017-12-30 Tom de Vries <tom@codesourcery.com> PR libgomp/83046 * omp-expand.c (expand_omp_target): If in_lto_p, mark offload_funcs with DECL_PRESERVE_P. * lto-streamer-out.c (prune_offload_funcs): New function. Remove offload_funcs entries that no longer have a corresponding cgraph_node. Mark the remaining ones as DECL_PRESERVE_P. (output_lto): Call prune_offload_funcs. * testsuite/libgomp.oacc-c-c++-common/pr83046.c: New test. * testsuite/libgomp.c-c++-common/pr83046.c: New test. From-SVN: r256045
2017-12-12[SFN] not-quite-boilerplate changes in preparation to introduce nonbind markersAlexandre Oliva
This patch adjusts numerous parts of the compiler that would malfunction should they find debug markers at points where they may be introduced. The changes purport to allow the compiler to pass bootstrap-debug-lean (-fcompare-debug in stage3) at various optimization levels, as well as bootstrap-debug-lib (-fcompare-debug for target libraries), even after the compiler is changed so that debug markers are introduced in code streams at spots where earlier debug stmts, insns and notes wouldn't normally appear. This patch depends on an earlier SFN boilerplate patch, and on another SFN patch that introduces new RTL insn-walking functions. for gcc/ChangeLog * cfgcleanup.c (delete_unreachable_blocks): Use alternate block removal order if MAY_HAVE_DEBUG_BIND_INSNS. * cfgexpand.c (label_rtx_for_bb): Skip debug insns. * cfgrtl.c (try_redirect_by_replacing_jump): Skip debug insns. (rtl_tidy_fallthru_edge): Likewise. (rtl_verify_fallthru): Likewise. (rtl_verify_bb_layout): Likewise. (skip_insns_after_block): Likewise. (duplicate_insn_chain): Use DEBUG_BIND_INSN_P. * dwarf2out.c: Include print-rtl.h. (dwarf2out_next_real_insn): New. (dwarf2out_var_location): Call it. Disregard begin stmt markers. Dump debug binds in asm comments. * gimple-iterator.c (gimple_find_edge_insert_loc): Skip debug stmts. * gimple-iterator.h (gsi_start_bb_nondebug): Remove; adjust callers to use gsi_start_nondebug_bb instead. (gsi_after_labels): Skip gimple debug stmts. (gsi_start_nondebug): New. * gimple-loop-interchange.c (find_deps_in_bb_for_stmt): Adjust. (proper_loop_form_for_interchange): Adjust. * gimple-low.c (gimple_seq_may_fallthru): Take last nondebug stmt. * gimple.h (gimple_seq_last_nondebug_stmt): New. * gimplify.c (last_stmt_in_scope): Skip debug stmts. (collect_fallthrough_labels): Likewise. (should_warn_for_implicit_fallthrough): Likewise. (warn_implicit_fallthrough_r): Likewise. (expand_FALLTHROUGH_r): Likewise. * graphite-isl-ast-to-gimple.c (gsi_insert_earliest): Adjust. (graphite_copy_stmts_from_block): Skip nonbind markers. * haifa-sched.c (sched_extend_bb): Skip debug insns. * ipa-icf-gimple.c (func_checker::compare_bb): Adjust. * jump.c (clean_barriers): Skip debug insns. * omp-expand.c (expand_parallel_call): Skip debug insns. (expand_task_call): Likewise. (remove_exit_barrier): Likewise. (expand_omp_taskreg): Likewise. (expand_omp_for_init_counts): Likewise. (expand_omp_for_generic): Likewise. (expand_omp_for_static_nochunk): Likewise. (expand_omp_for_static_chunk): Likewise. (expand_omp_simd): Likewise. (expand_omp_taskloop_for_outer): Likewise. (expand_omp_taskloop_for_inner): Likewise. (expand_oacc_for): Likewise. (expand_omp_sections): Likewise. (expand_omp_single): Likewise. (expand_omp_synch): Likewise. (expand_omp_atomic_load): Likewise. (expand_omp_atomic_store): Likewise. (expand_omp_atomic_fetch_op): Likewise. (expand_omp_atomic_pipeline): Likewise. (expand_omp_atomic_mutex): Likewise. (expand_omp_target): Likewise. (grid_expand_omp_for_loop): Likewise. (grid_expand_target_grid_body): Likewise. (build_omp_regions_1): Likewise. * omp-low.c (check_combined_parallel): Skip debug stmts. * postreload.c (fixup_debug_insns): Skip nonbind debug insns. * regcprop.c (find_oldest_value_reg): Ensure REGNO is not a pseudo. * sese.c (sese_trivially_empty_bb_p): Call is_gimple_debug in test. * tree-cfg.c (make_blobs_1): Skip debug stmts. (make_edges): Likewise. (cleanup_dead_labels): Likewise. (gimple_can_merge_blocks_p): Likewise. (stmt_starts_bb_p): Likewise. (gimple_block_label): Likewise. (gimple_redirect_edge_and_branch): Likewise. * tree-cfgcleanup.c (remove_forwarder_block): Rearrange skipping of debug stmts. (execute_cleanup_cfg_post_optimizing): Dump enumerated decls with TDF_SLIM. * tree-pretty-print (print_declaration): Omit initializer in slim dumps. * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Mark begin stmt markers. (eliminate_unnecessary_stmts): Stabilize block removal order. * tree-ssa-tail-merge.c (find_duplicate): Skip debug stmts. * var-tracking.c (get_first_insn): New. (vt_emit_notes): Call it. (vt_initialize): Walk any insns before the first BB. (delete_debug_insns): Likewise. From-SVN: r255566
2017-11-28Remove Cilk Plus support.Julia Koval
* Makefile.def (target_modules): Remove libcilkrts. * Makefile.in: Ditto. * configure: Ditto. * configure.ac: Ditto. contrib/ * contrib/gcc_update: Ditto. gcc/ * Makefile.in (cilkplus.def, cilk-builtins.def, c-family/cilk.o, c-family/c-cilkplus.o, c-family/array-notation-common.o, cilk-common.o, cilk.h, cilk-common.c): Remove. * builtin-types.def (BT_FN_INT_PTR_PTR_PTR_FTYPE_BT_INT_BT_PTR_BT_PTR_BT_PTR): Remove. * builtins.c (is_builtin_name): Remove cilkplus condition. (BUILT_IN_CILK_DETACH, BUILT_IN_CILK_POP_FRAME): Remove. * builtins.def (DEF_CILK_BUILTIN_STUB, DEF_CILKPLUS_BUILTIN, cilk-builtins.def, cilkplus.def): Remove. * cif-code.def (CILK_SPAWN): Remove. * cilk-builtins.def: Delete. * cilk-common.c: Ditto. * cilk.h: Ditto. * cilkplus.def: Ditto. * config/darwin.h (fcilkplus): Delete. * cppbuiltin.c: Ditto. * doc/extend.texi: Remove cilkplus doc. * doc/generic.texi: Ditto. * doc/invoke.texi: Ditto. * doc/passes.texi: Ditto. * gcc.c (fcilkplus): Remove. * gengtype.c (cilk.h): Remove. * gimple-pretty-print.c (dump_gimple_omp_for): Remove cilkplus support. * gimple.h (GF_OMP_FOR_KIND_CILKFOR, GF_OMP_FOR_KIND_CILKSIMD): Remove. * gimplify.c (gimplify_return_expr, maybe_fold_stmt, gimplify_call_expr, is_gimple_stmt, gimplify_modify_expr, gimplify_scan_omp_clauses, gimplify_adjust_omp_clauses, gimplify_omp_for, gimplify_expr): Remove cilkplus conditions. * ipa-fnsummary.c (ipa_dump_fn_summary, compute_fn_summary, inline_read_section): Ditto. * ipa-inline-analysis.c (cilk.h): Remove. * ira.c (ira_setup_eliminable_regset): Remove cilkplus support. * lto-wrapper.c (merge_and_complain, append_compiler_options, append_linker_options): Remove condition for fcilkplus. * lto/lto-lang.c (cilk.h): Remove. (lto_init): Remove condition for fcilkplus. * omp-expand.c (expand_cilk_for_call): Delete. (expand_omp_taskreg, expand_omp_for_static_chunk, expand_omp_for): Remove cilkplus conditions. (expand_cilk_for): Delete. * omp-general.c (omp_extract_for_data): Remove cilkplus support. * omp-low.c (scan_sharing_clauses, create_omp_child_function, execute_lower_omp, diagnose_sb_0): Ditto. * omp-simd-clone.c (simd_clone_clauses_extract): Ditto. * tree-core.h (OMP_CLAUSE__CILK_FOR_COUNT_): Delete. * tree-nested.c: Ditto. * tree-pretty-print.c (dump_omp_clause): Remove cilkplus support. (dump_generic_node): Ditto. * tree.c (OMP_CLAUSE__CILK_FOR_COUNT_): Delete. * tree.def (cilk_simd, cilk_for, cilk_spawn_stmt, cilk_sync_stmt): Delete. * tree.h (CILK_SPAWN_FN, EXPR_CILK_SPAWN): Delete. gcc/c-family/ * array-notation-common.c: Delete. * c-cilkplus.c: Ditto. * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove. * c-common.def (ARRAY_NOTATION_REF): Remove. * c-common.h (RID_CILK_SPAWN, build_array_notation_expr, build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop, c_validate_cilk_plus_loop, cilkplus_an_parts, cilk_ignorable_spawn_rhs_op, cilk_recognize_spawn): Remove. * c-gimplify.c (CILK_SPAWN_STMT): Remove. * c-omp.c: Remove CILK_SIMD check. * c-pragma.c: Ditto. * c-pragma.h: Remove CILK related pragmas. * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove ARRAY_NOTATION_REF condition. (c_pretty_printer::expression): Ditto. * c.opt (fcilkplus): Remove. * cilk.c: Delete. gcc/c/ * Make-lang.in (c/c-array-notation.o): Remove. * c-array-notation.c: Delete. * c-decl.c: Remove cilkplus condition. * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for, c_parser_cilk_verify_simd, c_parser_array_notation, c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize, c_parser_cilk_simd_fn_vector_attrs, c_finish_cilk_simd_fn_tokens): Delete. (c_parser_declaration_or_fndef): Remove cilkplus condition. (c_parser_direct_declarator_inner): Ditto. (CILK_SIMD_FN_CLAUSE_MASK): Delete. (c_parser_attributes, c_parser_compound_statement, c_parser_statement_after_labels, c_parser_if_statement, c_parser_switch_statement, c_parser_while_statement, c_parser_do_statement, c_parser_for_statement, c_parser_unary_expression, c_parser_postfix_expression, c_parser_postfix_expression_after_primary, c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses, c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus support. * c-typeck.c (build_array_ref, build_function_call_vec, convert_arguments, lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt, c_finish_loop, build_binary_op): Remove cilkplus support. gcc/cp/ * Make-lang.in (cp/cp-array-notation.o, cp/cp-cilkplus.o): Delete. * call.c (convert_for_arg_passing, build_cxx_call): Remove cilkplus. * constexpr.c (potential_constant_expression_1): Ditto. * cp-array-notation.c: Delete. * cp-cilkplus.c: Ditto. * cp-cilkplus.h: Ditto. * cp-gimplify.c (cp_gimplify_expr, cp_fold_r, cp_genericize): Remove cilkplus condition. * cp-objcp-common.c (ARRAY_NOTATION_REF): Delete. * cp-tree.h (cilkplus_an_triplet_types_ok_p): Delete. * decl.c (grokfndecl, finish_function): Remove cilkplus condition. * error.c (dump_decl, dump_expr): Remove ARRAY_NOTATION_REF condition. * lambda.c (cp-cilkplus.h): Remove. * parser.c (cp_parser_cilk_simd, cp_parser_cilk_for, cp_parser_cilk_simd_vectorlength): Delete. (cp_debug_parser, cp_parser_ctor_initializer_opt_and_function_body, cp_parser_postfix_expression, cp_parser_postfix_open_square_expression, cp_parser_statement, cp_parser_jump_statement, cp_parser_direct_declarator, cp_parser_late_return_type_opt, cp_parser_gnu_attribute_list, cp_parser_omp_clause_name, cp_parser_omp_clause_aligned, cp_parser_omp_clause_linear, cp_parser_omp_all_clauses, cp_parser_omp_flush, cp_parser_omp_for_cond, cp_parser_omp_for_incr, cp_parser_omp_for_loop_init, cp_parser_omp_for_loop, cp_parser_omp_declare_simd): Remove cilkplus support. (CILK_SIMD_FN_CLAUSE_MASK, cp_parser_late_parsing_cilk_simd_fn_info, cp_parser_cilk_grainsize): Remove. (cp_parser_pragma, c_parse_file): Remove cilkplus support. (cp_parser_cilk_simd_vectorlength, cp_parser_cilk_simd_linear, cp_parser_cilk_simd_clause_name, cp_parser_cilk_simd_all_clauses, cp_parser_cilk_simd, cp_parser_cilk_for): Remove. * parser.h (IN_CILK_SIMD_FOR, IN_CILK_SPAWN): Remove. * pt.c (tsubst_attribute, tsubst_expr, tsubst_copy_and_build): Remove cilkplus support. * semantics.c (finish_goto_stmt, begin_while_stmt, finish_do_body, finish_init_stmt, finish_switch_cond, simplify_aggr_init_expr, finish_omp_clauses, finish_omp_clauses, finish_omp_for): Remove cilkplus support. * tree.c (lvalue_kind): Remove ARRAY_NOTATION_REF conditon. * typeck.c (cp_build_array_ref, cp_build_compound_expr, check_return_expr): Remove cilkplus support. gcc/testsuite/ * c-c++-common/attr-simd-3.c: Delete. * c-c++-common/cilk-plus/AN/an-if.c: Delete. * c-c++-common/cilk-plus/AN/array_test1.c: Delete. * c-c++-common/cilk-plus/AN/array_test2.c: Delete. * c-c++-common/cilk-plus/AN/array_test_ND.c: Delete. * c-c++-common/cilk-plus/AN/builtin_fn_custom.c: Delete. * c-c++-common/cilk-plus/AN/builtin_fn_mutating.c: Delete. * c-c++-common/cilk-plus/AN/builtin_func_double.c: Delete. * c-c++-common/cilk-plus/AN/builtin_func_double2.c: Delete. * c-c++-common/cilk-plus/AN/comma_exp.c: Delete. * c-c++-common/cilk-plus/AN/conditional.c: Delete. * c-c++-common/cilk-plus/AN/decl-ptr-colon.c: Delete. * c-c++-common/cilk-plus/AN/dimensionless-arrays.c: Delete. * c-c++-common/cilk-plus/AN/exec-once.c: Delete. * c-c++-common/cilk-plus/AN/exec-once2.c: Delete. * c-c++-common/cilk-plus/AN/fn_ptr-2.c: Delete. * c-c++-common/cilk-plus/AN/fn_ptr.c: Delete. * c-c++-common/cilk-plus/AN/fp_triplet_values.c: Delete. * c-c++-common/cilk-plus/AN/gather-scatter-errors.c: Delete. * c-c++-common/cilk-plus/AN/gather_scatter.c: Delete. * c-c++-common/cilk-plus/AN/if_test.c: Delete. * c-c++-common/cilk-plus/AN/if_test_errors.c: Delete. * c-c++-common/cilk-plus/AN/misc.c: Delete. * c-c++-common/cilk-plus/AN/n-ptr-test.c: Delete. * c-c++-common/cilk-plus/AN/parser_errors.c: Delete. * c-c++-common/cilk-plus/AN/parser_errors2.c: Delete. * c-c++-common/cilk-plus/AN/parser_errors3.c: Delete. * c-c++-common/cilk-plus/AN/parser_errors4.c: Delete. * c-c++-common/cilk-plus/AN/pr57457-2.c: Delete. * c-c++-common/cilk-plus/AN/pr57457.c: Delete. * c-c++-common/cilk-plus/AN/pr57490.c: Delete. * c-c++-common/cilk-plus/AN/pr57541-2.c: Delete. * c-c++-common/cilk-plus/AN/pr57541.c: Delete. * c-c++-common/cilk-plus/AN/pr57577.c: Delete. * c-c++-common/cilk-plus/AN/pr58942.c: Delete. * c-c++-common/cilk-plus/AN/pr61191.c: Delete. * c-c++-common/cilk-plus/AN/pr61455-2.c: Delete. * c-c++-common/cilk-plus/AN/pr61455.c: Delete. * c-c++-common/cilk-plus/AN/pr61962.c: Delete. * c-c++-common/cilk-plus/AN/pr61963.c: Delete. * c-c++-common/cilk-plus/AN/pr62008.c: Delete. * c-c++-common/cilk-plus/AN/pr63884.c: Delete. * c-c++-common/cilk-plus/AN/rank_mismatch.c: Delete. * c-c++-common/cilk-plus/AN/rank_mismatch2.c: Delete. * c-c++-common/cilk-plus/AN/rank_mismatch3.c: Delete. * c-c++-common/cilk-plus/AN/sec_implicit.c: Delete. * c-c++-common/cilk-plus/AN/sec_implicit2.c: Delete. * c-c++-common/cilk-plus/AN/sec_implicit_ex.c: Delete. * c-c++-common/cilk-plus/AN/sec_reduce_ind_same_value.c: Delete. * c-c++-common/cilk-plus/AN/sec_reduce_max_min_ind.c: Delete. * c-c++-common/cilk-plus/AN/sec_reduce_return.c: Delete. * c-c++-common/cilk-plus/AN/side-effects-1.c: Delete. * c-c++-common/cilk-plus/AN/test_builtin_return.c: Delete. * c-c++-common/cilk-plus/AN/test_sec_limits.c: Delete. * c-c++-common/cilk-plus/AN/tst_lngth.c: Delete. * c-c++-common/cilk-plus/AN/vla.c: Delete. * c-c++-common/cilk-plus/CK/Wparentheses-1.c: Delete. * c-c++-common/cilk-plus/CK/cilk-for-2.c: Delete. * c-c++-common/cilk-plus/CK/cilk-for-3.c: Delete. * c-c++-common/cilk-plus/CK/cilk-fors.c: Delete. * c-c++-common/cilk-plus/CK/cilk_for_errors.c: Delete. * c-c++-common/cilk-plus/CK/cilk_for_grain.c: Delete. * c-c++-common/cilk-plus/CK/cilk_for_grain_errors.c: Delete. * c-c++-common/cilk-plus/CK/cilk_for_ptr_iter.c: Delete. * c-c++-common/cilk-plus/CK/compound_cilk_spawn.c: Delete. * c-c++-common/cilk-plus/CK/concec_cilk_spawn.c: Delete. * c-c++-common/cilk-plus/CK/errors.c: Delete. * c-c++-common/cilk-plus/CK/fib.c: Delete. * c-c++-common/cilk-plus/CK/fib_init_expr_xy.c: Delete. * c-c++-common/cilk-plus/CK/fib_no_return.c: Delete. * c-c++-common/cilk-plus/CK/fib_no_sync.c: Delete. * c-c++-common/cilk-plus/CK/invalid_spawns.c: Delete. * c-c++-common/cilk-plus/CK/invalid_sync.c: Delete.c * c-c++-common/cilk-plus/CK/nested_cilk_for.c: Delete. * c-c++-common/cilk-plus/CK/no_args_error.c: Delete. * c-c++-common/cilk-plus/CK/pr59631.c: Delete. * c-c++-common/cilk-plus/CK/pr60197-2.c: Delete. * c-c++-common/cilk-plus/CK/pr60197.c: Delete. * c-c++-common/cilk-plus/CK/pr60469.c: Delete. * c-c++-common/cilk-plus/CK/pr60586.c: Delete. * c-c++-common/cilk-plus/CK/pr63307.c: Delete. * c-c++-common/cilk-plus/CK/pr69826-1.c: Delete. * c-c++-common/cilk-plus/CK/pr69826-2.c: Delete. * c-c++-common/cilk-plus/CK/pr79428-4.c: Delete. * c-c++-common/cilk-plus/CK/pr79428-7.c: Delete. * c-c++-common/cilk-plus/CK/spawn_in_return.c: Delete. * c-c++-common/cilk-plus/CK/spawnee_inline.c: Delete. * c-c++-common/cilk-plus/CK/spawner_inline.c: Delete. * c-c++-common/cilk-plus/CK/spawning_arg.c: Delete. * c-c++-common/cilk-plus/CK/steal_check.c: Delete. * c-c++-common/cilk-plus/CK/sync_wo_spawn.c: Delete. * c-c++-common/cilk-plus/CK/test__cilk.c: Delete. * c-c++-common/cilk-plus/CK/varargs_test.c: Delete. * c-c++-common/cilk-plus/PS/Wparentheses-1.c: Delete. * c-c++-common/cilk-plus/PS/body.c: Delete. * c-c++-common/cilk-plus/PS/clauses1.c: Delete. * c-c++-common/cilk-plus/PS/clauses2.c: Delete. * c-c++-common/cilk-plus/PS/clauses3.c: Delete. * c-c++-common/cilk-plus/PS/clauses4.c: Delete. * c-c++-common/cilk-plus/PS/for1.c: Delete. * c-c++-common/cilk-plus/PS/for2.c: Delete. * c-c++-common/cilk-plus/PS/for3.c: Delete. * c-c++-common/cilk-plus/PS/pr69363.c: Delete. * c-c++-common/cilk-plus/PS/reduction-1.c: Delete. * c-c++-common/cilk-plus/PS/reduction-2.c: Delete. * c-c++-common/cilk-plus/PS/reduction-3.c: Delete. * c-c++-common/cilk-plus/PS/run-1.c: Delete. * c-c++-common/cilk-plus/PS/safelen.c: Delete. * c-c++-common/cilk-plus/PS/vectorlength-2.c: Delete. * c-c++-common/cilk-plus/PS/vectorlength-3.c: Delete. * c-c++-common/cilk-plus/PS/vectorlength.c: Delete. * c-c++-common/cilk-plus/SE/ef_error.c: Delete. * c-c++-common/cilk-plus/SE/ef_error2.c: Delete. * c-c++-common/cilk-plus/SE/ef_error3.c: Delete. * c-c++-common/cilk-plus/SE/ef_test.c: Delete. * c-c++-common/cilk-plus/SE/ef_test2.c: Delete. * c-c++-common/cilk-plus/SE/vlength_errors.c: Delete. * g++.dg/cilk-plus/AN/array_function.c: Delete. * g++.dg/cilk-plus/AN/array_test1_tplt.c: Delete. * g++.dg/cilk-plus/AN/array_test2_tplt.c: Delete. * g++.dg/cilk-plus/AN/array_test_ND_tplt.c: Delete. * g++.dg/cilk-plus/AN/braced_list.c: Delete. * g++.dg/cilk-plus/AN/builtin_fn_custom_tplt.c: Delete. * g++.dg/cilk-plus/AN/builtin_fn_mutating_tplt.c: Delete. * g++.dg/cilk-plus/AN/fp_triplet_values_tplt.c: Delete. * g++.dg/cilk-plus/AN/postincr_test.c: Delete. * g++.dg/cilk-plus/AN/preincr_test.c: Delete. * g++.dg/cilk-plus/CK/catch_exc.c: Delete. * g++.dg/cilk-plus/CK/cf3.c: Delete. * g++.dg/cilk-plus/CK/cilk-for-tplt.c: Delete. * g++.dg/cilk-plus/CK/const_spawn.c: Delete. * g++.dg/cilk-plus/CK/fib-opr-overload.c: Delete. * g++.dg/cilk-plus/CK/fib-tplt.c: Delete. * g++.dg/cilk-plus/CK/for1.c: Delete. * g++.dg/cilk-plus/CK/lambda_spawns.c: Delete. * g++.dg/cilk-plus/CK/lambda_spawns_tplt.c: Delete. * g++.dg/cilk-plus/CK/pr60586.c: Delete. * g++.dg/cilk-plus/CK/pr66326.c: Delete. * g++.dg/cilk-plus/CK/pr68001.c: Delete. * g++.dg/cilk-plus/CK/pr68997.c: Delete. * g++.dg/cilk-plus/CK/pr69024.c: Delete. * g++.dg/cilk-plus/CK/pr69048.c: Delete. * g++.dg/cilk-plus/CK/pr69267.c: Delete. * g++.dg/cilk-plus/CK/pr80038.c: Delete. * g++.dg/cilk-plus/CK/stl_iter.c: Delete. * g++.dg/cilk-plus/CK/stl_rev_iter.c: Delete. * g++.dg/cilk-plus/CK/stl_test.c: Delete. * g++.dg/cilk-plus/cilk-plus.exp * g++.dg/cilk-plus/ef_test.C: Delete. * g++.dg/cilk-plus/for.C: Delete. * g++.dg/cilk-plus/for2.C: Delete. * g++.dg/cilk-plus/for3.C: Delete. * g++.dg/cilk-plus/for4.C: Delete. * g++.dg/cilk-plus/pr60967.C: Delete. * g++.dg/cilk-plus/pr69028.C: Delete. * g++.dg/cilk-plus/pr70565.C: Delete. * g++.dg/pr57662.C: Delete. * gcc.dg/cilk-plus/cilk-plus.exp * gcc.dg/cilk-plus/for1.c: Delete. * gcc.dg/cilk-plus/for2.c: Delete. * gcc.dg/cilk-plus/jump-openmp.c: Delete. * gcc.dg/cilk-plus/jump.c: Delete. * gcc.dg/cilk-plus/pr69798-1.c: Delete. * gcc.dg/cilk-plus/pr69798-2.c: Delete. * gcc.dg/cilk-plus/pr78306.c: Delete. * gcc.dg/cilk-plus/pr79116.c: Delete. * gcc.dg/graphite/id-28.c: Delete. * lib/cilk-plus-dg.exp: Delete. * lib/target-supports.exp (cilkplus_runtime): Delete. Co-Authored-By: Sebastian Peryt <sebastian.peryt@intel.com> From-SVN: r255195
2017-11-14auto-profile.c (afdo_annotate_cfg): Use update_max_bb_count.Jan Hubicka
* auto-profile.c (afdo_annotate_cfg): Use update_max_bb_count. * cgraphunit.c (cgraph_node::expand_thunk): Use update_max_bb_count. * ipa-utils.c (ipa_merge_profiles): Use update_max_bb_count. * lto-streamer-in.c (input_function): Use update_max_bb_count. * omp-expand.c (expand_omp_taskreg): Use update_max_bb_count. * predict.c (maybe_hot_frequency_p): Inline to ... (maybe_hot_count_p): ... here; rewrite to counts. (counts_to_freqs): Rename to ... (update_max_bb_count): ... this one. (expensive_function_p): Use counts. (estimate_bb_frequencies): Update. (rebuild_frequencies): Update. * predict.h (counts_to_freqs): Rename to ... (update_max_bb_count): ... this one. * profile.c (compute_branch_probabilities): Add debug info * tree-inline.c (expand_call_inline): Update debug info. (optimize_inline_calls): Use update_max_bb_count.. (tree_function_versioning): Use update_max_bb_count.. * value-prof.c (gimple_value_profile_transformations): Do not use update_max_bb_count. From-SVN: r254725
2017-11-03asan.c (create_cond_insert_point): Maintain profile.Jan Hubicka
* asan.c (create_cond_insert_point): Maintain profile. * ipa-utils.c (ipa_merge_profiles): Be sure only IPA profiles are merged. * basic-block.h (struct basic_block_def): Remove frequency. (EDGE_FREQUENCY): Use to_frequency * bb-reorder.c (push_to_next_round_p): Use only IPA counts for global heuristics. (find_traces): Update to use to_frequency. (find_traces_1_round): Likewise; use only IPA counts. (bb_to_key): Likewise. (connect_traces): Use IPA counts only. (copy_bb_p): Update to use to_frequency. (fix_up_crossing_landing_pad): Likewise. (sanitize_hot_paths): Likewise. * bt-load.c (basic_block_freq): Likewise. * cfg.c (init_flow): Set count_max to uninitialized. (check_bb_profile): Remove frequencies; check counts. (dump_bb_info): Do not dump frequencies. (update_bb_profile_for_threading): Update counts only. (scale_bbs_frequencies_int): Likewise. (MAX_SAFE_MULTIPLIER): Remove. (scale_bbs_frequencies_gcov_type): Update counts only. (scale_bbs_frequencies_profile_count): Update counts only. (scale_bbs_frequencies): Update counts only. * cfg.h (struct control_flow_graph): Add count-max. (update_bb_profile_for_threading): Update prototype. * cfgbuild.c (find_bb_boundaries): Do not update frequencies. (find_many_sub_basic_blocks): Likewise. * cfgcleanup.c (try_forward_edges): Likewise. (try_crossjump_to_edge): Likewise. * cfgexpand.c (expand_gimple_cond): Likewise. (expand_gimple_tailcall): Likewise. (construct_init_block): Likewise. (construct_exit_block): Likewise. * cfghooks.c (verify_flow_info): Check consistency of counts. (dump_bb_for_graph): Do not dump frequencies. (split_block_1): Do not update frequencies. (split_edge): Do not update frequencies. (make_forwarder_block): Do not update frequencies. (duplicate_block): Do not update frequencies. (account_profile_record): Do not update frequencies. * cfgloop.c (find_subloop_latch_edge_by_profile): Use IPA counts for global heuristics. * cfgloopanal.c (average_num_loop_insns): Update to use to_frequency. (expected_loop_iterations_unbounded): Use counts only. * cfgloopmanip.c (scale_loop_profile): Simplify. (create_empty_loop_on_edge): Simplify (loopify): Simplify (duplicate_loop_to_header_edge): Simplify * cfgrtl.c (force_nonfallthru_and_redirect): Update profile. (update_br_prob_note): Take care of removing note when profile becomes undefined. (relink_block_chain): Do not dump frequency. (rtl_account_profile_record): Use to_frequency. * cgraph.c (symbol_table::create_edge): Convert count to ipa count. (cgraph_edge::redirect_call_stmt_to_calle): Conver tcount to ipa count. (cgraph_update_edges_for_call_stmt_node): Likewise. (cgraph_edge::verify_count_and_frequency): Update. (cgraph_node::verify_node): Temporarily disable frequency verification. * cgraphbuild.c (compute_call_stmt_bb_frequency): Use to_cgraph_frequency. (cgraph_edge::rebuild_edges): Convert to ipa counts. * cgraphunit.c (init_lowered_empty_function): Do not initialize frequencies. (cgraph_node::expand_thunk): Update profile. * except.c (dw2_build_landing_pads): Do not update frequency. * final.c (compute_alignments): Use to_frequency. (dump_basic_block_info): Do not dump frequency. * gimple-pretty-print.c (dump_profile): Do not dump frequency. (dump_gimple_bb_header): Do not dump frequency. * gimple-ssa-isolate-paths.c (isolate_path): Do not update frequency; do update count. * gimple-streamer-in.c (input_bb): Do not stream frequency. * gimple-streamer-out.c (output_bb): Do not stream frequency. * haifa-sched.c (sched_pressure_start_bb): Use to_freuqency. (init_before_recovery): Do not update frequency. (sched_create_recovery_edges): Do not update frequency. * hsa-gen.c (convert_switch_statements): Do not update frequency. * ipa-cp.c (ipcp_propagate_stage): Update search for max_count. (ipa_cp_c_finalize): Set max_count to uninitialized. * ipa-fnsummary.c (get_minimal_bb): Use counts. (param_change_prob): Use counts. * ipa-profile.c (ipa_profile_generate_summary): Do not summarize local profiles. * ipa-split.c (consider_split): Use to_frequency. (split_function): Use to_frequency. * ira-build.c (loop_compare_func): Likewise. (mark_loops_for_removal): Likewise. (mark_all_loops_for_removal): Likewise. * loop-doloop.c (doloop_modify): Do not update frequency. * loop-unroll.c (unroll_loop_runtime_iterations): Do not update frequency. * lto-streamer-in.c (input_function): Update count_max. * omp-expand.c (expand_omp_taskreg): Update count_max. * omp-simd-clone.c (simd_clone_adjust): Update profile. * predict.c (maybe_hot_frequency_p): Use to_frequency. (maybe_hot_count_p): Use ipa counts only. (maybe_hot_bb_p): Simplify. (maybe_hot_edge_p): Simplify. (probably_never_executed): Do not take frequency argument. (probably_never_executed_bb_p): Do not pass frequency. (probably_never_executed_edge_p): Likewise. (combine_predictions_for_bb): Check that profile is nonzero. (propagate_freq): Do not set frequency. (drop_profile): Simplify. (counts_to_freqs): Simplify. (expensive_function_p): Use to_frequency. (propagate_unlikely_bbs_forward): Simplify. (determine_unlikely_bbs): Simplify. (estimate_bb_frequencies): Add hack to silence graphite issues. (compute_function_frequency): Use ipa counts. (pass_profile::execute): Update. (rebuild_frequencies): Use counts only. (force_edge_cold): Use counts only. * profile-count.c (profile_count::dump): Dump new count types. (profile_count::differs_from_p): Check compatiblity. (profile_count::to_frequency): New function. (profile_count::to_cgraph_frequency): New function. * profile-count.h (struct function): Declare. (enum profile_quality): Add profile_guessed_local and profile_guessed_global0. (class profile_proability): Decrease number of bits to 29; update from_reg_br_prob_note and to_reg_br_prob_note. (class profile_count: Update comment; decrease number of bits to 61. Check compatibility. (profile_count::compatible_p): New private member function. (profile_count::ipa_p): New member function. (profile_count::operator<): Handle global zero correctly. (profile_count::operator>): Handle global zero correctly. (profile_count::operator<=): Handle global zero correctly. (profile_count::operator>=): Handle global zero correctly. (profile_count::nonzero_p): New member function. (profile_count::force_nonzero): New member function. (profile_count::max): New member function. (profile_count::apply_scale): Handle IPA scalling. (profile_count::guessed_local): New member function. (profile_count::global0): New member function. (profile_count::ipa): New member function. (profile_count::to_frequency): Declare. (profile_count::to_cgraph_frequency): Declare. * profile.c (OVERLAP_BASE): Delete. (compute_frequency_overlap): Delete. (compute_branch_probabilities): Do not use compute_frequency_overlap. * regs.h (REG_FREQ_FROM_BB): Use to_frequency. * sched-ebb.c (rank): Use counts only. * shrink-wrap.c (handle_simple_exit): Use counts only. (try_shrink_wrapping): Use counts only. (place_prologue_for_one_component): Use counts only. * tracer.c (find_best_predecessor): Use to_frequency. (find_trace): Use to_frequency. (tail_duplicate): Use to_frequency. * trans-mem.c (expand_transaction): Do not update frequency. * tree-call-cdce.c: Do not update frequency. * tree-cfg.c (gimple_find_sub_bbs): Likewise. (gimple_merge_blocks): Likewise. (gimple_split_edge): Likewise. (gimple_duplicate_sese_region): Likewise. (gimple_duplicate_sese_tail): Likewise. (move_sese_region_to_fn): Likewise. (gimple_account_profile_record): Likewise. (insert_cond_bb): Likewise. * tree-complex.c (expand_complex_div_wide): Likewise. * tree-eh.c (lower_resx): Update profile. * tree-inline.c (copy_bb): Simplify count scaling; do not scale frequencies. (initialize_cfun): Do not initialize frequencies (freqs_to_counts): Delete. (copy_cfg_body): Ignore count parameter. (copy_body): Update. (expand_call_inline): Update count_max. (optimize_inline_calls): Update count_max. (tree_function_versioning): Update count_max. * tree-ssa-coalesce.c (coalesce_cost_bb): Use to_frequency. * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Do not update frequency. * tree-ssa-loop-im.c (execute_sm_if_changed): Use counts only. * tree-ssa-loop-ivcanon.c (unloop_loops): Do not update freuqency. (try_peel_loop): Likewise. * tree-ssa-loop-ivopts.c (get_scaled_computation_cost_at): Use to_frequency. * tree-ssa-loop-manip.c (niter_for_unrolled_loop): Pass -1. (tree_transform_and_unroll_loop): Do not use frequencies * tree-ssa-loop-niter.c (estimate_numbers_of_iterations): Use reliable prediction only. * tree-ssa-loop-unswitch.c (hoist_guard): Do not use frequencies. * tree-ssa-sink.c (select_best_block): Use to_frequency. * tree-ssa-tail-merge.c (replace_block_by): Temporarily disable probability scaling. * tree-ssa-threadupdate.c (create_block_for_threading): Do not update frequency (any_remaining_duplicated_blocks): Likewise. (update_profile): Likewise. (estimated_freqs_path): Delete. (freqs_to_counts_path): Delete. (clear_counts_path): Delete. (ssa_fix_duplicate_block_edges): Likewise. (duplicate_thread_path): Likewise. * tree-switch-conversion.c (gen_inbound_check): Use counts. * tree-tailcall.c (decrease_profile): Do not update frequency. (eliminate_tail_call): Likewise. * tree-vect-loop-manip.c (vect_do_peeling): Likewise. * tree-vect-loop.c (scale_profile_for_vect_loop): Likewise. (optimize_mask_stores): Likewise. * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise. * ubsan.c (ubsan_expand_null_ifn): Update profile. (ubsan_expand_ptr_ifn): Update profile. * value-prof.c (gimple_ic): Simplify. * value-prof.h (gimple_ic): Update prototype. * ipa-inline-transform.c (inline_transform): Fix scaling conditoins. * ipa-inline.c (compute_uninlined_call_time): Be sure that counts are nonzero. (want_inline_self_recursive_call_p): Likewise. (resolve_noninline_speculation): Only cummulate defined counts. (inline_small_functions): Use nonzero_p. (ipa_inline): Do not access freed node. Unknown ChangeLog: 2017-11-02 Jan Hubicka <hubicka@ucw.cz> * testsuite/gcc.dg/no-strict-overflow-3.c (foo): Update magic value to not clash with frequency. * testsuite/gcc.dg/strict-overflow-3.c (foo): Likewise. * testsuite/gcc.dg/tree-ssa/builtin-sprintf-2.c: Update template. * testsuite/gcc.dg/tree-ssa/dump-2.c: Update template. * testsuite/gcc.dg/tree-ssa/ifc-10.c: Update template. * testsuite/gcc.dg/tree-ssa/ifc-11.c: Update template. * testsuite/gcc.dg/tree-ssa/ifc-12.c: Update template. * testsuite/gcc.dg/tree-ssa/ifc-20040816-1.c: Update template. * testsuite/gcc.dg/tree-ssa/ifc-20040816-2.c: Update template. * testsuite/gcc.dg/tree-ssa/ifc-5.c: Update template. * testsuite/gcc.dg/tree-ssa/ifc-8.c: Update template. * testsuite/gcc.dg/tree-ssa/ifc-9.c: Update template. * testsuite/gcc.dg/tree-ssa/ifc-cd.c: Update template. * testsuite/gcc.dg/tree-ssa/ifc-pr56541.c: Update template. * testsuite/gcc.dg/tree-ssa/ifc-pr68583.c: Update template. * testsuite/gcc.dg/tree-ssa/ifc-pr69489-1.c: Update template. * testsuite/gcc.dg/tree-ssa/ifc-pr69489-2.c: Update template. * testsuite/gcc.target/i386/pr61403.c: Update template. From-SVN: r254379
2017-10-02omp-expand.c (adjust_context_scope): New function.Kevin Buettner
* omp-expand.c (adjust_context_scope): New function. (expand_parallel_call): Call adjust_context_scope. From-SVN: r253335
2017-09-05re PR middle-end/81768 (error: control flow in the middle of basic block)Jakub Jelinek
PR middle-end/81768 * omp-expand.c (expand_omp_simd): Force second operands of COND_EXPR into gimple val before gimplification fo the COND_EXPR. * gcc.dg/gomp/pr81768-1.c: New test. From-SVN: r251741
2017-08-30[68/77] Use scalar_mode for is_int_mode/is_float_mode pairsRichard Sandiford
This patch uses scalar_mode for code that operates only on MODE_INT and MODE_FLOAT. 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org> Alan Hayward <alan.hayward@arm.com> David Sherwood <david.sherwood@arm.com> gcc/ * omp-expand.c (expand_omp_atomic): Use is_int_mode, is_float_mode and scalar_mode. * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Likewise. Co-Authored-By: Alan Hayward <alan.hayward@arm.com> Co-Authored-By: David Sherwood <david.sherwood@arm.com> From-SVN: r251519
2017-08-08trans.c: Include header files.Martin Liska
. 2017-08-08 Martin Liska <mliska@suse.cz> * gcc-interface/trans.c: Include header files. 2017-08-08 Martin Liska <mliska@suse.cz> * objc-gnu-runtime-abi-01.c: Include header files. * objc-next-runtime-abi-01.c: Likewise. * objc-next-runtime-abi-02.c: Likewise. 2017-08-08 Martin Liska <mliska@suse.cz> * asan.c: Include header files. * attribs.c (build_decl_attribute_variant): New function moved from tree.[ch]. (build_type_attribute_qual_variant): Likewise. (cmp_attrib_identifiers): Likewise. (simple_cst_list_equal): Likewise. (omp_declare_simd_clauses_equal): Likewise. (attribute_value_equal): Likewise. (comp_type_attributes): Likewise. (build_type_attribute_variant): Likewise. (lookup_ident_attribute): Likewise. (remove_attribute): Likewise. (merge_attributes): Likewise. (merge_type_attributes): Likewise. (merge_decl_attributes): Likewise. (merge_dllimport_decl_attributes): Likewise. (handle_dll_attribute): Likewise. (attribute_list_equal): Likewise. (attribute_list_contained): Likewise. * attribs.h (lookup_attribute): New function moved from tree.[ch]. (lookup_attribute_by_prefix): Likewise. * bb-reorder.c: Include header files. * builtins.c: Likewise. * calls.c: Likewise. * cfgexpand.c: Likewise. * cgraph.c: Likewise. * cgraphunit.c: Likewise. * convert.c: Likewise. * dwarf2out.c: Likewise. * final.c: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * gimple-expr.c: Likewise. * gimple-fold.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimplify.c: Likewise. * hsa-common.c: Likewise. * hsa-gen.c: Likewise. * internal-fn.c: Likewise. * ipa-chkp.c: Likewise. * ipa-cp.c: Likewise. * ipa-devirt.c: Likewise. * ipa-fnsummary.c: Likewise. * ipa-inline.c: Likewise. * ipa-visibility.c: Likewise. * ipa.c: Likewise. * lto-cgraph.c: Likewise. * omp-expand.c: Likewise. * omp-general.c: Likewise. * omp-low.c: Likewise. * omp-offload.c: Likewise. * omp-simd-clone.c: Likewise. * opts-global.c: Likewise. * passes.c: Likewise. * predict.c: Likewise. * sancov.c: Likewise. * sanopt.c: Likewise. * symtab.c: Likewise. * toplev.c: Likewise. * trans-mem.c: Likewise. * tree-chkp.c: Likewise. * tree-eh.c: Likewise. * tree-into-ssa.c: Likewise. * tree-object-size.c: Likewise. * tree-parloops.c: Likewise. * tree-profile.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa.c: Likewise. * tree-streamer-in.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vrp.c: Likewise. * tsan.c: Likewise. * ubsan.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * tree.c: Remove functions moved to attribs.[ch]. * tree.h: Likewise. * config/aarch64/aarch64.c: Add attrs.h header file. * config/alpha/alpha.c: Likewise. * config/arc/arc.c: Likewise. * config/arm/arm.c: Likewise. * config/avr/avr.c: Likewise. * config/bfin/bfin.c: Likewise. * config/c6x/c6x.c: Likewise. * config/cr16/cr16.c: Likewise. * config/cris/cris.c: Likewise. * config/darwin.c: Likewise. * config/epiphany/epiphany.c: Likewise. * config/fr30/fr30.c: Likewise. * config/frv/frv.c: Likewise. * config/ft32/ft32.c: Likewise. * config/h8300/h8300.c: Likewise. * config/i386/winnt.c: Likewise. * config/ia64/ia64.c: Likewise. * config/iq2000/iq2000.c: Likewise. * config/lm32/lm32.c: Likewise. * config/m32c/m32c.c: Likewise. * config/m32r/m32r.c: Likewise. * config/m68k/m68k.c: Likewise. * config/mcore/mcore.c: Likewise. * config/microblaze/microblaze.c: Likewise. * config/mips/mips.c: Likewise. * config/mmix/mmix.c: Likewise. * config/mn10300/mn10300.c: Likewise. * config/moxie/moxie.c: Likewise. * config/msp430/msp430.c: Likewise. * config/nds32/nds32-isr.c: Likewise. * config/nds32/nds32.c: Likewise. * config/nios2/nios2.c: Likewise. * config/nvptx/nvptx.c: Likewise. * config/pa/pa.c: Likewise. * config/pdp11/pdp11.c: Likewise. * config/powerpcspe/powerpcspe.c: Likewise. * config/riscv/riscv.c: Likewise. * config/rl78/rl78.c: Likewise. * config/rx/rx.c: Likewise. * config/s390/s390.c: Likewise. * config/sh/sh.c: Likewise. * config/sol2.c: Likewise. * config/sparc/sparc.c: Likewise. * config/spu/spu.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/tilegx/tilegx.c: Likewise. * config/tilepro/tilepro.c: Likewise. * config/v850/v850.c: Likewise. * config/vax/vax.c: Likewise. * config/visium/visium.c: Likewise. * config/xtensa/xtensa.c: Likewise. 2017-08-08 Martin Liska <mliska@suse.cz> * call.c: Include header files. * cp-gimplify.c: Likewise. * cp-ubsan.c: Likewise. * cvt.c: Likewise. * init.c: Likewise. * search.c: Likewise. * semantics.c: Likewise. * typeck.c: Likewise. 2017-08-08 Martin Liska <mliska@suse.cz> * lto-lang.c: Include header files. * lto-symtab.c: Likewise. 2017-08-08 Martin Liska <mliska@suse.cz> * c-convert.c: Include header files. * c-typeck.c: Likewise. 2017-08-08 Martin Liska <mliska@suse.cz> * c-ada-spec.c: Include header files. * c-ubsan.c: Likewise. * c-warn.c: Likewise. 2017-08-08 Martin Liska <mliska@suse.cz> * trans-types.c: Include header files. From-SVN: r250946
2017-08-07Fix diff_type in expand_oacc_for char iter_typeTom de Vries
2017-08-07 Tom de Vries <tom@codesourcery.com> PR middle-end/78266 * omp-expand.c (expand_oacc_for): Ensure diff_type is large enough. * testsuite/libgomp.oacc-c-c++-common/vprop-2.c: New test. * testsuite/libgomp.oacc-c-c++-common/vprop.c: Remove xfail. From-SVN: r250925
2017-08-06Add missing edge probabilities in expand_oacc_for, tile caseTom de Vries
;; basic block 11, loop depth 2, freq 0, maybe hot ;; prev block 22, next block 23, flags: (NEW, REACHABLE) ;; pred: 22 (TRUE_VALUE) ;; 24 (TRUE_VALUE) ... if (.e_offset.15D.1971 < .e_bound.14D.1972) - goto <bb 23>; [100.00%] [count: INV] + goto <bb 23>; [80.01%] [count: INV] else - goto <bb 24>; [INV] [count: INV] + goto <bb 24>; [19.99%] [count: INV] ;; basic block 23, loop depth 3, freq 0, maybe hot ;; prev block 11, next block 24, flags: (NEW) ;; pred: 11 [always] (TRUE_VALUE) ;; 23 (TRUE_VALUE) ixD.1974 = .outer.4D.1967 + .e_offset.15D.1971; .e_offset.15D.1971 = .e_offset.15D.1971 + .e_step.16D.1973; if (.e_offset.15D.1971 < .e_bound.14D.1972) - goto <bb 23>; [INV] [count: INV] + goto <bb 23>; [80.01%] [count: INV] else - goto <bb 24>; [100.00%] [count: INV] + goto <bb 24>; [19.99%] [count: INV] 2017-08-06 Tom de Vries <tom@codesourcery.com> * omp-expand.c (expand_oacc_for): Add missing edge probability for tile and element loops. From-SVN: r250900
2017-08-06Add missing edge probability in expand_oacc_forTom de Vries
;; basic block 10, loop depth 1, freq 0, maybe hot ;; prev block 9, next block 19, flags: (NEW, REACHABLE) ;; pred: 18 (FALSE_VALUE) ;; 9 (FALSE_VALUE) GIMPLE_NOP .chunk_no.7D.1948 = .chunk_no.7D.1948 + 1; if (.chunk_no.7D.1948 < .chunk_max.6D.1949) - goto <bb 18>; [INV] [count: INV] + goto <bb 18>; [80.01%] [count: INV] else - goto <bb 19>; [100.00%] [count: INV] + goto <bb 19>; [19.99%] [count: INV] 2017-08-06 Tom de Vries <tom@codesourcery.com> * omp-expand.c (expand_oacc_for): Add missing edge probability for chunk loop. From-SVN: r250899
2017-08-01Remove flag_tree_vectorizeJames Greenhalgh
gcc/ * common.opt (ftree-vectorize): No longer set flag_tree_vectorize. (ftree-loop-vectorize): Set as EnabledBy ftree-vectorize. (ftree-slp-vectorize): Likewise. * omp-expand (expand_omp_simd): Remove flag_tree_vectorize, as it can no longer be set independent of flag_tree_loop_vectorize. * omp-general.c (emp_max_vf): Likewise. * opts.c (enable_fdo_optimizations): Remove references to flag_tree_vectorize, these are now implicit. (common_handle_option): Remove handling for OPT_ftree_vectorize, and leave it for the options machinery. From-SVN: r250774