Commit 097d3b8
committed
Tweak neighbor spilling heuristic
We now spill only neighboring fragments that have no attached
instructions at all, rather than spilling ones that contain a single def
as well.
The rationale is that the better split point selection should now trim
closer to the def anyway, achieving the same end result as a spill of
the entire range. Not spilling the defs eagerly, however, will allow
defs in higher-weight regions to be kept in registers and spilled only
later (once split placement is aware of weight).
This did cause a minor regression with instruction defs that can be
placed directly in memory, but we can revisit that later if it becomes a
serious problem.1 parent 8a246bd commit 097d3b8
File tree
9 files changed
+5363
-5350
lines changed- crates
- codegen/src/regalloc
- filetests/cases
- codegen/tdn
- isel-regalloc/tdn
9 files changed
+5363
-5350
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
265 | | - | |
266 | | - | |
267 | | - | |
| 265 | + | |
268 | 266 | | |
269 | 267 | | |
270 | 268 | | |
271 | | - | |
| 269 | + | |
272 | 270 | | |
273 | 271 | | |
274 | 272 | | |
| |||
282 | 280 | | |
283 | 281 | | |
284 | 282 | | |
285 | | - | |
| 283 | + | |
286 | 284 | | |
287 | 285 | | |
288 | 286 | | |
| |||
833 | 831 | | |
834 | 832 | | |
835 | 833 | | |
836 | | - | |
837 | | - | |
838 | | - | |
839 | | - | |
840 | 834 | | |
841 | 835 | | |
842 | 836 | | |
| |||
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Lines changed: 4676 additions & 4675 deletions
Large diffs are not rendered by default.
Lines changed: 8 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
| 57 | + | |
57 | 58 | | |
58 | | - | |
| 59 | + | |
| 60 | + | |
59 | 61 | | |
60 | 62 | | |
61 | 63 | | |
| |||
135 | 137 | | |
136 | 138 | | |
137 | 139 | | |
138 | | - | |
139 | | - | |
| 140 | + | |
| 141 | + | |
140 | 142 | | |
141 | 143 | | |
142 | 144 | | |
| |||
169 | 171 | | |
170 | 172 | | |
171 | 173 | | |
172 | | - | |
173 | | - | |
| 174 | + | |
| 175 | + | |
174 | 176 | | |
175 | 177 | | |
176 | 178 | | |
| |||
Lines changed: 135 additions & 133 deletions
Large diffs are not rendered by default.
Lines changed: 21 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
52 | 54 | | |
53 | 55 | | |
54 | 56 | | |
| |||
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
60 | | - | |
61 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
62 | 66 | | |
63 | 67 | | |
64 | 68 | | |
65 | 69 | | |
66 | 70 | | |
67 | 71 | | |
68 | | - | |
| 72 | + | |
| 73 | + | |
69 | 74 | | |
70 | 75 | | |
71 | 76 | | |
72 | 77 | | |
73 | | - | |
| 78 | + | |
| 79 | + | |
74 | 80 | | |
75 | 81 | | |
76 | 82 | | |
| |||
157 | 163 | | |
158 | 164 | | |
159 | 165 | | |
160 | | - | |
161 | 166 | | |
| 167 | + | |
162 | 168 | | |
163 | 169 | | |
164 | 170 | | |
165 | | - | |
166 | 171 | | |
| 172 | + | |
167 | 173 | | |
168 | 174 | | |
169 | 175 | | |
170 | 176 | | |
171 | 177 | | |
172 | 178 | | |
173 | 179 | | |
174 | | - | |
175 | 180 | | |
| 181 | + | |
176 | 182 | | |
177 | 183 | | |
178 | 184 | | |
| |||
240 | 246 | | |
241 | 247 | | |
242 | 248 | | |
243 | | - | |
244 | 249 | | |
| 250 | + | |
245 | 251 | | |
246 | 252 | | |
247 | 253 | | |
248 | | - | |
249 | 254 | | |
| 255 | + | |
250 | 256 | | |
251 | 257 | | |
252 | 258 | | |
| |||
332 | 338 | | |
333 | 339 | | |
334 | 340 | | |
335 | | - | |
336 | 341 | | |
| 342 | + | |
337 | 343 | | |
338 | 344 | | |
339 | 345 | | |
340 | | - | |
341 | 346 | | |
| 347 | + | |
342 | 348 | | |
343 | 349 | | |
344 | 350 | | |
| |||
378 | 384 | | |
379 | 385 | | |
380 | 386 | | |
381 | | - | |
382 | 387 | | |
| 388 | + | |
383 | 389 | | |
384 | 390 | | |
385 | 391 | | |
386 | | - | |
387 | 392 | | |
| 393 | + | |
388 | 394 | | |
389 | 395 | | |
390 | 396 | | |
| |||
Lines changed: 9 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
70 | | - | |
| 69 | + | |
| 70 | + | |
71 | 71 | | |
| 72 | + | |
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
77 | | - | |
78 | 78 | | |
| 79 | + | |
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
| |||
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
94 | 96 | | |
95 | 97 | | |
96 | 98 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
0 commit comments