diff options
| author | Chris Lattner <sabre@nondot.org> | 2002-07-27 01:12:17 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2002-07-27 01:12:17 +0000 |
| commit | 2675007573b820d1c084afe560105ab8a622d942 (patch) | |
| tree | f1d936ba7cfe6eff56304634bbc16e760d71837c /llvm/lib/Analysis/Interval.cpp | |
| parent | 96a0dfa33e8469ef18866d1d89708af18929e38e (diff) | |
| download | bcm5719-llvm-2675007573b820d1c084afe560105ab8a622d942.tar.gz bcm5719-llvm-2675007573b820d1c084afe560105ab8a622d942.zip | |
* Standardize how analysis results/passes as printed with the print() virtual
methods
* Eliminate AnalysisID: Now it is just a typedef for const PassInfo*
* Simplify how AnalysisID's are initialized
* Eliminate Analysis/Writer.cpp/.h: incorporate printing functionality into
the analyses themselves.
llvm-svn: 3116
Diffstat (limited to 'llvm/lib/Analysis/Interval.cpp')
| -rw-r--r-- | llvm/lib/Analysis/Interval.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/Interval.cpp b/llvm/lib/Analysis/Interval.cpp index a4aa88abdbc..8ba8980a47e 100644 --- a/llvm/lib/Analysis/Interval.cpp +++ b/llvm/lib/Analysis/Interval.cpp @@ -8,6 +8,7 @@ #include "llvm/Analysis/Interval.h" #include "llvm/BasicBlock.h" #include "llvm/Support/CFG.h" +#include <algorithm> //===----------------------------------------------------------------------===// // Interval Implementation @@ -26,3 +27,19 @@ bool Interval::isLoop() const { } +void Interval::print(ostream &o) const { + o << "-------------------------------------------------------------\n" + << "Interval Contents:\n"; + + // Print out all of the basic blocks in the interval... + std::copy(Nodes.begin(), Nodes.end(), + std::ostream_iterator<BasicBlock*>(o, "\n")); + + o << "Interval Predecessors:\n"; + std::copy(Predecessors.begin(), Predecessors.end(), + std::ostream_iterator<BasicBlock*>(o, "\n")); + + o << "Interval Successors:\n"; + std::copy(Successors.begin(), Successors.end(), + std::ostream_iterator<BasicBlock*>(o, "\n")); +} |

