13#ifndef MLIR_DIALECT_OPENMP_UTILS_UTILS_H_
14#define MLIR_DIALECT_OPENMP_UTILS_UTILS_H_
19#include "llvm/TargetParser/Triple.h"
Operation is the basic unit of execution within MLIR.
This class represents an instance of an SSA value in the MLIR system, representing a computable value...
void setOffloadModuleInterfaceAttributes(ModuleOp module, const OffloadModuleOpts &opts)
Sets OpenMP offload module interface attributes on a ModuleOp, shared between Flang and Clang (CIR) f...
bool isOpenMPModule(ModuleOp module)
Checks whether this is an OpenMP-enabled module.
int64_t getOpenMPVersionAttribute(ModuleOp module, int64_t fallback=-1)
Returns the value of the omp.version attribute, if present, or the fallback.
bool opInSharedDeviceContext(Operation &op)
Check whether the given operation is located in a context where an allocation to be used by multiple ...
void setOpenMPVersionAttribute(ModuleOp module, int64_t version)
Adds or updates the omp.version attribute.
bool allocaUsesRequireSharedMem(Value alloc)
Check whether the value representing an allocation, assumed to have been defined in a shared device c...
Include the generated interface declarations.
Offload-specific OpenMP module attributes, associated to the OffloadModuleInterface.
bool assumeNoNestedParallelism
bool assumeTeamsOversubscription
std::vector< llvm::Triple > targetTriples
OffloadModuleOpts()=default
bool assumeThreadsOversubscription
uint32_t openMPDeviceVersion
OffloadModuleOpts(uint32_t targetDebugKind, bool assumeTeamsOversubscription, bool assumeThreadsOversubscription, bool assumeNoThreadState, bool assumeNoNestedParallelism, bool isTargetDevice, bool isGPU, bool forceUSM, uint32_t openMPDeviceVersion, const Twine &hostIRFile, ArrayRef< llvm::Triple > targetTriples={}, bool noGPULib=false)