Commit 6ae6583
authored
[CodeGen] Finish untangling LRE::scanRemattable [nfc] (#161963)
This is an attempt to simplify the rematerialization logic in
InlineSpiller and SplitKit. I'd earlier done the same for
RegisterCoalescer in 57b673.
The basic idea of this change is that we don't need to check whether an
instruction is rematerializable early. Instead, we can defer the check
to the point where we're actually trying to materialize something. We
also don't need to indirect that query through a VNI key, and can
instead just check the instruction directly at the use site.1 parent 0797bb7 commit 6ae6583
File tree
4 files changed
+21
-58
lines changed- llvm
- include/llvm/CodeGen
- lib/CodeGen
4 files changed
+21
-58
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | 78 | | |
82 | 79 | | |
83 | 80 | | |
84 | 81 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | 82 | | |
90 | 83 | | |
91 | 84 | | |
92 | 85 | | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | 86 | | |
97 | 87 | | |
98 | 88 | | |
| |||
175 | 165 | | |
176 | 166 | | |
177 | 167 | | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | 168 | | |
184 | 169 | | |
185 | 170 | | |
| |||
189 | 174 | | |
190 | 175 | | |
191 | 176 | | |
192 | | - | |
| 177 | + | |
193 | 178 | | |
194 | | - | |
| 179 | + | |
195 | 180 | | |
196 | 181 | | |
197 | 182 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
671 | 671 | | |
672 | 672 | | |
673 | 673 | | |
674 | | - | |
675 | | - | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
676 | 686 | | |
677 | | - | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
678 | 690 | | |
679 | 691 | | |
680 | 692 | | |
| |||
739 | 751 | | |
740 | 752 | | |
741 | 753 | | |
742 | | - | |
743 | | - | |
744 | | - | |
745 | 754 | | |
746 | 755 | | |
747 | 756 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
| 71 | + | |
| 72 | + | |
98 | 73 | | |
99 | | - | |
100 | | - | |
| 74 | + | |
101 | 75 | | |
102 | 76 | | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | 77 | | |
107 | 78 | | |
108 | 79 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
379 | | - | |
380 | | - | |
381 | 379 | | |
382 | 380 | | |
383 | 381 | | |
| |||
638 | 636 | | |
639 | 637 | | |
640 | 638 | | |
641 | | - | |
| 639 | + | |
642 | 640 | | |
643 | 641 | | |
644 | 642 | | |
| |||
0 commit comments