aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Analysis/Writer.h
blob: b0050940c2a29fe4a2717c55b3c1bc24621cc057 (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
//===-- 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 <iosfwd>

// This library provides support for printing out Intervals.
class Interval;
class IntervalPartition;

void WriteToOutput(const Interval *I, std::ostream &o);
inline std::ostream &operator <<(std::ostream &o, const Interval *I) {
  WriteToOutput(I, o); return o;
}

void WriteToOutput(const IntervalPartition &IP, std::ostream &o);
inline std::ostream &operator <<(std::ostream &o,
                                 const IntervalPartition &IP) {
  WriteToOutput(IP, o); return o;
}

// Stuff for printing out Dominator data structures...
class DominatorSetBase;
class ImmediateDominatorsBase;
class DominatorTreeBase;
class DominanceFrontierBase;

void WriteToOutput(const DominatorSetBase &, std::ostream &o);
inline std::ostream &operator <<(std::ostream &o, const DominatorSetBase &DS) {
  WriteToOutput(DS, o); return o;
}

void WriteToOutput(const ImmediateDominatorsBase &, std::ostream &o);
inline std::ostream &operator <<(std::ostream &o,
                                 const ImmediateDominatorsBase &ID) {
  WriteToOutput(ID, o); return o;
}

void WriteToOutput(const DominatorTreeBase &, std::ostream &o);
inline std::ostream &operator <<(std::ostream &o, const DominatorTreeBase &DT) {
  WriteToOutput(DT, o); return o;
}

void WriteToOutput(const DominanceFrontierBase &, std::ostream &o);
inline std::ostream &operator <<(std::ostream &o,
                                 const DominanceFrontierBase &DF) {
  WriteToOutput(DF, o); return o;
}

// Stuff for printing out Loop information
class Loop;
class LoopInfo;

void WriteToOutput(const LoopInfo &, std::ostream &o);
inline std::ostream &operator <<(std::ostream &o, const LoopInfo &LI) {
  WriteToOutput(LI, o); return o;
}

void WriteToOutput(const Loop *, std::ostream &o);
inline std::ostream &operator <<(std::ostream &o, const Loop *L) {
  WriteToOutput(L, o); return o;
}

class InductionVariable;
void WriteToOutput(const InductionVariable &, std::ostream &o);
inline std::ostream &operator <<(std::ostream &o, const InductionVariable &IV) {
  WriteToOutput(IV, o); return o;
}

#endif