LLVM 20.0.0git
|
Class that manages information about offload code regions and data. More...
#include "llvm/Frontend/OpenMP/OMPIRBuilder.h"
Classes | |
class | OffloadEntryInfo |
Base class of the entries info. More... | |
class | OffloadEntryInfoDeviceGlobalVar |
Device global variable entries info. More... | |
class | OffloadEntryInfoTargetRegion |
Target region entries info. More... | |
Public Types | |
enum | OMPTargetRegionEntryKind : uint32_t { OMPTargetRegionEntryTargetRegion = 0x0 } |
Kind of the target registry entry. More... | |
enum | OMPTargetGlobalVarEntryKind : uint32_t { OMPTargetGlobalVarEntryTo = 0x0 , OMPTargetGlobalVarEntryLink = 0x1 , OMPTargetGlobalVarEntryEnter = 0x2 , OMPTargetGlobalVarEntryNone = 0x3 , OMPTargetGlobalVarEntryIndirect = 0x8 , OMPTargetGlobalRegisterRequires = 0x10 } |
Kind of the global variable entry.. More... | |
enum | OMPTargetDeviceClauseKind : uint32_t { OMPTargetDeviceClauseAny = 0x0 , OMPTargetDeviceClauseNoHost = 0x1 , OMPTargetDeviceClauseHost = 0x2 , OMPTargetDeviceClauseNone = 0x3 } |
Kind of device clause for declare target variables and functions NOTE: Currently not used as a part of a variable entry used for Flang and Clang to interface with the variable related registration functions. More... | |
typedef function_ref< void(const TargetRegionEntryInfo &EntryInfo, const OffloadEntryInfoTargetRegion &)> | OffloadTargetRegionEntryInfoActTy |
brief Applies action Action on all registered entries. | |
typedef function_ref< void(StringRef, const OffloadEntryInfoDeviceGlobalVar &)> | OffloadDeviceGlobalVarEntryInfoActTy |
Applies action Action on all registered entries. | |
Class that manages information about offload code regions and data.
Definition at line 232 of file OMPIRBuilder.h.
typedef function_ref<void(StringRef, const OffloadEntryInfoDeviceGlobalVar &)> llvm::OffloadEntriesInfoManager::OffloadDeviceGlobalVarEntryInfoActTy |
Applies action Action on all registered entries.
Definition at line 438 of file OMPIRBuilder.h.
typedef function_ref<void(const TargetRegionEntryInfo &EntryInfo, const OffloadEntryInfoTargetRegion &)> llvm::OffloadEntriesInfoManager::OffloadTargetRegionEntryInfoActTy |
brief Applies action Action on all registered entries.
Definition at line 348 of file OMPIRBuilder.h.
Kind of device clause for declare target variables and functions NOTE: Currently not used as a part of a variable entry used for Flang and Clang to interface with the variable related registration functions.
Definition at line 377 of file OMPIRBuilder.h.
Kind of the global variable entry..
Definition at line 357 of file OMPIRBuilder.h.
Kind of the target registry entry.
Enumerator | |
---|---|
OMPTargetRegionEntryTargetRegion | Mark the entry as target region. |
Definition at line 297 of file OMPIRBuilder.h.
|
inline |
Definition at line 290 of file OMPIRBuilder.h.
void OffloadEntriesInfoManager::actOnDeviceGlobalVarEntriesInfo | ( | const OffloadDeviceGlobalVarEntryInfoActTy & | Action | ) |
Definition at line 9674 of file OMPIRBuilder.cpp.
Referenced by llvm::OpenMPIRBuilder::createOffloadEntriesAndInfoMetadata().
void OffloadEntriesInfoManager::actOnTargetRegionEntriesInfo | ( | const OffloadTargetRegionEntryInfoActTy & | Action | ) |
Definition at line 9620 of file OMPIRBuilder.cpp.
Referenced by llvm::OpenMPIRBuilder::createOffloadEntriesAndInfoMetadata().
bool OffloadEntriesInfoManager::empty | ( | ) | const |
Return true if a there are no entries defined.
Definition at line 9543 of file OMPIRBuilder.cpp.
Referenced by llvm::OpenMPIRBuilder::createOffloadEntriesAndInfoMetadata(), and llvm::OpenMPIRBuilder::finalize().
void OffloadEntriesInfoManager::getTargetRegionEntryFnName | ( | SmallVectorImpl< char > & | Name, |
const TargetRegionEntryInfo & | EntryInfo | ||
) |
Definition at line 9272 of file OMPIRBuilder.cpp.
References llvm::TargetRegionEntryInfo::DeviceID, llvm::TargetRegionEntryInfo::FileID, llvm::TargetRegionEntryInfo::getTargetRegionEntryFnName(), llvm::TargetRegionEntryInfo::Line, Name, and llvm::TargetRegionEntryInfo::ParentName.
Referenced by llvm::OpenMPIRBuilder::emitTargetRegionFunction().
Checks if the variable with the given name has been registered already.
Definition at line 433 of file OMPIRBuilder.h.
References llvm::StringMap< ValueTy, AllocatorTy >::count().
Referenced by llvm::OpenMPIRBuilder::registerTargetGlobalVariable().
bool OffloadEntriesInfoManager::hasTargetRegionEntryInfo | ( | TargetRegionEntryInfo | EntryInfo, |
bool | IgnoreAddressId = false |
||
) | const |
Return true if a target region entry with the provided information exists.
Definition at line 9604 of file OMPIRBuilder.cpp.
References llvm::TargetRegionEntryInfo::Count.
void OffloadEntriesInfoManager::initializeDeviceGlobalVarEntryInfo | ( | StringRef | Name, |
OMPTargetGlobalVarEntryKind | Flags, | ||
unsigned | Order | ||
) |
Initialize device global variable entry.
This is ONLY used for DEVICE compilation.
Definition at line 9628 of file OMPIRBuilder.cpp.
References llvm::omp::Flags, and Name.
Referenced by llvm::OpenMPIRBuilder::loadOffloadInfoMetadata().
void OffloadEntriesInfoManager::initializeTargetRegionEntryInfo | ( | const TargetRegionEntryInfo & | EntryInfo, |
unsigned | Order | ||
) |
Initialize target region entry.
This is ONLY needed for DEVICE compilation.
Definition at line 9564 of file OMPIRBuilder.cpp.
Referenced by llvm::OpenMPIRBuilder::loadOffloadInfoMetadata().
void OffloadEntriesInfoManager::registerDeviceGlobalVarEntryInfo | ( | StringRef | VarName, |
Constant * | Addr, | ||
int64_t | VarSize, | ||
OMPTargetGlobalVarEntryKind | Flags, | ||
GlobalValue::LinkageTypes | Linkage | ||
) |
Register device global variable entry.
Definition at line 9634 of file OMPIRBuilder.cpp.
References Addr, assert(), llvm::OpenMPIRBuilder::Config, llvm::omp::Flags, llvm::OpenMPIRBuilderConfig::isTargetDevice(), and OMPTargetGlobalVarEntryIndirect.
Referenced by llvm::OpenMPIRBuilder::registerTargetGlobalVariable().
void OffloadEntriesInfoManager::registerTargetRegionEntryInfo | ( | TargetRegionEntryInfo | EntryInfo, |
Constant * | Addr, | ||
Constant * | ID, | ||
OMPTargetRegionEntryKind | Flags | ||
) |
Register target region entry.
Definition at line 9572 of file OMPIRBuilder.cpp.
References Addr, assert(), llvm::OpenMPIRBuilder::Config, llvm::TargetRegionEntryInfo::Count, llvm::omp::Flags, llvm::OpenMPIRBuilderConfig::isTargetDevice(), and OMPTargetRegionEntryTargetRegion.
Referenced by llvm::OpenMPIRBuilder::registerTargetRegionFunction().
|
inline |
Return number of entries defined so far.
Definition at line 288 of file OMPIRBuilder.h.
Referenced by llvm::OpenMPIRBuilder::createOffloadEntriesAndInfoMetadata().