summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/DominatorCalculation.h
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2007-09-27 23:23:00 +0000
committerOwen Anderson <resistor@mac.com>2007-09-27 23:23:00 +0000
commitee73e0b8cbfdf942c7ed268f1eb716ff91ab2307 (patch)
tree1e95ea95e348ed9151cd926dab7029c946d63ae4 /llvm/lib/VMCore/DominatorCalculation.h
parenta1d46c7d0aec896d62f2995418faaba7dcffae07 (diff)
downloadbcm5719-llvm-ee73e0b8cbfdf942c7ed268f1eb716ff91ab2307.tar.gz
bcm5719-llvm-ee73e0b8cbfdf942c7ed268f1eb716ff91ab2307.zip
Convert DFSPass into a templated friend function, in preparation for making it common to DomTree and PostDomTree.
llvm-svn: 42420
Diffstat (limited to 'llvm/lib/VMCore/DominatorCalculation.h')
-rw-r--r--llvm/lib/VMCore/DominatorCalculation.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/VMCore/DominatorCalculation.h b/llvm/lib/VMCore/DominatorCalculation.h
index 0ad4bc072d8..bf90a97a4ea 100644
--- a/llvm/lib/VMCore/DominatorCalculation.h
+++ b/llvm/lib/VMCore/DominatorCalculation.h
@@ -11,6 +11,7 @@
#define LLVM_VMCORE_DOMINATOR_CALCULATION_H
#include "llvm/Analysis/Dominators.h"
+#include "llvm/Analysis/DominatorInternals.h"
//===----------------------------------------------------------------------===//
//
@@ -32,7 +33,7 @@
//===----------------------------------------------------------------------===//
namespace llvm {
-
+
void DTcalculate(DominatorTree& DT, Function &F) {
BasicBlock* Root = DT.Roots[0];
@@ -43,7 +44,7 @@ void DTcalculate(DominatorTree& DT, Function &F) {
// Step #1: Number blocks in depth-first order and initialize variables used
// in later stages of the algorithm.
- unsigned N = DT.DFSPass(Root, 0);
+ unsigned N = DFSPass<GraphTraits<BasicBlock*> >(DT, Root, 0);
for (unsigned i = N; i >= 2; --i) {
BasicBlock *W = DT.Vertex[i];
OpenPOWER on IntegriCloud