diff options
Diffstat (limited to 'include/llvm/Analysis/Dominators.h')
-rw-r--r-- | include/llvm/Analysis/Dominators.h | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/include/llvm/Analysis/Dominators.h b/include/llvm/Analysis/Dominators.h index 76998fb..eec87d4 100644 --- a/include/llvm/Analysis/Dominators.h +++ b/include/llvm/Analysis/Dominators.h @@ -129,6 +129,7 @@ protected: // Info - Collection of information used during the computation of idoms. DenseMap<BasicBlock*, InfoRec> Info; + unsigned DFSPass(BasicBlock *V, unsigned N); public: DominatorTreeBase(intptr_t ID, bool isPostDom) @@ -278,6 +279,13 @@ protected: /// updateDFSNumbers - Assign In and Out numbers to the nodes while walking /// dominator tree in dfs order. void updateDFSNumbers(); + + DomTreeNode *getNodeForBlock(BasicBlock *BB); + + inline BasicBlock *getIDom(BasicBlock *BB) const { + DenseMap<BasicBlock*, BasicBlock*>::const_iterator I = IDoms.find(BB); + return I != IDoms.end() ? I->second : 0; + } }; //===------------------------------------- @@ -304,17 +312,13 @@ public: /// BB is split and now it has one successor. Update dominator tree to /// reflect this change. void splitBlock(BasicBlock *BB); + private: - void calculate(Function& F); - DomTreeNode *getNodeForBlock(BasicBlock *BB); - unsigned DFSPass(BasicBlock *V, unsigned N); - void Compress(BasicBlock *V); - BasicBlock *Eval(BasicBlock *v); - void Link(BasicBlock *V, BasicBlock *W, InfoRec &WInfo); - inline BasicBlock *getIDom(BasicBlock *BB) const { - DenseMap<BasicBlock*, BasicBlock*>::const_iterator I = IDoms.find(BB); - return I != IDoms.end() ? I->second : 0; - } + friend void DTcalculate(DominatorTree& DT, Function& F); + friend void DTCompress(DominatorTree& DT, BasicBlock *VIn); + friend BasicBlock *DTEval(DominatorTree& DT, BasicBlock *v); + friend void DTLink(DominatorTree& DT, BasicBlock *V, + BasicBlock *W, InfoRec &WInfo); }; //===------------------------------------- |