mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
c9f39b26c0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63 91177308-0d34-0410-b5e6-96231b3b80d8
29 lines
975 B
C++
29 lines
975 B
C++
//===-- IntervalWriter.cpp - Library for printing Intervals ------*- C++ -*--=//
|
|
//
|
|
// This library implements the interval printing functionality defined in
|
|
// llvm/Assembly/Writer.h
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "llvm/Assembly/Writer.h"
|
|
#include "llvm/Analysis/Interval.h"
|
|
#include <iterator>
|
|
#include <algorithm>
|
|
|
|
void cfg::WriteToOutput(const Interval *I, ostream &o) {
|
|
o << "-------------------------------------------------------------\n"
|
|
<< "Interval Contents:\n";
|
|
|
|
// Print out all of the basic blocks in the interval...
|
|
copy(I->Nodes.begin(), I->Nodes.end(),
|
|
ostream_iterator<BasicBlock*>(o, "\n"));
|
|
|
|
o << "Interval Predecessors:\n";
|
|
copy(I->Predecessors.begin(), I->Predecessors.end(),
|
|
ostream_iterator<BasicBlock*>(o, "\n"));
|
|
|
|
o << "Interval Successors:\n";
|
|
copy(I->Successors.begin(), I->Successors.end(),
|
|
ostream_iterator<BasicBlock*>(o, "\n"));
|
|
}
|