LLVM 22.0.0git
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 }
 Kind of the target registry entry. More...
enum  OMPTargetGlobalVarEntryKind : uint32_t {
  OMPTargetGlobalVarEntryTo = 0x0 , OMPTargetGlobalVarEntryLink = 0x1 , OMPTargetGlobalVarEntryEnter = 0x2 , OMPTargetGlobalVarEntryNone = 0x3 ,
  OMPTargetGlobalVarEntryIndirect = 0x8 , OMPTargetGlobalRegisterRequires = 0x10 , OMPTargetGlobalVarEntryIndirectVTable = 0x20
}
 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.

Public Member Functions

LLVM_ABI bool empty () const
 Return true if a there are no entries defined.
unsigned size () const
 Return number of entries defined so far.
 OffloadEntriesInfoManager (OpenMPIRBuilder *builder)
LLVM_ABI void initializeTargetRegionEntryInfo (const TargetRegionEntryInfo &EntryInfo, unsigned Order)
 Initialize target region entry.
LLVM_ABI void registerTargetRegionEntryInfo (TargetRegionEntryInfo EntryInfo, Constant *Addr, Constant *ID, OMPTargetRegionEntryKind Flags)
 Register target region entry.
LLVM_ABI bool hasTargetRegionEntryInfo (TargetRegionEntryInfo EntryInfo, bool IgnoreAddressId=false) const
 Return true if a target region entry with the provided information exists.
LLVM_ABI void getTargetRegionEntryFnName (SmallVectorImpl< char > &Name, const TargetRegionEntryInfo &EntryInfo)
LLVM_ABI void actOnTargetRegionEntriesInfo (const OffloadTargetRegionEntryInfoActTy &Action)
LLVM_ABI void initializeDeviceGlobalVarEntryInfo (StringRef Name, OMPTargetGlobalVarEntryKind Flags, unsigned Order)
 Initialize device global variable entry.
LLVM_ABI 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.
LLVM_ABI void actOnDeviceGlobalVarEntriesInfo (const OffloadDeviceGlobalVarEntryInfoActTy &Action)

Detailed Description

Class that manages information about offload code regions and data.

Definition at line 260 of file OMPIRBuilder.h.

Member Typedef Documentation

◆ OffloadDeviceGlobalVarEntryInfoActTy

Applies action Action on all registered entries.

Definition at line 468 of file OMPIRBuilder.h.

◆ OffloadTargetRegionEntryInfoActTy

brief Applies action Action on all registered entries.

Definition at line 378 of file OMPIRBuilder.h.

Member Enumeration Documentation

◆ OMPTargetDeviceClauseKind

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.

Enumerator
OMPTargetDeviceClauseAny 

The target is marked for all devices.

OMPTargetDeviceClauseNoHost 

The target is marked for non-host devices.

OMPTargetDeviceClauseHost 

The target is marked for host devices.

OMPTargetDeviceClauseNone 

The target is marked as having no clause.

Definition at line 409 of file OMPIRBuilder.h.

◆ 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.

OMPTargetGlobalVarEntryEnter 

Mark the entry as a declare target enter.

OMPTargetGlobalVarEntryNone 

Mark the entry as having no declare target entry kind.

OMPTargetGlobalVarEntryIndirect 

Mark the entry as a declare target indirect global.

OMPTargetGlobalRegisterRequires 

Mark the entry as a register requires global.

OMPTargetGlobalVarEntryIndirectVTable 

Mark the entry as a declare target indirect vtable.

Definition at line 387 of file OMPIRBuilder.h.

◆ OMPTargetRegionEntryKind

Kind of the target registry entry.

Enumerator
OMPTargetRegionEntryTargetRegion 

Mark the entry as target region.

Definition at line 325 of file OMPIRBuilder.h.

Constructor & Destructor Documentation

◆ OffloadEntriesInfoManager()

llvm::OffloadEntriesInfoManager::OffloadEntriesInfoManager ( OpenMPIRBuilder * builder)
inline

Definition at line 318 of file OMPIRBuilder.h.

Member Function Documentation

◆ actOnDeviceGlobalVarEntriesInfo()

void OffloadEntriesInfoManager::actOnDeviceGlobalVarEntriesInfo ( const OffloadDeviceGlobalVarEntryInfoActTy & Action)

Definition at line 11489 of file OMPIRBuilder.cpp.

◆ actOnTargetRegionEntriesInfo()

void OffloadEntriesInfoManager::actOnTargetRegionEntriesInfo ( const OffloadTargetRegionEntryInfoActTy & Action)

Definition at line 11433 of file OMPIRBuilder.cpp.

◆ empty()

bool OffloadEntriesInfoManager::empty ( ) const

Return true if a there are no entries defined.

Definition at line 11356 of file OMPIRBuilder.cpp.

◆ getTargetRegionEntryFnName()

◆ hasDeviceGlobalVarEntryInfo()

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

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

Definition at line 463 of file OMPIRBuilder.h.

Referenced by registerDeviceGlobalVarEntryInfo().

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

References llvm::TargetRegionEntryInfo::Count.

Referenced by registerTargetRegionEntryInfo().

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

◆ initializeTargetRegionEntryInfo()

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

Initialize target region entry.

This is ONLY needed for DEVICE compilation.

Definition at line 11377 of file OMPIRBuilder.cpp.

References OMPTargetRegionEntryTargetRegion.

◆ registerDeviceGlobalVarEntryInfo()

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

◆ registerTargetRegionEntryInfo()

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

◆ size()

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

Return number of entries defined so far.

Definition at line 316 of file OMPIRBuilder.h.


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