LLVM 17.0.0git
Classes | Public Types | Public Member Functions | List of all members
llvm::OffloadEntriesInfoManager Class Reference

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 , OMPTargetRegionEntryCtor = 0x02 , OMPTargetRegionEntryDtor = 0x04 }
 Kind of the target registry entry. More...
 
enum  OMPTargetGlobalVarEntryKind : uint32_t { OMPTargetGlobalVarEntryTo = 0x0 , OMPTargetGlobalVarEntryLink = 0x1 }
 Kind of the global variable entry.. 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.
 

Public Member Functions

void setConfig (OpenMPIRBuilderConfig C)
 
bool empty () const
 Return true if a there are no entries defined.
 
unsigned size () const
 Return number of entries defined so far.
 
 OffloadEntriesInfoManager ()
 
void initializeTargetRegionEntryInfo (const TargetRegionEntryInfo &EntryInfo, unsigned Order)
 Initialize target region entry.
 
void registerTargetRegionEntryInfo (TargetRegionEntryInfo EntryInfo, Constant *Addr, Constant *ID, OMPTargetRegionEntryKind Flags)
 Register target region entry.
 
bool hasTargetRegionEntryInfo (TargetRegionEntryInfo EntryInfo, bool IgnoreAddressId=false) const
 Return true if a target region entry with the provided information exists.
 
void getTargetRegionEntryFnName (SmallVectorImpl< char > &Name, const TargetRegionEntryInfo &EntryInfo)
 
void actOnTargetRegionEntriesInfo (const OffloadTargetRegionEntryInfoActTy &Action)
 
void initializeDeviceGlobalVarEntryInfo (StringRef Name, OMPTargetGlobalVarEntryKind Flags, unsigned Order)
 Initialize device global variable entry.
 
void registerDeviceGlobalVarEntryInfo (StringRef VarName, Constant *Addr, int64_t VarSize, OMPTargetGlobalVarEntryKind Flags, GlobalValue::LinkageTypes Linkage)
 Register device global variable entry.
 
bool hasDeviceGlobalVarEntryInfo (StringRef VarName) const
 Checks if the variable with the given name has been registered already.
 
void actOnDeviceGlobalVarEntriesInfo (const OffloadDeviceGlobalVarEntryInfoActTy &Action)
 

Detailed Description

Class that manages information about offload code regions and data.

Definition at line 1930 of file OMPIRBuilder.h.

Member Typedef Documentation

◆ OffloadDeviceGlobalVarEntryInfoActTy

Applies action Action on all registered entries.

Definition at line 2115 of file OMPIRBuilder.h.

◆ OffloadTargetRegionEntryInfoActTy

brief Applies action Action on all registered entries.

Definition at line 2052 of file OMPIRBuilder.h.

Member Enumeration Documentation

◆ OMPTargetGlobalVarEntryKind

Kind of the global variable entry..

Enumerator
OMPTargetGlobalVarEntryTo 

Mark the entry as a to declare target.

OMPTargetGlobalVarEntryLink 

Mark the entry as a to declare target link.

Definition at line 2061 of file OMPIRBuilder.h.

◆ OMPTargetRegionEntryKind

Kind of the target registry entry.

Enumerator
OMPTargetRegionEntryTargetRegion 

Mark the entry as target region.

OMPTargetRegionEntryCtor 

Mark the entry as a global constructor.

OMPTargetRegionEntryDtor 

Mark the entry as a global destructor.

Definition at line 1997 of file OMPIRBuilder.h.

Constructor & Destructor Documentation

◆ OffloadEntriesInfoManager()

llvm::OffloadEntriesInfoManager::OffloadEntriesInfoManager ( )
inline

Definition at line 1990 of file OMPIRBuilder.h.

Member Function Documentation

◆ actOnDeviceGlobalVarEntriesInfo()

void OffloadEntriesInfoManager::actOnDeviceGlobalVarEntriesInfo ( const OffloadDeviceGlobalVarEntryInfoActTy Action)

Definition at line 5134 of file OMPIRBuilder.cpp.

References E.

Referenced by llvm::OpenMPIRBuilder::createOffloadEntriesAndInfoMetadata().

◆ actOnTargetRegionEntriesInfo()

void OffloadEntriesInfoManager::actOnTargetRegionEntriesInfo ( const OffloadTargetRegionEntryInfoActTy Action)

◆ empty()

bool OffloadEntriesInfoManager::empty ( ) const

Return true if a there are no entries defined.

Definition at line 5008 of file OMPIRBuilder.cpp.

Referenced by llvm::OpenMPIRBuilder::createOffloadEntriesAndInfoMetadata().

◆ getTargetRegionEntryFnName()

void OffloadEntriesInfoManager::getTargetRegionEntryFnName ( SmallVectorImpl< char > &  Name,
const TargetRegionEntryInfo EntryInfo 
)

◆ hasDeviceGlobalVarEntryInfo()

bool llvm::OffloadEntriesInfoManager::hasDeviceGlobalVarEntryInfo ( StringRef  VarName) const
inline

Checks if the variable with the given name has been registered already.

Definition at line 2110 of file OMPIRBuilder.h.

References llvm::StringMap< ValueTy, AllocatorTy >::count().

◆ hasTargetRegionEntryInfo()

bool OffloadEntriesInfoManager::hasTargetRegionEntryInfo ( TargetRegionEntryInfo  EntryInfo,
bool  IgnoreAddressId = false 
) const

Return true if a target region entry with the provided information exists.

Definition at line 5069 of file OMPIRBuilder.cpp.

References llvm::TargetRegionEntryInfo::Count.

◆ initializeDeviceGlobalVarEntryInfo()

void OffloadEntriesInfoManager::initializeDeviceGlobalVarEntryInfo ( StringRef  Name,
OMPTargetGlobalVarEntryKind  Flags,
unsigned  Order 
)

Initialize device global variable entry.

This is ONLY used for DEVICE compilation.

Definition at line 5093 of file OMPIRBuilder.cpp.

References llvm::omp::Flags, and Name.

Referenced by llvm::OpenMPIRBuilder::loadOffloadInfoMetadata().

◆ initializeTargetRegionEntryInfo()

void OffloadEntriesInfoManager::initializeTargetRegionEntryInfo ( const TargetRegionEntryInfo EntryInfo,
unsigned  Order 
)

Initialize target region entry.

This is ONLY needed for DEVICE compilation.

Definition at line 5029 of file OMPIRBuilder.cpp.

Referenced by llvm::OpenMPIRBuilder::loadOffloadInfoMetadata().

◆ registerDeviceGlobalVarEntryInfo()

void OffloadEntriesInfoManager::registerDeviceGlobalVarEntryInfo ( StringRef  VarName,
Constant Addr,
int64_t  VarSize,
OMPTargetGlobalVarEntryKind  Flags,
GlobalValue::LinkageTypes  Linkage 
)

Register device global variable entry.

Definition at line 5099 of file OMPIRBuilder.cpp.

References Addr, assert(), llvm::OpenMPIRBuilder::Config, llvm::omp::Flags, and llvm::OpenMPIRBuilderConfig::isEmbedded().

◆ registerTargetRegionEntryInfo()

void OffloadEntriesInfoManager::registerTargetRegionEntryInfo ( TargetRegionEntryInfo  EntryInfo,
Constant Addr,
Constant ID,
OMPTargetRegionEntryKind  Flags 
)

◆ setConfig()

void llvm::OffloadEntriesInfoManager::setConfig ( OpenMPIRBuilderConfig  C)
inline

Definition at line 1936 of file OMPIRBuilder.h.

References llvm::CallingConv::C.

◆ size()

unsigned llvm::OffloadEntriesInfoManager::size ( ) const
inline

Return number of entries defined so far.

Definition at line 1988 of file OMPIRBuilder.h.

Referenced by llvm::OpenMPIRBuilder::createOffloadEntriesAndInfoMetadata().


The documentation for this class was generated from the following files: