LLVM 20.0.0git
|
This file implements helper functions and classes to deal with OpenMP contexts as used by [begin/end] declare variant
and metadirective
.
More...
#include "llvm/Frontend/OpenMP/OMPContext.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/TargetParser/Triple.h"
#include "llvm/Frontend/OpenMP/OMPKinds.def"
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "openmp-ir-builder" |
#define | OMP_TRAIT_PROPERTY(Enum, TraitSetEnum, TraitSelectorEnum, Str) |
#define | OMP_TRAIT_SET(Enum, Str) .Case(Str, TraitSet::Enum) |
#define | OMP_TRAIT_SELECTOR(Enum, TraitSetEnum, Str, ReqProp) |
#define | OMP_TRAIT_PROPERTY(Enum, TraitSetEnum, TraitSelectorEnum, Str) |
#define | OMP_TRAIT_SET(Enum, Str) |
#define | OMP_TRAIT_SELECTOR(Enum, TraitSetEnum, Str, ReqProp) .Case(Str, TraitSelector::Enum) |
#define | OMP_TRAIT_PROPERTY(Enum, TraitSetEnum, TraitSelectorEnum, Str) |
#define | OMP_TRAIT_SELECTOR(Enum, TraitSetEnum, Str, ReqProp) |
#define | OMP_TRAIT_PROPERTY(Enum, TraitSetEnum, TraitSelectorEnum, Str) |
#define | OMP_TRAIT_PROPERTY(Enum, TraitSetEnum, TraitSelectorEnum, Str) |
#define | OMP_TRAIT_PROPERTY(Enum, TraitSetEnum, TraitSelectorEnum, Str) |
#define | OMP_TRAIT_PROPERTY(Enum, TraitSetEnum, TraitSelectorEnum, Str) |
#define | OMP_TRAIT_SELECTOR(Enum, TraitSetEnum, Str, ReqProp) |
#define | OMP_TRAIT_PROPERTY(Enum, TraitSetEnum, TraitSelectorEnum, Str) |
#define | OMP_TRAIT_SET(Enum, Str) |
#define | OMP_TRAIT_SELECTOR(Enum, TraitSetEnum, Str, ReqProp) |
#define | OMP_TRAIT_PROPERTY(Enum, TraitSetEnum, TraitSelectorEnum, Str) |
Functions | |
template<typename T > | |
static bool | isSubset (ArrayRef< T > C0, ArrayRef< T > C1) |
Return true if C0 is a subset of C1 . | |
template<typename T > | |
static bool | isStrictSubset (ArrayRef< T > C0, ArrayRef< T > C1) |
Return true if C0 is a strict subset of C1 . | |
static bool | isStrictSubset (const VariantMatchInfo &VMI0, const VariantMatchInfo &VMI1) |
static int | isVariantApplicableInContextHelper (const VariantMatchInfo &VMI, const OMPContext &Ctx, SmallVectorImpl< unsigned > *ConstructMatches, bool DeviceSetOnly) |
static APInt | getVariantMatchScore (const VariantMatchInfo &VMI, const OMPContext &Ctx, SmallVectorImpl< unsigned > &ConstructMatches) |
This file implements helper functions and classes to deal with OpenMP contexts as used by [begin/end] declare variant
and metadirective
.
Definition in file OMPContext.cpp.
#define DEBUG_TYPE "openmp-ir-builder" |
Definition at line 22 of file OMPContext.cpp.
#define OMP_TRAIT_PROPERTY | ( | Enum, | |
TraitSetEnum, | |||
TraitSelectorEnum, | |||
Str | |||
) |
#define OMP_TRAIT_PROPERTY | ( | Enum, | |
TraitSetEnum, | |||
TraitSelectorEnum, | |||
Str | |||
) |
#define OMP_TRAIT_PROPERTY | ( | Enum, | |
TraitSetEnum, | |||
TraitSelectorEnum, | |||
Str | |||
) |
#define OMP_TRAIT_PROPERTY | ( | Enum, | |
TraitSetEnum, | |||
TraitSelectorEnum, | |||
Str | |||
) |
#define OMP_TRAIT_PROPERTY | ( | Enum, | |
TraitSetEnum, | |||
TraitSelectorEnum, | |||
Str | |||
) |
#define OMP_TRAIT_PROPERTY | ( | Enum, | |
TraitSetEnum, | |||
TraitSelectorEnum, | |||
Str | |||
) |
#define OMP_TRAIT_PROPERTY | ( | Enum, | |
TraitSetEnum, | |||
TraitSelectorEnum, | |||
Str | |||
) |
#define OMP_TRAIT_PROPERTY | ( | Enum, | |
TraitSetEnum, | |||
TraitSelectorEnum, | |||
Str | |||
) |
#define OMP_TRAIT_PROPERTY | ( | Enum, | |
TraitSetEnum, | |||
TraitSelectorEnum, | |||
Str | |||
) |
#define OMP_TRAIT_SELECTOR | ( | Enum, | |
TraitSetEnum, | |||
Str, | |||
ReqProp | |||
) |
#define OMP_TRAIT_SELECTOR | ( | Enum, | |
TraitSetEnum, | |||
Str, | |||
ReqProp | |||
) | .Case(Str, TraitSelector::Enum) |
#define OMP_TRAIT_SELECTOR | ( | Enum, | |
TraitSetEnum, | |||
Str, | |||
ReqProp | |||
) |
#define OMP_TRAIT_SELECTOR | ( | Enum, | |
TraitSetEnum, | |||
Str, | |||
ReqProp | |||
) |
#define OMP_TRAIT_SELECTOR | ( | Enum, | |
TraitSetEnum, | |||
Str, | |||
ReqProp | |||
) |
#define OMP_TRAIT_SET | ( | Enum, | |
Str | |||
) | .Case(Str, TraitSet::Enum) |
#define OMP_TRAIT_SET | ( | Enum, | |
Str | |||
) |
#define OMP_TRAIT_SET | ( | Enum, | |
Str | |||
) |
|
static |
Definition at line 270 of file OMPContext.cpp.
References assert(), llvm::omp::VariantMatchInfo::ConstructTraits, llvm::dbgs(), DEBUG_TYPE, llvm::omp::getOpenMPContextTraitSelectorForProperty(), llvm::omp::getOpenMPContextTraitSetForProperty(), llvm::APInt::getZExtValue(), LLVM_DEBUG, llvm_unreachable, llvm::omp::VariantMatchInfo::RequiredTraits, llvm::omp::VariantMatchInfo::ScoreMap, llvm::BitVector::set_bits(), llvm::SmallVectorBase< Size_T >::size(), and llvm::APInt::uge().
Referenced by llvm::omp::getBestVariantMatchForContext().
Return true if C0
is a strict subset of C1
.
Note that both arrays are expected to be sorted.
Definition at line 124 of file OMPContext.cpp.
References llvm::ArrayRef< T >::size().
Referenced by llvm::omp::getBestVariantMatchForContext().
|
static |
Definition at line 130 of file OMPContext.cpp.
References llvm::omp::VariantMatchInfo::ConstructTraits, llvm::BitVector::count(), llvm::omp::VariantMatchInfo::RequiredTraits, llvm::BitVector::set_bits(), and llvm::BitVector::test().
Return true if C0
is a subset of C1
.
Note that both arrays are expected to be sorted.
Definition at line 99 of file OMPContext.cpp.
References assert(), llvm::ArrayRef< T >::begin(), llvm::ArrayRef< T >::end(), llvm::is_sorted(), and llvm::ArrayRef< T >::size().
|
static |
Definition at line 145 of file OMPContext.cpp.
References llvm::omp::OMPContext::ActiveTraits, llvm::all_of(), assert(), llvm::omp::VariantMatchInfo::ConstructTraits, llvm::omp::OMPContext::ConstructTraits, llvm::dbgs(), DEBUG_TYPE, llvm::omp::getOpenMPContextTraitPropertyName(), llvm::omp::getOpenMPContextTraitSelectorForProperty(), llvm::omp::getOpenMPContextTraitSetForProperty(), llvm::omp::VariantMatchInfo::ISATraits, LLVM_DEBUG, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::omp::VariantMatchInfo::RequiredTraits, llvm::BitVector::set_bits(), llvm::SmallVectorBase< Size_T >::size(), and llvm::BitVector::test().
Referenced by llvm::omp::getBestVariantMatchForContext(), and llvm::omp::isVariantApplicableInContext().