#include "llvm/Analysis/Dominators.h"
+namespace llvm {
/// PostDominatorSet Class - Concrete subclass of DominatorSetBase that is used
/// to compute the post-dominator set. Because there can be multiple exit nodes
virtual bool runOnFunction(Function &F);
- // getAnalysisUsage - This pass does not modify the function at all.
- //
+ /// getAnalysisUsage - This pass does not modify the function at all.
+ ///
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesAll();
}
};
-
-//===-------------------------------------
-// ImmediatePostDominators Class - Concrete subclass of ImmediateDominatorsBase
-// that is used to compute the immediate post-dominators.
-//
+/// ImmediatePostDominators Class - Concrete subclass of ImmediateDominatorsBase
+/// that is used to compute the immediate post-dominators.
+///
struct ImmediatePostDominators : public ImmediateDominatorsBase {
ImmediatePostDominators() : ImmediateDominatorsBase(true) {}
AU.setPreservesAll();
AU.addRequired<PostDominatorSet>();
}
+private:
+ void calcIDoms(const DominatorSetBase &DS);
};
-//===-------------------------------------
-// PostDominatorTree Class - Concrete subclass of DominatorTree that is used to
-// compute the a post-dominator tree.
-//
+/// PostDominatorTree Class - Concrete subclass of DominatorTree that is used to
+/// compute the a post-dominator tree.
+///
struct PostDominatorTree : public DominatorTreeBase {
PostDominatorTree() : DominatorTreeBase(true) {}
};
-//===-------------------------------------
-// PostDominanceFrontier Class - Concrete subclass of DominanceFrontier that is
-// used to compute the a post-dominance frontier.
-//
+/// PostDominanceFrontier Class - Concrete subclass of DominanceFrontier that is
+/// used to compute the a post-dominance frontier.
+///
struct PostDominanceFrontier : public DominanceFrontierBase {
PostDominanceFrontier() : DominanceFrontierBase(true) {}
static IncludeFile
POST_DOMINATOR_INCLUDE_FILE((void*)&PostDominanceFrontier::stub);
+} // End llvm namespace
+
#endif