LLVM  17.0.0git
Classes | Typedefs | Enumerations | Functions | Variables
llvm::omp Namespace Reference

Classes

struct  AssumptionClauseMappingInfo
 Helper to describe assume clauses. More...
 
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...
 

Typedefs

using Kernel = Function *
 Summary of a kernel (=entry point for target offloading). More...
 
using KernelSet = SetVector< Kernel >
 Set of kernels in the module. More...
 

Enumerations

enum  InternalControlVar { InternalControlVar::ICV_DATA_ENV }
 IDs for all Internal Control Variables (ICVs). More...
 
enum  ICVInitValue { ICVInitValue::ICV_INIT_VALUE }
 
enum  RuntimeFunction { RuntimeFunction::OMP_RTL }
 IDs for all omp runtime library (RTL) functions. More...
 
enum  DefaultKind { DefaultKind::OMP_DEFAULT_KIND }
 IDs for the different default kinds. More...
 
enum  IdentFlag { IdentFlag::OMP_IDENT_FLAG }
 IDs for all omp runtime library ident_t flag encodings (see their defintion in openmp/runtime/src/kmp.h). More...
 
enum  OMPScheduleType {
  OMPScheduleType::None = 0, OMPScheduleType::BaseStaticChunked = 1, OMPScheduleType::BaseStatic = 2, OMPScheduleType::BaseDynamicChunked = 3,
  OMPScheduleType::BaseGuidedChunked = 4, OMPScheduleType::BaseRuntime = 5, OMPScheduleType::BaseAuto = 6, OMPScheduleType::BaseTrapezoidal = 7,
  OMPScheduleType::BaseGreedy = 8, OMPScheduleType::BaseBalanced = 9, OMPScheduleType::BaseGuidedIterativeChunked = 10, OMPScheduleType::BaseGuidedAnalyticalChunked = 11,
  OMPScheduleType::BaseSteal = 12, OMPScheduleType::BaseStaticBalancedChunked = 13, OMPScheduleType::BaseGuidedSimd = 14, OMPScheduleType::BaseRuntimeSimd = 15,
  OMPScheduleType::BaseDistributeChunked = 27, OMPScheduleType::BaseDistribute = 28, OMPScheduleType::ModifierUnordered = (1 << 5), OMPScheduleType::ModifierOrdered = (1 << 6),
  OMPScheduleType::ModifierNomerge = (1 << 7), OMPScheduleType::ModifierMonotonic = (1 << 29), OMPScheduleType::ModifierNonmonotonic = (1 << 30), OMPScheduleType::OrderingMask = ModifierUnordered | ModifierOrdered | ModifierNomerge,
  OMPScheduleType::MonotonicityMask = ModifierMonotonic | ModifierNonmonotonic, OMPScheduleType::ModifierMask = OrderingMask | MonotonicityMask, OMPScheduleType::UnorderedStaticChunked = BaseStaticChunked | ModifierUnordered, OMPScheduleType::UnorderedStatic = BaseStatic | ModifierUnordered,
  OMPScheduleType::UnorderedDynamicChunked = BaseDynamicChunked | ModifierUnordered, OMPScheduleType::UnorderedGuidedChunked = BaseGuidedChunked | ModifierUnordered, OMPScheduleType::UnorderedRuntime = BaseRuntime | ModifierUnordered, OMPScheduleType::UnorderedAuto = BaseAuto | ModifierUnordered,
  OMPScheduleType::UnorderedTrapezoidal = BaseTrapezoidal | ModifierUnordered, OMPScheduleType::UnorderedGreedy = BaseGreedy | ModifierUnordered, OMPScheduleType::UnorderedBalanced = BaseBalanced | ModifierUnordered, OMPScheduleType::UnorderedGuidedIterativeChunked,
  OMPScheduleType::UnorderedGuidedAnalyticalChunked, OMPScheduleType::UnorderedSteal = BaseSteal | ModifierUnordered, OMPScheduleType::UnorderedStaticBalancedChunked, OMPScheduleType::UnorderedGuidedSimd = BaseGuidedSimd | ModifierUnordered,
  OMPScheduleType::UnorderedRuntimeSimd = BaseRuntimeSimd | ModifierUnordered, OMPScheduleType::OrderedStaticChunked = BaseStaticChunked | ModifierOrdered, OMPScheduleType::OrderedStatic = BaseStatic | ModifierOrdered, OMPScheduleType::OrderedDynamicChunked = BaseDynamicChunked | ModifierOrdered,
  OMPScheduleType::OrderedGuidedChunked = BaseGuidedChunked | ModifierOrdered, OMPScheduleType::OrderedRuntime = BaseRuntime | ModifierOrdered, OMPScheduleType::OrderedAuto = BaseAuto | ModifierOrdered, OMPScheduleType::OrderdTrapezoidal = BaseTrapezoidal | ModifierOrdered,
  OMPScheduleType::OrderedDistributeChunked = BaseDistributeChunked | ModifierOrdered, OMPScheduleType::OrderedDistribute = BaseDistribute | ModifierOrdered, OMPScheduleType::NomergeUnorderedStaticChunked, OMPScheduleType::NomergeUnorderedStatic,
  OMPScheduleType::NomergeUnorderedDynamicChunked, OMPScheduleType::NomergeUnorderedGuidedChunked, OMPScheduleType::NomergeUnorderedRuntime, OMPScheduleType::NomergeUnorderedAuto = BaseAuto | ModifierUnordered | ModifierNomerge,
  OMPScheduleType::NomergeUnorderedTrapezoidal, OMPScheduleType::NomergeUnorderedGreedy, OMPScheduleType::NomergeUnorderedBalanced, OMPScheduleType::NomergeUnorderedGuidedIterativeChunked,
  OMPScheduleType::NomergeUnorderedGuidedAnalyticalChunked, OMPScheduleType::NomergeUnorderedSteal, OMPScheduleType::NomergeOrderedStaticChunked, OMPScheduleType::NomergeOrderedStatic = BaseStatic | ModifierOrdered | ModifierNomerge,
  OMPScheduleType::NomergeOrderedDynamicChunked, OMPScheduleType::NomergeOrderedGuidedChunked, OMPScheduleType::NomergeOrderedRuntime, OMPScheduleType::NomergeOrderedAuto = BaseAuto | ModifierOrdered | ModifierNomerge,
  OMPScheduleType::NomergeOrderedTrapezoidal
}
 
enum  OpenMPOffloadMappingFlags : uint64_t {
  OpenMPOffloadMappingFlags::OMP_MAP_NONE = 0x0, OpenMPOffloadMappingFlags::OMP_MAP_TO = 0x01, OpenMPOffloadMappingFlags::OMP_MAP_FROM = 0x02, OpenMPOffloadMappingFlags::OMP_MAP_ALWAYS = 0x04,
  OpenMPOffloadMappingFlags::OMP_MAP_DELETE = 0x08, OpenMPOffloadMappingFlags::OMP_MAP_PTR_AND_OBJ = 0x10, OpenMPOffloadMappingFlags::OMP_MAP_TARGET_PARAM = 0x20, OpenMPOffloadMappingFlags::OMP_MAP_RETURN_PARAM = 0x40,
  OpenMPOffloadMappingFlags::OMP_MAP_PRIVATE = 0x80, OpenMPOffloadMappingFlags::OMP_MAP_LITERAL = 0x100, OpenMPOffloadMappingFlags::OMP_MAP_IMPLICIT = 0x200, OpenMPOffloadMappingFlags::OMP_MAP_CLOSE = 0x400,
  OpenMPOffloadMappingFlags::OMP_MAP_PRESENT = 0x1000, OpenMPOffloadMappingFlags::OMP_MAP_OMPX_HOLD = 0x2000, OpenMPOffloadMappingFlags::OMP_MAP_NON_CONTIG = 0x100000000000, OpenMPOffloadMappingFlags::OMP_MAP_MEMBER_OF = 0xffff000000000000
}
 Values for bit flags used to specify the mapping type for offloading. More...
 
enum  AddressSpace : unsigned {
  AddressSpace::Generic = 0, AddressSpace::Global = 1, AddressSpace::Shared = 3, AddressSpace::Constant = 4,
  AddressSpace::Local = 5
}
 
enum  OMPInteropType { OMPInteropType::Unknown, OMPInteropType::Target, OMPInteropType::TargetSync }
 
enum  OMPAtomicCompareOp : unsigned { OMPAtomicCompareOp::EQ, OMPAtomicCompareOp::MIN, OMPAtomicCompareOp::MAX }
 Atomic compare operations. Currently OpenMP only supports ==, >, and <. More...
 
enum  RTLDependInfoFields { RTLDependInfoFields::BaseAddr, RTLDependInfoFields::Len, RTLDependInfoFields::Flags }
 Fields ids in kmp_depend_info record. More...
 
enum  RTLDependenceKindTy {
  RTLDependenceKindTy::DepUnknown = 0x0, RTLDependenceKindTy::DepIn = 0x01, RTLDependenceKindTy::DepInOut = 0x3, RTLDependenceKindTy::DepMutexInOutSet = 0x4,
  RTLDependenceKindTy::DepInOutSet = 0x8, RTLDependenceKindTy::DepOmpAllMem = 0x80
}
 Dependence kind for RTL. More...
 
enum  TraitSet { TraitSet::OMP_TRAIT_SET }
 OpenMP Context related IDs and helpers. More...
 
enum  TraitSelector { TraitSelector::OMP_TRAIT_SELECTOR }
 IDs for all OpenMP context selector trait (device={kind/isa...}/...). More...
 
enum  TraitProperty { TraitProperty::OMP_TRAIT_PROPERTY, TraitProperty::OMP_LAST_TRAIT_PROPERTY }
 IDs for all OpenMP context trait properties (host/gpu/bsc/llvm/...) More...
 
enum  OMPTgtExecModeFlags : unsigned char { OMP_TGT_EXEC_MODE_GENERIC = 1 << 0, OMP_TGT_EXEC_MODE_SPMD = 1 << 1, OMP_TGT_EXEC_MODE_GENERIC_SPMD }
 

Functions

std::string getAllAssumeClauseOptions ()
 
 LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE ()
 
TraitSet getOpenMPContextTraitSetKind (StringRef Str)
 Parse Str and return the trait set it matches or TraitSet::invalid. More...
 
TraitSet getOpenMPContextTraitSetForSelector (TraitSelector Selector)
 Return the trait set for which Selector is a selector. More...
 
TraitSet getOpenMPContextTraitSetForProperty (TraitProperty Property)
 Return the trait set for which Property is a property. More...
 
StringRef getOpenMPContextTraitSetName (TraitSet Kind)
 Return a textual representation of the trait set Kind. More...
 
TraitSelector getOpenMPContextTraitSelectorKind (StringRef Str)
 Parse Str and return the trait set it matches or TraitSelector::invalid. More...
 
TraitSelector getOpenMPContextTraitSelectorForProperty (TraitProperty Property)
 Return the trait selector for which Property is a property. More...
 
StringRef getOpenMPContextTraitSelectorName (TraitSelector Kind)
 Return a textual representation of the trait selector Kind. More...
 
TraitProperty 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 getOpenMPContextTraitPropertyForSelector (TraitSelector Selector)
 Return the trait property for a singleton selector Selector. More...
 
StringRef 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 getOpenMPContextTraitPropertyFullName (TraitProperty Kind)
 Return a textual representation of the trait property Kind with selector and set name included. More...
 
std::string listOpenMPContextTraitSets ()
 Return a string listing all trait sets. More...
 
std::string listOpenMPContextTraitSelectors (TraitSet Set)
 Return a string listing all trait selectors for Set. More...
 
std::string listOpenMPContextTraitProperties (TraitSet Set, TraitSelector Selector)
 Return a string listing all trait properties for Set and Selector. More...
 
bool isValidTraitSelectorForTraitSet (TraitSelector Selector, TraitSet Set, bool &AllowsTraitScore, bool &RequiresProperty)
 } More...
 
bool isValidTraitPropertyForTraitSetAndSelector (TraitProperty Property, TraitSelector Selector, TraitSet Set)
 Return true if Property can be nested in Selector and Set. More...
 
bool 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 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...
 
template<unsigned wavesize>
constexpr const GVgetAMDGPUGridValues ()
 
bool containsOpenMP (Module &M)
 Helper to determine if M contains OpenMP. More...
 
bool isOpenMPDevice (Module &M)
 Helper to determine if M is a OpenMP target offloading device module. More...
 
KernelSet getDeviceKernels (Module &M)
 Get OpenMP device kernels in M. More...
 

Variables

static constexpr AssumptionClauseMappingInfo AssumptionClauseMappings []
 All known assume clauses. More...
 
static constexpr GV AMDGPUGridValues64
 For AMDGPU GPUs. More...
 
static constexpr GV AMDGPUGridValues32
 
static constexpr GV NVPTXGridValues
 For Nvidia GPUs. More...
 

Typedef Documentation

◆ Kernel

using llvm::omp::Kernel = typedef Function *

Summary of a kernel (=entry point for target offloading).

Definition at line 21 of file OpenMPOpt.h.

◆ KernelSet

Set of kernels in the module.

Definition at line 24 of file OpenMPOpt.h.

Enumeration Type Documentation

◆ AddressSpace

enum llvm::omp::AddressSpace : unsigned
strong
Enumerator
Generic 
Global 
Shared 
Constant 
Local 

Definition at line 244 of file OMPConstants.h.

◆ DefaultKind

IDs for the different default kinds.

Enumerator
OMP_DEFAULT_KIND 

Definition at line 55 of file OMPConstants.h.

◆ ICVInitValue

Enumerator
ICV_INIT_VALUE 

Definition at line 36 of file OMPConstants.h.

◆ IdentFlag

enum llvm::omp::IdentFlag
strong

IDs for all omp runtime library ident_t flag encodings (see their defintion in openmp/runtime/src/kmp.h).

Enumerator
OMP_IDENT_FLAG 

Definition at line 66 of file OMPConstants.h.

◆ InternalControlVar

IDs for all Internal Control Variables (ICVs).

Enumerator
ICV_DATA_ENV 

Definition at line 27 of file OMPConstants.h.

◆ OMPAtomicCompareOp

enum llvm::omp::OMPAtomicCompareOp : unsigned
strong

Atomic compare operations. Currently OpenMP only supports ==, >, and <.

Enumerator
EQ 
MIN 
MAX 

Definition at line 256 of file OMPConstants.h.

◆ OMPInteropType

Note
This needs to be kept in sync with interop.h enum kmp_interop_type_t.:
Enumerator
Unknown 
Target 
TargetSync 

Definition at line 253 of file OMPConstants.h.

◆ OMPScheduleType

Note
This needs to be kept in sync with kmp.h enum sched_type. Todo: Update kmp.h to include this file, and remove the enums in kmp.h
Enumerator
None 
BaseStaticChunked 
BaseStatic 
BaseDynamicChunked 
BaseGuidedChunked 
BaseRuntime 
BaseAuto 
BaseTrapezoidal 
BaseGreedy 
BaseBalanced 
BaseGuidedIterativeChunked 
BaseGuidedAnalyticalChunked 
BaseSteal 
BaseStaticBalancedChunked 
BaseGuidedSimd 
BaseRuntimeSimd 
BaseDistributeChunked 
BaseDistribute 
ModifierUnordered 
ModifierOrdered 
ModifierNomerge 
ModifierMonotonic 
ModifierNonmonotonic 
OrderingMask 
MonotonicityMask 
ModifierMask 
UnorderedStaticChunked 
UnorderedStatic 
UnorderedDynamicChunked 
UnorderedGuidedChunked 
UnorderedRuntime 
UnorderedAuto 
UnorderedTrapezoidal 
UnorderedGreedy 
UnorderedBalanced 
UnorderedGuidedIterativeChunked 
UnorderedGuidedAnalyticalChunked 
UnorderedSteal 
UnorderedStaticBalancedChunked 
UnorderedGuidedSimd 
UnorderedRuntimeSimd 
OrderedStaticChunked 
OrderedStatic 
OrderedDynamicChunked 
OrderedGuidedChunked 
OrderedRuntime 
OrderedAuto 
OrderdTrapezoidal 
OrderedDistributeChunked 
OrderedDistribute 
NomergeUnorderedStaticChunked 
NomergeUnorderedStatic 
NomergeUnorderedDynamicChunked 
NomergeUnorderedGuidedChunked 
NomergeUnorderedRuntime 
NomergeUnorderedAuto 
NomergeUnorderedTrapezoidal 
NomergeUnorderedGreedy 
NomergeUnorderedBalanced 
NomergeUnorderedGuidedIterativeChunked 
NomergeUnorderedGuidedAnalyticalChunked 
NomergeUnorderedSteal 
NomergeOrderedStaticChunked 
NomergeOrderedStatic 
NomergeOrderedDynamicChunked 
NomergeOrderedGuidedChunked 
NomergeOrderedRuntime 
NomergeOrderedAuto 
NomergeOrderedTrapezoidal 

Definition at line 77 of file OMPConstants.h.

◆ OMPTgtExecModeFlags

enum llvm::omp::OMPTgtExecModeFlags : unsigned char
Enumerator
OMP_TGT_EXEC_MODE_GENERIC 
OMP_TGT_EXEC_MODE_SPMD 
OMP_TGT_EXEC_MODE_GENERIC_SPMD 

Definition at line 21 of file OMPDeviceConstants.h.

◆ OpenMPOffloadMappingFlags

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_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 190 of file OMPConstants.h.

◆ RTLDependenceKindTy

Dependence kind for RTL.

Enumerator
DepUnknown 
DepIn 
DepInOut 
DepMutexInOutSet 
DepInOutSet 
DepOmpAllMem 

Definition at line 262 of file OMPConstants.h.

◆ RTLDependInfoFields

Fields ids in kmp_depend_info record.

Enumerator
BaseAddr 
Len 
Flags 

Definition at line 259 of file OMPConstants.h.

◆ RuntimeFunction

IDs for all omp runtime library (RTL) functions.

Enumerator
OMP_RTL 

Definition at line 46 of file OMPConstants.h.

◆ TraitProperty

IDs for all OpenMP context trait properties (host/gpu/bsc/llvm/...)

Enumerator
OMP_TRAIT_PROPERTY 
OMP_LAST_TRAIT_PROPERTY 

Definition at line 45 of file OMPContext.h.

◆ TraitSelector

IDs for all OpenMP context selector trait (device={kind/isa...}/...).

Enumerator
OMP_TRAIT_SELECTOR 

Definition at line 39 of file OMPContext.h.

◆ TraitSet

enum llvm::omp::TraitSet
strong

OpenMP Context related IDs and helpers.

{ IDs for all OpenMP context selector trait sets (construct/device/...).

Enumerator
OMP_TRAIT_SET 

Definition at line 33 of file OMPContext.h.

Function Documentation

◆ containsOpenMP()

bool llvm::omp::containsOpenMP ( Module M)

Helper to determine if M contains OpenMP.

Definition at line 5517 of file OpenMPOpt.cpp.

References M.

Referenced by llvm::OpenMPOptPass::run(), and llvm::OpenMPOptCGSCCPass::run().

◆ getAllAssumeClauseOptions()

std::string llvm::omp::getAllAssumeClauseOptions ( )
inline

Definition at line 44 of file OMPAssume.h.

References AssumptionClauseMappings, and S.

◆ getAMDGPUGridValues()

template<unsigned wavesize>
constexpr const GV& llvm::omp::getAMDGPUGridValues ( )
constexpr

Definition at line 107 of file OMPGridValues.h.

References AMDGPUGridValues32, and AMDGPUGridValues64.

◆ getBestVariantMatchForContext()

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.

See llvm::isVariantApplicableInContext.

Definition at line 339 of file OMPContext.cpp.

References llvm::numbers::e, llvm::APInt::eq(), getVariantMatchScore(), isStrictSubset(), isVariantApplicableInContextHelper(), and llvm::APInt::ult().

◆ getDeviceKernels()

KernelSet llvm::omp::getDeviceKernels ( Module M)

◆ getOpenMPContextTraitPropertyForSelector()

TraitProperty llvm::omp::getOpenMPContextTraitPropertyForSelector ( TraitSelector  Selector)

Return the trait property for a singleton selector Selector.

Definition at line 453 of file OMPContext.cpp.

References llvm::StringSwitch< T, R >::Default(), and getOpenMPContextTraitSelectorName().

◆ getOpenMPContextTraitPropertyFullName()

StringRef llvm::omp::getOpenMPContextTraitPropertyFullName ( TraitProperty  Kind)

Return a textual representation of the trait property Kind with selector and set name included.

Definition at line 475 of file OMPContext.cpp.

References llvm_unreachable.

Referenced by llvm::omp::OMPContext::OMPContext().

◆ getOpenMPContextTraitPropertyKind()

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 440 of file OMPContext.cpp.

◆ getOpenMPContextTraitPropertyName()

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 463 of file OMPContext.cpp.

References llvm_unreachable.

Referenced by isVariantApplicableInContextHelper().

◆ getOpenMPContextTraitSelectorForProperty()

TraitSelector llvm::omp::getOpenMPContextTraitSelectorForProperty ( TraitProperty  Property)

Return the trait selector for which Property is a property.

Definition at line 421 of file OMPContext.cpp.

References llvm_unreachable.

Referenced by getVariantMatchScore(), and isVariantApplicableInContextHelper().

◆ getOpenMPContextTraitSelectorKind()

TraitSelector llvm::omp::getOpenMPContextTraitSelectorKind ( StringRef  Str)

Parse Str and return the trait set it matches or TraitSelector::invalid.

Definition at line 413 of file OMPContext.cpp.

References llvm::StringSwitch< T, R >::Default(), and S.

◆ getOpenMPContextTraitSelectorName()

StringRef llvm::omp::getOpenMPContextTraitSelectorName ( TraitSelector  Kind)

Return a textual representation of the trait selector Kind.

Definition at line 430 of file OMPContext.cpp.

References llvm_unreachable.

Referenced by getOpenMPContextTraitPropertyForSelector().

◆ getOpenMPContextTraitSetForProperty()

TraitSet llvm::omp::getOpenMPContextTraitSetForProperty ( TraitProperty  Property)

Return the trait set for which Property is a property.

Definition at line 394 of file OMPContext.cpp.

References llvm_unreachable.

Referenced by llvm::omp::VariantMatchInfo::addTrait(), llvm::omp::OMPContext::addTrait(), getVariantMatchScore(), and isVariantApplicableInContextHelper().

◆ getOpenMPContextTraitSetForSelector()

TraitSet llvm::omp::getOpenMPContextTraitSetForSelector ( TraitSelector  Selector)

Return the trait set for which Selector is a selector.

Definition at line 384 of file OMPContext.cpp.

References llvm_unreachable.

◆ getOpenMPContextTraitSetKind()

TraitSet llvm::omp::getOpenMPContextTraitSetKind ( StringRef  Str)

Parse Str and return the trait set it matches or TraitSet::invalid.

Definition at line 376 of file OMPContext.cpp.

References llvm::StringSwitch< T, R >::Default(), and S.

◆ getOpenMPContextTraitSetName()

StringRef llvm::omp::getOpenMPContextTraitSetName ( TraitSet  Kind)

Return a textual representation of the trait set Kind.

Definition at line 403 of file OMPContext.cpp.

References llvm_unreachable.

◆ isOpenMPDevice()

bool llvm::omp::isOpenMPDevice ( Module M)

Helper to determine if M is a OpenMP target offloading device module.

Definition at line 5525 of file OpenMPOpt.cpp.

References M.

Referenced by llvm::OpenMPOptPass::run(), and llvm::OpenMPOptCGSCCPass::run().

◆ isValidTraitPropertyForTraitSetAndSelector()

bool llvm::omp::isValidTraitPropertyForTraitSetAndSelector ( TraitProperty  Property,
TraitSelector  Selector,
TraitSet  Set 
)

Return true if Property can be nested in Selector and Set.

Definition at line 500 of file OMPContext.cpp.

References llvm_unreachable.

◆ isValidTraitSelectorForTraitSet()

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 485 of file OMPContext.cpp.

References llvm_unreachable.

◆ isVariantApplicableInContext()

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.

If DeviceSetOnly is true, only the device selector set, if present, are checked. Note that we still honor extension traits provided by the user.

Definition at line 262 of file OMPContext.cpp.

References isVariantApplicableInContextHelper().

◆ listOpenMPContextTraitProperties()

std::string llvm::omp::listOpenMPContextTraitProperties ( TraitSet  Set,
TraitSelector  Selector 
)

Return a string listing all trait properties for Set and Selector.

Definition at line 533 of file OMPContext.cpp.

References S.

◆ listOpenMPContextTraitSelectors()

std::string llvm::omp::listOpenMPContextTraitSelectors ( TraitSet  Set)

Return a string listing all trait selectors for Set.

Definition at line 522 of file OMPContext.cpp.

References S.

◆ listOpenMPContextTraitSets()

std::string llvm::omp::listOpenMPContextTraitSets ( )

Return a string listing all trait sets.

Definition at line 512 of file OMPContext.cpp.

References S.

◆ LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE()

llvm::omp::LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE ( )

Variable Documentation

◆ AMDGPUGridValues32

constexpr GV llvm::omp::AMDGPUGridValues32
staticconstexpr
Initial value:
= {
256,
32,
(1 << 16),
440,
896,
1024,
256,
}

Definition at line 97 of file OMPGridValues.h.

Referenced by getAMDGPUGridValues().

◆ AMDGPUGridValues64

constexpr GV llvm::omp::AMDGPUGridValues64
staticconstexpr
Initial value:
= {
256,
64,
(1 << 16),
440,
896,
1024,
256,
}

For AMDGPU GPUs.

Definition at line 87 of file OMPGridValues.h.

Referenced by getAMDGPUGridValues().

◆ AssumptionClauseMappings

constexpr AssumptionClauseMappingInfo llvm::omp::AssumptionClauseMappings[]
staticconstexpr
Initial value:
= {
#define OMP_ASSUME_CLAUSE(Identifier, StartsWith, HasDirectiveList, HasExpression)
}

All known assume clauses.

Definition at line 37 of file OMPAssume.h.

Referenced by getAllAssumeClauseOptions().

◆ NVPTXGridValues

constexpr GV llvm::omp::NVPTXGridValues
staticconstexpr
Initial value:
= {
256,
32,
(1 << 16),
3200,
896,
1024,
128,
}

For Nvidia GPUs.

Definition at line 113 of file OMPGridValues.h.