GCC Middle and Back End API Reference
omp_context Struct Reference
Collaboration diagram for omp_context:

Data Fields

copy_body_data cb
struct omp_contextouter
gimplestmt
splay_tree field_map
tree record_type
tree sender_decl
tree receiver_decl
splay_tree sfield_map
tree srecord_type
tree block_vars
tree cancel_label
gimplesimt_stmt
vec< treetask_reductions
hash_map< tree, unsigned > * task_reduction_map
hash_map< tree, tree > * lastprivate_conditional_map
hash_map< tree, tree > * allocate_map
tree local_reduction_clauses
tree outer_reduction_clauses
int depth
bool is_nested
bool cancellable
bool combined_into_simd_safelen1
bool scan_inclusive
bool scan_exclusive
bool for_simd_scan_phase
bool order_concurrent
bool loop_p
bool teams_nested_p
bool nonteams_nested_p
vec< treeoacc_privatization_candidates

Detailed Description

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-2025 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.

Field Documentation

◆ allocate_map

◆ block_vars

◆ cancel_label

tree omp_context::cancel_label

◆ cancellable

◆ cb

◆ combined_into_simd_safelen1

bool omp_context::combined_into_simd_safelen1

◆ depth

int omp_context::depth

Referenced by new_omp_context().

◆ field_map

◆ for_simd_scan_phase

◆ is_nested

◆ lastprivate_conditional_map

◆ local_reduction_clauses

tree omp_context::local_reduction_clauses

◆ loop_p

◆ nonteams_nested_p

bool omp_context::nonteams_nested_p

◆ oacc_privatization_candidates

◆ order_concurrent

bool omp_context::order_concurrent

◆ outer

◆ outer_reduction_clauses

tree omp_context::outer_reduction_clauses

Referenced by scan_omp_for().

◆ receiver_decl

◆ record_type

◆ scan_exclusive

◆ scan_inclusive

◆ sender_decl

◆ sfield_map

◆ simt_stmt

gimple* omp_context::simt_stmt

Referenced by lower_omp_for(), and scan_omp_simd().

◆ srecord_type

◆ stmt

◆ task_reduction_map

hash_map<tree, unsigned>* omp_context::task_reduction_map

◆ task_reductions

vec<tree> omp_context::task_reductions

◆ teams_nested_p

bool omp_context::teams_nested_p

The documentation for this struct was generated from the following file: