Factor the calculation details for PostDomTree out of PostDominators.cpp and

into a separate header file.

Next step: merging PostDominatorCalculation.h with DominatorCalculation.h.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42251 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Owen Anderson
2007-09-23 22:21:00 +00:00
parent eefb31094f
commit 04fa569320
3 changed files with 156 additions and 147 deletions
+7 -5
View File
@@ -29,7 +29,7 @@ struct PostDominatorTree : public DominatorTreeBase {
virtual bool runOnFunction(Function &F) {
reset(); // Reset from the last time we were run...
calculate(F);
PDTcalculate(*this, F);
return false;
}
@@ -37,11 +37,13 @@ struct PostDominatorTree : public DominatorTreeBase {
AU.setPreservesAll();
}
private:
void calculate(Function &F);
unsigned DFSPass(BasicBlock *V, unsigned N);
void Compress(BasicBlock *V, InfoRec &VInfo);
BasicBlock *Eval(BasicBlock *V);
void Link(BasicBlock *V, BasicBlock *W, InfoRec &WInfo);
friend void PDTcalculate(PostDominatorTree& PDT, Function &F);
friend void PDTCompress(PostDominatorTree& PDT, BasicBlock *V,
InfoRec &VInfo);
friend BasicBlock *PDTEval(PostDominatorTree& PDT, BasicBlock *V);
friend void PDTLink(PostDominatorTree& PDT,BasicBlock *V,
BasicBlock *W, InfoRec &WInfo);
};