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. More...
 
typedef function_ref< void(StringRef, const OffloadEntryInfoDeviceGlobalVar &)> OffloadDeviceGlobalVarEntryInfoActTy
 Applies action Action on all registered entries. More...
 

Public Member Functions

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

Detailed Description

Class that manages information about offload code regions and data.

Definition at line 1937 of file OMPIRBuilder.h.

Member Typedef Documentation

◆ OffloadDeviceGlobalVarEntryInfoActTy

Applies action Action on all registered entries.

Definition at line 2122 of file OMPIRBuilder.h.

◆ OffloadTargetRegionEntryInfoActTy

brief Applies action Action on all registered entries.

Definition at line 2059 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 2068 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 2004 of file OMPIRBuilder.h.

Constructor & Destructor Documentation

◆ OffloadEntriesInfoManager()

llvm::OffloadEntriesInfoManager::OffloadEntriesInfoManager ( )
inline

Definition at line 1997 of file OMPIRBuilder.h.

Member Function Documentation

◆ actOnDeviceGlobalVarEntriesInfo()

void OffloadEntriesInfoManager::actOnDeviceGlobalVarEntriesInfo ( const OffloadDeviceGlobalVarEntryInfoActTy Action)

Definition at line 5151 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 5025 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 2117 of file OMPIRBuilder.h.

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

◆ 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 5086 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 5110 of file OMPIRBuilder.cpp.

References llvm::omp::Flags.

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 5046 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 5116 of file OMPIRBuilder.cpp.

References llvm::tgtok::VarName.

◆ registerTargetRegionEntryInfo()

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

Register target region entry.

Definition at line 5054 of file OMPIRBuilder.cpp.

References assert(), and llvm::TargetRegionEntryInfo::Count.

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

◆ setConfig()

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

Definition at line 1943 of file OMPIRBuilder.h.

◆ size()

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

Return number of entries defined so far.

Definition at line 1995 of file OMPIRBuilder.h.

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


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