From 2675007573b820d1c084afe560105ab8a622d942 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 27 Jul 2002 01:12:17 +0000 Subject: * 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 --- llvm/lib/Analysis/Interval.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'llvm/lib/Analysis/Interval.cpp') 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 //===----------------------------------------------------------------------===// // 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(o, "\n")); + + o << "Interval Predecessors:\n"; + std::copy(Predecessors.begin(), Predecessors.end(), + std::ostream_iterator(o, "\n")); + + o << "Interval Successors:\n"; + std::copy(Successors.begin(), Successors.end(), + std::ostream_iterator(o, "\n")); +} -- cgit v1.2.3