Go to the documentation of this file.
37 #include "llvm/IR/PassManager.h"
38 #include "llvm/ADT/DenseMap.h"
39 #include "llvm/ADT/SmallVector.h"
40 #include "llvm/ADT/SmallPtrSet.h"
41 #include "llvm/IR/Instruction.h"
43 #define PREC_PAIR(OP, LEVEL) std::make_pair(Instruction::OP, LEVEL)
70 bool run(
CGRADFG &G, Loop &L, FunctionAnalysisManager &FAM,
71 LoopAnalysisManager &LAM,
72 LoopStandardAnalysisResults &AR);
88 SmallVector<ComputeNode*> findRootCandidates(
CGRADFG &G);
117 return OperatorPrecedence[N->
getInst()->getOpcode()];
122 #endif //BALANCETREE_H
static int getOperatorPrecedence(ComputeNode *N)
Function to obtain the precedence for a given ComputeNode.
Definition: BalanceTree.hpp:116
Definition: OptionPlugin.cpp:128
static std::map< int, int > OperatorPrecedence
map to decode operator precedence
Definition: BalanceTree.hpp:109
A DFGPass to balance the tree structure.
Definition: BalanceTree.hpp:57
SmallVector< DFGEdge *, 10U > EdgeListTy
Definition: BalanceTree.hpp:74
DenseMap< DFGNode *, int > weight
Definition: BalanceTree.hpp:99
Definition: AGVerifyPass.hpp:50
DenseMap< DFGNode *, bool > visited
Definition: BalanceTree.hpp:100
A graph class for CGRA kernel DFG derived from llvm::DirectedGraph.
Definition: CGRADataFlowGraph.hpp:505
SmallPtrSet< DFGNode *, 10 > candidate_set
Definition: BalanceTree.hpp:101
A concrete class for computational nodes.
Definition: CGRADataFlowGraph.hpp:171
Instruction * getInst() const
Definition: CGRADataFlowGraph.hpp:185
bool changed
Definition: BalanceTree.hpp:102