Commit 52dbe76
committed
[ADT] Make use of subsetOf and anyCommon methods of BitVector (NFC)
Replace the code along these lines
BitVector Tmp = LHS;
Tmp &= RHS;
return Tmp.any();
and
BitVector Tmp = LHS;
Tmp.reset(RHS);
return Tmp.none();
with `LHS.anyCommon(RHS)` and `LHS.subsetOf(RHS)`, correspondingly, which
do not require creating temporary BitVector and can return early.1 parent dcefe31 commit 52dbe76
File tree
8 files changed
+18
-31
lines changed- bolt
- include/bolt/Passes
- lib/Passes
- llvm
- lib/CodeGen
- tools/llvm-exegesis/lib
8 files changed
+18
-31
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | | - | |
43 | | - | |
| 42 | + | |
44 | 43 | | |
45 | 44 | | |
46 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
137 | | - | |
| 136 | + | |
138 | 137 | | |
139 | 138 | | |
140 | 139 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
319 | | - | |
320 | | - | |
321 | | - | |
| 319 | + | |
322 | 320 | | |
323 | 321 | | |
324 | 322 | | |
325 | 323 | | |
326 | 324 | | |
327 | 325 | | |
328 | | - | |
329 | | - | |
330 | | - | |
| 326 | + | |
331 | 327 | | |
332 | 328 | | |
333 | 329 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1100 | 1100 | | |
1101 | 1101 | | |
1102 | 1102 | | |
1103 | | - | |
1104 | | - | |
1105 | | - | |
| 1103 | + | |
| 1104 | + | |
1106 | 1105 | | |
1107 | 1106 | | |
1108 | 1107 | | |
1109 | 1108 | | |
1110 | 1109 | | |
1111 | 1110 | | |
1112 | 1111 | | |
1113 | | - | |
1114 | | - | |
1115 | | - | |
| 1112 | + | |
| 1113 | + | |
1116 | 1114 | | |
1117 | 1115 | | |
1118 | 1116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
107 | | - | |
| 106 | + | |
108 | 107 | | |
109 | 108 | | |
110 | 109 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
101 | | - | |
| 100 | + | |
| 101 | + | |
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
121 | | - | |
| 120 | + | |
| 121 | + | |
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
| 290 | + | |
| 291 | + | |
294 | 292 | | |
295 | 293 | | |
296 | 294 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
277 | | - | |
| 277 | + | |
278 | 278 | | |
279 | | - | |
280 | | - | |
281 | | - | |
| 279 | + | |
282 | 280 | | |
283 | 281 | | |
284 | 282 | | |
| |||
0 commit comments