Commit 2caaad0
committed
ColdBlockInfo: post-order walk converges faster
I thought `reverse(silFn)` would do a post-order walk, but I was wrong.
This patch cuts the number of iterations to propagate coldness from
3-4 down to 2 in a few of the simple regression test cases. At least on
macOS (as the stdlib can vary per platform).1 parent ec62258 commit 2caaad0
File tree
2 files changed
+17
-12
lines changed- lib/SILOptimizer/Analysis
- test/SILOptimizer
2 files changed
+17
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
385 | 386 | | |
386 | 387 | | |
387 | 388 | | |
388 | | - | |
389 | | - | |
390 | | - | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
391 | 395 | | |
392 | | - | |
393 | | - | |
394 | | - | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
395 | 399 | | |
396 | 400 | | |
397 | 401 | | |
| |||
401 | 405 | | |
402 | 406 | | |
403 | 407 | | |
404 | | - | |
| 408 | + | |
405 | 409 | | |
406 | 410 | | |
407 | 411 | | |
408 | | - | |
| 412 | + | |
409 | 413 | | |
410 | 414 | | |
411 | | - | |
412 | | - | |
| 415 | + | |
| 416 | + | |
413 | 417 | | |
414 | 418 | | |
415 | 419 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
131 | 132 | | |
132 | 133 | | |
133 | 134 | | |
134 | | - | |
| 135 | + | |
135 | 136 | | |
136 | 137 | | |
137 | 138 | | |
| |||
0 commit comments