summaryrefslogtreecommitdiff
path: root/lib/Analysis/IntervalPartition.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-07-27 01:12:17 +0000
committerChris Lattner <sabre@nondot.org>2002-07-27 01:12:17 +0000
commita59cbb2043c08f3cfb8fb379f0d336e21e070be8 (patch)
tree19ace2fcd6b60628e49d6c65ca1015cbff960916 /lib/Analysis/IntervalPartition.cpp
parent97f51a3024a72ef8500e95b90e6361e6783160fd (diff)
downloadllvm-a59cbb2043c08f3cfb8fb379f0d336e21e070be8.tar.gz
llvm-a59cbb2043c08f3cfb8fb379f0d336e21e070be8.tar.bz2
llvm-a59cbb2043c08f3cfb8fb379f0d336e21e070be8.tar.xz
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3116 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/IntervalPartition.cpp')
-rw-r--r--lib/Analysis/IntervalPartition.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Analysis/IntervalPartition.cpp b/lib/Analysis/IntervalPartition.cpp
index 5e6bf9ca4d..2e8668ae5d 100644
--- a/lib/Analysis/IntervalPartition.cpp
+++ b/lib/Analysis/IntervalPartition.cpp
@@ -13,7 +13,7 @@ using std::make_pair;
static RegisterAnalysis<IntervalPartition>
X("intervals", "Interval Partition Construction");
-AnalysisID IntervalPartition::ID(AnalysisID::create<IntervalPartition>(), true);
+AnalysisID IntervalPartition::ID = X;
//===----------------------------------------------------------------------===//
// IntervalPartition Implementation
@@ -26,6 +26,11 @@ void IntervalPartition::destroy() {
RootInterval = 0;
}
+void IntervalPartition::print(ostream &O) const {
+ std::copy(begin(), end(),
+ std::ostream_iterator<const Interval *>(O, "\n"));
+}
+
// addIntervalToPartition - Add an interval to the internal list of intervals,
// and then add mappings from all of the basic blocks in the interval to the
// interval itself (in the IntervalMap).