Commit 52c338d
authored
[llvm][NFC] Rework Timer.cpp globals to ensure valid lifetimes (llvm#121663)
This is intended to help with flang `-ftime-report` support:
- llvm#107270.
With this change, I was able to cherry-pick llvm#107270, uncomment
`llvm::TimePassesIsEnabled = true;` and compile with `-ftime-report`.
I also noticed that `clang/lib/Driver/OffloadBundler.cpp` was statically
constructing a `TimerGroup` and changed it to lazily construct via
ManagedStatic.1 parent c3d1a50 commit 52c338d
File tree
3 files changed
+182
-95
lines changed- clang/lib/Driver
- llvm
- include/llvm/Support
- lib/Support
3 files changed
+182
-95
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
66 | | - | |
67 | | - | |
68 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
69 | 78 | | |
70 | 79 | | |
71 | 80 | | |
| |||
987 | 996 | | |
988 | 997 | | |
989 | 998 | | |
990 | | - | |
| 999 | + | |
991 | 1000 | | |
992 | 1001 | | |
993 | 1002 | | |
| |||
1004 | 1013 | | |
1005 | 1014 | | |
1006 | 1015 | | |
1007 | | - | |
| 1016 | + | |
1008 | 1017 | | |
1009 | 1018 | | |
1010 | 1019 | | |
| |||
1119 | 1128 | | |
1120 | 1129 | | |
1121 | 1130 | | |
1122 | | - | |
| 1131 | + | |
1123 | 1132 | | |
1124 | 1133 | | |
1125 | 1134 | | |
| |||
1141 | 1150 | | |
1142 | 1151 | | |
1143 | 1152 | | |
1144 | | - | |
| 1153 | + | |
1145 | 1154 | | |
1146 | 1155 | | |
1147 | 1156 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| |||
196 | 198 | | |
197 | 199 | | |
198 | 200 | | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
199 | 205 | | |
200 | 206 | | |
201 | 207 | | |
| |||
0 commit comments