[llvm-commits] CVS: llvm/lib/VMCore/Dominators.cpp
Chris Lattner
sabre at nondot.org
Sun Apr 8 23:10:23 PDT 2007
Changes in directory llvm/lib/VMCore:
Dominators.cpp updated: 1.90 -> 1.91
---
Log message:
minor cleanups
---
Diffs of the changes: (+16 -14)
Dominators.cpp | 30 ++++++++++++++++--------------
1 files changed, 16 insertions(+), 14 deletions(-)
Index: llvm/lib/VMCore/Dominators.cpp
diff -u llvm/lib/VMCore/Dominators.cpp:1.90 llvm/lib/VMCore/Dominators.cpp:1.91
--- llvm/lib/VMCore/Dominators.cpp:1.90 Sun Apr 8 23:07:36 2007
+++ llvm/lib/VMCore/Dominators.cpp Mon Apr 9 01:10:06 2007
@@ -48,19 +48,6 @@
static RegisterPass<ImmediateDominators>
C("idom", "Immediate Dominators Construction", true);
-namespace {
- class DFCalculateWorkObject {
- public:
- DFCalculateWorkObject(BasicBlock *B, BasicBlock *P,
- const DominatorTree::Node *N,
- const DominatorTree::Node *PN)
- : currentBB(B), parentBB(P), Node(N), parentNode(PN) {}
- BasicBlock *currentBB;
- BasicBlock *parentBB;
- const DominatorTree::Node *Node;
- const DominatorTree::Node *parentNode;
- };
-}
unsigned ImmediateDominators::DFSPass(BasicBlock *V, InfoRec &VInfo,
unsigned N) {
VInfo.Semi = ++N;
@@ -362,6 +349,20 @@
static RegisterPass<DominanceFrontier>
G("domfrontier", "Dominance Frontier Construction", true);
+namespace {
+ class DFCalculateWorkObject {
+ public:
+ DFCalculateWorkObject(BasicBlock *B, BasicBlock *P,
+ const DominatorTree::Node *N,
+ const DominatorTree::Node *PN)
+ : currentBB(B), parentBB(P), Node(N), parentNode(PN) {}
+ BasicBlock *currentBB;
+ BasicBlock *parentBB;
+ const DominatorTree::Node *Node;
+ const DominatorTree::Node *parentNode;
+ };
+}
+
const DominanceFrontier::DomSetType &
DominanceFrontier::calculate(const DominatorTree &DT,
const DominatorTree::Node *Node) {
@@ -406,7 +407,8 @@
DominatorTree::Node *IDominee = *NI;
BasicBlock *childBB = IDominee->getBlock();
if (visited.count(childBB) == 0) {
- workList.push_back(DFCalculateWorkObject(childBB, currentBB, IDominee, currentNode));
+ workList.push_back(DFCalculateWorkObject(childBB, currentBB,
+ IDominee, currentNode));
visitChild = true;
}
}
More information about the llvm-commits
mailing list