GCC Middle and Back End API Reference
omp-general.cc File Reference
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "backend.h"
#include "target.h"
#include "tree.h"
#include "gimple.h"
#include "ssa.h"
#include "diagnostic-core.h"
#include "fold-const.h"
#include "langhooks.h"
#include "omp-general.h"
#include "stringpool.h"
#include "attribs.h"
#include "gimplify.h"
#include "cgraph.h"
#include "alloc-pool.h"
#include "symbol-summary.h"
#include "tree-pass.h"
#include "omp-device-properties.h"
#include "tree-iterator.h"
#include "data-streamer.h"
#include "streamer-hooks.h"
#include "opts.h"
#include "tree-pretty-print.h"
Include dependency graph for omp-general.cc:

Namespaces

namespace  omp_addr_tokenizer
 

Functions

tree omp_find_clause (tree clauses, enum omp_clause_code kind)
 
bool omp_is_allocatable_or_ptr (tree decl)
 
tree omp_check_optional_argument (tree decl, bool for_present_check)
 
bool omp_mappable_type (tree type)
 
bool omp_privatize_by_reference (tree decl)
 
void omp_adjust_for_condition (location_t loc, enum tree_code *cond_code, tree *n2, tree v, tree step)
 
tree omp_get_for_step_from_incr (location_t loc, tree incr)
 
void omp_extract_for_data (gomp_for *for_stmt, struct omp_for_data *fd, struct omp_for_data_loop *loops)
 
gimpleomp_build_barrier (tree lhs)
 
tree find_combined_omp_for (tree *tp, int *walk_subtrees, void *data)
 
poly_uint64 omp_max_vf (bool offload)
 
int omp_max_simt_vf (void)
 
static bool omp_offload_device_kind_arch_isa (const char *props, const char *prop)
 
static bool omp_maybe_offloaded (tree construct_context)
 
const char * omp_context_name_list_prop (tree prop)
 
static tree expr_uses_parm_decl (tree *tp, int *walk_subtrees, void *data)
 
tree omp_check_context_selector (location_t loc, tree ctx, bool metadirective_p)
 
static int omp_context_selector_set_compare (enum omp_tss_code, tree, tree)
 
static int omp_construct_simd_compare (tree, tree, bool)
 
void omp_mark_declare_variant (location_t loc, tree variant, tree construct)
 
tree make_trait_set_selector (enum omp_tss_code code, tree selectors, tree chain)
 
tree make_trait_selector (enum omp_ts_code code, tree score, tree properties, tree chain)
 
tree make_trait_property (tree name, tree value, tree chain)
 
tree make_omp_metadirective_variant (tree selector, tree directive, tree body)
 
static bool omp_construct_traits_match (tree selector_traits, tree context_traits, score_wide_int *score)
 
int omp_context_selector_matches (tree ctx, tree construct_context, bool complete_p)
 
static bool omp_target_device_matches_on_host (enum omp_ts_code selector, tree properties)
 
tree resolve_omp_target_device_matches (tree node)
 
static int omp_context_selector_props_compare (enum omp_tss_code set, enum omp_ts_code sel, tree ctx1, tree ctx2)
 
static int omp_context_selector_compare (tree ctx1, tree ctx2)
 
tree omp_get_context_selector (tree ctx, enum omp_tss_code set, enum omp_ts_code sel)
 
tree omp_get_context_selector_list (tree ctx, enum omp_tss_code set)
 
enum omp_tss_code omp_lookup_tss_code (const char *s)
 
enum omp_ts_code omp_lookup_ts_code (enum omp_tss_code set, const char *s)
 
static bool omp_selector_is_dynamic (tree ctx)
 
static tree omp_device_num_check (tree *device_num, bool *is_host)
 
tree omp_dynamic_cond (tree ctx, tree supercontext)
 
static void omp_context_compute_score (struct omp_variant *variant, tree construct_context, bool complete_p)
 
static tree omp_complete_construct_context (tree construct_context, bool *completep)
 
static int sort_variant (const void *a, const void *b, void *)
 
vec< struct omp_variantomp_get_dynamic_candidates (vec< struct omp_variant > &all_variants, tree construct_context)
 
vec< struct omp_variantomp_declare_variant_candidates (tree base, tree construct_context)
 
vec< struct omp_variantomp_metadirective_candidates (tree metadirective, tree construct_context)
 
vec< struct omp_variantomp_early_resolve_metadirective (tree metadirective)
 
vec< struct omp_variantomp_resolve_variant_construct (tree construct_context, tree selectors)
 
tree oacc_launch_pack (unsigned code, tree device, unsigned op)
 
tree oacc_replace_fn_attrib_attr (tree attribs, tree dims)
 
void oacc_replace_fn_attrib (tree fn, tree dims)
 
void oacc_set_fn_attrib (tree fn, tree clauses, vec< tree > *args)
 
int oacc_verify_routine_clauses (tree fndecl, tree *clauses, location_t loc, const char *routine_str)
 
tree oacc_build_routine_dims (tree clauses)
 
tree oacc_get_fn_attrib (tree fn)
 
bool offloading_function_p (tree fn)
 
int oacc_get_fn_dim_size (tree fn, int axis)
 
int oacc_get_ifn_dim_arg (const gimple *stmt)
 
tree omp_build_component_ref (tree obj, tree field)
 
bool omp_runtime_api_procname (const char *name)
 
bool omp_runtime_api_call (const_tree fndecl)
 
char omp_get_fr_id_from_name (const char *str)
 
const char * omp_get_name_from_fr_id (int fr_id)
 
static bool omp_addr_tokenizer::omp_parse_component_selector (tree *expr0)
 
static bool omp_addr_tokenizer::omp_parse_ref (tree *expr0)
 
static bool omp_addr_tokenizer::omp_parse_pointer (tree *expr0, bool *has_offset)
 
static bool omp_addr_tokenizer::omp_parse_access_method (tree *expr0, enum access_method_kinds *kind)
 
static bool omp_addr_tokenizer::omp_parse_access_methods (vec< omp_addr_token * > &addr_tokens, tree *expr0)
 
static bool omp_addr_tokenizer::omp_parse_structured_expr (vec< omp_addr_token * > &, tree *)
 
static bool omp_addr_tokenizer::omp_parse_structure_base (vec< omp_addr_token * > &addr_tokens, tree *expr0, structure_base_kinds *kind, vec< omp_addr_token * > &base_access_tokens, bool allow_structured=true)
 
static bool omp_addr_tokenizer::omp_parse_array_expr (vec< omp_addr_token * > &addr_tokens, tree *expr0)
 
bool omp_addr_tokenizer::omp_access_chain_p (vec< omp_addr_token * > &addr_tokens, unsigned i)
 
tree omp_addr_tokenizer::omp_accessed_addr (vec< omp_addr_token * > &addr_tokens, unsigned i, tree expr)
 
bool omp_parse_expr (vec< omp_addr_token * > &addr_tokens, tree expr)
 
DEBUG_FUNCTION void debug_omp_tokenized_addr (vec< omp_addr_token * > &addr_tokens, bool with_exprs)
 
tree omp_loop_number_of_iterations (tree for_stmt, int i, tree *pstep)
 
static void omp_apply_tile (tree for_stmt, tree sizes, int size)
 
static tree find_nested_loop_xform (tree *tp, int *walk_subtrees, void *data)
 
void omp_maybe_apply_loop_xforms (tree *expr_p, tree for_clauses)
 

Variables

enum omp_requires omp_requires_mask
 
const char * omp_tss_map []
 
static const char *const kind_properties []
 
static const char *const vendor_properties []
 
static const char *const extension_properties []
 
static const char *const atomic_default_mem_order_properties []
 
struct omp_ts_info omp_ts_map []
 
static const char * omp_interop_fr_str []
 

Function Documentation

◆ debug_omp_tokenized_addr()

◆ expr_uses_parm_decl()

static tree expr_uses_parm_decl ( tree * tp,
int * walk_subtrees,
void * data )
static
Helper function called via walk_tree, to determine if *TP is a
PARM_DECL.   

References NULL_TREE, and TREE_CODE.

Referenced by omp_check_context_selector().

◆ find_combined_omp_for()

tree find_combined_omp_for ( tree * tp,
int * walk_subtrees,
void * data )
Find OMP_FOR resp. OMP_SIMD with non-NULL OMP_FOR_INIT.  Also, fill in pdata
array, pdata[0] non-NULL if there is anything non-trivial in between,
pdata[1] is address of OMP_PARALLEL in between if any, pdata[2] is address
of OMP_FOR in between if any and pdata[3] is address of the inner
OMP_FOR/OMP_SIMD.   

References BIND_EXPR_BLOCK, BIND_EXPR_VARS, BLOCK_VARS, NULL_TREE, OMP_FOR_INIT, TREE_CODE, tsi_one_before_end_p(), and tsi_start().

Referenced by gimplify_omp_for().

◆ find_nested_loop_xform()

static tree find_nested_loop_xform ( tree * tp,
int * walk_subtrees,
void * data )
static
Callback for walk_tree to find nested loop transforming construct.   

References BIND_EXPR_BLOCK, BIND_EXPR_VARS, BLOCK_VARS, NULL, TREE_CODE, tsi_one_before_end_p(), and tsi_start().

Referenced by omp_maybe_apply_loop_xforms().

◆ make_omp_metadirective_variant()

tree make_omp_metadirective_variant ( tree selector,
tree directive,
tree body )
Constructor for metadirective variants.   

References build_tree_list().

◆ make_trait_property()

tree make_trait_property ( tree name,
tree value,
tree chain )

References omp_ts_info::name, and tree_cons().

◆ make_trait_selector()

tree make_trait_selector ( enum omp_ts_code code,
tree score,
tree properties,
tree chain )

◆ make_trait_set_selector()

tree make_trait_set_selector ( enum omp_tss_code code,
tree selectors,
tree chain )
Constructors for context selectors.   

References build_int_cst(), integer_type_node, and tree_cons().

◆ oacc_build_routine_dims()

tree oacc_build_routine_dims ( tree clauses)
Process the OpenACC 'routine' directive clauses to generate an attribute
for the level of parallelism.  All dimensions have a size of zero
(dynamic).  TREE_PURPOSE is set to indicate whether that dimension
can have a loop partitioned on it.  non-zero indicates
yes, zero indicates no.  By construction once a non-zero has been
reached, further inner dimensions must also be non-zero.  We set
TREE_VALUE to zero for the dimensions that may be partitioned and
1 for the other ones -- if a loop is (erroneously) spawned at
an outer level, we don't want to try and partition it.   

References boolean_type_node, build_int_cst(), gcc_checking_assert, integer_type_node, NULL_TREE, OMP_CLAUSE_CHAIN, OMP_CLAUSE_CODE, OMP_CLAUSE_GANG, OMP_CLAUSE_SEQ, OMP_CLAUSE_VECTOR, OMP_CLAUSE_WORKER, and tree_cons().

◆ oacc_get_fn_attrib()

◆ oacc_get_fn_dim_size()

int oacc_get_fn_dim_size ( tree fn,
int axis )
Extract an oacc execution dimension from FN.  FN must be an
offloaded function or routine that has already had its execution
dimensions lowered to the target-specific values.   

References gcc_assert, oacc_get_fn_attrib(), TREE_CHAIN, TREE_INT_CST_LOW, and TREE_VALUE.

Referenced by execute_oacc_device_lower(), execute_omp_oacc_neuter_broadcast(), fold_internal_goacc_dim(), and cfn_goacc_dim::fold_range().

◆ oacc_get_ifn_dim_arg()

int oacc_get_ifn_dim_arg ( const gimple * stmt)
Extract the dimension axis from an IFN_GOACC_DIM_POS or
IFN_GOACC_DIM_SIZE call.   

References gcc_checking_assert, gimple_call_arg(), gimple_call_internal_fn(), and TREE_INT_CST_LOW.

Referenced by fold_internal_goacc_dim(), and gimple_range_op_handler::maybe_builtin_call().

◆ oacc_launch_pack()

tree oacc_launch_pack ( unsigned code,
tree device,
unsigned op )
Encode an oacc launch argument.  This matches the GOMP_LAUNCH_PACK
macro on gomp-constants.h.  We do not check for overflow.   

References build_int_cst(), fold_build2, and unsigned_type_node.

Referenced by expand_omp_target(), and oacc_set_fn_attrib().

◆ oacc_replace_fn_attrib()

void oacc_replace_fn_attrib ( tree fn,
tree dims )
Replace any existing oacc fn attribute on FN with updated
dimensions.   

References DECL_ATTRIBUTES, and oacc_replace_fn_attrib_attr().

Referenced by expand_omp_target(), oacc_set_fn_attrib(), and oacc_validate_dims().

◆ oacc_replace_fn_attrib_attr()

tree oacc_replace_fn_attrib_attr ( tree attribs,
tree dims )
Openacc compute grid dimension clauses are converted to an attribute
attached to the function.  This permits the target-side code to (a) massage
the dimensions, (b) emit that data and (c) optimize.  Non-constant
dimensions are pushed onto ARGS.

The attribute value is a TREE_LIST.  A set of dimensions is
represented as a list of INTEGER_CST.  Those that are runtime
exprs are represented as an INTEGER_CST of zero.

TODO: Normally the attribute will just contain a single such list.  If
however it contains a list of lists, this will represent the use of
device_type.  Each member of the outer list is an assoc list of
dimensions, keyed by the device type.  The first entry will be the
default.  Well, that's the plan.   
Replace any existing oacc fn attribute in ATTRIBS with updated
dimensions.   

References get_identifier(), OACC_FN_ATTRIB, TREE_CHAIN, tree_cons(), and TREE_PURPOSE.

Referenced by oacc_replace_fn_attrib().

◆ oacc_set_fn_attrib()

void oacc_set_fn_attrib ( tree fn,
tree clauses,
vec< tree > * args )
Scan CLAUSES for launch dimensions and attach them to the oacc
function attribute.  Push any that are non-constant onto the ARGS
list, along with an appropriate GOMP_LAUNCH_DIM tag.   

References integer_zero_node, NULL_TREE, oacc_launch_pack(), oacc_replace_fn_attrib(), OMP_CLAUSE_EXPR, OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS, OMP_CLAUSE_VECTOR_LENGTH, omp_find_clause(), TREE_CODE, and tree_cons().

Referenced by execute_oacc_loop_designation(), and expand_omp_target().

◆ oacc_verify_routine_clauses()

int oacc_verify_routine_clauses ( tree fndecl,
tree * clauses,
location_t loc,
const char * routine_str )
Verify OpenACC routine clauses.

Returns 0 if FNDECL should be marked with an OpenACC 'routine' directive, 1
if it has already been marked in compatible way, and -1 if incompatible.
Upon returning, the chain of clauses will contain exactly one clause
specifying the level of parallelism.   

References build_omp_clause(), DECL_ATTRIBUTES, error_at(), gcc_checking_assert, gcc_unreachable, inform(), lookup_attribute(), NULL_TREE, OMP_CLAUSE_CHAIN, OMP_CLAUSE_CODE, omp_clause_code_name, OMP_CLAUSE_GANG, OMP_CLAUSE_LOCATION, OMP_CLAUSE_NOHOST, OMP_CLAUSE_SEQ, OMP_CLAUSE_VECTOR, OMP_CLAUSE_WORKER, and TREE_VALUE.

◆ offloading_function_p()

bool offloading_function_p ( tree fn)
Return true if FN is an OpenMP or OpenACC offloading function.   

References DECL_ATTRIBUTES, and lookup_attribute().

Referenced by tree_switch_conversion::switch_conversion::build_one_array().

◆ omp_adjust_for_condition()

void omp_adjust_for_condition ( location_t loc,
enum tree_code * cond_code,
tree * n2,
tree v,
tree step )

◆ omp_apply_tile()

static void omp_apply_tile ( tree for_stmt,
tree sizes,
int size )
static
Tile transformation:
 Original loop:

#pragma omp tile sizes(16, 32)
for (i = 0; i < k; ++i)
  for (j = 0; j < 128; j += 2)
    {
      baz (i, j);
    }

 Transformed loop:
#pragma omp tile sizes(16, 32)
for (i.0 = 0; i.0 < k; i.0 += 16)
  for (j.0 = 0; j.0 < 128; j.0 += 64)
    {
      i = i.0;
      i.1 = MIN_EXPR <i.0 + 16, k>;
      goto <D.2783>;
      <D.2782>:;
      j = j.0;
      j.1 = j.0 + 32;
      goto <D.2786>;
      <D.2785>:;
      {
        baz (i, j);
      }
      j += 2;
      <D.2786>:;
      if (j < j.1) goto <D.2785>; else goto <D.2787>;
      <D.2787>:;
      ++i;
      <D.2783>:;
      if (i < i.1) goto <D.2782>; else goto <D.2784>;
      <D.2784>:;
    }

 where the grid loops have canonical form, but the inner
 loops don't and so are immediately lowered.   

References annot_expr_unroll_kind, append_to_statement_list(), boolean_type_node, build1(), build2(), build3(), build4(), build_int_cst(), build_minus_one_cst(), build_one_cst(), create_artificial_label(), create_tmp_var_raw(), current_function_decl, DECL_CONTEXT, end(), error_at(), EXPR_LOCATION, fold_build2, fold_convert, wide_int_storage::from(), gcc_assert, gcc_unreachable, wide_int_storage::get_precision(), i, integer_type_node, make_tree_vec(), wi::multiple_of_p(), NULL_TREE, omp_adjust_for_condition(), OMP_FOR_BODY, OMP_FOR_COND, OMP_FOR_INCR, OMP_FOR_INIT, OMP_FOR_NON_RECTANGULAR, OMP_FOR_ORIG_DECLS, OMP_FOR_PRE_BODY, omp_loop_number_of_iterations(), POINTER_TYPE_P, save_expr(), size_int, sizetype, wi::to_wide(), TREE_CHAIN, TREE_CODE, TREE_OPERAND, TREE_PRIVATE, TREE_SET_CODE, TREE_SIDE_EFFECTS, tree_to_uhwi(), TREE_TYPE, TREE_VALUE, TREE_VEC_ELT, TREE_VEC_LENGTH, TYPE_SIGN, UNKNOWN_LOCATION, and void_type_node.

Referenced by omp_maybe_apply_loop_xforms().

◆ omp_build_barrier()

◆ omp_build_component_ref()

tree omp_build_component_ref ( tree obj,
tree field )
Build COMPONENT_REF and set TREE_THIS_VOLATILE and TREE_READONLY on it
as appropriate.   

References build3(), NULL, TREE_READONLY, TREE_THIS_VOLATILE, and TREE_TYPE.

Referenced by build_outer_var_ref(), build_receiver_ref(), build_receiver_ref(), build_sender_ref(), build_sender_ref(), create_task_copyfn(), lower_omp_target(), and lower_send_clauses().

◆ omp_check_context_selector()

◆ omp_check_optional_argument()

tree omp_check_optional_argument ( tree decl,
bool for_present_check )
Check whether this DECL belongs to a Fortran optional argument.
With 'for_present_check' set to false, decls which are optional parameters
themselve are returned as tree - or a NULL_TREE otherwise. Those decls are
always pointers.  With 'for_present_check' set to true, the decl for checking
whether an argument is present is returned; for arguments with value
attribute this is the hidden argument and of BOOLEAN_TYPE.  If the decl is
unrelated to optional arguments, NULL_TREE is returned.   

References lang_hooks::decls, and lang_hooks_for_decls::omp_check_optional_argument.

Referenced by lower_omp_target().

◆ omp_complete_construct_context()

static tree omp_complete_construct_context ( tree construct_context,
bool * completep )
static
CONSTRUCT_CONTEXT contains "the directive names, each being a trait,
of all enclosing constructs at that point in the program up to a target
construct", per section 7.1 of the 5.2 specification.  The traits are
collected during gimplification and are listed outermost first.

This function attempts to apply the "if the point in the program is not
enclosed by a target construct, the following rules are applied in order"
requirements that follow in the same paragraph.  This may not be possible,
depending on the compilation phase; in particular, "declare simd" clones
are not known until late resolution.

The augmented context is returned, and *COMPLETEP is set to true if
the context is known to be complete, false otherwise.   

References cfun, chainon(), copy_node(), current_function_decl, DECL_ATTRIBUTES, cgraph_node::get(), lookup_attribute(), make_trait_selector(), NULL_TREE, OMP_TRAIT_CONSTRUCT_SIMD, OMP_TRAIT_CONSTRUCT_TARGET, OMP_TS_CODE, PARSING, PROP_gimple_any, cgraph_node::simdclone, symtab, TREE_CHAIN, and TREE_VALUE.

Referenced by omp_declare_variant_candidates(), omp_get_dynamic_candidates(), and omp_metadirective_candidates().

◆ omp_construct_simd_compare()

static int omp_construct_simd_compare ( tree clauses1,
tree clauses2,
bool match_p )
static
Compare construct={simd} CLAUSES1 with CLAUSES2, return 0/-1/1/2 as
in omp_context_selector_set_compare.  If MATCH_P is true, additionally
apply the special matching rules for the "simdlen" and "aligned" clauses
used to determine whether the selector CLAUSES1 is part of matches
the OpenMP context containing CLAUSES2.   

References FOR_EACH_VEC_ELT, gcc_unreachable, i, NULL_TREE, OMP_CLAUSE_ALIGNED, OMP_CLAUSE_ALIGNED_ALIGNMENT, OMP_CLAUSE_CHAIN, OMP_CLAUSE_CODE, OMP_CLAUSE_DECL, OMP_CLAUSE_INBRANCH, OMP_CLAUSE_LINEAR, OMP_CLAUSE_LINEAR_KIND, OMP_CLAUSE_LINEAR_STEP, OMP_CLAUSE_LINEAR_VARIABLE_STRIDE, OMP_CLAUSE_NOTINBRANCH, OMP_CLAUSE_SIMDLEN, OMP_CLAUSE_SIMDLEN_EXPR, OMP_CLAUSE_UNIFORM, r, simple_cst_equal(), tree_fits_uhwi_p(), and tree_to_uhwi().

Referenced by omp_construct_traits_match(), and omp_context_selector_set_compare().

◆ omp_construct_traits_match()

static bool omp_construct_traits_match ( tree selector_traits,
tree context_traits,
score_wide_int * score )
static
If the construct selector traits SELECTOR_TRAITS match the corresponding
OpenMP context traits CONTEXT_TRAITS, return true and set *SCORE to the
corresponding score if it is non-null.   

References alloca, i, list_length(), omp_construct_simd_compare(), OMP_TRAIT_CONSTRUCT_SIMD, OMP_TS_CODE, OMP_TS_PROPERTIES, wi::shifted_mask(), and TREE_CHAIN.

Referenced by omp_context_compute_score(), and omp_context_selector_matches().

◆ omp_context_compute_score()

static void omp_context_compute_score ( struct omp_variant * variant,
tree construct_context,
bool complete_p )
static
Given an omp_variant VARIANT, compute VARIANT->score and
VARIANT->scorable.
CONSTRUCT_CONTEXT is the OpenMP construct context; if this is null or
COMPLETE_P is false (e.g., during parsing or gimplification) then it
may not be possible to compute the score accurately and the scorable
flag is set to false.

Cited text in the comments is from section 7.2 of the OpenMP 5.2
specification.   

References list_length(), omp_construct_traits_match(), OMP_TRAIT_DEVICE_ARCH, OMP_TRAIT_DEVICE_ISA, OMP_TRAIT_DEVICE_KIND, OMP_TRAIT_SET_CONSTRUCT, OMP_TRAIT_SET_DEVICE, OMP_TRAIT_SET_TARGET_DEVICE, OMP_TS_CODE, OMP_TS_SCORE, OMP_TSS_CODE, OMP_TSS_TRAIT_SELECTORS, omp_variant::scorable, omp_variant::score, omp_variant::selector, wi::shifted_mask(), wi::to_wide(), TREE_CHAIN, TREE_CODE, TREE_TYPE, and TYPE_SIGN.

Referenced by omp_get_dynamic_candidates().

◆ omp_context_name_list_prop()

◆ omp_context_selector_compare()

static int omp_context_selector_compare ( tree ctx1,
tree ctx2 )
static
Compare whole context selector specification CTX1 and CTX2.
Return 0 if CTX1 is equal to CTX2,
-1 if CTX1 is a strict subset of CTX2,
1 if CTX2 is a strict subset of CTX1, or
2 if neither context is a subset of another one.   

References list_length(), NULL_TREE, omp_context_selector_set_compare(), OMP_TSS_CODE, OMP_TSS_TRAIT_SELECTORS, r, and TREE_CHAIN.

Referenced by omp_get_dynamic_candidates().

◆ omp_context_selector_matches()

int omp_context_selector_matches ( tree ctx,
tree construct_context,
bool complete_p )
Return 1 if context selector CTX matches the current OpenMP context, 0
if it does not and -1 if it is unknown and need to be determined later.
Some properties can be checked right away during parsing, others need
to wait until the whole TU is parsed, others need to wait until
IPA, others until vectorization.

CONSTRUCT_CONTEXT is a list of construct traits from the OpenMP context,
which must be collected by omp_get_construct_context during
gimplification.  It is ignored (and may be null) if this function is
called during parsing.  Otherwise COMPLETE_P should indicate whether
CONSTRUCT_CONTEXT is known to be complete and not missing constructs
filled in later during compilation.

Dynamic properties (which are evaluated at run-time) should always
return 1.   

References cfun, current_function_decl, DECL_ATTRIBUTES, gcc_assert, gcc_unreachable, IDENTIFIER_POINTER, integer_nonzerop(), integer_zerop(), lookup_attribute(), NULL, NULL_TREE, omp_construct_traits_match(), omp_context_name_list_prop(), omp_device_arch, omp_device_isa, omp_device_kind, omp_maybe_offloaded(), OMP_MEMORY_ORDER_ACQ_REL, OMP_MEMORY_ORDER_ACQUIRE, OMP_MEMORY_ORDER_RELAXED, OMP_MEMORY_ORDER_RELEASE, OMP_MEMORY_ORDER_SEQ_CST, OMP_MEMORY_ORDER_UNSPECIFIED, omp_offload_device_kind_arch_isa(), OMP_REQUIRES_ATOMIC_DEFAULT_MEM_ORDER, OMP_REQUIRES_DYNAMIC_ALLOCATORS, omp_requires_mask, OMP_REQUIRES_REVERSE_OFFLOAD, OMP_REQUIRES_SELF_MAPS, OMP_REQUIRES_UNIFIED_ADDRESS, OMP_REQUIRES_UNIFIED_SHARED_MEMORY, OMP_TP_NAME, OMP_TP_VALUE, OMP_TRAIT_CONSTRUCT_SIMD, OMP_TRAIT_CONSTRUCT_TARGET, OMP_TRAIT_DEVICE_ARCH, OMP_TRAIT_DEVICE_ISA, OMP_TRAIT_DEVICE_KIND, OMP_TRAIT_IMPLEMENTATION_ADMO, OMP_TRAIT_IMPLEMENTATION_DYNAMIC_ALLOCATORS, OMP_TRAIT_IMPLEMENTATION_EXTENSION, OMP_TRAIT_IMPLEMENTATION_REVERSE_OFFLOAD, OMP_TRAIT_IMPLEMENTATION_SELF_MAPS, OMP_TRAIT_IMPLEMENTATION_UNIFIED_ADDRESS, OMP_TRAIT_IMPLEMENTATION_UNIFIED_SHARED_MEMORY, OMP_TRAIT_IMPLEMENTATION_VENDOR, OMP_TRAIT_INVALID, OMP_TRAIT_SET_CONSTRUCT, OMP_TRAIT_SET_DEVICE, OMP_TRAIT_SET_IMPLEMENTATION, OMP_TRAIT_SET_TARGET_DEVICE, OMP_TRAIT_SET_USER, OMP_TRAIT_USER_CONDITION, OMP_TS_CODE, OMP_TS_PROPERTIES, OMP_TSS_CODE, OMP_TSS_TRAIT_SELECTORS, PARSING, PROP_gimple_any, r, sorry(), symtab, targetm, TREE_CHAIN, and tree_fits_shwi_p().

Referenced by omp_declare_variant_candidates(), omp_get_dynamic_candidates(), and omp_metadirective_candidates().

◆ omp_context_selector_props_compare()

static int omp_context_selector_props_compare ( enum omp_tss_code set,
enum omp_ts_code sel,
tree ctx1,
tree ctx2 )
static
Compare properties of selectors SEL from SET other than construct.
CTX1 and CTX2 are the lists of properties to compare.
Return 0/-1/1/2 as in omp_context_selector_set_compare.
Unlike set names or selector names, properties can have duplicates.   

References integer_zerop(), NULL_TREE, omp_context_name_list_prop(), OMP_TP_NAME, OMP_TP_NAMELIST_NODE, OMP_TP_VALUE, OMP_TRAIT_SET_USER, OMP_TRAIT_USER_CONDITION, r, simple_cst_equal(), and TREE_CHAIN.

Referenced by omp_context_selector_set_compare().

◆ omp_context_selector_set_compare()

static int omp_context_selector_set_compare ( enum omp_tss_code set,
tree ctx1,
tree ctx2 )
static
Forward declarations.   
Compare single context selector sets CTX1 and CTX2 with SET name.
CTX1 and CTX2 are lists of trait-selectors.
Return 0 if CTX1 is equal to CTX2,
-1 if CTX1 is a strict subset of CTX2,
1 if CTX2 is a strict subset of CTX1, or
2 if neither context is a subset of another one.   

References list_length(), NULL_TREE, omp_construct_simd_compare(), omp_context_selector_props_compare(), OMP_TRAIT_CONSTRUCT_SIMD, OMP_TRAIT_INVALID, OMP_TRAIT_SET_CONSTRUCT, OMP_TS_CODE, OMP_TS_PROPERTIES, OMP_TS_SCORE, r, simple_cst_equal(), and TREE_CHAIN.

Referenced by omp_context_selector_compare(), and omp_mark_declare_variant().

◆ omp_declare_variant_candidates()

vec< struct omp_variant > omp_declare_variant_candidates ( tree base,
tree construct_context )
Two attempts are made to resolve calls to "declare variant" functions:
early resolution in the gimplifier, and late resolution in the
omp_device_lower pass.  If early resolution is not possible, the
original function call is gimplified into the same form as metadirective
and goes through the same late resolution code as metadirective.   
Collect "declare variant" candidates for BASE.  CONSTRUCT_CONTEXT
is the un-augmented context, or NULL_TREE if that information is not
available yet.   

References omp_variant::alternative, omp_variant::body, candidate(), candidates, DECL_ATTRIBUTES, omp_variant::dynamic_selector, lookup_attribute(), NULL_TREE, omp_complete_construct_context(), omp_context_selector_matches(), omp_variant::selector, TREE_CHAIN, TREE_CODE, TREE_PURPOSE, and TREE_VALUE.

Referenced by gimplify_omp_dispatch(), and gimplify_variant_call_expr().

◆ omp_device_num_check()

static tree omp_device_num_check ( tree * device_num,
bool * is_host )
static
Helper function for omp_dynamic_cond: return a boolean tree expression
that tests whether *DEVICE_NUM is a "conforming device number other
than omp_invalid_device".  This may modify *DEVICE_NUM (i.e, to be
a save_expr).  *IS_HOST is set to true if the device can be statically
determined to be the host.   

References build2(), build_call_expr(), builtin_decl_explicit(), DECL_NAME, get_callee_fndecl(), IDENTIFIER_POINTER, integer_minus_one_node, integer_one_node, integer_type_node, integer_zero_node, omp_runtime_api_call(), save_expr(), TREE_CODE, tree_fits_shwi_p(), and tree_to_shwi().

Referenced by omp_dynamic_cond().

◆ omp_dynamic_cond()

◆ omp_early_resolve_metadirective()

vec< struct omp_variant > omp_early_resolve_metadirective ( tree metadirective)
Return a vector of dynamic replacement candidates for the metadirective
statement in METADIRECTIVE.  Return an empty vector if the metadirective
cannot be resolved.  This function is intended to be called from the
front ends, prior to gimplification.   

References candidates, NULL_TREE, omp_get_dynamic_candidates(), and omp_metadirective_candidates().

◆ omp_extract_for_data()

void omp_extract_for_data ( gomp_for * for_stmt,
struct omp_for_data * fd,
struct omp_for_data_loop * loops )
Extract the header elements of parallel loop FOR_STMT and store
them into *FD.   

References omp_for_data::adjn1, boolean_type_node, build_bitint_type(), build_int_cst(), build_nonstandard_integer_type(), build_one_cst(), build_zero_cst(), omp_for_data::chunk_size, omp_for_data::collapse, omp_for_data_loop::cond_code, count, create_tmp_var, omp_for_data::factor, omp_for_data::first_inner_iterations, omp_for_data::first_nonrect, fold_binary, fold_build1, fold_build2, fold_build2_loc(), fold_convert, fold_convert_loc(), fold_unary, omp_for_data::for_stmt, gcc_assert, GF_OMP_FOR_KIND_DISTRIBUTE, GF_OMP_FOR_KIND_OACC_LOOP, GF_OMP_FOR_KIND_SIMD, GF_OMP_FOR_KIND_TASKLOOP, gimple_location(), gimple_omp_for_clauses(), gimple_omp_for_cond(), gimple_omp_for_final(), gimple_omp_for_incr(), gimple_omp_for_index(), gimple_omp_for_initial(), gimple_omp_for_kind(), omp_for_data::have_nonctrl_scantemp, omp_for_data::have_nowait, omp_for_data::have_ordered, omp_for_data::have_pointer_condtemp, omp_for_data::have_reductemp, omp_for_data::have_scantemp, i, integer_nonzerop(), integer_one_node, integer_zero_node, integer_zerop(), omp_for_data::iter_type, last, omp_for_data::last_nonrect, omp_for_data::lastprivate_conditional, list_length(), long_integer_type_node, long_long_unsigned_type_node, omp_for_data::loop, omp_for_data::loops, omp_for_data_loop::m1, omp_for_data_loop::m2, make_tree_vec(), omp_for_data_loop::n1, omp_for_data_loop::n2, omp_for_data::non_rect, NULL, NULL_TREE, omp_adjust_for_condition(), OMP_CLAUSE__CONDTEMP_, OMP_CLAUSE__REDUCTEMP_, OMP_CLAUSE__SCANTEMP_, OMP_CLAUSE__SCANTEMP__ALLOC, OMP_CLAUSE__SCANTEMP__CONTROL, OMP_CLAUSE_CHAIN, OMP_CLAUSE_CODE, OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_COLLAPSE_COUNT, OMP_CLAUSE_COLLAPSE_EXPR, OMP_CLAUSE_COLLAPSE_ITERVAR, OMP_CLAUSE_DECL, OMP_CLAUSE_DIST_SCHEDULE, OMP_CLAUSE_DIST_SCHEDULE_CHUNK_EXPR, OMP_CLAUSE_LASTPRIVATE, OMP_CLAUSE_LASTPRIVATE_CONDITIONAL, OMP_CLAUSE_NOWAIT, OMP_CLAUSE_ORDER, OMP_CLAUSE_ORDER_UNCONSTRAINED, OMP_CLAUSE_ORDERED, OMP_CLAUSE_ORDERED_DOACROSS, OMP_CLAUSE_ORDERED_EXPR, OMP_CLAUSE_SCHEDULE, OMP_CLAUSE_SCHEDULE_AUTO, OMP_CLAUSE_SCHEDULE_CHUNK_EXPR, OMP_CLAUSE_SCHEDULE_KIND, OMP_CLAUSE_SCHEDULE_MASK, OMP_CLAUSE_SCHEDULE_RUNTIME, OMP_CLAUSE_SCHEDULE_SIMD, OMP_CLAUSE_SCHEDULE_STATIC, OMP_CLAUSE_TILE, OMP_CLAUSE_TILE_COUNT, OMP_CLAUSE_TILE_ITERVAR, OMP_CLAUSE_TILE_LIST, omp_get_for_step_from_incr(), omp_for_data::ordered, omp_for_data_loop::outer, POINTER_TYPE_P, omp_for_data::pre, omp_for_data::sched_kind, omp_for_data::sched_modifiers, signed_type_for(), omp_for_data::simd_schedule, SSA_NAME_VAR, SSA_VAR_P, omp_for_data_loop::step, omp_for_data::tiling, TREE_CODE, TREE_CONSTANT, tree_int_cst_lt(), TREE_OPERAND, tree_to_shwi(), TREE_TYPE, TREE_VEC_ELT, TYPE_MAX_VALUE, TYPE_MIN_VALUE, TYPE_PRECISION, TYPE_UNSIGNED, and omp_for_data_loop::v.

Referenced by add_taskreg_looptemp_clauses(), expand_omp_for(), expand_task_call(), get_ws_args_for(), gimplify_omp_for(), lower_lastprivate_conditional_clauses(), lower_omp_for(), lower_omp_for_lastprivate(), lower_omp_ordered_clauses(), and workshare_safe_to_combine_p().

◆ omp_find_clause()

tree omp_find_clause ( tree clauses,
enum omp_clause_code kind )
Find an OMP clause of type KIND within CLAUSES.   

References NULL_TREE, OMP_CLAUSE_CHAIN, and OMP_CLAUSE_CODE.

Referenced by add_taskreg_looptemp_clauses(), adjust_region_code_walk_stmt_fn(), check_omp_nesting_restrictions(), determine_parallel_type(), execute_oacc_loop_designation(), expand_omp_for_generic(), expand_omp_for_init_counts(), expand_omp_for_init_vars(), expand_omp_for_static_chunk(), expand_omp_for_static_nochunk(), expand_omp_sections(), expand_omp_simd(), expand_omp_target(), expand_omp_taskloop_for_inner(), expand_omp_taskloop_for_outer(), expand_parallel_call(), expand_task_call(), expand_taskwait_call(), expand_teams_call(), find_lastprivate_looptemp(), finish_taskreg_scan(), get_target_arguments(), get_ws_args_for(), gimplify_call_expr(), gimplify_omp_dispatch(), gimplify_omp_for(), gimplify_omp_loop(), gimplify_omp_loop_xform(), gimplify_omp_target_update(), gimplify_omp_task(), gimplify_omp_workshare(), gimplify_scan_omp_clauses(), lower_depend_clauses(), lower_lastprivate_clauses(), lower_lastprivate_conditional_clauses(), lower_omp_1(), lower_omp_for(), lower_omp_for_lastprivate(), lower_omp_master(), lower_omp_ordered(), lower_omp_scan(), lower_omp_scope(), lower_omp_sections(), lower_omp_single(), lower_omp_target(), lower_omp_task_reductions(), lower_omp_taskreg(), lower_omp_teams(), lower_rec_input_clauses(), lower_rec_simd_input_clauses(), oacc_set_fn_attrib(), omp_default_clause(), omp_discover_declare_target_fn_r(), omp_discover_declare_target_tgt_fn_r(), omp_get_construct_context(), omp_has_nocontext(), omp_has_novariants(), omp_maybe_apply_loop_xforms(), omp_task_reduction_iterate(), omp_task_reductions_find_first(), optimize_omp_library_calls(), optimize_target_teams(), scan_omp_1_stmt(), scan_omp_parallel(), and scan_omp_task().

◆ omp_get_context_selector()

tree omp_get_context_selector ( tree ctx,
enum omp_tss_code set,
enum omp_ts_code sel )
From context selector CTX, return trait-selector with name SEL in
trait-selector-set with name SET if any, or NULL_TREE if not found.   

References NULL_TREE, OMP_TS_CODE, OMP_TSS_CODE, OMP_TSS_TRAIT_SELECTORS, and TREE_CHAIN.

Referenced by omp_dynamic_cond(), and omp_selector_is_dynamic().

◆ omp_get_context_selector_list()

tree omp_get_context_selector_list ( tree ctx,
enum omp_tss_code set )
Similar, but returns the whole trait-selector list for SET in CTX.   

References NULL_TREE, OMP_TSS_CODE, OMP_TSS_TRAIT_SELECTORS, and TREE_CHAIN.

Referenced by omp_dynamic_cond(), and omp_selector_is_dynamic().

◆ omp_get_dynamic_candidates()

◆ omp_get_for_step_from_incr()

tree omp_get_for_step_from_incr ( location_t loc,
tree incr )
Return the looping step from INCR, extracted from the step of a gimple omp
for statement.   

References fold_build1_loc(), fold_convert, gcc_unreachable, ssizetype, TREE_CODE, TREE_OPERAND, and TREE_TYPE.

Referenced by omp_extract_for_data(), and omp_loop_number_of_iterations().

◆ omp_get_fr_id_from_name()

char omp_get_fr_id_from_name ( const char * str)
Returns the foreign-runtime ID if found or 0 otherwise.   

References i, and omp_interop_fr_str.

◆ omp_get_name_from_fr_id()

const char * omp_get_name_from_fr_id ( int fr_id)
Returns the string value to a foreign-runtime integer value or NULL if value
is not known.   

References omp_interop_fr_str.

Referenced by dump_omp_init_prefer_type().

◆ omp_is_allocatable_or_ptr()

bool omp_is_allocatable_or_ptr ( tree decl)
True if OpenMP should regard this DECL as being a scalar which has Fortran's
allocatable or pointer attribute.   

References lang_hooks::decls, and lang_hooks_for_decls::omp_is_allocatable_or_ptr.

Referenced by lower_omp_target(), and scan_sharing_clauses().

◆ omp_lookup_ts_code()

enum omp_ts_code omp_lookup_ts_code ( enum omp_tss_code set,
const char * s )
Map string S onto a trait selector code for set SET.   

References i, OMP_TRAIT_INVALID, OMP_TRAIT_LAST, and omp_ts_map.

◆ omp_lookup_tss_code()

enum omp_tss_code omp_lookup_tss_code ( const char * s)
Map string S onto a trait selector set code.   

References i, OMP_TRAIT_SET_INVALID, OMP_TRAIT_SET_LAST, and omp_tss_map.

◆ omp_loop_number_of_iterations()

◆ omp_mappable_type()

bool omp_mappable_type ( tree type)
Return true if TYPE is an OpenMP mappable type.   

References COMPLETE_TYPE_P, and error_mark_node.

Referenced by omp_notice_variable().

◆ omp_mark_declare_variant()

void omp_mark_declare_variant ( location_t loc,
tree variant,
tree construct )
Register VARIANT as variant of some base function marked with
#pragma omp declare variant.  CONSTRUCT is corresponding list of
trait-selectors for the construct selector set.  This is stashed as the
value of the "omp declare variant variant" attribute on VARIANT.   

References DECL_ATTRIBUTES, error_at(), get_identifier(), lookup_attribute(), NULL_TREE, omp_context_selector_set_compare(), OMP_TRAIT_INVALID, OMP_TRAIT_SET_CONSTRUCT, OMP_TS_CODE, TREE_CHAIN, tree_cons(), TREE_VALUE, and unshare_expr().

◆ omp_max_simt_vf()

int omp_max_simt_vf ( void )
Return maximum SIMT width if offloading may target SIMT hardware.   

References startswith().

Referenced by expand_omp_simd(), lower_omp_ordered(), lower_rec_simd_input_clauses(), and scan_omp_1_stmt().

◆ omp_max_vf()

poly_uint64 omp_max_vf ( bool offload)
Return maximum possible vectorization factor for the target, or for
the OpenMP offload target if one exists.   

References GET_MODE_CLASS, GET_MODE_NUNITS(), i, modes, omp_max_vf(), OPTION_SET_P, startswith(), and targetm.

Referenced by execute_omp_device_lower(), lower_rec_simd_input_clauses(), omp_adjust_chunk_size(), and omp_max_vf().

◆ omp_maybe_apply_loop_xforms()

◆ omp_maybe_offloaded()

static bool omp_maybe_offloaded ( tree construct_context)
static
Return true if the current code location is or might be offloaded.
Return true in declare target functions, or when nested in a target
region or when unsure, return false otherwise.   

References cfun, current_function_decl, DECL_ATTRIBUTES, lookup_attribute(), names, NULL, OMP_TRAIT_CONSTRUCT_TARGET, OMP_TS_CODE, PARSING, symtab, and TREE_CHAIN.

Referenced by omp_context_selector_matches().

◆ omp_metadirective_candidates()

vec< struct omp_variant > omp_metadirective_candidates ( tree metadirective,
tree construct_context )
Collect metadirective candidates for METADIRECTIVE.  CONSTRUCT_CONTEXT
is the un-augmented context, or NULL_TREE if that information is not
available yet.   

References candidate(), candidates, gcc_assert, omp_complete_construct_context(), omp_context_selector_matches(), OMP_METADIRECTIVE_VARIANT_BODY, OMP_METADIRECTIVE_VARIANT_DIRECTIVE, OMP_METADIRECTIVE_VARIANT_SELECTOR, OMP_METADIRECTIVE_VARIANTS, omp_variant::selector, and TREE_CHAIN.

Referenced by gimplify_omp_metadirective(), and omp_early_resolve_metadirective().

◆ omp_offload_device_kind_arch_isa()

static bool omp_offload_device_kind_arch_isa ( const char * props,
const char * prop )
static
Return true if PROP is possibly present in one of the offloading target's
OpenMP contexts.  The format of PROPS string is always offloading target's
name terminated by '\0', followed by properties for that offloading
target separated by '\0' and terminated by another '\0'.  The strings
are created from omp-device-properties installed files of all configured
offloading targets.   

References names, and NULL.

Referenced by omp_context_selector_matches().

◆ omp_parse_expr()

◆ omp_privatize_by_reference()

◆ omp_resolve_variant_construct()

vec< struct omp_variant > omp_resolve_variant_construct ( tree construct_context,
tree selectors )
Return a vector of dynamic replacement candidates for the variant construct
with SELECTORS and CONSTRUCT_CONTEXT.  This version is called during late
resolution in the ompdevlow pass.   

References omp_variant::alternative, omp_variant::body, build_int_cst(), omp_variant::dynamic_selector, i, integer_type_node, NULL_TREE, omp_get_dynamic_candidates(), omp_variant::selector, TREE_VEC_ELT, and TREE_VEC_LENGTH.

Referenced by resolve_omp_variant_cookies().

◆ omp_runtime_api_call()

bool omp_runtime_api_call ( const_tree fndecl)
Return true if FNDECL is an omp_* runtime API call.   

References DECL_CONTEXT, DECL_NAME, IDENTIFIER_POINTER, NULL_TREE, omp_runtime_api_procname(), TREE_CODE, and TREE_PUBLIC.

Referenced by omp_device_num_check(), and scan_omp_1_stmt().

◆ omp_runtime_api_procname()

bool omp_runtime_api_procname ( const char * name)
Return true if NAME is the name of an omp_* runtime API call.   

References i, NULL, and startswith().

Referenced by omp_runtime_api_call().

◆ omp_selector_is_dynamic()

◆ omp_target_device_matches_on_host()

static bool omp_target_device_matches_on_host ( enum omp_ts_code selector,
tree properties )
static
Helper function for resolve_omp_target_device_matches, also used
directly when we know in advance that the device is the host to avoid
the overhead of late resolution.  SEL is the selector code and
PROPERTIES are the properties to match.  The return value is a
boolean.   

References dump_file, gcc_unreachable, NULL, omp_context_name_list_prop(), omp_device_arch, omp_device_isa, omp_device_kind, OMP_TRAIT_DEVICE_ARCH, OMP_TRAIT_DEVICE_ISA, OMP_TRAIT_DEVICE_KIND, targetm, and TREE_CHAIN.

Referenced by omp_dynamic_cond(), and resolve_omp_target_device_matches().

◆ resolve_omp_target_device_matches()

tree resolve_omp_target_device_matches ( tree node)
Called for late resolution of the OMP_TARGET_DEVICE_MATCHES tree node to
a constant in omp-offload.cc.  This is used in code that is wrapped in a
#pragma omp target construct to execute on the specified device, and
can be reduced to a compile-time constant in the offload compiler.
NODE is an OMP_TARGET_DEVICE_MATCHES tree node and the result is an
INTEGER_CST.   

References integer_one_node, integer_zero_node, omp_target_device_matches_on_host(), OMP_TARGET_DEVICE_MATCHES_PROPERTIES, OMP_TARGET_DEVICE_MATCHES_SELECTOR, and tree_to_shwi().

Referenced by resolve_omp_variant_cookies().

◆ sort_variant()

static int sort_variant ( const void * a,
const void * b,
void *  )
static
Comparison function for sorting routines, to sort OpenMP metadirective
variants by decreasing score.   

References a, b, and omp_variant::score.

Referenced by omp_get_dynamic_candidates().

Variable Documentation

◆ atomic_default_mem_order_properties

const char* const atomic_default_mem_order_properties[]
static
Initial value:
=
{ "seq_cst", "relaxed", "acq_rel", "acquire", "release", NULL }
#define NULL
Definition system.h:50

◆ extension_properties

const char* const extension_properties[]
static
Initial value:
=
{ NULL }

◆ kind_properties

const char* const kind_properties[]
static
Initial value:
=
{ "host", "nohost", "cpu", "gpu", "fpga", "any", NULL }
Arrays of property candidates must be null-terminated.   

◆ omp_interop_fr_str

const char* omp_interop_fr_str[]
static
Initial value:
= {"cuda", "cuda_driver", "opencl",
"sycl", "hip", "level_zero", "hsa"}
See "Additional Definitions for the OpenMP API Specification" document;
associated IDs are 1, 2, ...   

Referenced by omp_get_fr_id_from_name(), and omp_get_name_from_fr_id().

◆ omp_requires_mask

enum omp_requires omp_requires_mask
General types and functions that are useful for processing of OpenMP,
   OpenACC and similar directives at various stages of compilation.

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

Referenced by gimplify_bind_expr(), input_offload_tables(), lower_omp_target(), omp_context_selector_matches(), output_offload_tables(), and scan_sharing_clauses().

◆ omp_ts_map

struct omp_ts_info omp_ts_map[]

◆ omp_tss_map

const char* omp_tss_map[]
Initial value:
=
{
"construct",
"device",
"target_device",
"implementation",
"user",
}
Lookup tables for context selectors.   

Referenced by omp_lookup_tss_code().

◆ vendor_properties

const char* const vendor_properties[]
static
Initial value:
=
{ "amd", "arm", "bsc", "cray", "fujitsu", "gnu", "hpe", "ibm", "intel",
"llvm", "nec", "nvidia", "pgi", "ti", "unknown", NULL }