CGRAOmp  0.1
Classes | Public Types | Public Member Functions | Private Attributes | List of all members
CGRAOmp::OmpKernelInfo Class Reference

A set of information regarding OpenMP target kernel. More...

#include <CGRAOmpPass.hpp>

Classes

struct  OffloadMetadata_t
 

Public Types

using MetadataList = SmallVector< OffloadMetadata_t >
 
using md_iterator = MetadataList::iterator
 
using FunctionList = SmallVector< Function * >
 
using func_iterator = FunctionList::iterator
 

Public Member Functions

template<typename IRUnitT , typename InvT >
bool invalidate (IRUnitT &IR, const PreservedAnalyses &PA, InvT &Inv)
 implemented for enabling getCacheResult from inner modules More...
 
md_iterator md_begin ()
 
md_iterator md_end ()
 
iterator_range< md_iteratormetadata ()
 
func_iterator kernel_begin ()
 
func_iterator kernel_end ()
 
iterator_range< func_iteratorkernels ()
 
void add_kernel (Function *offload, Function *kernel)
 add kernel function as an entry More...
 
Function * getOffloadFunction (Function *kernel)
 Get the Offload Function pointer from the kernel function. More...
 
md_iterator getMetadata (Function *offload)
 get metadata about the kernel function More...
 
void setOffloadMetadata (Module &M)
 parse metadata from Module and save it More...
 
int getKernelLine (Function *kernel)
 get the line number where the kernel starts More...
 

Private Attributes

MetadataList md_list
 
FunctionList kernel_list
 
FunctionList offload_func_list
 

Detailed Description

A set of information regarding OpenMP target kernel.

Member Typedef Documentation

◆ func_iterator

using CGRAOmp::OmpKernelInfo::func_iterator = FunctionList::iterator

◆ FunctionList

using CGRAOmp::OmpKernelInfo::FunctionList = SmallVector<Function*>

◆ md_iterator

using CGRAOmp::OmpKernelInfo::md_iterator = MetadataList::iterator

◆ MetadataList

Member Function Documentation

◆ add_kernel()

void CGRAOmp::OmpKernelInfo::add_kernel ( Function *  offload,
Function *  kernel 
)
inline

add kernel function as an entry

Parameters
offloadOffloading function corresponding to the target region
kernelOutlined function for the kernel

◆ getKernelLine()

int OmpKernelInfo::getKernelLine ( Function *  kernel)

get the line number where the kernel starts

Parameters
kernelkernel function
Returns
int line number

◆ getMetadata()

OmpKernelInfo::md_iterator OmpKernelInfo::getMetadata ( Function *  offload)

get metadata about the kernel function

Parameters
offloadoffloading function
Returns
md_iterator an iterator for the metadata set

◆ getOffloadFunction()

Function* CGRAOmp::OmpKernelInfo::getOffloadFunction ( Function *  kernel)
inline

Get the Offload Function pointer from the kernel function.

Parameters
kernelkernel function
Returns
Function* the offloading function

◆ invalidate()

template<typename IRUnitT , typename InvT >
bool OmpKernelInfo::invalidate ( IRUnitT &  IR,
const PreservedAnalyses &  PA,
InvT &  Inv 
)

implemented for enabling getCacheResult from inner modules

◆ kernel_begin()

func_iterator CGRAOmp::OmpKernelInfo::kernel_begin ( )
inline

◆ kernel_end()

func_iterator CGRAOmp::OmpKernelInfo::kernel_end ( )
inline

◆ kernels()

iterator_range<func_iterator> CGRAOmp::OmpKernelInfo::kernels ( )
inline

◆ md_begin()

md_iterator CGRAOmp::OmpKernelInfo::md_begin ( )
inline

◆ md_end()

md_iterator CGRAOmp::OmpKernelInfo::md_end ( )
inline

◆ metadata()

iterator_range<md_iterator> CGRAOmp::OmpKernelInfo::metadata ( )
inline

◆ setOffloadMetadata()

void OmpKernelInfo::setOffloadMetadata ( Module &  M)

parse metadata from Module and save it

Parameters
MModule
Remarks
If there is no metadata "omp_offload.info", it poses an error and finish the process

Member Data Documentation

◆ kernel_list

FunctionList CGRAOmp::OmpKernelInfo::kernel_list
private

◆ md_list

MetadataList CGRAOmp::OmpKernelInfo::md_list
private

◆ offload_func_list

FunctionList CGRAOmp::OmpKernelInfo::offload_func_list
private

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