LLVM: lib/XRay/BlockPrinter.cpp Source File (original) (raw)
Go to the documentation of this file.
1
2
3
4
5
6
7
9
10using namespace llvm;
12
14 OS << "\n[New Block]\n";
15 CurrentState = State::Preamble;
16 return RP.visit(R);
17}
18
19
21 if (CurrentState == State::Start)
22 OS << "\n[New Block]\n";
23
24 OS << "Preamble: \n";
25 CurrentState = State::Preamble;
26 return RP.visit(R);
27}
28
30 CurrentState = State::Preamble;
31 return RP.visit(R);
32}
33
35 CurrentState = State::Preamble;
36 return RP.visit(R);
37}
38
39
41 if (CurrentState == State::Preamble)
42 OS << "\nBody:\n";
43 if (CurrentState == State::Function)
44 OS << "\nMetadata: ";
45 CurrentState = State::Metadata;
46 OS << " ";
47 auto E = RP.visit(R);
48 return E;
49}
50
52 if (CurrentState == State::Function)
53 OS << "\nMetadata:";
54 CurrentState = State::Metadata;
55 OS << " ";
56 auto E = RP.visit(R);
57 return E;
58}
59
60
62 if (CurrentState == State::Metadata)
63 OS << "\n";
64 CurrentState = State::CustomEvent;
65 OS << "* ";
66 auto E = RP.visit(R);
67 return E;
68}
69
71 if (CurrentState == State::Metadata)
72 OS << "\n";
73 CurrentState = State::CustomEvent;
74 OS << "* ";
75 auto E = RP.visit(R);
76 return E;
77}
78
80 if (CurrentState == State::Metadata)
81 OS << "\n";
82 CurrentState = State::CustomEvent;
83 OS << "* ";
84 auto E = RP.visit(R);
85 return E;
86}
87
88
90 if (CurrentState == State::Metadata)
91 OS << "\n";
92 CurrentState = State::Function;
93 OS << "- ";
94 auto E = RP.visit(R);
95 return E;
96}
97
99 CurrentState = State::Arg;
100 OS << " : ";
101 auto E = RP.visit(R);
102 return E;
103}
104
106 CurrentState = State::End;
107 OS << " *** ";
108 auto E = RP.visit(R);
109 return E;
110}
Lightweight error class with error context and mandatory checking.
Error visit(BufferExtents &) override
Definition BlockPrinter.cpp:13
This is an optimization pass for GlobalISel generic memory operations.