Author: lattner Date: Mon Aug 6 01:15:43 2007 New Revision: 40856 URL: http://llvm.org/viewvc/llvm-project?rev=40856&view=rev Log: Various random cleanups, add two accessors to DomTreeNode: getDFSNumIn/getDFSNumOut
Modified: llvm/trunk/include/llvm/Analysis/Dominators.h Modified: llvm/trunk/include/llvm/Analysis/Dominators.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/Dominators.h?rev=40856&r1=40855&r2=40856&view=diff ============================================================================== --- llvm/trunk/include/llvm/Analysis/Dominators.h (original) +++ llvm/trunk/include/llvm/Analysis/Dominators.h Mon Aug 6 01:15:43 2007 @@ -76,17 +76,23 @@ const_iterator begin() const { return Children.begin(); } const_iterator end() const { return Children.end(); } - inline BasicBlock *getBlock() const { return TheBB; } - inline DomTreeNode *getIDom() const { return IDom; } - inline const std::vector<DomTreeNode*> &getChildren() const { return Children; } + BasicBlock *getBlock() const { return TheBB; } + DomTreeNode *getIDom() const { return IDom; } + const std::vector<DomTreeNode*> &getChildren() const { return Children; } - inline DomTreeNode(BasicBlock *BB, DomTreeNode *iDom) + DomTreeNode(BasicBlock *BB, DomTreeNode *iDom) : TheBB(BB), IDom(iDom), DFSNumIn(-1), DFSNumOut(-1) { } - inline DomTreeNode *addChild(DomTreeNode *C) { Children.push_back(C); return C; } + DomTreeNode *addChild(DomTreeNode *C) { Children.push_back(C); return C; } void setIDom(DomTreeNode *NewIDom); + + /// getDFSNumIn/getDFSNumOut - These are an internal implementation detail, do + /// not call them. + unsigned getDFSNumIn() const { return DFSNumIn; } + unsigned getDFSNumOut() const { return DFSNumOut; } private: - // Return true if this node is dominated by other. Use this only if DFS info is valid. + // Return true if this node is dominated by other. Use this only if DFS info + // is valid. bool DominatedBy(const DomTreeNode *other) const { return this->DFSNumIn >= other->DFSNumIn && this->DFSNumOut <= other->DFSNumOut; @@ -118,7 +124,7 @@ std::vector<BasicBlock*> Bucket; - InfoRec() : Semi(0), Size(0), Label(0), Parent(0), Child(0), Ancestor(0){} + InfoRec() : Semi(0), Size(0), Label(0), Parent(0), Child(0), Ancestor(0) {} }; DenseMap<BasicBlock*, BasicBlock*> IDoms; @@ -416,9 +422,8 @@ AU.addRequired<DominatorTree>(); } - /// splitBlock - /// BB is split and now it has one successor. Update dominace frontier to - /// reflect this change. + /// splitBlock - BB is split and now it has one successor. Update dominance + /// frontier to reflect this change. void splitBlock(BasicBlock *BB); private: _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits