LLVM  14.0.0git
Classes | Namespaces | Macros | Enumerations | Functions
OMPContext.h File Reference
#include "llvm/ADT/APSInt.h"
#include "llvm/ADT/BitVector.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/Triple.h"
#include "llvm/Frontend/OpenMP/OMPConstants.h"
#include "llvm/Frontend/OpenMP/OMPKinds.def"
Include dependency graph for OMPContext.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


struct  llvm::omp::VariantMatchInfo
 Variant match information describes the required traits and how they are scored (via the ScoresMap). More...
struct  llvm::omp::OMPContext
 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...
struct  llvm::DenseMapInfo< omp::TraitProperty >


 ---------------------— PointerInfo ------------------------------------—


#define OMP_TRAIT_SET(Enum, ...)   Enum,
#define OMP_TRAIT_SELECTOR(Enum, ...)   Enum,
#define OMP_TRAIT_PROPERTY(Enum, ...)   Enum,
#define OMP_LAST_TRAIT_PROPERTY(Enum)   Last = Enum


enum  llvm::omp::TraitSet { llvm::omp::TraitSet::OMP_TRAIT_SET }
 OpenMP Context related IDs and helpers. More...
enum  llvm::omp::TraitSelector { llvm::omp::TraitSelector::OMP_TRAIT_SELECTOR }
 IDs for all OpenMP context selector trait (device={kind/isa...}/...). More...
enum  llvm::omp::TraitProperty { llvm::omp::TraitProperty::OMP_TRAIT_PROPERTY, llvm::omp::TraitProperty::OMP_LAST_TRAIT_PROPERTY }
 IDs for all OpenMP context trait properties (host/gpu/bsc/llvm/...) More...


TraitSet llvm::omp::getOpenMPContextTraitSetKind (StringRef Str)
 Parse Str and return the trait set it matches or TraitSet::invalid. More...
TraitSet llvm::omp::getOpenMPContextTraitSetForSelector (TraitSelector Selector)
 Return the trait set for which Selector is a selector. More...
TraitSet llvm::omp::getOpenMPContextTraitSetForProperty (TraitProperty Property)
 Return the trait set for which Property is a property. More...
StringRef llvm::omp::getOpenMPContextTraitSetName (TraitSet Kind)
 Return a textual representation of the trait set Kind. More...
TraitSelector llvm::omp::getOpenMPContextTraitSelectorKind (StringRef Str)
 Parse Str and return the trait set it matches or TraitSelector::invalid. More...
TraitSelector llvm::omp::getOpenMPContextTraitSelectorForProperty (TraitProperty Property)
 Return the trait selector for which Property is a property. More...
StringRef llvm::omp::getOpenMPContextTraitSelectorName (TraitSelector Kind)
 Return a textual representation of the trait selector Kind. More...
TraitProperty llvm::omp::getOpenMPContextTraitPropertyKind (TraitSet Set, TraitSelector Selector, StringRef Str)
 Parse Str and return the trait property it matches in the set Set and selector Selector or TraitProperty::invalid. More...
TraitProperty llvm::omp::getOpenMPContextTraitPropertyForSelector (TraitSelector Selector)
 Return the trait property for a singleton selector Selector. More...
StringRef llvm::omp::getOpenMPContextTraitPropertyName (TraitProperty Kind, StringRef RawString)
 Return a textual representation of the trait property Kind, which might be the raw string we parsed (RawString) if we do not translate the property into a (distinct) enum. More...
StringRef llvm::omp::getOpenMPContextTraitPropertyFullName (TraitProperty Kind)
 Return a textual representation of the trait property Kind with selector and set name included. More...
std::string llvm::omp::listOpenMPContextTraitSets ()
 Return a string listing all trait sets. More...
std::string llvm::omp::listOpenMPContextTraitSelectors (TraitSet Set)
 Return a string listing all trait selectors for Set. More...
std::string llvm::omp::listOpenMPContextTraitProperties (TraitSet Set, TraitSelector Selector)
 Return a string listing all trait properties for Set and Selector. More...
bool llvm::omp::isValidTraitSelectorForTraitSet (TraitSelector Selector, TraitSet Set, bool &AllowsTraitScore, bool &RequiresProperty)
 } More...
bool llvm::omp::isValidTraitPropertyForTraitSetAndSelector (TraitProperty Property, TraitSelector Selector, TraitSet Set)
 Return true if Property can be nested in Selector and Set. More...
bool llvm::omp::isVariantApplicableInContext (const VariantMatchInfo &VMI, const OMPContext &Ctx, bool DeviceSetOnly=false)
 Return true if VMI is applicable in Ctx, that is, all traits required by VMI are available in the OpenMP context Ctx. More...
int llvm::omp::getBestVariantMatchForContext (const SmallVectorImpl< VariantMatchInfo > &VMIs, const OMPContext &Ctx)
 Return the index (into VMIs) of the variant with the highest score from the ones applicble in Ctx. More...

Detailed Description

This file provides helper functions and classes to deal with OpenMP contexts as used by [begin/end] declare variant and metadirective.

Definition in file OMPContext.h.

Macro Definition Documentation


#define OMP_LAST_TRAIT_PROPERTY (   Enum)    Last = Enum

Definition at line 47 of file OMPContext.h.


#define OMP_TRAIT_PROPERTY (   Enum,
)    Enum,

Definition at line 46 of file OMPContext.h.


#define OMP_TRAIT_SELECTOR (   Enum,
)    Enum,

Definition at line 40 of file OMPContext.h.


#define OMP_TRAIT_SET (   Enum,
)    Enum,

Definition at line 34 of file OMPContext.h.