Add dump() routines for debugging assistance.
llvm-svn: 37314
This commit is contained in:
@@ -199,6 +199,7 @@ public:
|
|||||||
void print(std::ostream *OS, const Module* M = 0) const {
|
void print(std::ostream *OS, const Module* M = 0) const {
|
||||||
if (OS) print(*OS, M);
|
if (OS) print(*OS, M);
|
||||||
}
|
}
|
||||||
|
virtual void dump();
|
||||||
};
|
};
|
||||||
|
|
||||||
//===-------------------------------------
|
//===-------------------------------------
|
||||||
@@ -372,6 +373,7 @@ public:
|
|||||||
void print(std::ostream *OS, const Module* M = 0) const {
|
void print(std::ostream *OS, const Module* M = 0) const {
|
||||||
if (OS) print(*OS, M);
|
if (OS) print(*OS, M);
|
||||||
}
|
}
|
||||||
|
virtual void dump();
|
||||||
protected:
|
protected:
|
||||||
/// getNode - return the (Post)DominatorTree node for the specified basic
|
/// getNode - return the (Post)DominatorTree node for the specified basic
|
||||||
/// block. This is the same as using operator[] on this class.
|
/// block. This is the same as using operator[] on this class.
|
||||||
@@ -467,6 +469,7 @@ public:
|
|||||||
void print(std::ostream *OS, const Module* M = 0) const {
|
void print(std::ostream *OS, const Module* M = 0) const {
|
||||||
if (OS) print(*OS, M);
|
if (OS) print(*OS, M);
|
||||||
}
|
}
|
||||||
|
virtual void dump();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
#include "llvm/ADT/SetOperations.h"
|
#include "llvm/ADT/SetOperations.h"
|
||||||
#include "llvm/ADT/SmallPtrSet.h"
|
#include "llvm/ADT/SmallPtrSet.h"
|
||||||
#include "llvm/Instructions.h"
|
#include "llvm/Instructions.h"
|
||||||
|
#include "llvm/Support/Streams.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
@@ -363,6 +364,10 @@ void DominatorTreeBase::print(std::ostream &o, const Module* ) const {
|
|||||||
PrintDomTree(getRootNode(), o, 1);
|
PrintDomTree(getRootNode(), o, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DominatorTreeBase::dump() {
|
||||||
|
print (llvm::cerr);
|
||||||
|
}
|
||||||
|
|
||||||
bool DominatorTree::runOnFunction(Function &F) {
|
bool DominatorTree::runOnFunction(Function &F) {
|
||||||
reset(); // Reset from the last time we were run...
|
reset(); // Reset from the last time we were run...
|
||||||
Roots.push_back(&F.getEntryBlock());
|
Roots.push_back(&F.getEntryBlock());
|
||||||
@@ -476,6 +481,11 @@ void DominanceFrontierBase::print(std::ostream &o, const Module* ) const {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DominanceFrontierBase::dump() {
|
||||||
|
print (llvm::cerr);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// ETOccurrence Implementation
|
// ETOccurrence Implementation
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
@@ -1019,3 +1029,7 @@ void ETForestBase::print(std::ostream &o, const Module *) const {
|
|||||||
}
|
}
|
||||||
o << "\n";
|
o << "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ETForestBase::dump() {
|
||||||
|
print (llvm::cerr);
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user