LLVM  10.0.0
Namespaces | Macros | Enumerations | Functions
OMPConstants.h File Reference

This file defines constans and helpers used when dealing with OpenMP. More...

#include "llvm/ADT/BitmaskEnum.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Frontend/OpenMP/OMPKinds.def"
Include dependency graph for OMPConstants.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 llvm
 This class represents lattice values for constants.
 
 llvm::omp
 
 llvm::omp::types
 Forward declarations for LLVM-IR types (simple, function and structure) are generated below.
 

Macros

#define OMP_DIRECTIVE(Enum, ...)   Enum,
 Make the enum values available in the llvm::omp namespace. More...
 
#define OMP_DIRECTIVE(Enum, ...)   constexpr auto Enum = omp::Directive::Enum;
 Make the enum values available in the llvm::omp namespace. More...
 
#define OMP_RTL(Enum, ...)   Enum,
 
#define OMP_RTL(Enum, ...)   constexpr auto Enum = omp::RuntimeFunction::Enum;
 
#define OMP_PROC_BIND_KIND(Enum, Str, Value)   Enum = Value,
 
#define OMP_PROC_BIND_KIND(Enum, ...)   constexpr auto Enum = omp::ProcBindKind::Enum;
 
#define OMP_IDENT_FLAG(Enum, Str, Value)   Enum = Value,
 
#define OMP_IDENT_FLAG(Enum, ...)   constexpr auto Enum = omp::IdentFlag::Enum;
 
#define OMP_TYPE(VarName, InitValue)   extern Type *VarName;
 
#define OMP_FUNCTION_TYPE(VarName, IsVarArg, ReturnType, ...)
 
#define OMP_STRUCT_TYPE(VarName, StrName, ...)
 

Enumerations

enum  llvm::omp::Directive { llvm::omp::Directive::OMP_DIRECTIVE }
 IDs for all OpenMP directives. More...
 
enum  llvm::omp::RuntimeFunction { llvm::omp::RuntimeFunction::OMP_RTL }
 IDs for all omp runtime library (RTL) functions. More...
 
enum  llvm::omp::ProcBindKind { llvm::omp::ProcBindKind::OMP_PROC_BIND_KIND }
 IDs for the different proc bind kinds. More...
 
enum  llvm::omp::IdentFlag { llvm::omp::IdentFlag::OMP_IDENT_FLAG }
 IDs for all omp runtime library ident_t flag encodings (see their defintion in openmp/runtime/src/kmp.h). More...
 

Functions

 llvm::omp::LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE ()
 
Directive llvm::omp::getOpenMPDirectiveKind (StringRef Str)
 Parse Str and return the directive it matches or OMPD_unknown if none. More...
 
StringRef llvm::omp::getOpenMPDirectiveName (Directive D)
 Return a textual representation of the directive D. More...
 
void llvm::omp::types::initializeTypes (Module &M)
 Helper to initialize all types defined in OpenMP/OMPKinds.def. More...
 
void llvm::omp::types::uninitializeTypes ()
 Helper to uninitialize all types defined in OpenMP/OMPKinds.def. More...
 

Detailed Description

This file defines constans and helpers used when dealing with OpenMP.

Definition in file OMPConstants.h.

Macro Definition Documentation

◆ OMP_DIRECTIVE [1/2]

#define OMP_DIRECTIVE (   Enum,
  ... 
)    Enum,

Make the enum values available in the llvm::omp namespace.

This allows us to write something like OMPD_parallel if we have a using namespace omp. At the same time we do not loose the strong type guarantees of the enum class, that is we cannot pass an unsigned as Directive without an explicit cast.

Definition at line 40 of file OMPConstants.h.

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

◆ OMP_DIRECTIVE [2/2]

#define OMP_DIRECTIVE (   Enum,
  ... 
)    constexpr auto Enum = omp::Directive::Enum;

Make the enum values available in the llvm::omp namespace.

This allows us to write something like OMPD_parallel if we have a using namespace omp. At the same time we do not loose the strong type guarantees of the enum class, that is we cannot pass an unsigned as Directive without an explicit cast.

Definition at line 40 of file OMPConstants.h.

◆ OMP_FUNCTION_TYPE

#define OMP_FUNCTION_TYPE (   VarName,
  IsVarArg,
  ReturnType,
  ... 
)
Value:

Definition at line 88 of file OMPConstants.h.

◆ OMP_IDENT_FLAG [1/2]

#define OMP_IDENT_FLAG (   Enum,
  Str,
  Value 
)    Enum = Value,

Definition at line 70 of file OMPConstants.h.

◆ OMP_IDENT_FLAG [2/2]

#define OMP_IDENT_FLAG (   Enum,
  ... 
)    constexpr auto Enum = omp::IdentFlag::Enum;

Definition at line 70 of file OMPConstants.h.

◆ OMP_PROC_BIND_KIND [1/2]

#define OMP_PROC_BIND_KIND (   Enum,
  Str,
  Value 
)    Enum = Value,

Definition at line 58 of file OMPConstants.h.

◆ OMP_PROC_BIND_KIND [2/2]

#define OMP_PROC_BIND_KIND (   Enum,
  ... 
)    constexpr auto Enum = omp::ProcBindKind::Enum;

Definition at line 58 of file OMPConstants.h.

◆ OMP_RTL [1/2]

#define OMP_RTL (   Enum,
  ... 
)    Enum,

Definition at line 49 of file OMPConstants.h.

◆ OMP_RTL [2/2]

#define OMP_RTL (   Enum,
  ... 
)    constexpr auto Enum = omp::RuntimeFunction::Enum;

Definition at line 49 of file OMPConstants.h.

◆ OMP_STRUCT_TYPE

#define OMP_STRUCT_TYPE (   VarName,
  StrName,
  ... 
)
Value:
extern StructType *VarName; \
extern PointerType *VarName##Ptr;

Definition at line 91 of file OMPConstants.h.

◆ OMP_TYPE

#define OMP_TYPE (   VarName,
  InitValue 
)    extern Type *VarName;

Definition at line 87 of file OMPConstants.h.