|
LLVM 24.0.0git
|
Captures attributes that affect generating LLVM-IR using the OpenMPIRBuilder and related classes. More...
#include "llvm/Frontend/OpenMP/OMPIRBuilder.h"
Public Types | |
| enum class | CollapseIVMapping { DivMod , Virtual } |
| Representation of a collapsed iteration space. More... | |
Public Attributes | |
| CollapseIVMapping | CollapseMapping = CollapseIVMapping::DivMod |
| Mapping used for collapsed loops. | |
| 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< bool > | NoSignedWrap |
| Flag for specifying whether the no-signed-wrap (nsw) flag should be added to loop induction variable arithmetic. | |
| std::optional< omp::GV > | GridValue |
| SmallVector< Triple > | TargetTriples |
| When compilation is being done for the OpenMP host (i.e. | |
| unsigned | DefaultTargetAS = 0 |
| CallingConv::ID | RuntimeCC = llvm::CallingConv::C |
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 104 of file OMPIRBuilder.h.
|
strong |
Representation of a collapsed iteration space.
| Enumerator | |
|---|---|
| DivMod | Decode source indices from the logical index using division and remainder in each iteration. |
| Virtual | Retain the physical nest and decode each assigned range once. |
Definition at line 107 of file OMPIRBuilder.h.
| OpenMPIRBuilderConfig::OpenMPIRBuilderConfig | ( | ) |
Definition at line 572 of file OMPIRBuilder.cpp.
| OpenMPIRBuilderConfig::OpenMPIRBuilderConfig | ( | bool | IsTargetDevice, |
| bool | IsGPU, | ||
| bool | OpenMPOffloadMandatory, | ||
| bool | HasRequiresReverseOffload, | ||
| bool | HasRequiresUnifiedAddress, | ||
| bool | HasRequiresUnifiedSharedMemory, | ||
| bool | HasRequiresDynamicAllocators ) |
Definition at line 575 of file OMPIRBuilder.cpp.
References IsGPU, IsTargetDevice, and OpenMPOffloadMandatory.
|
inline |
Definition at line 211 of file OMPIRBuilder.h.
References FirstSeparator, and isGPU().
|
inline |
Definition at line 192 of file OMPIRBuilder.h.
References DefaultTargetAS.
|
inline |
Definition at line 187 of file OMPIRBuilder.h.
| int64_t OpenMPIRBuilderConfig::getRequiresFlags | ( | ) | const |
Returns requires directive clauses as flags compatible with those expected by libomptarget.
Definition at line 608 of file OMPIRBuilder.cpp.
References hasRequiresFlags().
|
inline |
Definition at line 197 of file OMPIRBuilder.h.
References RuntimeCC.
|
inline |
Definition at line 194 of file OMPIRBuilder.h.
References NoSignedWrap.
| bool OpenMPIRBuilderConfig::hasRequiresDynamicAllocators | ( | ) | const |
Definition at line 604 of file OMPIRBuilder.cpp.
|
inline |
Definition at line 199 of file OMPIRBuilder.h.
Referenced by getRequiresFlags().
| bool OpenMPIRBuilderConfig::hasRequiresReverseOffload | ( | ) | const |
Definition at line 592 of file OMPIRBuilder.cpp.
| bool OpenMPIRBuilderConfig::hasRequiresUnifiedAddress | ( | ) | const |
Definition at line 596 of file OMPIRBuilder.cpp.
| bool OpenMPIRBuilderConfig::hasRequiresUnifiedSharedMemory | ( | ) | const |
Definition at line 600 of file OMPIRBuilder.cpp.
|
inline |
Definition at line 176 of file OMPIRBuilder.h.
References assert(), and IsGPU.
Referenced by firstSeparator(), and separator().
|
inline |
Definition at line 171 of file OMPIRBuilder.h.
References assert(), and IsTargetDevice.
Referenced by createOutlinedFunction(), and FixupDebugInfoForOutlinedFunction().
|
inline |
Definition at line 181 of file OMPIRBuilder.h.
References assert(), and OpenMPOffloadMandatory.
|
inline |
Definition at line 221 of file OMPIRBuilder.h.
|
inline |
Definition at line 236 of file OMPIRBuilder.h.
References DefaultTargetAS.
|
inline |
Definition at line 231 of file OMPIRBuilder.h.
References EmitLLVMUsedMetaInfo.
|
inline |
Definition at line 233 of file OMPIRBuilder.h.
References FirstSeparator.
|
inline |
Definition at line 235 of file OMPIRBuilder.h.
| void OpenMPIRBuilderConfig::setHasRequiresDynamicAllocators | ( | bool | Value | ) |
Definition at line 634 of file OMPIRBuilder.cpp.
| void OpenMPIRBuilderConfig::setHasRequiresReverseOffload | ( | bool | Value | ) |
Definition at line 613 of file OMPIRBuilder.cpp.
| void OpenMPIRBuilderConfig::setHasRequiresUnifiedAddress | ( | bool | Value | ) |
Definition at line 620 of file OMPIRBuilder.cpp.
| void OpenMPIRBuilderConfig::setHasRequiresUnifiedSharedMemory | ( | bool | Value | ) |
Definition at line 627 of file OMPIRBuilder.cpp.
|
inline |
Definition at line 230 of file OMPIRBuilder.h.
References IsGPU.
|
inline |
Definition at line 229 of file OMPIRBuilder.h.
References IsTargetDevice.
|
inline |
Definition at line 195 of file OMPIRBuilder.h.
References NoSignedWrap.
|
inline |
Definition at line 232 of file OMPIRBuilder.h.
References OpenMPOffloadMandatory.
|
inline |
Definition at line 237 of file OMPIRBuilder.h.
|
inline |
Definition at line 234 of file OMPIRBuilder.h.
References Separator.
| CollapseIVMapping llvm::OpenMPIRBuilderConfig::CollapseMapping = CollapseIVMapping::DivMod |
Mapping used for collapsed loops.
Definition at line 116 of file OMPIRBuilder.h.
| unsigned llvm::OpenMPIRBuilderConfig::DefaultTargetAS = 0 |
Definition at line 158 of file OMPIRBuilder.h.
Referenced by getDefaultTargetAS(), and setDefaultTargetAS().
| std::optional<bool> llvm::OpenMPIRBuilderConfig::EmitLLVMUsedMetaInfo |
Flag for specifying if LLVMUsed information should be emitted.
Definition at line 135 of file OMPIRBuilder.h.
Referenced by setEmitLLVMUsed().
| std::optional<StringRef> llvm::OpenMPIRBuilderConfig::FirstSeparator |
First separator used between the initial two parts of a name.
Definition at line 141 of file OMPIRBuilder.h.
Referenced by firstSeparator(), and setFirstSeparator().
| std::optional<omp::GV> llvm::OpenMPIRBuilderConfig::GridValue |
Definition at line 151 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 132 of file OMPIRBuilder.h.
Referenced by isGPU(), OpenMPIRBuilderConfig(), 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 122 of file OMPIRBuilder.h.
Referenced by isTargetDevice(), OpenMPIRBuilderConfig(), and setIsTargetDevice().
| std::optional<bool> llvm::OpenMPIRBuilderConfig::NoSignedWrap |
Flag for specifying whether the no-signed-wrap (nsw) flag should be added to loop induction variable arithmetic.
Set when the frontend guarantees that signed integer overflow is undefined (with -fno-wrapv).
Definition at line 148 of file OMPIRBuilder.h.
Referenced by hasNoSignedWrap(), and setNoSignedWrap().
| std::optional<bool> llvm::OpenMPIRBuilderConfig::OpenMPOffloadMandatory |
Flag for specifying if offloading is mandatory.
Definition at line 138 of file OMPIRBuilder.h.
Referenced by OpenMPIRBuilderConfig(), openMPOffloadMandatory(), and setOpenMPOffloadMandatory().
| CallingConv::ID llvm::OpenMPIRBuilderConfig::RuntimeCC = llvm::CallingConv::C |
Definition at line 160 of file OMPIRBuilder.h.
Referenced by getRuntimeCC(), and setRuntimeCC().
| std::optional<StringRef> llvm::OpenMPIRBuilderConfig::Separator |
Separator used between all of the rest consecutive parts of s name.
Definition at line 143 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 155 of file OMPIRBuilder.h.