diff --git a/include/llvm/Analysis/Dominators.h b/include/llvm/Analysis/Dominators.h index 4b2f61129d0..9dcabcfd477 100644 --- a/include/llvm/Analysis/Dominators.h +++ b/include/llvm/Analysis/Dominators.h @@ -66,7 +66,23 @@ public: /// class ImmediateDominatorsBase : public DominatorBase { protected: + struct InfoRec { + unsigned Semi; + unsigned Size; + BasicBlock *Label, *Parent, *Child, *Ancestor; + + std::vector Bucket; + + InfoRec() : Semi(0), Size(0), Label(0), Parent(0), Child(0), Ancestor(0){} + }; + std::map IDoms; + + // Vertex - Map the DFS number to the BasicBlock* + std::vector Vertex; + + // Info - Collection of information used during the computation of idoms. + std::map Info; public: ImmediateDominatorsBase(bool isPostDom) : DominatorBase(isPostDom) {} @@ -139,22 +155,6 @@ struct ImmediateDominators : public ImmediateDominatorsBase { } private: - struct InfoRec { - unsigned Semi; - unsigned Size; - BasicBlock *Label, *Parent, *Child, *Ancestor; - - std::vector Bucket; - - InfoRec() : Semi(0), Size(0), Label(0), Parent(0), Child(0), Ancestor(0){} - }; - - // Vertex - Map the DFS number to the BasicBlock* - std::vector Vertex; - - // Info - Collection of information used during the computation of idoms. - std::map Info; - unsigned DFSPass(BasicBlock *V, InfoRec &VInfo, unsigned N); void Compress(BasicBlock *V, InfoRec &VInfo); BasicBlock *Eval(BasicBlock *v); diff --git a/include/llvm/Analysis/PostDominators.h b/include/llvm/Analysis/PostDominators.h index 39b26d707ff..b9a1feb8ba3 100644 --- a/include/llvm/Analysis/PostDominators.h +++ b/include/llvm/Analysis/PostDominators.h @@ -32,22 +32,6 @@ struct ImmediatePostDominators : public ImmediateDominatorsBase { } private: - struct InfoRec { - unsigned Semi; - unsigned Size; - BasicBlock *Label, *Parent, *Child, *Ancestor; - - std::vector Bucket; - - InfoRec() : Semi(0), Size(0), Label(0), Parent(0), Child(0), Ancestor(0){} - }; - - // Vertex - Map the DFS number to the BasicBlock* - std::vector Vertex; - - // Info - Collection of information used during the computation of idoms. - std::map Info; - unsigned DFSPass(BasicBlock *V, InfoRec &VInfo, unsigned N); void Compress(BasicBlock *V, InfoRec &VInfo); BasicBlock *Eval(BasicBlock *v);