|
LLVM 24.0.0git
|
Namespaces | |
| namespace | descriptor |
| namespace | detail |
Classes | |
| struct | AssumptionClauseMappingInfo |
| Helper to describe assume clauses. More... | |
| struct | DirectiveNameParser |
| Parser class for OpenMP directive names. More... | |
| struct | EnumSet |
| struct | GV |
| Defines various target-specific GPU grid values that must be consistent between host RTL (plugin), device RTL, and clang. More... | |
| struct | 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 | VariantMatchInfo |
| Variant match information describes the required traits and how they are scored (via the ScoresMap). More... | |
| struct | Version |
Typedefs | |
| using | Clauses = EnumSet<Clause> |
| using | Directives = EnumSet<Directive> |
| using | Properties = EnumSet<Property> |
| using | ClauseSets = EnumSet<ClauseSet> |
| using | Modifiers = EnumSet<Modifier> |
| using | ModifierSets = EnumSet<ModifierSet> |
| template<typename Enum, typename DescriptorTy> | |
| using | DescriptorMap = DenseMap<Enum, DescriptorTy> |
| using | Kernel = Function * |
| Summary of a kernel (=entry point for target offloading). | |
| using | KernelSet = SetVector<Kernel> |
| Set of kernels in the module. | |
Variables | |
| template<typename Enum> | |
| constexpr size_t | EnumSize |
| static constexpr AssumptionClauseMappingInfo | AssumptionClauseMappings [] |
| All known assume clauses. | |
| constexpr const char * | OmpDefaultMapperName = "_omp_default_mapper" |
| static constexpr GV | AMDGPUGridValues64 |
| For AMDGPU GPUs. | |
| static constexpr GV | AMDGPUGridValues32 |
| static constexpr GV | NVPTXGridValues |
| For Nvidia GPUs. | |
| static constexpr GV | SPIRVGridValues |
| For generic SPIR-V GPUs. | |
| using llvm::omp::Clauses = EnumSet<Clause> |
| using llvm::omp::ClauseSets = EnumSet<ClauseSet> |
Definition at line 88 of file OMPDescriptors.h.
| using llvm::omp::DescriptorMap = DenseMap<Enum, DescriptorTy> |
Definition at line 200 of file OMPDescriptors.h.
| using llvm::omp::Directives = EnumSet<Directive> |
| using llvm::omp::Kernel = Function * |
Summary of a kernel (=entry point for target offloading).
Definition at line 21 of file OpenMPOpt.h.
| using llvm::omp::KernelSet = SetVector<Kernel> |
Set of kernels in the module.
Definition at line 24 of file OpenMPOpt.h.
| using llvm::omp::Modifiers = EnumSet<Modifier> |
Definition at line 89 of file OMPDescriptors.h.
| using llvm::omp::ModifierSets = EnumSet<ModifierSet> |
Definition at line 90 of file OMPDescriptors.h.
| using llvm::omp::Properties = EnumSet<Property> |
Definition at line 87 of file OMPDescriptors.h.
|
strong |
| Enumerator | |
|---|---|
| Generic | |
| Global | |
| Shared | |
| Constant | |
| Local | |
Definition at line 275 of file OMPConstants.h.
|
strong |
Definition at line 29 of file OMPDescriptors.h.
|
strong |
IDs for the different default kinds.
Definition at line 54 of file OMPConstants.h.
|
strong |
Definition at line 35 of file OMPConstants.h.
|
strong |
IDs for all omp runtime library ident_t flag encodings (see their defintion in openmp/runtime/src/kmp.h).
Definition at line 65 of file OMPConstants.h.
|
strong |
IDs for all Internal Control Variables (ICVs).
Definition at line 26 of file OMPConstants.h.
|
strong |
Definition at line 55 of file OMPDescriptors.h.
|
strong |
| Enumerator | |
|---|---|
| AdjustOp | |
| First_ | |
| DependListType | |
| InteropType | |
| MapTypeModifying | |
| ReductionType | |
| VariableSelector | |
| Last_ | |
| DependModifierSet1 | |
| First_ | |
| NumTeamsModifierSet1 | |
| ReductionModifierSet1 | |
| Last_ | |
| First_ | |
| Last_ | |
Definition at line 61 of file OMPDescriptors.h.
|
strong |
Atomic compare operations. Currently OpenMP only supports ==, >, and <.
| Enumerator | |
|---|---|
| EQ | |
| MIN | |
| MAX | |
Definition at line 287 of file OMPConstants.h.
|
strong |
The fallback types for the dyn_groupprivate clause.
| Enumerator | |
|---|---|
| Abort | Abort the execution. |
| Null | Return null pointer. |
| DefaultMem | Allocate from a implementation defined memory space. |
Definition at line 194 of file OMPConstants.h.
|
strong |
| Enumerator | |
|---|---|
| Unknown | |
| Target | |
| TargetSync | |
Definition at line 284 of file OMPConstants.h.
|
strong |
Definition at line 82 of file OMPConstants.h.
| Enumerator | |
|---|---|
| OMP_TGT_EXEC_MODE_BARE | |
| OMP_TGT_EXEC_MODE_GENERIC | |
| OMP_TGT_EXEC_MODE_SPMD | |
| OMP_TGT_EXEC_MODE_GENERIC_SPMD | |
| OMP_TGT_EXEC_MODE_SPMD_NO_LOOP | |
Definition at line 21 of file OMPDeviceConstants.h.
| Enumerator | |
|---|---|
| OMP_DEVICEID_UNDEF | Device ID if the device was not defined, runtime should get it from environment variables in the spec. |
Definition at line 269 of file OMPConstants.h.
|
strong |
Values for bit flags used to specify the mapping type for offloading.
| Enumerator | |
|---|---|
| OMP_MAP_NONE | No flags. |
| OMP_MAP_TO | Allocate memory on the device and move data from host to device. |
| OMP_MAP_FROM | Allocate memory on the device and move data from device to host. |
| OMP_MAP_ALWAYS | Always perform the requested mapping action on the element, even if it was already mapped before. |
| OMP_MAP_DELETE | Delete the element from the device environment, ignoring the current reference count associated with the element. |
| OMP_MAP_PTR_AND_OBJ | The element being mapped is a pointer-pointee pair; both the pointer and the pointee should be mapped. |
| OMP_MAP_TARGET_PARAM | This flags signals that the base address of an entry should be passed to the target kernel as an argument. |
| OMP_MAP_RETURN_PARAM | Signal that the runtime library has to return the device pointer in the current position for the data being mapped. Used when we have the use_device_ptr or use_device_addr clause. |
| OMP_MAP_PRIVATE | This flag signals that the reference being passed is a pointer to private data. |
| OMP_MAP_LITERAL | Pass the element to the device by value. |
| OMP_MAP_IMPLICIT | Implicit map. |
| OMP_MAP_CLOSE | Close is a hint to the runtime to allocate memory close to the target device. |
| OMP_MAP_PRESENT | 0x800 is reserved for compatibility with XLC. Produce a runtime error if the data is not already allocated. |
| OMP_MAP_OMPX_HOLD | |
| OMP_MAP_ATTACH | |
| OMP_MAP_FB_NULLIFY | |
| OMP_MAP_NON_CONTIG | Signal that the runtime library should use args as an array of descriptor_dim pointers and use args_size as dims. Used when we have non-contiguous list items in target update directive |
| OMP_MAP_MEMBER_OF | The 16 MSBs of the flags indicate whether the entry is member of some struct/class. |
Definition at line 208 of file OMPConstants.h.
|
strong |
Definition at line 23 of file OMPDescriptors.h.
|
strong |
Dependence kind for RTL.
| Enumerator | |
|---|---|
| DepUnknown | |
| DepIn | |
| DepInOut | |
| DepMutexInOutSet | |
| DepInOutSet | |
| DepOmpAllMem | |
Definition at line 293 of file OMPConstants.h.
|
strong |
Fields ids in kmp_depend_info record.
| Enumerator | |
|---|---|
| BaseAddr | |
| Len | |
| Flags | |
Definition at line 290 of file OMPConstants.h.
|
strong |
IDs for all omp runtime library (RTL) functions.
Definition at line 45 of file OMPConstants.h.
|
strong |
IDs for all OpenMP context trait properties (host/gpu/bsc/llvm/...)
Definition at line 46 of file OMPContext.h.
|
strong |
IDs for all OpenMP context selector trait (device={kind/isa...}/...).
Definition at line 40 of file OMPContext.h.
|
strong |
OpenMP Context related IDs and helpers.
{ IDs for all OpenMP context selector trait sets (construct/device/...).
Definition at line 34 of file OMPContext.h.
|
strong |
A type of worksharing loop construct.
| Enumerator | |
|---|---|
| ForStaticLoop | |
| DistributeStaticLoop | |
| DistributeForStaticLoop | |
Definition at line 303 of file OMPConstants.h.
|
inlinestaticconstexpr |
Definition at line 173 of file OMP.h.
References llvm::enum_seq_inclusive().
Referenced by collectPrivatizingConstructs().
Helper to determine if M contains OpenMP.
Definition at line 6228 of file OpenMPOpt.cpp.
Referenced by llvm::OpenMPOptCGSCCPass::run(), and llvm::OpenMPOptPass::run().
Deconstruct an OpenMP kernel name into the parent function name and the line number.
Definition at line 249 of file OMP.cpp.
References llvm::demangle(), llvm::StringRef::drop_front(), I, llvm::TargetRegionEntryInfo::KernelNamePrefix, llvm::StringRef::npos, llvm::StringRef::rfind(), and llvm::StringRef::starts_with().
Referenced by prettifyFunctionName().
|
inlinestaticconstexpr |
Definition at line 177 of file OMP.h.
References llvm::enum_seq_inclusive().
Referenced by collectPrivatizingConstructs(), and llvm::omp::DirectiveNameParser::DirectiveNameParser().
|
inline |
Definition at line 44 of file OMPAssume.h.
References AssumptionClauseMappings.
Definition at line 107 of file OMPGridValues.h.
References AMDGPUGridValues32, and AMDGPUGridValues64.
Referenced by getGridValue().
| 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 applicable in Ctx.
See llvm::isVariantApplicableInContext.
Definition at line 406 of file OMPContext.cpp.
References llvm::APInt::eq(), getVariantMatchScore(), isStrictSubset(), isVariantApplicableInContextHelper(), llvm::SmallVectorTemplateCommon< T, typename >::size(), and llvm::APInt::ult().
| const DescriptorMap< Clause, descriptor::Clause > & llvm::omp::getClauseMap | ( | ) |
Definition at line 24 of file OMPDescriptors.cpp.
Referenced by getDescriptor().
| const DescriptorMap< ClauseSet, descriptor::ClauseSet > & llvm::omp::getClauseSetMap | ( | ) |
Definition at line 33 of file OMPDescriptors.cpp.
Referenced by getDescriptor().
Definition at line 144 of file OMP.cpp.
References llvm::SmallVectorImpl< T >::append(), llvm::ArrayRef(), llvm::ArrayRef< T >::begin(), llvm::SmallVectorTemplateCommon< T, typename >::data(), llvm::ArrayRef< T >::empty(), llvm::ArrayRef< T >::end(), getLeafConstructs(), P, and llvm::SmallVectorTemplateBase< T, bool >::push_back().
Referenced by getLeafOrCompositeConstructs().
| const descriptor::Clause & llvm::omp::getDescriptor | ( | Clause | C | ) |
Definition at line 153 of file OMPDescriptors.cpp.
References C(), and getClauseMap().
Referenced by getDescriptor(), and getProperties().
| const descriptor::ClauseSet & llvm::omp::getDescriptor | ( | ClauseSet | S | ) |
Definition at line 157 of file OMPDescriptors.cpp.
References getClauseSetMap().
| const descriptor::Directive & llvm::omp::getDescriptor | ( | Directive | D | ) |
Definition at line 161 of file OMPDescriptors.cpp.
References D(), F, getDescriptor(), getDirectiveMap(), getLeafConstructsOrSelf(), llvm::ArrayRef< T >::size(), and T.
| const descriptor::Modifier & llvm::omp::getDescriptor | ( | Modifier | M | ) |
Definition at line 205 of file OMPDescriptors.cpp.
References getModifierMap().
| const descriptor::ModifierSet & llvm::omp::getDescriptor | ( | ModifierSet | S | ) |
Definition at line 209 of file OMPDescriptors.cpp.
References getModifierSetMap().
Get OpenMP device kernels in M.
Definition at line 6210 of file OpenMPOpt.cpp.
References F, and isOpenMPKernel().
Referenced by llvm::OpenMPOptPass::run().
| const DescriptorMap< Directive, descriptor::Directive > & llvm::omp::getDirectiveMap | ( | ) |
Definition at line 46 of file OMPDescriptors.cpp.
Referenced by getDescriptor().
Definition at line 98 of file OMP.cpp.
References llvm::ArrayRef(), and D().
Referenced by getCompoundConstruct(), getLeafConstructsOrSelf(), isCombinedConstruct(), and isLeafConstruct().
Definition at line 106 of file OMP.cpp.
References llvm::ArrayRef(), assert(), D(), and getLeafConstructs().
Referenced by getDescriptor(), getLeafOrCompositeConstructs(), and isCompositeConstruct().
| ArrayRef< Directive > llvm::omp::getLeafOrCompositeConstructs | ( | Directive | D, |
| SmallVectorImpl< Directive > & | Output ) |
Definition at line 117 of file OMP.cpp.
References assert(), llvm::ArrayRef< T >::begin(), D(), llvm::ArrayRef< T >::end(), getCompoundConstruct(), getFirstCompositeRange(), getLeafConstructsOrSelf(), llvm::make_range(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), and Range.
| const DescriptorMap< Modifier, descriptor::Modifier > & llvm::omp::getModifierMap | ( | ) |
Definition at line 55 of file OMPDescriptors.cpp.
Referenced by getDescriptor().
| const DescriptorMap< ModifierSet, descriptor::ModifierSet > & llvm::omp::getModifierSetMap | ( | ) |
Definition at line 64 of file OMPDescriptors.cpp.
Referenced by getDescriptor().
| TraitProperty llvm::omp::getOpenMPContextTraitPropertyForSelector | ( | TraitSelector | Selector | ) |
Return the trait property for a singleton selector Selector.
Definition at line 531 of file OMPContext.cpp.
References llvm::StringSwitch< T, R >::Default(), and getOpenMPContextTraitSelectorName().
| StringRef llvm::omp::getOpenMPContextTraitPropertyFullName | ( | TraitProperty | Kind | ) |
Return a textual representation of the trait property Kind with selector and set name included.
Definition at line 555 of file OMPContext.cpp.
References llvm_unreachable.
Referenced by llvm::omp::OMPContext::OMPContext().
| 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.
Definition at line 515 of file OMPContext.cpp.
| 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.
Definition at line 541 of file OMPContext.cpp.
References llvm_unreachable.
Referenced by isVariantApplicableInContextHelper().
| TraitSelector llvm::omp::getOpenMPContextTraitSelectorForProperty | ( | TraitProperty | Property | ) |
Return the trait selector for which Property is a property.
Definition at line 496 of file OMPContext.cpp.
References llvm_unreachable.
Referenced by getVariantMatchScore(), and isVariantApplicableInContextHelper().
| TraitSelector llvm::omp::getOpenMPContextTraitSelectorKind | ( | StringRef | Str, |
| TraitSet | Set ) |
Parse Str and return the trait set it matches or TraitSelector::invalid.
Definition at line 481 of file OMPContext.cpp.
References llvm::StringSwitch< T, R >::Default().
| StringRef llvm::omp::getOpenMPContextTraitSelectorName | ( | TraitSelector | Kind | ) |
Return a textual representation of the trait selector Kind.
Definition at line 505 of file OMPContext.cpp.
References llvm_unreachable.
Referenced by getOpenMPContextTraitPropertyForSelector().
| TraitSet llvm::omp::getOpenMPContextTraitSetForProperty | ( | TraitProperty | Property | ) |
Return the trait set for which Property is a property.
Definition at line 462 of file OMPContext.cpp.
References llvm_unreachable.
Referenced by llvm::omp::OMPContext::addTrait(), llvm::omp::VariantMatchInfo::addTrait(), getVariantMatchScore(), and isVariantApplicableInContextHelper().
| TraitSet llvm::omp::getOpenMPContextTraitSetForSelector | ( | TraitSelector | Selector | ) |
Return the trait set for which Selector is a selector.
Definition at line 452 of file OMPContext.cpp.
References llvm_unreachable.
Parse Str and return the trait set it matches or TraitSet::invalid.
Definition at line 444 of file OMPContext.cpp.
References llvm::StringSwitch< T, R >::Default().
Return a textual representation of the trait set Kind.
Definition at line 471 of file OMPContext.cpp.
References llvm_unreachable.
Definition at line 211 of file OMP.cpp.
References llvm::Version.
Referenced by llvm::omp::DirectiveNameParser::DirectiveNameParser(), and llvm::omp::descriptor::Descriptor< details::Clause >::getVersions().
| Properties llvm::omp::getProperties | ( | Clause | C, |
| Version | V ) |
Definition at line 213 of file OMPDescriptors.cpp.
References C(), getDescriptor(), llvm::omp::descriptor::Clause::getProperties(), and llvm::Version.
Definition at line 49 of file OMPDescriptors.h.
Definition at line 205 of file OMP.cpp.
References D(), getLeafConstructs(), and isCompositeConstruct().
Definition at line 197 of file OMP.cpp.
References llvm::ArrayRef< T >::begin(), D(), llvm::ArrayRef< T >::end(), getFirstCompositeRange(), getLeafConstructsOrSelf(), Range, and llvm::ArrayRef< T >::size().
Referenced by isCombinedConstruct().
Definition at line 195 of file OMP.cpp.
References D(), and getLeafConstructs().
|
inlineconstexpr |
Definition at line 81 of file OMPDescriptors.h.
Helper to determine if M is a OpenMP target offloading device module.
Definition at line 6236 of file OpenMPOpt.cpp.
Referenced by llvm::OpenMPOptCGSCCPass::run(), and llvm::OpenMPOptPass::run().
Return true iff Fn is an OpenMP GPU kernel; Fn has the "kernel" attribute.
Definition at line 6206 of file OpenMPOpt.cpp.
References llvm::Function::hasFnAttribute().
Referenced by getDeviceKernels().
Can directive D, under some circumstances, create a private copy of a variable in given OpenMP version?
Definition at line 217 of file OMP.cpp.
References collectPrivatizingConstructs(), D(), and llvm::is_contained().
| bool llvm::omp::isValidTraitPropertyForTraitSetAndSelector | ( | TraitProperty | Property, |
| TraitSelector | Selector, | ||
| TraitSet | Set ) |
Return true if Property can be nested in Selector and Set.
Definition at line 581 of file OMPContext.cpp.
References llvm_unreachable.
| bool llvm::omp::isValidTraitSelectorForTraitSet | ( | TraitSelector | Selector, |
| TraitSet | Set, | ||
| bool & | AllowsTraitScore, | ||
| bool & | RequiresProperty ) |
}
Return true if Selector can be nested in Set. Also sets AllowsTraitScore and RequiresProperty to true/false if the user can specify a score for properties in Selector and if the Selector requires at least one property.
Definition at line 565 of file OMPContext.cpp.
References llvm_unreachable.
| bool llvm::omp::isVariantApplicableInContext | ( | const VariantMatchInfo & | VMI, |
| const OMPContext & | Ctx, | ||
| bool | DeviceOrImplementationSetOnly = false ) |
Return true if VMI is applicable in Ctx, that is, all traits required by VMI are available in the OpenMP context Ctx.
If DeviceOrImplementationSetOnly is true, only the device and implementation selector set, if present, are checked. Note that we still honor extension traits provided by the user.
Definition at line 315 of file OMPContext.cpp.
References isVariantApplicableInContextHelper().
| std::string llvm::omp::listOpenMPContextTraitProperties | ( | TraitSet | Set, |
| TraitSelector | Selector ) |
Return a string listing all trait properties for Set and Selector.
Definition at line 614 of file OMPContext.cpp.
| std::string llvm::omp::listOpenMPContextTraitSelectors | ( | TraitSet | Set | ) |
Return a string listing all trait selectors for Set.
Definition at line 603 of file OMPContext.cpp.
| std::string llvm::omp::listOpenMPContextTraitSets | ( | ) |
Return a string listing all trait sets.
Definition at line 593 of file OMPContext.cpp.
| llvm::omp::LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE | ( | ) |
Definition at line 43 of file OMPVersion.h.
References A(), B(), and llvm::Version.
Definition at line 34 of file OMPVersion.h.
Definition at line 44 of file OMPVersion.h.
References A(), B(), and llvm::Version.
Definition at line 35 of file OMPVersion.h.
Definition at line 45 of file OMPVersion.h.
References A(), B(), and llvm::Version.
Definition at line 36 of file OMPVersion.h.
Definition at line 42 of file OMPVersion.h.
References A(), B(), and llvm::Version.
Definition at line 33 of file OMPVersion.h.
Definition at line 46 of file OMPVersion.h.
References A(), B(), and llvm::Version.
Definition at line 39 of file OMPVersion.h.
Definition at line 47 of file OMPVersion.h.
References A(), B(), and llvm::Version.
Definition at line 40 of file OMPVersion.h.
| std::string llvm::omp::prettifyFunctionName | ( | StringRef | FunctionName | ) |
Create a nicer version of a function name for humans to look at.
Definition at line 235 of file OMP.cpp.
References deconstructOpenMPKernelName(), llvm::StringRef::drop_back(), llvm::StringRef::ends_with(), and llvm::StringRef::str().
|
staticconstexpr |
Definition at line 97 of file OMPGridValues.h.
Referenced by getAMDGPUGridValues().
|
staticconstexpr |
For AMDGPU GPUs.
Definition at line 87 of file OMPGridValues.h.
Referenced by getAMDGPUGridValues().
|
staticconstexpr |
All known assume clauses.
Definition at line 37 of file OMPAssume.h.
Referenced by getAllAssumeClauseOptions().
|
inlineconstexpr |
|
staticconstexpr |
For Nvidia GPUs.
Definition at line 113 of file OMPGridValues.h.
Referenced by getGridValue().
Definition at line 204 of file OMPConstants.h.
|
staticconstexpr |
For generic SPIR-V GPUs.
Definition at line 124 of file OMPGridValues.h.
Referenced by getGridValue().