//
//===----------------------------------------------------------------------===//
+#define DEBUG_TYPE "postdomtree"
+
#include "llvm/Analysis/PostDominators.h"
#include "llvm/Instructions.h"
#include "llvm/Support/CFG.h"
+#include "llvm/Support/Debug.h"
#include "llvm/ADT/DepthFirstIterator.h"
#include "llvm/ADT/SetOperations.h"
#include "llvm/Analysis/DominatorInternals.h"
bool PostDominatorTree::runOnFunction(Function &F) {
DT->recalculate(F);
+ DEBUG(DT->dump());
return false;
}
+PostDominatorTree::~PostDominatorTree()
+{
+ delete DT;
+}
+
+FunctionPass* llvm::createPostDomTree() {
+ return new PostDominatorTree();
+}
+
//===----------------------------------------------------------------------===//
// PostDominanceFrontier Implementation
//===----------------------------------------------------------------------===//
return S;
}
-// Ensure that this .cpp file gets linked when PostDominators.h is used.
-DEFINING_FILE_FOR(PostDominanceFrontier)
+FunctionPass* llvm::createPostDomFrontier() {
+ return new PostDominanceFrontier();
+}