// interval itself (in the IntervalMap).
//
void IntervalPartition::addIntervalToPartition(Interval *I) {
- IntervalList.push_back(I);
+ push_back(I);
// Add mappings for all of the basic blocks in I to the IntervalPartition
for (Interval::node_iterator It = I->Nodes.begin(), End = I->Nodes.end();
//===----------------------------------------------------------------------===//
#include "llvm/Analysis/Writer.h"
-#include "llvm/Analysis/Interval.h"
+#include "llvm/Analysis/IntervalPartition.h"
#include "llvm/Analysis/Dominators.h"
#include <iterator>
#include <algorithm>
+//===----------------------------------------------------------------------===//
+// Interval Printing Routines
+//===----------------------------------------------------------------------===//
+
void cfg::WriteToOutput(const Interval *I, ostream &o) {
o << "-------------------------------------------------------------\n"
<< "Interval Contents:\n";
ostream_iterator<BasicBlock*>(o, "\n"));
}
+void cfg::WriteToOutput(const IntervalPartition &IP, ostream &o) {
+ copy(IP.begin(), IP.end(), ostream_iterator<const Interval *>(o, "\n"));
+}
+
+
+
+//===----------------------------------------------------------------------===//
+// Dominator Printing Routines
+//===----------------------------------------------------------------------===//
+
ostream &operator<<(ostream &o, const set<const BasicBlock*> &BBs) {
copy(BBs.begin(), BBs.end(), ostream_iterator<const BasicBlock*>(o, "\n"));
return o;