1 //===-- IntervalWriter.cpp - Library for printing Intervals ------*- C++ -*--=//
3 // This library implements the interval printing functionality defined in
4 // llvm/Assembly/Writer.h
6 //===----------------------------------------------------------------------===//
8 #include "llvm/Assembly/Writer.h"
9 #include "llvm/Analysis/Interval.h"
13 void cfg::WriteToOutput(const Interval *I, ostream &o) {
14 o << "-------------------------------------------------------------\n"
15 << "Interval Contents:\n";
17 // Print out all of the basic blocks in the interval...
18 copy(I->Nodes.begin(), I->Nodes.end(),
19 ostream_iterator<BasicBlock*>(o, "\n"));
21 o << "Interval Predecessors:\n";
22 copy(I->Predecessors.begin(), I->Predecessors.end(),
23 ostream_iterator<BasicBlock*>(o, "\n"));
25 o << "Interval Successors:\n";
26 copy(I->Successors.begin(), I->Successors.end(),
27 ostream_iterator<BasicBlock*>(o, "\n"));