summaryrefslogtreecommitdiff
path: root/include/llvm/Analysis/Writer.h
blob: 4d668380946aa62a821527abc665ff657a51dcbf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//===-- 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;
  void WriteToOutput(const Interval *I, ostream &o);
  inline ostream &operator <<(ostream &o, const Interval *I) {
    WriteToOutput(I, o); return o;
  }

  // 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;
  }
}  // End namespace CFG

#endif