#ifndef LLVM_FRONTEND_OPENMP_OMPCONSTANTS_H
#define LLVM_FRONTEND_OPENMP_OMPCONSTANTS_H
#include "llvm/ADT/BitmaskEnum.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Frontend/OpenMP/OMP.h.inc"
namespace llvm {
namespace omp {
LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE();
enum class InternalControlVar {
#define ICV_DATA_ENV(Enum, ...) Enum,
#include "llvm/Frontend/OpenMP/OMPKinds.def"
};
#define ICV_DATA_ENV(Enum, ...) \
constexpr auto Enum = omp::InternalControlVar::Enum;
#include "llvm/Frontend/OpenMP/OMPKinds.def"
enum class ICVInitValue {
#define ICV_INIT_VALUE(Enum, Name) Enum,
#include "llvm/Frontend/OpenMP/OMPKinds.def"
};
#define ICV_INIT_VALUE(Enum, Name) \
constexpr auto Enum = omp::ICVInitValue::Enum;
#include "llvm/Frontend/OpenMP/OMPKinds.def"
enum class RuntimeFunction {
#define OMP_RTL(Enum, ...) Enum,
#include "llvm/Frontend/OpenMP/OMPKinds.def"
};
#define OMP_RTL(Enum, ...) constexpr auto Enum = omp::RuntimeFunction::Enum;
#include "llvm/Frontend/OpenMP/OMPKinds.def"
enum class DefaultKind {
#define OMP_DEFAULT_KIND(Enum, Str) Enum,
#include "llvm/Frontend/OpenMP/OMPKinds.def"
};
#define OMP_DEFAULT_KIND(Enum, ...) \
constexpr auto Enum = omp::DefaultKind::Enum;
#include "llvm/Frontend/OpenMP/OMPKinds.def"
enum class IdentFlag {
#define OMP_IDENT_FLAG(Enum, Str, Value) Enum = Value,
#include "llvm/Frontend/OpenMP/OMPKinds.def"
LLVM_MARK_AS_BITMASK_ENUM(0x7FFFFFFF)
};
#define OMP_IDENT_FLAG(Enum, ...) constexpr auto Enum = omp::IdentFlag::Enum;
#include "llvm/Frontend/OpenMP/OMPKinds.def"
enum class OMPScheduleType {
None = 0,
BaseStaticChunked = 1,
BaseStatic = 2,
BaseDynamicChunked = 3,
BaseGuidedChunked = 4,
BaseRuntime = 5,
BaseAuto = 6,
BaseTrapezoidal = 7,
BaseGreedy = 8,
BaseBalanced = 9,
BaseGuidedIterativeChunked = 10,
BaseGuidedAnalyticalChunked = 11,
BaseSteal = 12,
BaseStaticBalancedChunked = 13,
BaseGuidedSimd = 14,
BaseRuntimeSimd = 15,
BaseDistributeChunked = 27,
BaseDistribute = 28,
ModifierUnordered = (1 << 5),
ModifierOrdered = (1 << 6),
ModifierNomerge = (1 << 7),
ModifierMonotonic = (1 << 29),
ModifierNonmonotonic = (1 << 30),
OrderingMask = ModifierUnordered | ModifierOrdered | ModifierNomerge,
MonotonicityMask = ModifierMonotonic | ModifierNonmonotonic,
ModifierMask = OrderingMask | MonotonicityMask,
UnorderedStaticChunked = BaseStaticChunked | ModifierUnordered, UnorderedStatic = BaseStatic | ModifierUnordered, UnorderedDynamicChunked = BaseDynamicChunked | ModifierUnordered, UnorderedGuidedChunked = BaseGuidedChunked | ModifierUnordered, UnorderedRuntime = BaseRuntime | ModifierUnordered, UnorderedAuto = BaseAuto | ModifierUnordered, UnorderedTrapezoidal = BaseTrapezoidal | ModifierUnordered, UnorderedGreedy = BaseGreedy | ModifierUnordered, UnorderedBalanced = BaseBalanced | ModifierUnordered, UnorderedGuidedIterativeChunked =
BaseGuidedIterativeChunked | ModifierUnordered, UnorderedGuidedAnalyticalChunked =
BaseGuidedAnalyticalChunked | ModifierUnordered, UnorderedSteal = BaseSteal | ModifierUnordered,
UnorderedStaticBalancedChunked =
BaseStaticBalancedChunked | ModifierUnordered, UnorderedGuidedSimd = BaseGuidedSimd | ModifierUnordered, UnorderedRuntimeSimd = BaseRuntimeSimd | ModifierUnordered,
OrderedStaticChunked = BaseStaticChunked | ModifierOrdered, OrderedStatic = BaseStatic | ModifierOrdered, OrderedDynamicChunked = BaseDynamicChunked | ModifierOrdered, OrderedGuidedChunked = BaseGuidedChunked | ModifierOrdered, OrderedRuntime = BaseRuntime | ModifierOrdered, OrderedAuto = BaseAuto | ModifierOrdered, OrderdTrapezoidal = BaseTrapezoidal | ModifierOrdered,
OrderedDistributeChunked = BaseDistributeChunked | ModifierOrdered, OrderedDistribute = BaseDistribute | ModifierOrdered,
NomergeUnorderedStaticChunked =
BaseStaticChunked | ModifierUnordered | ModifierNomerge, NomergeUnorderedStatic =
BaseStatic | ModifierUnordered | ModifierNomerge, NomergeUnorderedDynamicChunked =
BaseDynamicChunked | ModifierUnordered | ModifierNomerge, NomergeUnorderedGuidedChunked =
BaseGuidedChunked | ModifierUnordered | ModifierNomerge, NomergeUnorderedRuntime =
BaseRuntime | ModifierUnordered | ModifierNomerge, NomergeUnorderedAuto = BaseAuto | ModifierUnordered | ModifierNomerge, NomergeUnorderedTrapezoidal =
BaseTrapezoidal | ModifierUnordered | ModifierNomerge, NomergeUnorderedGreedy =
BaseGreedy | ModifierUnordered | ModifierNomerge, NomergeUnorderedBalanced =
BaseBalanced | ModifierUnordered | ModifierNomerge, NomergeUnorderedGuidedIterativeChunked =
BaseGuidedIterativeChunked | ModifierUnordered | ModifierNomerge, NomergeUnorderedGuidedAnalyticalChunked =
BaseGuidedAnalyticalChunked | ModifierUnordered | ModifierNomerge, NomergeUnorderedSteal =
BaseSteal | ModifierUnordered | ModifierNomerge,
NomergeOrderedStaticChunked =
BaseStaticChunked | ModifierOrdered | ModifierNomerge, NomergeOrderedStatic = BaseStatic | ModifierOrdered | ModifierNomerge, NomergeOrderedDynamicChunked =
BaseDynamicChunked | ModifierOrdered | ModifierNomerge, NomergeOrderedGuidedChunked =
BaseGuidedChunked | ModifierOrdered | ModifierNomerge, NomergeOrderedRuntime =
BaseRuntime | ModifierOrdered | ModifierNomerge, NomergeOrderedAuto = BaseAuto | ModifierOrdered | ModifierNomerge, NomergeOrderedTrapezoidal =
BaseTrapezoidal | ModifierOrdered | ModifierNomerge,
LLVM_MARK_AS_BITMASK_ENUM( ModifierMask)
};
enum OMPTgtExecModeFlags : int8_t {
OMP_TGT_EXEC_MODE_GENERIC = 1 << 0,
OMP_TGT_EXEC_MODE_SPMD = 1 << 1,
OMP_TGT_EXEC_MODE_GENERIC_SPMD =
OMP_TGT_EXEC_MODE_GENERIC | OMP_TGT_EXEC_MODE_SPMD,
LLVM_MARK_AS_BITMASK_ENUM( OMP_TGT_EXEC_MODE_GENERIC_SPMD)
};
enum class AddressSpace : unsigned {
Generic = 0,
Global = 1,
Shared = 3,
Constant = 4,
Local = 5,
};
enum class OMPInteropType { Unknown, Target, TargetSync };
enum class OMPAtomicCompareOp : unsigned { EQ, MIN, MAX };
}
}
#endif