1 //===-- llvm/Analysis/Writer.h - Printer for Analysis routines ---*- C++ -*--=//
3 // This library provides routines to print out various analysis results to
6 //===----------------------------------------------------------------------===//
8 #ifndef LLVM_ANALYSIS_WRITER_H
9 #define LLVM_ANALYSIS_WRITER_H
11 #include "llvm/Assembly/Writer.h"
15 // This library provides support for printing out Intervals.
17 class IntervalPartition;
19 void WriteToOutput(const Interval *I, ostream &o);
20 inline ostream &operator <<(ostream &o, const Interval *I) {
21 WriteToOutput(I, o); return o;
24 void WriteToOutput(const IntervalPartition &IP, ostream &o);
25 inline ostream &operator <<(ostream &o, const IntervalPartition &IP) {
26 WriteToOutput(IP, o); return o;
29 // Stuff for printing out Dominator data structures...
31 class ImmediateDominators;
33 class DominanceFrontier;
35 void WriteToOutput(const DominatorSet &, ostream &o);
36 inline ostream &operator <<(ostream &o, const DominatorSet &DS) {
37 WriteToOutput(DS, o); return o;
40 void WriteToOutput(const ImmediateDominators &, ostream &o);
41 inline ostream &operator <<(ostream &o, const ImmediateDominators &ID) {
42 WriteToOutput(ID, o); return o;
45 void WriteToOutput(const DominatorTree &, ostream &o);
46 inline ostream &operator <<(ostream &o, const DominatorTree &DT) {
47 WriteToOutput(DT, o); return o;
50 void WriteToOutput(const DominanceFrontier &, ostream &o);
51 inline ostream &operator <<(ostream &o, const DominanceFrontier &DF) {
52 WriteToOutput(DF, o); return o;
55 // Stuff for printing out a callgraph...
59 void WriteToOutput(const CallGraph &, ostream &o);
60 inline ostream &operator <<(ostream &o, const CallGraph &CG) {
61 WriteToOutput(CG, o); return o;
64 void WriteToOutput(const CallGraphNode *, ostream &o);
65 inline ostream &operator <<(ostream &o, const CallGraphNode *CGN) {
66 WriteToOutput(CGN, o); return o;
69 // Stuff for printing out Loop information
73 void WriteToOutput(const LoopInfo &, ostream &o);
74 inline ostream &operator <<(ostream &o, const LoopInfo &LI) {
75 WriteToOutput(LI, o); return o;
78 void WriteToOutput(const Loop *, ostream &o);
79 inline ostream &operator <<(ostream &o, const Loop *L) {
80 WriteToOutput(L, o); return o;
83 } // End namespace CFG
85 class InductionVariable;
86 void WriteToOutput(const InductionVariable &, ostream &o);
87 inline ostream &operator <<(ostream &o, const InductionVariable &IV) {
88 WriteToOutput(IV, o); return o;