Print out post dominance data structures more nicely

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2562 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2002-05-08 23:11:08 +00:00
parent 5c4afb9034
commit 4874680b65

View File

@ -51,7 +51,12 @@ void WriteToOutput(const IntervalPartition &IP, ostream &o) {
//===----------------------------------------------------------------------===//
ostream &operator<<(ostream &o, const set<BasicBlock*> &BBs) {
copy(BBs.begin(),BBs.end(), std::ostream_iterator<BasicBlock*>(o, "\n"));
for (set<BasicBlock*>::const_iterator I = BBs.begin(), E = BBs.end();
I != E; ++I) {
o << " ";
WriteAsOperand(o, (Value*)*I, false);
o << "\n";
}
return o;
}
@ -98,8 +103,9 @@ void WriteToOutput(const DominanceFrontier &DF, ostream &o) {
for (DominanceFrontier::const_iterator I = DF.begin(), E = DF.end();
I != E; ++I) {
o << "=============================--------------------------------\n"
<< "\nDominance Frontier For Basic Block\n" << I->first
<< "is: \n" << I->second << "\n";
<< "\nDominance Frontier For Basic Block\n";
WriteAsOperand(o, (Value*)I->first, false);
o << " is: \n" << I->second << "\n";
}
}