Commit 1219306
committed
[RISCV] Clear vill for whole vector register moves in vsetvli insertion
This is an alternative to llvm#117866 that works by demanding a valid vtype instead 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 5cd3e97 commit 1219306
File tree
175 files changed
+3410
-1541
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.
175 files changed
+3410
-1541
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
198 | 219 | | |
199 | 220 | | |
200 | 221 | | |
| |||
221 | 242 | | |
222 | 243 | | |
223 | 244 | | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
224 | 248 | | |
225 | 249 | | |
226 | 250 | | |
227 | | - | |
| 251 | + | |
228 | 252 | | |
229 | 253 | | |
230 | 254 | | |
| |||
239 | 263 | | |
240 | 264 | | |
241 | 265 | | |
| 266 | + | |
242 | 267 | | |
243 | 268 | | |
244 | 269 | | |
| |||
263 | 288 | | |
264 | 289 | | |
265 | 290 | | |
| 291 | + | |
266 | 292 | | |
267 | 293 | | |
268 | 294 | | |
| |||
308 | 334 | | |
309 | 335 | | |
310 | 336 | | |
311 | | - | |
| 337 | + | |
| 338 | + | |
312 | 339 | | |
313 | 340 | | |
314 | 341 | | |
| |||
503 | 530 | | |
504 | 531 | | |
505 | 532 | | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
506 | 543 | | |
507 | 544 | | |
508 | 545 | | |
| |||
1208 | 1245 | | |
1209 | 1246 | | |
1210 | 1247 | | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
1211 | 1259 | | |
1212 | 1260 | | |
1213 | 1261 | | |
| |||
1296 | 1344 | | |
1297 | 1345 | | |
1298 | 1346 | | |
1299 | | - | |
| 1347 | + | |
| 1348 | + | |
1300 | 1349 | | |
1301 | 1350 | | |
1302 | 1351 | | |
| |||
1426 | 1475 | | |
1427 | 1476 | | |
1428 | 1477 | | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
1429 | 1484 | | |
1430 | 1485 | | |
1431 | 1486 | | |
| |||
| 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