Checkin of new Analysis result printing header
[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   void WriteToOutput(const Interval *I, ostream &o);
18   inline ostream &operator <<(ostream &o, const Interval *I) {
19     WriteToOutput(I, o); return o;
20   }
21
22   // Stuff for printing out Dominator data structures...
23   class DominatorSet;
24   class ImmediateDominators;
25   class DominatorTree;
26   class DominanceFrontier;
27
28   void WriteToOutput(const DominatorSet &, ostream &o);
29   inline ostream &operator <<(ostream &o, const DominatorSet &DS) {
30     WriteToOutput(DS, o); return o;
31   }
32
33   void WriteToOutput(const ImmediateDominators &, ostream &o);
34   inline ostream &operator <<(ostream &o, const ImmediateDominators &ID) {
35     WriteToOutput(ID, o); return o;
36   }
37
38   void WriteToOutput(const DominatorTree &, ostream &o);
39   inline ostream &operator <<(ostream &o, const DominatorTree &DT) {
40     WriteToOutput(DT, o); return o;
41   }
42
43   void WriteToOutput(const DominanceFrontier &, ostream &o);
44   inline ostream &operator <<(ostream &o, const DominanceFrontier &DF) {
45     WriteToOutput(DF, o); return o;
46   }
47 }  // End namespace CFG
48
49 #endif