LLVM 20.0.0git
|
Captures attributes that affect generating LLVM-IR using the OpenMPIRBuilder and related classes. More...
#include "llvm/Frontend/OpenMP/OMPIRBuilder.h"
Public Attributes | |
std::optional< bool > | IsTargetDevice |
Flag to define whether to generate code for the role of the OpenMP host (if set to false) or device (if set to true) in an offloading context. | |
std::optional< bool > | IsGPU |
Flag for specifying if the compilation is done for an accelerator. | |
std::optional< bool > | EmitLLVMUsedMetaInfo |
Flag for specifying if LLVMUsed information should be emitted. | |
std::optional< bool > | OpenMPOffloadMandatory |
Flag for specifying if offloading is mandatory. | |
std::optional< StringRef > | FirstSeparator |
First separator used between the initial two parts of a name. | |
std::optional< StringRef > | Separator |
Separator used between all of the rest consecutive parts of s name. | |
std::optional< omp::GV > | GridValue |
SmallVector< Triple > | TargetTriples |
When compilation is being done for the OpenMP host (i.e. | |
Captures attributes that affect generating LLVM-IR using the OpenMPIRBuilder and related classes.
Note that not all attributes are required for all classes or functions. In some use cases the configuration is not necessary at all, because because the only functions that are called are ones that are not dependent on the configuration.
Definition at line 87 of file OMPIRBuilder.h.
OpenMPIRBuilderConfig::OpenMPIRBuilderConfig | ( | ) |
Definition at line 422 of file OMPIRBuilder.cpp.
OpenMPIRBuilderConfig::OpenMPIRBuilderConfig | ( | bool | IsTargetDevice, |
bool | IsGPU, | ||
bool | OpenMPOffloadMandatory, | ||
bool | HasRequiresReverseOffload, | ||
bool | HasRequiresUnifiedAddress, | ||
bool | HasRequiresUnifiedSharedMemory, | ||
bool | HasRequiresDynamicAllocators | ||
) |
Definition at line 425 of file OMPIRBuilder.cpp.
|
inline |
Definition at line 165 of file OMPIRBuilder.h.
References FirstSeparator, and isGPU().
Referenced by llvm::OpenMPIRBuilder::createPlatformSpecificName().
|
inline |
Definition at line 148 of file OMPIRBuilder.h.
int64_t OpenMPIRBuilderConfig::getRequiresFlags | ( | ) | const |
Returns requires directive clauses as flags compatible with those expected by libomptarget.
Definition at line 458 of file OMPIRBuilder.cpp.
References hasRequiresFlags().
Referenced by llvm::OpenMPIRBuilder::createOffloadEntriesAndInfoMetadata().
bool OpenMPIRBuilderConfig::hasRequiresDynamicAllocators | ( | ) | const |
Definition at line 454 of file OMPIRBuilder.cpp.
|
inline |
Definition at line 153 of file OMPIRBuilder.h.
Referenced by llvm::OpenMPIRBuilder::createOffloadEntriesAndInfoMetadata(), and getRequiresFlags().
bool OpenMPIRBuilderConfig::hasRequiresReverseOffload | ( | ) | const |
Definition at line 442 of file OMPIRBuilder.cpp.
bool OpenMPIRBuilderConfig::hasRequiresUnifiedAddress | ( | ) | const |
Definition at line 446 of file OMPIRBuilder.cpp.
bool OpenMPIRBuilderConfig::hasRequiresUnifiedSharedMemory | ( | ) | const |
Definition at line 450 of file OMPIRBuilder.cpp.
Referenced by llvm::OpenMPIRBuilder::createOffloadEntriesAndInfoMetadata(), llvm::OpenMPIRBuilder::getAddrOfDeclareTargetVar(), and llvm::OpenMPIRBuilder::registerTargetGlobalVariable().
|
inline |
Definition at line 137 of file OMPIRBuilder.h.
References assert(), and IsGPU.
Referenced by llvm::OpenMPIRBuilder::createOffloadEntry(), firstSeparator(), and separator().
|
inline |
Definition at line 132 of file OMPIRBuilder.h.
References assert(), and IsTargetDevice.
Referenced by llvm::OpenMPIRBuilder::applyWorkshareLoop(), llvm::OpenMPIRBuilder::createOffloadEntriesAndInfoMetadata(), createOutlinedFunction(), llvm::OpenMPIRBuilder::createParallel(), llvm::OpenMPIRBuilder::createTarget(), llvm::OpenMPIRBuilder::createTeams(), llvm::OpenMPIRBuilder::emitTargetRegionFunction(), llvm::OpenMPIRBuilder::finalize(), llvm::OpenMPIRBuilder::getAddrOfDeclareTargetVar(), llvm::OffloadEntriesInfoManager::registerDeviceGlobalVarEntryInfo(), llvm::OpenMPIRBuilder::registerTargetGlobalVariable(), and llvm::OffloadEntriesInfoManager::registerTargetRegionEntryInfo().
|
inline |
Definition at line 142 of file OMPIRBuilder.h.
References assert(), and OpenMPOffloadMandatory.
Referenced by llvm::OpenMPIRBuilder::emitTargetRegionFunction().
|
inline |
Definition at line 175 of file OMPIRBuilder.h.
References isGPU(), and Separator.
Referenced by llvm::OpenMPIRBuilder::createPlatformSpecificName().
Definition at line 185 of file OMPIRBuilder.h.
References EmitLLVMUsedMetaInfo.
Referenced by llvm::OpenMPIRBuilder::createReductionsGPU().
|
inline |
Definition at line 187 of file OMPIRBuilder.h.
References FirstSeparator.
|
inline |
Definition at line 189 of file OMPIRBuilder.h.
Referenced by llvm::OpenMPIRBuilder::createReductionsGPU().
void OpenMPIRBuilderConfig::setHasRequiresDynamicAllocators | ( | bool | Value | ) |
Definition at line 484 of file OMPIRBuilder.cpp.
void OpenMPIRBuilderConfig::setHasRequiresReverseOffload | ( | bool | Value | ) |
Definition at line 463 of file OMPIRBuilder.cpp.
void OpenMPIRBuilderConfig::setHasRequiresUnifiedAddress | ( | bool | Value | ) |
Definition at line 470 of file OMPIRBuilder.cpp.
void OpenMPIRBuilderConfig::setHasRequiresUnifiedSharedMemory | ( | bool | Value | ) |
Definition at line 477 of file OMPIRBuilder.cpp.
|
inline |
Definition at line 184 of file OMPIRBuilder.h.
References IsGPU.
|
inline |
Definition at line 183 of file OMPIRBuilder.h.
References IsTargetDevice.
|
inline |
Definition at line 186 of file OMPIRBuilder.h.
References OpenMPOffloadMandatory.
|
inline |
Definition at line 188 of file OMPIRBuilder.h.
References Separator.
std::optional<bool> llvm::OpenMPIRBuilderConfig::EmitLLVMUsedMetaInfo |
Flag for specifying if LLVMUsed information should be emitted.
Definition at line 106 of file OMPIRBuilder.h.
Referenced by llvm::OpenMPIRBuilder::finalize(), and setEmitLLVMUsed().
std::optional<StringRef> llvm::OpenMPIRBuilderConfig::FirstSeparator |
First separator used between the initial two parts of a name.
Definition at line 112 of file OMPIRBuilder.h.
Referenced by firstSeparator(), and setFirstSeparator().
std::optional<omp::GV> llvm::OpenMPIRBuilderConfig::GridValue |
Definition at line 117 of file OMPIRBuilder.h.
Referenced by getGridValue(), and setGridValue().
std::optional<bool> llvm::OpenMPIRBuilderConfig::IsGPU |
Flag for specifying if the compilation is done for an accelerator.
It is set according to the architecture of the target triple and currently only true when targeting AMDGPU or NVPTX. Today, these targets can only perform the role of an OpenMP target device, so IsTargetDevice
must also be true if IsGPU
is true. This restriction might be lifted if an accelerator- like target with the ability to work as the OpenMP host is added, or if the capabilities of the currently supported GPU architectures are expanded.
Definition at line 103 of file OMPIRBuilder.h.
Referenced by isGPU(), and setIsGPU().
std::optional<bool> llvm::OpenMPIRBuilderConfig::IsTargetDevice |
Flag to define whether to generate code for the role of the OpenMP host (if set to false) or device (if set to true) in an offloading context.
It is set when the -fopenmp-is-target-device compiler frontend option is specified.
Definition at line 93 of file OMPIRBuilder.h.
Referenced by llvm::OpenMPIRBuilder::createTargetData(), isTargetDevice(), and setIsTargetDevice().
std::optional<bool> llvm::OpenMPIRBuilderConfig::OpenMPOffloadMandatory |
Flag for specifying if offloading is mandatory.
Definition at line 109 of file OMPIRBuilder.h.
Referenced by openMPOffloadMandatory(), and setOpenMPOffloadMandatory().
std::optional<StringRef> llvm::OpenMPIRBuilderConfig::Separator |
Separator used between all of the rest consecutive parts of s name.
Definition at line 114 of file OMPIRBuilder.h.
Referenced by separator(), and setSeparator().
SmallVector<Triple> llvm::OpenMPIRBuilderConfig::TargetTriples |
When compilation is being done for the OpenMP host (i.e.
IsTargetDevice = false
), this contains the list of offloading triples associated, if any.
Definition at line 121 of file OMPIRBuilder.h.