Commit 770ddc3
[Support] Optimize DebugCounter hot path (NFC) (llvm#170260)
When enabling ShouldPrintCounter, also set Enabled, so that we only have
to check one of them. This cuts down the cost of (disabled) debug
counters by half.1 parent e1ed2b8 commit 770ddc3
File tree
2 files changed
+6
-2
lines changed- llvm
- include/llvm/Support
- lib/Support
2 files changed
+6
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | | - | |
| 161 | + | |
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
139 | 143 | | |
140 | 144 | | |
141 | 145 | | |
| |||
0 commit comments