Remove all contents of the cfg namespace to the global namespace
[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 <iosfwd>
12
13 // This library provides support for printing out Intervals.
14 class Interval;
15 class IntervalPartition;
16
17 void WriteToOutput(const Interval *I, std::ostream &o);
18 inline std::ostream &operator <<(std::ostream &o, const Interval *I) {
19   WriteToOutput(I, o); return o;
20 }
21
22 void WriteToOutput(const IntervalPartition &IP, std::ostream &o);
23 inline std::ostream &operator <<(std::ostream &o,
24                                  const IntervalPartition &IP) {
25   WriteToOutput(IP, o); return o;
26 }
27
28 // Stuff for printing out Dominator data structures...
29 class DominatorSet;
30 class ImmediateDominators;
31 class DominatorTree;
32 class DominanceFrontier;
33
34 void WriteToOutput(const DominatorSet &, std::ostream &o);
35 inline std::ostream &operator <<(std::ostream &o, const DominatorSet &DS) {
36   WriteToOutput(DS, o); return o;
37 }
38
39 void WriteToOutput(const ImmediateDominators &, std::ostream &o);
40 inline std::ostream &operator <<(std::ostream &o,
41                                  const ImmediateDominators &ID) {
42   WriteToOutput(ID, o); return o;
43 }
44
45 void WriteToOutput(const DominatorTree &, std::ostream &o);
46 inline std::ostream &operator <<(std::ostream &o, const DominatorTree &DT) {
47   WriteToOutput(DT, o); return o;
48 }
49
50 void WriteToOutput(const DominanceFrontier &, std::ostream &o);
51 inline std::ostream &operator <<(std::ostream &o,
52                                  const DominanceFrontier &DF) {
53   WriteToOutput(DF, o); return o;
54 }
55
56 // Stuff for printing out Loop information
57 class Loop;
58 class LoopInfo;
59
60 void WriteToOutput(const LoopInfo &, std::ostream &o);
61 inline std::ostream &operator <<(std::ostream &o, const LoopInfo &LI) {
62   WriteToOutput(LI, o); return o;
63 }
64
65 void WriteToOutput(const Loop *, std::ostream &o);
66 inline std::ostream &operator <<(std::ostream &o, const Loop *L) {
67   WriteToOutput(L, o); return o;
68 }
69
70 class InductionVariable;
71 void WriteToOutput(const InductionVariable &, std::ostream &o);
72 inline std::ostream &operator <<(std::ostream &o, const InductionVariable &IV) {
73   WriteToOutput(IV, o); return o;
74 }
75
76 #endif