|
CGRAOmp
0.1
|
A DFGPass to balance the tree structure. More...
#include <BalanceTree.hpp>
Public Member Functions | |
| bool | run (CGRADFG &G, Loop &L, FunctionAnalysisManager &FAM, LoopAnalysisManager &LAM, LoopStandardAnalysisResults &AR) |
| Apply tree height reduction for a given DFG. More... | |
Private Types | |
| using | EdgeListTy = SmallVector< DFGEdge *, 10U > |
Private Member Functions | |
| void | initWeight (CGRADFG &G) |
| Initialize the graph weight. More... | |
| SmallVector< ComputeNode * > | findRootCandidates (CGRADFG &G) |
| find candidates for root node More... | |
| void | toBalanced (CGRADFG &G, ComputeNode *Root) |
| Balance the graph for a given root node. More... | |
Static Private Member Functions | |
| static int | getOperatorPrecedence (ComputeNode *N) |
| Function to obtain the precedence for a given ComputeNode. More... | |
Private Attributes | |
| DenseMap< DFGNode *, int > | weight |
| DenseMap< DFGNode *, bool > | visited |
| SmallPtrSet< DFGNode *, 10 > | candidate_set |
| bool | changed |
Static Private Attributes | |
| static std::map< int, int > | OperatorPrecedence |
| map to decode operator precedence More... | |
A DFGPass to balance the tree structure.
This optimization is based on algorithm proposed in [1].
|
private |
|
private |
find candidates for root node
| G | Data flow graph to be balanced |
|
inlinestaticprivate |
Function to obtain the precedence for a given ComputeNode.
| N | the computational node |
|
private |
Initialize the graph weight.
| G | Data flow graph to be balanced |
| bool BalanceTree::run | ( | CGRADFG & | G, |
| Loop & | L, | ||
| FunctionAnalysisManager & | FAM, | ||
| LoopAnalysisManager & | LAM, | ||
| LoopStandardAnalysisResults & | AR | ||
| ) |
Apply tree height reduction for a given DFG.
| G | Data flow graph (DFG) |
| L | Loop associated with the DFGs |
| FAM | FunctionAnalysisManager to access analysis results |
| LAM | LoopAnalysisManager to access analysis results |
| AR | LoopStandardAnalysisResults |
|
private |
Balance the graph for a given root node.
| G | Data flow graph to be balanced |
| Root | Root node |
|
private |
|
private |
|
staticprivate |
map to decode operator precedence
It is a similar setting to precedence table of clang But the lower level means the higher priority
|
private |
|
private |
1.8.17