diff options
author | Chris Lattner <sabre@nondot.org> | 2002-05-08 23:11:08 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-05-08 23:11:08 +0000 |
commit | 4874680b65ac7accb2c506de263b7ef76e251242 (patch) | |
tree | e312650a4b094ffa0abb546b51392f0e1a04e146 /lib/Analysis/Writer.cpp | |
parent | 5c4afb9034b3dd784620977e67991043a312ae60 (diff) |
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
Diffstat (limited to 'lib/Analysis/Writer.cpp')
-rw-r--r-- | lib/Analysis/Writer.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/Analysis/Writer.cpp b/lib/Analysis/Writer.cpp index 9b68bfc1cf..3624dd1e6a 100644 --- a/lib/Analysis/Writer.cpp +++ b/lib/Analysis/Writer.cpp @@ -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"; } } |