Commit b6c0f1b
authored
[RISCV] Clear vill for whole vector register moves in vsetvli insertion (llvm#118283)
This is an alternative to llvm#117866 that works by demanding a valid vtype
instead of using a separate pass.
The main advantage of this is that it allows coalesceVSETVLIs to just
reuse an existing vsetvli later in the block.
To do this we need to first transfer the vsetvli info to some arbitrary
valid state in transferBefore when we encounter a vector copy. Then we
add a new vill demanded field that will happily accept any other known
vtype, which allows us to coalesce these where possible.
Note we also need to check for vector copies in computeVLVTYPEChanges,
otherwise the pass will completely skip over functions that only have
vector copies and nothing else.
This is one part of a fix for llvm#114518. We still need to check if there's
other cases where vector copies/whole register moves that are inserted
after vsetvli insertion.1 parent bda0209 commit b6c0f1b
File tree
176 files changed
+3602
-3927
lines changed- llvm
- lib/Target/RISCV
- test/CodeGen/RISCV
- rvv
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
176 files changed
+3602
-3927
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
43 | 49 | | |
44 | 50 | | |
45 | 51 | | |
| |||
195 | 201 | | |
196 | 202 | | |
197 | 203 | | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
198 | 212 | | |
199 | 213 | | |
200 | 214 | | |
| |||
221 | 235 | | |
222 | 236 | | |
223 | 237 | | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
224 | 241 | | |
225 | 242 | | |
226 | 243 | | |
227 | | - | |
| 244 | + | |
228 | 245 | | |
229 | 246 | | |
230 | 247 | | |
| |||
239 | 256 | | |
240 | 257 | | |
241 | 258 | | |
| 259 | + | |
242 | 260 | | |
243 | 261 | | |
244 | 262 | | |
| |||
263 | 281 | | |
264 | 282 | | |
265 | 283 | | |
| 284 | + | |
266 | 285 | | |
267 | 286 | | |
268 | 287 | | |
| |||
308 | 327 | | |
309 | 328 | | |
310 | 329 | | |
311 | | - | |
| 330 | + | |
| 331 | + | |
312 | 332 | | |
313 | 333 | | |
314 | 334 | | |
| |||
503 | 523 | | |
504 | 524 | | |
505 | 525 | | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
506 | 541 | | |
507 | 542 | | |
508 | 543 | | |
| |||
1208 | 1243 | | |
1209 | 1244 | | |
1210 | 1245 | | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
1211 | 1258 | | |
1212 | 1259 | | |
1213 | 1260 | | |
| |||
1296 | 1343 | | |
1297 | 1344 | | |
1298 | 1345 | | |
1299 | | - | |
| 1346 | + | |
| 1347 | + | |
1300 | 1348 | | |
1301 | 1349 | | |
1302 | 1350 | | |
| |||
1426 | 1474 | | |
1427 | 1475 | | |
1428 | 1476 | | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
1429 | 1487 | | |
1430 | 1488 | | |
1431 | 1489 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| 58 | + | |
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
567 | 567 | | |
568 | 568 | | |
569 | 569 | | |
| 570 | + | |
570 | 571 | | |
571 | 572 | | |
572 | 573 | | |
| |||
576 | 577 | | |
577 | 578 | | |
578 | 579 | | |
579 | | - | |
580 | 580 | | |
581 | 581 | | |
582 | 582 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3075 | 3075 | | |
3076 | 3076 | | |
3077 | 3077 | | |
| 3078 | + | |
3078 | 3079 | | |
3079 | 3080 | | |
3080 | 3081 | | |
| |||
3086 | 3087 | | |
3087 | 3088 | | |
3088 | 3089 | | |
3089 | | - | |
3090 | 3090 | | |
3091 | 3091 | | |
3092 | 3092 | | |
| |||
3158 | 3158 | | |
3159 | 3159 | | |
3160 | 3160 | | |
| 3161 | + | |
3161 | 3162 | | |
3162 | 3163 | | |
3163 | 3164 | | |
3164 | 3165 | | |
3165 | | - | |
3166 | 3166 | | |
3167 | 3167 | | |
3168 | 3168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1584 | 1584 | | |
1585 | 1585 | | |
1586 | 1586 | | |
| 1587 | + | |
1587 | 1588 | | |
1588 | 1589 | | |
1589 | 1590 | | |
| |||
1593 | 1594 | | |
1594 | 1595 | | |
1595 | 1596 | | |
1596 | | - | |
1597 | 1597 | | |
1598 | 1598 | | |
1599 | 1599 | | |
| |||
1631 | 1631 | | |
1632 | 1632 | | |
1633 | 1633 | | |
| 1634 | + | |
1634 | 1635 | | |
1635 | 1636 | | |
1636 | 1637 | | |
1637 | 1638 | | |
1638 | | - | |
1639 | 1639 | | |
1640 | 1640 | | |
1641 | 1641 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
336 | 336 | | |
337 | 337 | | |
338 | 338 | | |
| 339 | + | |
339 | 340 | | |
340 | 341 | | |
341 | 342 | | |
| |||
374 | 375 | | |
375 | 376 | | |
376 | 377 | | |
| 378 | + | |
377 | 379 | | |
378 | 380 | | |
379 | 381 | | |
| |||
451 | 453 | | |
452 | 454 | | |
453 | 455 | | |
| 456 | + | |
454 | 457 | | |
455 | 458 | | |
456 | 459 | | |
| |||
523 | 526 | | |
524 | 527 | | |
525 | 528 | | |
| 529 | + | |
526 | 530 | | |
527 | 531 | | |
528 | 532 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| 106 | + | |
106 | 107 | | |
107 | 108 | | |
108 | 109 | | |
| |||
119 | 120 | | |
120 | 121 | | |
121 | 122 | | |
| 123 | + | |
122 | 124 | | |
123 | 125 | | |
124 | 126 | | |
| |||
144 | 146 | | |
145 | 147 | | |
146 | 148 | | |
| 149 | + | |
147 | 150 | | |
148 | 151 | | |
149 | 152 | | |
| |||
160 | 163 | | |
161 | 164 | | |
162 | 165 | | |
| 166 | + | |
163 | 167 | | |
164 | 168 | | |
165 | 169 | | |
| |||
0 commit comments