LLVM 22.0.0git
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

LLVM_ABI OMPContext (bool IsDeviceCompilation, Triple TargetTriple, Triple TargetOffloadTriple, int DeviceNum)
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 164 of file OMPContext.h.

Constructor & Destructor Documentation

◆ OMPContext()

◆ ~OMPContext()

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

Member Function Documentation

◆ addTrait() [1/2]

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

Definition at line 169 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

Definition at line 172 of file OMPContext.h.

References ActiveTraits, and ConstructTraits.

◆ 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 181 of file OMPContext.h.

Member Data Documentation

◆ ActiveTraits

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

Definition at line 183 of file OMPContext.h.

Referenced by addTrait(), and OMPContext().

◆ ConstructTraits

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

Definition at line 184 of file OMPContext.h.

Referenced by addTrait().


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