mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-29 10:25:12 +00:00
* 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
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include "llvm/Analysis/Interval.h"
|
||||
#include "llvm/BasicBlock.h"
|
||||
#include "llvm/Support/CFG.h"
|
||||
#include <algorithm>
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// 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<BasicBlock*>(o, "\n"));
|
||||
|
||||
o << "Interval Predecessors:\n";
|
||||
std::copy(Predecessors.begin(), Predecessors.end(),
|
||||
std::ostream_iterator<BasicBlock*>(o, "\n"));
|
||||
|
||||
o << "Interval Successors:\n";
|
||||
std::copy(Successors.begin(), Successors.end(),
|
||||
std::ostream_iterator<BasicBlock*>(o, "\n"));
|
||||
}
|
||||
|
Reference in New Issue
Block a user