GCC Middle and Back End API Reference
|
Lowering pass for OMP directives. Converts OMP directives into explicit calls to the runtime library (libgomp), data marshalling to implement data sharing and copying clauses, offloading to accelerators, and more. Contributed by Diego Novillo <dnovillo@redhat.com> Copyright (C) 2005-2024 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>.
Lowering of OMP parallel and workshare constructs proceeds in two phases. The first phase scans the function looking for OMP statements and then for variables that must be replaced to satisfy data sharing clauses. The second phase expands code for the constructs, as well as re-gimplifying things when variables have been replaced with complex expressions. Final code generation is done by pass_expand_omp. The flowgraph is scanned for regions which are then moved to a new function, to be invoked by the thread library, or offloaded.
Context structure. Used to store information about each parallel directive in the code.
tree omp_context::block_vars |
tree omp_context::cancel_label |
Referenced by lower_omp_1(), lower_omp_for(), lower_omp_sections(), and lower_omp_taskreg().
bool omp_context::cancellable |
Referenced by check_omp_nesting_restrictions(), lower_omp_1(), lower_omp_for(), lower_omp_sections(), and lower_omp_taskreg().
copy_body_data omp_context::cb |
Referenced by add_taskreg_looptemp_clauses(), create_omp_child_function(), create_task_copyfn(), delete_omp_context(), fixup_child_record_type(), fixup_remapped_decl(), install_var_local(), lookup_decl(), lower_omp_for(), lower_omp_target(), lower_omp_task_reductions(), lower_omp_taskreg(), lower_rec_input_clauses(), lower_rec_simd_input_clauses(), maybe_lookup_decl(), new_omp_context(), omp_copy_decl(), scan_omp_1_op(), scan_omp_1_stmt(), scan_omp_parallel(), scan_omp_target(), scan_omp_task(), scan_omp_teams(), and scan_sharing_clauses().
bool omp_context::combined_into_simd_safelen1 |
Referenced by lower_lastprivate_clauses(), and lower_rec_input_clauses().
int omp_context::depth |
Referenced by new_omp_context().
splay_tree omp_context::field_map |
Referenced by build_outer_var_ref(), create_task_copyfn(), delete_omp_context(), fixup_child_record_type(), install_var_field(), lookup_field(), lookup_sfield(), lower_omp_target(), lower_rec_input_clauses(), maybe_lookup_field(), scan_omp_parallel(), scan_omp_single(), scan_omp_target(), scan_omp_task(), scan_omp_teams(), and scan_sharing_clauses().
bool omp_context::for_simd_scan_phase |
Referenced by lower_omp_scan(), lower_rec_input_clauses(), lower_rec_simd_input_clauses(), and scan_omp_simd_scan().
bool omp_context::is_nested |
Referenced by lookup_decl_in_outer_ctx(), scan_omp_parallel(), scan_omp_task(), and use_pointer_for_field().
tree omp_context::local_reduction_clauses |
Referenced by scan_omp_for(), and scan_sharing_clauses().
bool omp_context::loop_p |
Referenced by build_outer_var_ref(), check_omp_nesting_restrictions(), scan_omp_1_stmt(), and scan_sharing_clauses().
bool omp_context::nonteams_nested_p |
Referenced by check_omp_nesting_restrictions(), and scan_omp_target().
bool omp_context::order_concurrent |
Referenced by check_omp_nesting_restrictions(), scan_omp_1_stmt(), and scan_sharing_clauses().
struct omp_context* omp_context::outer |
Referenced by build_outer_var_ref(), check_oacc_kernel_gwv(), check_omp_nesting_restrictions(), ctx_in_oacc_kernels_region(), enclosing_target_ctx(), lookup_decl_in_outer_ctx(), lower_lastprivate_clauses(), lower_oacc_reductions(), lower_omp_1(), lower_omp_critical(), lower_omp_for(), lower_omp_for_lastprivate(), lower_omp_for_scan(), lower_omp_ordered_clauses(), lower_omp_scan(), lower_omp_target(), lower_omp_task_reductions(), lower_rec_input_clauses(), lower_send_clauses(), maybe_add_implicit_barrier_cancel(), maybe_lookup_decl_in_outer_ctx(), new_omp_context(), omp_copy_decl(), omp_maybe_offloaded_ctx(), scan_omp_1_stmt(), scan_omp_for(), scan_sharing_clauses(), and use_pointer_for_field().
tree omp_context::outer_reduction_clauses |
Referenced by scan_omp_for().
tree omp_context::receiver_decl |
tree omp_context::record_type |
Referenced by create_task_copyfn(), delete_omp_context(), finish_taskreg_scan(), fixup_child_record_type(), install_var_field(), lower_omp_scope(), lower_omp_single(), lower_omp_single_copy(), lower_omp_target(), lower_omp_taskreg(), lower_send_shared_vars(), scan_omp_parallel(), scan_omp_single(), scan_omp_target(), scan_omp_task(), scan_omp_teams(), and scan_sharing_clauses().
bool omp_context::scan_exclusive |
bool omp_context::scan_inclusive |
tree omp_context::sender_decl |
splay_tree omp_context::sfield_map |
Referenced by create_task_copyfn(), delete_omp_context(), install_var_field(), lookup_sfield(), and task_copyfn_copy_decl().
gimple* omp_context::simt_stmt |
Referenced by lower_omp_for(), and scan_omp_simd().
tree omp_context::srecord_type |
gimple* omp_context::stmt |
Referenced by build_outer_var_ref(), check_oacc_kernel_gwv(), check_omp_nesting_restrictions(), create_omp_child_function(), ctx_in_oacc_kernels_region(), enclosing_target_ctx(), finish_taskreg_scan(), fixup_child_record_type(), install_var_field(), is_host_teams_ctx(), is_oacc_kernels(), is_oacc_kernels_decomposed_part(), is_oacc_parallel_or_serial(), is_omp_target(), is_parallel_ctx(), is_task_ctx(), is_taskloop_ctx(), lower_lastprivate_clauses(), lower_lastprivate_conditional_clauses(), lower_oacc_reductions(), lower_omp_1(), lower_omp_critical(), lower_omp_for(), lower_omp_for_lastprivate(), lower_omp_ordered_clauses(), lower_omp_scan(), lower_omp_target(), lower_omp_task_reductions(), lower_omp_taskreg(), lower_rec_input_clauses(), lower_rec_simd_input_clauses(), lower_reduction_clauses(), lower_send_clauses(), new_omp_context(), oacc_privatization_scan_decl_chain(), omp_maybe_offloaded_ctx(), scan_omp_1_stmt(), scan_omp_for(), scan_omp_simd(), scan_omp_simd_scan(), scan_sharing_clauses(), task_copyfn_remap_type(), and use_pointer_for_field().
Referenced by delete_omp_context(), lower_omp_task_reductions(), and lower_rec_input_clauses().
Referenced by delete_omp_context(), lower_omp_task_reductions(), and lower_rec_input_clauses().
bool omp_context::teams_nested_p |
Referenced by check_omp_nesting_restrictions(), and scan_omp_target().