|
LLVM 22.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_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) |
| #define | OMP_TRAIT_SET(Enum, Str) |
| #define | OMP_TRAIT_SELECTOR(Enum, TraitSetEnum, Str, ReqProp) |
| #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 DeviceOrImplementationSetOnly) |
| 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_PROPERTY | ( | Enum, | |
| TraitSetEnum, | |||
| TraitSelectorEnum, | |||
| Str ) |
| #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_SELECTOR | ( | Enum, | |
| TraitSetEnum, | |||
| Str, | |||
| ReqProp ) |
| #define OMP_TRAIT_SELECTOR | ( | Enum, | |
| TraitSetEnum, | |||
| Str, | |||
| ReqProp ) |
| #define OMP_TRAIT_SET | ( | Enum, | |
| Str ) |
| #define OMP_TRAIT_SET | ( | Enum, | |
| Str ) |
| #define OMP_TRAIT_SET | ( | Enum, | |
| Str ) |
|
static |
Definition at line 329 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::SmallVectorTemplateCommon< T, typename >::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 175 of file OMPContext.cpp.
References isSubset(), and llvm::ArrayRef< T >::size().
Referenced by llvm::omp::getBestVariantMatchForContext().
|
static |
Definition at line 181 of file OMPContext.cpp.
References llvm::omp::VariantMatchInfo::ConstructTraits, llvm::BitVector::count(), isSubset(), 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 150 of file OMPContext.cpp.
References assert(), llvm::ArrayRef< T >::begin(), llvm::ArrayRef< T >::end(), llvm::is_sorted(), and llvm::ArrayRef< T >::size().
Referenced by isStrictSubset(), isStrictSubset(), and isVariantApplicableInContextHelper().
|
static |
Definition at line 197 of file OMPContext.cpp.
References llvm::all_of(), assert(), llvm::omp::VariantMatchInfo::ConstructTraits, llvm::dbgs(), DEBUG_TYPE, llvm::omp::getOpenMPContextTraitPropertyName(), llvm::omp::getOpenMPContextTraitSelectorForProperty(), llvm::omp::getOpenMPContextTraitSetForProperty(), llvm::omp::VariantMatchInfo::ISATraits, isSubset(), LLVM_DEBUG, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::omp::VariantMatchInfo::RequiredTraits, llvm::BitVector::set_bits(), and llvm::BitVector::test().
Referenced by llvm::omp::getBestVariantMatchForContext(), and llvm::omp::isVariantApplicableInContext().