LLVM 20.0.0git
Public Member Functions | Public Attributes | List of all members
llvm::omp::OMPContext Struct Reference

The context for a source location is made up of active property traits, e.g., device={kind(host)}, and constructs traits which describe the nesting in OpenMP constructs at the location. More...

#include "llvm/Frontend/OpenMP/OMPContext.h"

Public Member Functions

 OMPContext (bool IsDeviceCompilation, Triple TargetTriple)
 
virtual ~OMPContext ()=default
 
void addTrait (TraitProperty Property)
 
void addTrait (TraitSet Set, TraitProperty Property)
 
virtual bool matchesISATrait (StringRef) const
 Hook for users to check if an ISA trait matches.
 

Public Attributes

BitVector ActiveTraits = BitVector(unsigned(TraitProperty::Last) + 1)
 
SmallVector< TraitProperty, 8 > ConstructTraits
 

Detailed Description

The context for a source location is made up of active property traits, e.g., device={kind(host)}, and constructs traits which describe the nesting in OpenMP constructs at the location.

Definition at line 157 of file OMPContext.h.

Constructor & Destructor Documentation

◆ OMPContext()

OMPContext::OMPContext ( bool  IsDeviceCompilation,
Triple  TargetTriple 
)

◆ ~OMPContext()

virtual llvm::omp::OMPContext::~OMPContext ( )
virtualdefault

Member Function Documentation

◆ addTrait() [1/2]

void llvm::omp::OMPContext::addTrait ( TraitProperty  Property)
inline

Definition at line 161 of file OMPContext.h.

References addTrait(), and llvm::omp::getOpenMPContextTraitSetForProperty().

Referenced by addTrait().

◆ addTrait() [2/2]

void llvm::omp::OMPContext::addTrait ( TraitSet  Set,
TraitProperty  Property 
)
inline

◆ matchesISATrait()

virtual bool llvm::omp::OMPContext::matchesISATrait ( StringRef  ) const
inlinevirtual

Hook for users to check if an ISA trait matches.

The trait is described as the string that got parsed and it depends on the target and context if this matches or not.

Definition at line 173 of file OMPContext.h.

Member Data Documentation

◆ ActiveTraits

BitVector llvm::omp::OMPContext::ActiveTraits = BitVector(unsigned(TraitProperty::Last) + 1)

Definition at line 175 of file OMPContext.h.

Referenced by addTrait(), isVariantApplicableInContextHelper(), and OMPContext().

◆ ConstructTraits

SmallVector<TraitProperty, 8> llvm::omp::OMPContext::ConstructTraits

Definition at line 176 of file OMPContext.h.

Referenced by addTrait(), and isVariantApplicableInContextHelper().


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