Move callgraph printing out of writer.h into callgraph.h
[oota-llvm.git] / include / llvm / Analysis / Writer.h
1 //===-- llvm/Analysis/Writer.h - Printer for Analysis routines ---*- C++ -*--=//
2 //
3 // This library provides routines to print out various analysis results to 
4 // an output stream.
5 //
6 //===----------------------------------------------------------------------===//
7
8 #ifndef LLVM_ANALYSIS_WRITER_H
9 #define LLVM_ANALYSIS_WRITER_H
10
11 #include "llvm/Assembly/Writer.h"
12
13 namespace cfg {
14
15   // This library provides support for printing out Intervals.
16   class Interval;
17   class IntervalPartition;
18
19   void WriteToOutput(const Interval *I, std::ostream &o);
20   inline std::ostream &operator <<(std::ostream &o, const Interval *I) {
21     WriteToOutput(I, o); return o;
22   }
23
24   void WriteToOutput(const IntervalPartition &IP, std::ostream &o);
25   inline std::ostream &operator <<(std::ostream &o,
26                                    const IntervalPartition &IP) {
27     WriteToOutput(IP, o); return o;
28   }
29
30   // Stuff for printing out Dominator data structures...
31   class DominatorSet;
32   class ImmediateDominators;
33   class DominatorTree;
34   class DominanceFrontier;
35
36   void WriteToOutput(const DominatorSet &, std::ostream &o);
37   inline std::ostream &operator <<(std::ostream &o, const DominatorSet &DS) {
38     WriteToOutput(DS, o); return o;
39   }
40
41   void WriteToOutput(const ImmediateDominators &, std::ostream &o);
42   inline std::ostream &operator <<(std::ostream &o,
43                                    const ImmediateDominators &ID) {
44     WriteToOutput(ID, o); return o;
45   }
46
47   void WriteToOutput(const DominatorTree &, std::ostream &o);
48   inline std::ostream &operator <<(std::ostream &o, const DominatorTree &DT) {
49     WriteToOutput(DT, o); return o;
50   }
51
52   void WriteToOutput(const DominanceFrontier &, std::ostream &o);
53   inline std::ostream &operator <<(std::ostream &o,
54                                    const DominanceFrontier &DF) {
55     WriteToOutput(DF, o); return o;
56   }
57
58   // Stuff for printing out Loop information
59   class Loop;
60   class LoopInfo;
61
62   void WriteToOutput(const LoopInfo &, std::ostream &o);
63   inline std::ostream &operator <<(std::ostream &o, const LoopInfo &LI) {
64     WriteToOutput(LI, o); return o;
65   }
66   
67   void WriteToOutput(const Loop *, std::ostream &o);
68   inline std::ostream &operator <<(std::ostream &o, const Loop *L) {
69     WriteToOutput(L, o); return o;
70   }
71   
72 }  // End namespace CFG
73
74 class InductionVariable;
75 void WriteToOutput(const InductionVariable &, std::ostream &o);
76 inline std::ostream &operator <<(std::ostream &o, const InductionVariable &IV) {
77   WriteToOutput(IV, o); return o;
78 }
79
80 #endif