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

Module Pass to create data flow graph for all kernels while aplying DFG Optimization Passes. More...

#include <DFGPass.hpp>

Inheritance diagram for CGRAOmp::DFGPassHandler:

Public Types

using GraphList = SmallVector< CGRADFG * >
 
using graph_iterator = GraphList::iterator
 

Public Member Functions

 DFGPassHandler ()
 Default constructor. More...
 
 ~DFGPassHandler ()
 
 DFGPassHandler (DFGPassHandler &&P)
 Move constractor. More...
 
PreservedAnalyses run (Module &M, ModuleAnalysisManager &AM)
 
void addGraph (CGRADFG *G)
 
graph_iterator removeGraph (CGRADFG *G)
 
graph_iterator graph_begin ()
 
graph_iterator graph_end ()
 
iterator_range< graph_iteratorgraphs ()
 

Private Member Functions

template<typename VerifyPassT >
void createDataFlowGraphsForAllKernels (Function &F, FunctionAnalysisManager &AM)
 Create a Data Flow Graphs For All Kernels object. More...
 
template<typename VerifyPassT >
void createDataFlowGraph (Function &F, Loop &L, FunctionAnalysisManager &FAM, LoopAnalysisManager &LAM, LoopStandardAnalysisResults &AR)
 Create a Data Flow Graph object. More...
 
bool isMemAccess (Instruction &I)
 check if the instruction is memory access or not More...
 
DFGNodemake_mem_node (Instruction &I)
 create memory access node More...
 
DFGNodemake_comp_node (Instruction *inst, std::string opcode)
 create computational node More...
 
DFGNodemake_const_node (Value *V)
 create constant node More...
 
DFGNodemake_const_node (Value *V, SmallVector< Value * > *seq)
 create constant node with different data source More...
 
DFGNodemake_global_node (Value *V)
 create global data node More...
 
DFGNodemake_global_node (Value *V, SmallVector< Value * > *seq)
 create global data node with different data source More...
 
template<>
void createDataFlowGraph (Function &F, Loop &L, FunctionAnalysisManager &FAM, LoopAnalysisManager &LAM, LoopStandardAnalysisResults &AR)
 

Private Attributes

DFGPassBuilderDPB
 
DFGPassManagerDPM
 
SmallVector< CGRADFG * > graph_list
 

Detailed Description

Module Pass to create data flow graph for all kernels while aplying DFG Optimization Passes.

Member Typedef Documentation

◆ graph_iterator

using CGRAOmp::DFGPassHandler::graph_iterator = GraphList::iterator

◆ GraphList

Constructor & Destructor Documentation

◆ DFGPassHandler() [1/2]

DFGPassHandler::DFGPassHandler ( )

Default constructor.

◆ ~DFGPassHandler()

CGRAOmp::DFGPassHandler::~DFGPassHandler ( )
inline

◆ DFGPassHandler() [2/2]

CGRAOmp::DFGPassHandler::DFGPassHandler ( DFGPassHandler &&  P)
inline

Move constractor.

Member Function Documentation

◆ addGraph()

void CGRAOmp::DFGPassHandler::addGraph ( CGRADFG G)
inline

◆ createDataFlowGraph() [1/2]

template<typename VerifyPassT >
void DFGPassHandler::createDataFlowGraph ( Function &  F,
Loop &  L,
FunctionAnalysisManager &  FAM,
LoopAnalysisManager &  LAM,
LoopStandardAnalysisResults &  AR 
)
private

Create a Data Flow Graph object.

Parameters
FFunction including offloading kernels
LKernel looop
FAMAnalysisManager for the function
LAMAnalysisManager for the loop
ARAnalysisResults for the loop

◆ createDataFlowGraph() [2/2]

template<>
void CGRAOmp::DFGPassHandler::createDataFlowGraph ( Function &  F,
Loop &  L,
FunctionAnalysisManager &  FAM,
LoopAnalysisManager &  LAM,
LoopStandardAnalysisResults &  AR 
)
private

◆ createDataFlowGraphsForAllKernels()

template<typename VerifyPassT >
void DFGPassHandler::createDataFlowGraphsForAllKernels ( Function &  F,
FunctionAnalysisManager &  AM 
)
private

Create a Data Flow Graphs For All Kernels object.

Template Parameters
VerifyPassTVerifyPass type for the target CGRA category
Parameters
FFunction including offloading kernels
AMAnalysisManager for the function

◆ graph_begin()

graph_iterator CGRAOmp::DFGPassHandler::graph_begin ( )
inline

◆ graph_end()

graph_iterator CGRAOmp::DFGPassHandler::graph_end ( )
inline

◆ graphs()

iterator_range<graph_iterator> CGRAOmp::DFGPassHandler::graphs ( )
inline

◆ isMemAccess()

bool CGRAOmp::DFGPassHandler::isMemAccess ( Instruction &  I)
inlineprivate

check if the instruction is memory access or not

Parameters
IInstruction to be checked
Returns
true if it is a memory access
otherwise: false

◆ make_comp_node()

DFGNode* CGRAOmp::DFGPassHandler::make_comp_node ( Instruction *  inst,
std::string  opcode 
)
inlineprivate

create computational node

Parameters
IInstruction for the computational
Returns
DFGNode* a pointer to the node

◆ make_const_node() [1/2]

DFGNode* CGRAOmp::DFGPassHandler::make_const_node ( Value *  V)
inlineprivate

create constant node

Parameters
VValue corresponding the constant
Returns
DFGNode* a pointer to the node

◆ make_const_node() [2/2]

DFGNode* CGRAOmp::DFGPassHandler::make_const_node ( Value *  V,
SmallVector< Value * > *  seq 
)
inlineprivate

create constant node with different data source

Parameters
VValue corresponding the constant
seqA sequence of skipped node
Returns
DFGNode* a pointer to the node

◆ make_global_node() [1/2]

DFGNode* CGRAOmp::DFGPassHandler::make_global_node ( Value *  V)
inlineprivate

create global data node

Parameters
VValue corresponding the global value
Returns
DFGNode* a pointer to the node

◆ make_global_node() [2/2]

DFGNode* CGRAOmp::DFGPassHandler::make_global_node ( Value *  V,
SmallVector< Value * > *  seq 
)
inlineprivate

create global data node with different data source

Parameters
VValue corresponding the global value
seqA sequence of skipped node
Returns
DFGNode* a pointer to the node

◆ make_mem_node()

DFGNode* CGRAOmp::DFGPassHandler::make_mem_node ( Instruction &  I)
inlineprivate

create memory access node

Parameters
IInstruction for the memory access
Returns
DFGNode* a pointer to the node

◆ removeGraph()

graph_iterator CGRAOmp::DFGPassHandler::removeGraph ( CGRADFG G)
inline

◆ run()

PreservedAnalyses DFGPassHandler::run ( Module &  M,
ModuleAnalysisManager &  AM 
)

Member Data Documentation

◆ DPB

DFGPassBuilder* CGRAOmp::DFGPassHandler::DPB
private

◆ DPM

DFGPassManager* CGRAOmp::DFGPassHandler::DPM
private

◆ graph_list

SmallVector<CGRADFG*> CGRAOmp::DFGPassHandler::graph_list
private

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