projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Convert debug messages to use dbgs(). Generally this means
[oota-llvm.git]
/
lib
/
Analysis
/
PostDominators.cpp
diff --git
a/lib/Analysis/PostDominators.cpp
b/lib/Analysis/PostDominators.cpp
index 8bfa0692b9adc67850518d6d22b7e9d99300ba87..69d6b47bbee49cd42264edce511ea2680e2a94e6 100644
(file)
--- a/
lib/Analysis/PostDominators.cpp
+++ b/
lib/Analysis/PostDominators.cpp
@@
-11,9
+11,12
@@
//
//===----------------------------------------------------------------------===//
//
//===----------------------------------------------------------------------===//
+#define DEBUG_TYPE "postdomtree"
+
#include "llvm/Analysis/PostDominators.h"
#include "llvm/Instructions.h"
#include "llvm/Support/CFG.h"
#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"
#include "llvm/ADT/DepthFirstIterator.h"
#include "llvm/ADT/SetOperations.h"
#include "llvm/Analysis/DominatorInternals.h"
@@
-30,9
+33,23
@@
F("postdomtree", "Post-Dominator Tree Construction", true, true);
bool PostDominatorTree::runOnFunction(Function &F) {
DT->recalculate(F);
bool PostDominatorTree::runOnFunction(Function &F) {
DT->recalculate(F);
+ DEBUG(DT->print(errs()));
return false;
}
return false;
}
+PostDominatorTree::~PostDominatorTree() {
+ delete DT;
+}
+
+void PostDominatorTree::print(raw_ostream &OS, const Module *) const {
+ DT->print(OS);
+}
+
+
+FunctionPass* llvm::createPostDomTree() {
+ return new PostDominatorTree();
+}
+
//===----------------------------------------------------------------------===//
// PostDominanceFrontier Implementation
//===----------------------------------------------------------------------===//
//===----------------------------------------------------------------------===//
// PostDominanceFrontier Implementation
//===----------------------------------------------------------------------===//
@@
-76,5
+93,6
@@
PostDominanceFrontier::calculate(const PostDominatorTree &DT,
return S;
}
return S;
}
-// Ensure that this .cpp file gets linked when PostDominators.h is used.
-DEFINING_FILE_FOR(PostDominanceFrontier)
+FunctionPass* llvm::createPostDomFrontier() {
+ return new PostDominanceFrontier();
+}