2001-07-03 05:37:26 +00:00
|
|
|
//===-- llvm/Analysis/Writer.h - Printer for Analysis routines ---*- C++ -*--=//
|
|
|
|
//
|
|
|
|
// This library provides routines to print out various analysis results to
|
|
|
|
// an output stream.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef LLVM_ANALYSIS_WRITER_H
|
|
|
|
#define LLVM_ANALYSIS_WRITER_H
|
|
|
|
|
|
|
|
#include "llvm/Assembly/Writer.h"
|
|
|
|
|
|
|
|
namespace cfg {
|
|
|
|
|
|
|
|
// This library provides support for printing out Intervals.
|
|
|
|
class Interval;
|
2001-07-03 15:28:08 +00:00
|
|
|
class IntervalPartition;
|
|
|
|
|
2001-07-03 05:37:26 +00:00
|
|
|
void WriteToOutput(const Interval *I, ostream &o);
|
|
|
|
inline ostream &operator <<(ostream &o, const Interval *I) {
|
|
|
|
WriteToOutput(I, o); return o;
|
|
|
|
}
|
|
|
|
|
2001-07-03 15:28:08 +00:00
|
|
|
void WriteToOutput(const IntervalPartition &IP, ostream &o);
|
|
|
|
inline ostream &operator <<(ostream &o, const IntervalPartition &IP) {
|
|
|
|
WriteToOutput(IP, o); return o;
|
|
|
|
}
|
|
|
|
|
2001-07-03 05:37:26 +00:00
|
|
|
// Stuff for printing out Dominator data structures...
|
|
|
|
class DominatorSet;
|
|
|
|
class ImmediateDominators;
|
|
|
|
class DominatorTree;
|
|
|
|
class DominanceFrontier;
|
|
|
|
|
|
|
|
void WriteToOutput(const DominatorSet &, ostream &o);
|
|
|
|
inline ostream &operator <<(ostream &o, const DominatorSet &DS) {
|
|
|
|
WriteToOutput(DS, o); return o;
|
|
|
|
}
|
|
|
|
|
|
|
|
void WriteToOutput(const ImmediateDominators &, ostream &o);
|
|
|
|
inline ostream &operator <<(ostream &o, const ImmediateDominators &ID) {
|
|
|
|
WriteToOutput(ID, o); return o;
|
|
|
|
}
|
|
|
|
|
|
|
|
void WriteToOutput(const DominatorTree &, ostream &o);
|
|
|
|
inline ostream &operator <<(ostream &o, const DominatorTree &DT) {
|
|
|
|
WriteToOutput(DT, o); return o;
|
|
|
|
}
|
|
|
|
|
|
|
|
void WriteToOutput(const DominanceFrontier &, ostream &o);
|
|
|
|
inline ostream &operator <<(ostream &o, const DominanceFrontier &DF) {
|
|
|
|
WriteToOutput(DF, o); return o;
|
|
|
|
}
|
2001-09-28 00:06:15 +00:00
|
|
|
|
|
|
|
// Stuff for printing out a callgraph...
|
|
|
|
class CallGraph;
|
|
|
|
class CallGraphNode;
|
|
|
|
|
|
|
|
void WriteToOutput(const CallGraph &, ostream &o);
|
|
|
|
inline ostream &operator <<(ostream &o, const CallGraph &CG) {
|
|
|
|
WriteToOutput(CG, o); return o;
|
|
|
|
}
|
|
|
|
|
|
|
|
void WriteToOutput(const CallGraphNode *, ostream &o);
|
|
|
|
inline ostream &operator <<(ostream &o, const CallGraphNode *CG) {
|
|
|
|
WriteToOutput(CG, o); return o;
|
|
|
|
}
|
2001-07-03 05:37:26 +00:00
|
|
|
} // End namespace CFG
|
|
|
|
|
|
|
|
#endif
|