LLVM: lib/TableGen/TGTimer.cpp Source File (original) (raw)
Go to the documentation of this file.
1
2
3
4
5
6
7
8
9
10
11
12
14using namespace llvm;
15
16
17
19 if (!TimingGroup)
20 return;
21 if (LastTimer && LastTimer->isRunning()) {
22 LastTimer->stopTimer();
23 if (BackendTimer) {
24 LastTimer->clear();
25 BackendTimer = false;
26 }
27 }
28
29 LastTimer = std::make_unique("", Name, *TimingGroup);
30 LastTimer->startTimer();
31}
32
34 if (!TimingGroup)
35 return;
36
37 assert(LastTimer && "No phase timer was started");
38 LastTimer->stopTimer();
39}
40
42 if (!TimingGroup)
43 return;
44
46 BackendTimer = true;
47}
48
50 if (!TimingGroup || !BackendTimer)
51 return;
53 BackendTimer = false;
54}
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
StringRef - Represent a constant reference to a string, i.e.
void stopTimer()
Stop timing a phase.
Definition TGTimer.cpp:33
void startTimer(StringRef Name)
Start timing a phase. Automatically stops any previous phase timer.
Definition TGTimer.cpp:18
void stopBackendTimer()
Stop timing the overall backend.
Definition TGTimer.cpp:49
void startBackendTimer(StringRef Name)
Start timing the overall backend.
Definition TGTimer.cpp:41
This is an optimization pass for GlobalISel generic memory operations.