Commit dfaebe7
authored
[MLIR] Fix Liveness analysis handling of unreachable code (#153973)
This patch is forcing all values to be initialized by the
LivenessAnalysis, even in dead blocks. The dataflow framework will skip
visiting values when its already knows that a block is dynamically
unreachable, so this requires specific handling.
Downstream code could consider that the absence of liveness is the same
a "dead".
However as the code is mutated, new value can be introduced, and a
transformation like "RemoveDeadValue" must conservatively consider that
the absence of liveness information meant that we weren't sure if a
value was dead (it could be a newly introduced value.
Fixes #1539061 parent 191e7eb commit dfaebe7
File tree
6 files changed
+150
-13
lines changed- mlir
- lib
- Analysis/DataFlow
- Transforms
- test
- Analysis/DataFlow
- Transforms
- lib/Analysis/DataFlow
6 files changed
+150
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
297 | | - | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
298 | 325 | | |
299 | 326 | | |
300 | 327 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| 29 | + | |
| 30 | + | |
28 | 31 | | |
29 | 32 | | |
30 | 33 | | |
| |||
64 | 67 | | |
65 | 68 | | |
66 | 69 | | |
| 70 | + | |
| 71 | + | |
67 | 72 | | |
68 | 73 | | |
69 | | - | |
| 74 | + | |
| 75 | + | |
70 | 76 | | |
| 77 | + | |
71 | 78 | | |
72 | 79 | | |
| 80 | + | |
| 81 | + | |
73 | 82 | | |
| 83 | + | |
| 84 | + | |
74 | 85 | | |
75 | 86 | | |
76 | 87 | | |
77 | | - | |
78 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
79 | 92 | | |
| 93 | + | |
| 94 | + | |
80 | 95 | | |
81 | 96 | | |
82 | 97 | | |
| 98 | + | |
| 99 | + | |
83 | 100 | | |
84 | 101 | | |
85 | 102 | | |
| |||
409 | 426 | | |
410 | 427 | | |
411 | 428 | | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
412 | 433 | | |
413 | 434 | | |
414 | | - | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
415 | 438 | | |
| 439 | + | |
416 | 440 | | |
| 441 | + | |
| 442 | + | |
417 | 443 | | |
418 | 444 | | |
419 | 445 | | |
| |||
422 | 448 | | |
423 | 449 | | |
424 | 450 | | |
| 451 | + | |
425 | 452 | | |
426 | 453 | | |
427 | 454 | | |
428 | 455 | | |
429 | 456 | | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
430 | 460 | | |
431 | 461 | | |
432 | 462 | | |
| |||
463 | 493 | | |
464 | 494 | | |
465 | 495 | | |
| 496 | + | |
466 | 497 | | |
467 | 498 | | |
468 | 499 | | |
| |||
513 | 544 | | |
514 | 545 | | |
515 | 546 | | |
| 547 | + | |
516 | 548 | | |
517 | 549 | | |
518 | 550 | | |
519 | 551 | | |
520 | 552 | | |
521 | 553 | | |
522 | 554 | | |
| 555 | + | |
523 | 556 | | |
524 | 557 | | |
525 | | - | |
| 558 | + | |
| 559 | + | |
526 | 560 | | |
| 561 | + | |
527 | 562 | | |
528 | 563 | | |
| 564 | + | |
529 | 565 | | |
530 | 566 | | |
531 | 567 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
258 | 258 | | |
259 | 259 | | |
260 | 260 | | |
261 | | - | |
262 | 261 | | |
263 | | - | |
264 | | - | |
265 | | - | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
266 | 265 | | |
267 | 266 | | |
268 | 267 | | |
269 | 268 | | |
270 | 269 | | |
271 | 270 | | |
272 | | - | |
| 271 | + | |
273 | 272 | | |
274 | 273 | | |
275 | 274 | | |
| |||
728 | 727 | | |
729 | 728 | | |
730 | 729 | | |
| 730 | + | |
| 731 | + | |
731 | 732 | | |
| 733 | + | |
732 | 734 | | |
| 735 | + | |
| 736 | + | |
733 | 737 | | |
734 | 738 | | |
735 | 739 | | |
736 | 740 | | |
737 | 741 | | |
| 742 | + | |
738 | 743 | | |
| 744 | + | |
739 | 745 | | |
740 | 746 | | |
741 | 747 | | |
742 | 748 | | |
| 749 | + | |
743 | 750 | | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
744 | 755 | | |
745 | 756 | | |
746 | 757 | | |
| |||
749 | 760 | | |
750 | 761 | | |
751 | 762 | | |
| 763 | + | |
752 | 764 | | |
753 | | - | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
754 | 769 | | |
| 770 | + | |
755 | 771 | | |
756 | 772 | | |
757 | 773 | | |
| 774 | + | |
758 | 775 | | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
759 | 779 | | |
760 | 780 | | |
761 | 781 | | |
762 | 782 | | |
| 783 | + | |
763 | 784 | | |
764 | 785 | | |
765 | 786 | | |
766 | 787 | | |
| 788 | + | |
| 789 | + | |
767 | 790 | | |
768 | 791 | | |
769 | 792 | | |
770 | 793 | | |
| 794 | + | |
771 | 795 | | |
772 | 796 | | |
773 | 797 | | |
774 | 798 | | |
775 | 799 | | |
776 | 800 | | |
| 801 | + | |
| 802 | + | |
777 | 803 | | |
778 | 804 | | |
779 | 805 | | |
780 | 806 | | |
781 | 807 | | |
782 | 808 | | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
783 | 813 | | |
784 | 814 | | |
785 | 815 | | |
786 | 816 | | |
| 817 | + | |
| 818 | + | |
787 | 819 | | |
788 | 820 | | |
789 | 821 | | |
| 822 | + | |
| 823 | + | |
790 | 824 | | |
791 | 825 | | |
792 | 826 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
571 | 571 | | |
572 | 572 | | |
573 | 573 | | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | 36 | | |
38 | 37 | | |
39 | 38 | | |
| |||
0 commit comments