LLVM 24.0.0git
llvm::omp::VariantMatchInfo Struct Reference

Variant match information describes the required traits and how they are scored (via the ScoresMap). More...

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

Classes

struct  ISATrait
 A device or target_device isa property and the ISA name it requires. More...
struct  UnknownTrait

Public Member Functions

void addTrait (TraitProperty Property, StringRef RawString, APInt *Score=nullptr)
 Add the trait Property to the required trait set.
void addTrait (TraitSet Set, TraitProperty Property, StringRef RawString, APInt *Score=nullptr)
 Add the trait Property which is in set Set to the required trait set.
void addUnknownTrait (TraitSelector Selector, APInt *Score=nullptr)
 Add an unknown property of Selector.

Public Attributes

BitVector RequiredTraits = BitVector(unsigned(TraitProperty::Last) + 1)
SmallVector< ISATrait, 8 > ISATraits
SmallVector< TraitProperty, 8 > ConstructTraits
SmallDenseMap< TraitProperty, APInt > ScoreMap
SmallVector< UnknownTrait, 2 > UnknownTraits

Detailed Description

Variant match information describes the required traits and how they are scored (via the ScoresMap).

In addition, the required consturct nesting is decribed as well.

Definition at line 125 of file OMPContext.h.

Member Function Documentation

◆ addTrait() [1/2]

void llvm::omp::VariantMatchInfo::addTrait ( TraitProperty Property,
StringRef RawString,
APInt * Score = nullptr )
inline

Add the trait Property to the required trait set.

RawString is the string we parsed and derived Property from. If Score is not null, it recorded as well. If Property is in the construct set it is recorded in-order in the ConstructTraits as well.

Definition at line 144 of file OMPContext.h.

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

Referenced by addTrait().

◆ addTrait() [2/2]

void llvm::omp::VariantMatchInfo::addTrait ( TraitSet Set,
TraitProperty Property,
StringRef RawString,
APInt * Score = nullptr )
inline

Add the trait Property which is in set Set to the required trait set.

RawString is the string we parsed and derived Property from. If Score is not null, it recorded as well. If Set is the construct set it is recorded in-order in the ConstructTraits as well.

Definition at line 153 of file OMPContext.h.

References ConstructTraits, ISATraits, RequiredTraits, and ScoreMap.

◆ addUnknownTrait()

void llvm::omp::VariantMatchInfo::addUnknownTrait ( TraitSelector Selector,
APInt * Score = nullptr )
inline

Add an unknown property of Selector.

It never matches, but its selector is scored like a known property's.

Definition at line 171 of file OMPContext.h.

References RequiredTraits, and UnknownTraits.

Member Data Documentation

◆ ConstructTraits

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

◆ ISATraits

SmallVector<ISATrait, 8> llvm::omp::VariantMatchInfo::ISATraits

Definition at line 178 of file OMPContext.h.

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

◆ RequiredTraits

BitVector llvm::omp::VariantMatchInfo::RequiredTraits = BitVector(unsigned(TraitProperty::Last) + 1)

◆ ScoreMap

SmallDenseMap<TraitProperty, APInt> llvm::omp::VariantMatchInfo::ScoreMap

Definition at line 180 of file OMPContext.h.

Referenced by addTrait(), and getVariantMatchScore().

◆ UnknownTraits

SmallVector<UnknownTrait, 2> llvm::omp::VariantMatchInfo::UnknownTraits

Definition at line 181 of file OMPContext.h.

Referenced by addUnknownTrait(), and getVariantMatchScore().


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