Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JIT: Canonicalize loop exits #98096

Merged
merged 7 commits into from
Feb 14, 2024

Conversation

jakobbotsch
Copy link
Member

@jakobbotsch jakobbotsch commented Feb 7, 2024

This adds another canonicalization requirement for loops during the
optimization phases, namely that all regular loop exit blocks have only
loop predecessors. This gives natural places to insert IR that we want
to run only when we know the loop was exited.

Exceptional loop exit blocks can still have non-loop predecessors, so
these must still be accounted for by optimizations.

We could also have a stronger property, namely that all loop exits have only a single predecessor. However the main motivation for the canonicalization is #97865 which does not require this stronger canonicalization.

Example flowgraph: before, after

This adds another canonicalization requirement for loops during the
optimization phases, namely that all regular loop exit blocks have only
loop predecessors. This gives a natural place to insert IR that we want
to run only when we know the loop was entered.

Exceptional loop exit blocks can still have non-loop predecessors, so
these must still be accounted for by optimizations.
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Feb 7, 2024
@ghost ghost assigned jakobbotsch Feb 7, 2024
@ghost
Copy link

ghost commented Feb 7, 2024

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

Issue Details

This adds another canonicalization requirement for loops during the
optimization phases, namely that all regular loop exit blocks have only
loop predecessors. This gives a natural place to insert IR that we want
to run only when we know the loop was entered.

Exceptional loop exit blocks can still have non-loop predecessors, so
these must still be accounted for by optimizations.

We could also have a stronger property, namely that all loop exits have only a single predecessor. However the main motivation for the canonicalization is #97865 which does not require this stronger canonicalization.

Author: jakobbotsch
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@jakobbotsch
Copy link
Member Author

jakobbotsch commented Feb 7, 2024

There are cases where we no longer do jump threading because RBO no longer can prove the exact value of a dominator when reaching through a pred. Example without this change: flowgraph

BB38 has three preds BB33, BB36 and BB37. RBO is able to show that coming from BB36 and BB37 both imply that the condition is false.

With this change, however, we get this flowgraph. This time BB39 has only two preds and we can only show the BB37 pred being false, since the path that comes from BB36 and BB33 have been conflated.

@AndyAyersMS I wonder if there's a way to generalize RBO follow predecssors a bit more persistently and then do the jump threading on the BB36 -> BB38 edge instead of trying to do it on the BB38 -> BB39 edge? BB38 is an empty block in this case.

@ryujit-bot
Copy link

Diff results for #98096

Assembly diffs

Assembly diffs for linux/arm64 ran on windows/x64

Diffs are based on 1,610,910 contexts (368,644 MinOpts, 1,242,266 FullOpts).

MISSED contexts: 2,790 (0.17%)

Overall (-101,288 bytes)
Collection Base size (bytes) Diff size (bytes)
benchmarks.run.linux.arm64.checked.mch 13,063,852 +20
benchmarks.run_pgo.linux.arm64.checked.mch 65,248,792 -99,188
benchmarks.run_tiered.linux.arm64.checked.mch 20,463,728 -20
coreclr_tests.run.linux.arm64.checked.mch 301,233,192 -404
libraries.crossgen2.linux.arm64.checked.mch 63,764,680 -260
libraries.pmi.linux.arm64.checked.mch 76,209,360 +104
libraries_tests.run.linux.arm64.Release.mch 38,230,684 -1,040
libraries_tests_no_tiered_compilation.run.linux.arm64.Release.mch 161,796,492 +100
realworld.run.linux.arm64.checked.mch 15,928,884 -464
smoke_tests.nativeaot.linux.arm64.checked.mch 2,851,260 -136
FullOpts (-101,288 bytes)
Collection Base size (bytes) Diff size (bytes)
benchmarks.run.linux.arm64.checked.mch 12,930,536 +20
benchmarks.run_pgo.linux.arm64.checked.mch 43,966,168 -99,188
benchmarks.run_tiered.linux.arm64.checked.mch 4,685,104 -20
coreclr_tests.run.linux.arm64.checked.mch 140,439,428 -404
libraries.crossgen2.linux.arm64.checked.mch 63,763,044 -260
libraries.pmi.linux.arm64.checked.mch 76,089,376 +104
libraries_tests.run.linux.arm64.Release.mch 14,335,208 -1,040
libraries_tests_no_tiered_compilation.run.linux.arm64.Release.mch 148,393,660 +100
realworld.run.linux.arm64.checked.mch 15,346,680 -464
smoke_tests.nativeaot.linux.arm64.checked.mch 2,850,272 -136

Assembly diffs for linux/x64 ran on windows/x64

Diffs are based on 1,621,203 contexts (360,162 MinOpts, 1,261,041 FullOpts).

MISSED contexts: 2,647 (0.16%)

Overall (-162,350 bytes)
Collection Base size (bytes) Diff size (bytes)
benchmarks.run.linux.x64.checked.mch 11,931,736 -196
benchmarks.run_pgo.linux.x64.checked.mch 57,208,438 -178,358
benchmarks.run_tiered.linux.x64.checked.mch 18,554,476 -114
coreclr_tests.run.linux.x64.checked.mch 247,130,491 -130
libraries.crossgen2.linux.x64.checked.mch 44,619,341 -256
libraries.pmi.linux.x64.checked.mch 60,394,201 -98
libraries_tests.run.linux.x64.Release.mch 31,730,283 +18,122
libraries_tests_no_tiered_compilation.run.linux.x64.Release.mch 130,013,252 -699
realworld.run.linux.x64.checked.mch 13,219,489 -639
smoke_tests.nativeaot.linux.x64.checked.mch 4,228,743 +18
FullOpts (-162,350 bytes)
Collection Base size (bytes) Diff size (bytes)
benchmarks.run.linux.x64.checked.mch 11,762,034 -196
benchmarks.run_pgo.linux.x64.checked.mch 39,461,926 -178,358
benchmarks.run_tiered.linux.x64.checked.mch 3,498,730 -114
coreclr_tests.run.linux.x64.checked.mch 106,763,610 -130
libraries.crossgen2.linux.x64.checked.mch 44,618,143 -256
libraries.pmi.linux.x64.checked.mch 60,281,344 -98
libraries_tests.run.linux.x64.Release.mch 15,802,466 +18,122
libraries_tests_no_tiered_compilation.run.linux.x64.Release.mch 119,429,397 -699
realworld.run.linux.x64.checked.mch 12,830,953 -639
smoke_tests.nativeaot.linux.x64.checked.mch 4,227,794 +18

Assembly diffs for osx/arm64 ran on windows/x64

Diffs are based on 1,733,619 contexts (561,303 MinOpts, 1,172,316 FullOpts).

MISSED contexts: 2,902 (0.17%)

Overall (-6,016 bytes)
Collection Base size (bytes) Diff size (bytes)
benchmarks.run.osx.arm64.checked.mch 11,101,028 +20
benchmarks.run_pgo.osx.arm64.checked.mch 24,782,000 -3,132
benchmarks.run_tiered.osx.arm64.checked.mch 15,471,752 +44
coreclr_tests.run.osx.arm64.checked.mch 390,213,652 -444
libraries.crossgen2.osx.arm64.checked.mch 63,645,568 -260
libraries.pmi.osx.arm64.checked.mch 80,239,056 +300
libraries_tests.run.osx.arm64.Release.mch 72,839,284 -2,020
libraries_tests_no_tiered_compilation.run.osx.arm64.Release.mch 159,911,512 -56
realworld.run.osx.arm64.checked.mch 15,078,748 -468
FullOpts (-6,016 bytes)
Collection Base size (bytes) Diff size (bytes)
benchmarks.run.osx.arm64.checked.mch 11,100,292 +20
benchmarks.run_pgo.osx.arm64.checked.mch 8,787,588 -3,132
benchmarks.run_tiered.osx.arm64.checked.mch 3,950,116 +44
coreclr_tests.run.osx.arm64.checked.mch 138,802,076 -444
libraries.crossgen2.osx.arm64.checked.mch 63,643,940 -260
libraries.pmi.osx.arm64.checked.mch 80,117,928 +300
libraries_tests.run.osx.arm64.Release.mch 12,454,304 -2,020
libraries_tests_no_tiered_compilation.run.osx.arm64.Release.mch 146,852,152 -56
realworld.run.osx.arm64.checked.mch 14,514,796 -468

Assembly diffs for windows/arm64 ran on windows/x64

Diffs are based on 1,478,010 contexts (263,527 MinOpts, 1,214,483 FullOpts).

MISSED contexts: 2,751 (0.19%)

Overall (-4,376 bytes)
Collection Base size (bytes) Diff size (bytes)
benchmarks.run.windows.arm64.checked.mch 10,887,636 +8
benchmarks.run_pgo.windows.arm64.checked.mch 36,162,312 -1,268
benchmarks.run_tiered.windows.arm64.checked.mch 15,269,056 -4
coreclr_tests.run.windows.arm64.checked.mch 277,085,768 -384
libraries.crossgen2.windows.arm64.checked.mch 66,990,496 -244
libraries.pmi.windows.arm64.checked.mch 79,835,620 +164
libraries_tests.run.windows.arm64.Release.mch 6,478,404 -2,100
libraries_tests_no_tiered_compilation.run.windows.arm64.Release.mch 168,105,436 +80
realworld.run.windows.arm64.checked.mch 15,900,008 -452
smoke_tests.nativeaot.windows.arm64.checked.mch 3,865,048 -176
FullOpts (-4,376 bytes)
Collection Base size (bytes) Diff size (bytes)
benchmarks.run.windows.arm64.checked.mch 10,887,100 +8
benchmarks.run_pgo.windows.arm64.checked.mch 23,135,448 -1,268
benchmarks.run_tiered.windows.arm64.checked.mch 4,070,224 -4
coreclr_tests.run.windows.arm64.checked.mch 138,793,200 -384
libraries.crossgen2.windows.arm64.checked.mch 66,988,860 -244
libraries.pmi.windows.arm64.checked.mch 79,715,636 +164
libraries_tests.run.windows.arm64.Release.mch 5,254,404 -2,100
libraries_tests_no_tiered_compilation.run.windows.arm64.Release.mch 155,046,156 +80
realworld.run.windows.arm64.checked.mch 15,336,032 -452
smoke_tests.nativeaot.windows.arm64.checked.mch 3,864,036 -176

Assembly diffs for windows/x64 ran on windows/x64

Diffs are based on 1,999,649 contexts (587,594 MinOpts, 1,412,055 FullOpts).

MISSED contexts: base: 3,225 (0.16%), diff: 3,239 (0.16%)

Overall (+41,365 bytes)
Collection Base size (bytes) Diff size (bytes)
aspnet.run.windows.x64.checked.mch 46,746,711 +1,189
benchmarks.run.windows.x64.checked.mch 11,727,476 +473
benchmarks.run_pgo.windows.x64.checked.mch 34,353,258 +27,965
benchmarks.run_tiered.windows.x64.checked.mch 19,449,443 +127
coreclr_tests.run.windows.x64.checked.mch 296,148,172 +757
libraries.crossgen2.windows.x64.checked.mch 44,929,099 +208
libraries.pmi.windows.x64.checked.mch 67,669,814 +1,064
libraries_tests.run.windows.x64.Release.mch 42,430,255 +7,704
libraries_tests_no_tiered_compilation.run.windows.x64.Release.mch 142,641,671 +1,436
realworld.run.windows.x64.checked.mch 14,769,832 -151
smoke_tests.nativeaot.windows.x64.checked.mch 5,085,273 +593
FullOpts (+41,365 bytes)
Collection Base size (bytes) Diff size (bytes)
aspnet.run.windows.x64.checked.mch 28,257,971 +1,189
benchmarks.run.windows.x64.checked.mch 11,726,881 +473
benchmarks.run_pgo.windows.x64.checked.mch 15,516,562 +27,965
benchmarks.run_tiered.windows.x64.checked.mch 4,081,554 +127
coreclr_tests.run.windows.x64.checked.mch 110,373,782 +757
libraries.crossgen2.windows.x64.checked.mch 44,927,912 +208
libraries.pmi.windows.x64.checked.mch 67,556,293 +1,064
libraries_tests.run.windows.x64.Release.mch 10,788,375 +7,704
libraries_tests_no_tiered_compilation.run.windows.x64.Release.mch 131,858,801 +1,436
realworld.run.windows.x64.checked.mch 14,383,223 -151
smoke_tests.nativeaot.windows.x64.checked.mch 5,084,326 +593

Details here


Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 1,449,677 contexts (345,734 MinOpts, 1,103,943 FullOpts).

MISSED contexts: 55,309 (3.68%)

Overall (+6,954 bytes)
Collection Base size (bytes) Diff size (bytes)
benchmarks.run.linux.arm.checked.mch 13,691,660 +402
benchmarks.run_pgo.linux.arm.checked.mch 24,676,764 +144
benchmarks.run_tiered.linux.arm.checked.mch 17,983,552 +444
coreclr_tests.run.linux.arm.checked.mch 321,243,680 -626
libraries.crossgen2.linux.arm.checked.mch 35,989,292 -172
libraries.pmi.linux.arm.checked.mch 49,882,798 +678
libraries_tests.run.linux.arm.Release.mch 17,138,332 +4,772
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch 93,857,406 +956
realworld.run.linux.arm.checked.mch 13,598,268 +356
FullOpts (+6,954 bytes)
Collection Base size (bytes) Diff size (bytes)
benchmarks.run.linux.arm.checked.mch 13,379,084 +402
benchmarks.run_pgo.linux.arm.checked.mch 19,755,612 +144
benchmarks.run_tiered.linux.arm.checked.mch 10,616,262 +444
coreclr_tests.run.linux.arm.checked.mch 108,808,730 -626
libraries.crossgen2.linux.arm.checked.mch 35,988,062 -172
libraries.pmi.linux.arm.checked.mch 49,776,574 +678
libraries_tests.run.linux.arm.Release.mch 16,541,272 +4,772
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch 83,827,636 +956
realworld.run.linux.arm.checked.mch 13,163,196 +356

Assembly diffs for windows/x86 ran on windows/x86

Diffs are based on 1,624,599 contexts (327,626 MinOpts, 1,296,973 FullOpts).

MISSED contexts: base: 4,647 (0.29%), diff: 5,067 (0.31%)

Overall (+30,563 bytes)
Collection Base size (bytes) Diff size (bytes)
benchmarks.run.windows.x86.checked.mch 11,285,231 -2,394
benchmarks.run_pgo.windows.x86.checked.mch 33,169,638 +14,945
benchmarks.run_tiered.windows.x86.checked.mch 14,103,074 -2,024
coreclr_tests.run.windows.x86.checked.mch 215,320,101 +14,576
libraries.crossgen2.windows.x86.checked.mch 35,927,212 +430
libraries.pmi.windows.x86.checked.mch 51,218,524 -15
libraries_tests.run.windows.x86.Release.mch 14,890,950 +6,253
libraries_tests_no_tiered_compilation.run.windows.x86.Release.mch 109,378,088 -1,071
realworld.run.windows.x86.checked.mch 11,785,160 -137
FullOpts (+30,563 bytes)
Collection Base size (bytes) Diff size (bytes)
benchmarks.run.windows.x86.checked.mch 11,284,753 -2,394
benchmarks.run_pgo.windows.x86.checked.mch 27,047,690 +14,945
benchmarks.run_tiered.windows.x86.checked.mch 7,248,437 -2,024
coreclr_tests.run.windows.x86.checked.mch 93,059,077 +14,576
libraries.crossgen2.windows.x86.checked.mch 35,926,152 +430
libraries.pmi.windows.x86.checked.mch 51,123,291 -15
libraries_tests.run.windows.x86.Release.mch 9,400,755 +6,253
libraries_tests_no_tiered_compilation.run.windows.x86.Release.mch 100,425,315 -1,071
realworld.run.windows.x86.checked.mch 11,489,446 -137

Details here


Throughput diffs

Throughput diffs for linux/arm64 ran on windows/x64

Overall (+0.08% to +0.40%)
Collection PDIFF
benchmarks.run.linux.arm64.checked.mch +0.20%
benchmarks.run_pgo.linux.arm64.checked.mch +0.40%
benchmarks.run_tiered.linux.arm64.checked.mch +0.15%
coreclr_tests.run.linux.arm64.checked.mch +0.08%
libraries.crossgen2.linux.arm64.checked.mch +0.14%
libraries.pmi.linux.arm64.checked.mch +0.13%
libraries_tests.run.linux.arm64.Release.mch +0.23%
libraries_tests_no_tiered_compilation.run.linux.arm64.Release.mch +0.09%
realworld.run.linux.arm64.checked.mch +0.16%
smoke_tests.nativeaot.linux.arm64.checked.mch +0.21%
FullOpts (+0.09% to +0.45%)
Collection PDIFF
benchmarks.run.linux.arm64.checked.mch +0.20%
benchmarks.run_pgo.linux.arm64.checked.mch +0.45%
benchmarks.run_tiered.linux.arm64.checked.mch +0.29%
coreclr_tests.run.linux.arm64.checked.mch +0.12%
libraries.crossgen2.linux.arm64.checked.mch +0.14%
libraries.pmi.linux.arm64.checked.mch +0.13%
libraries_tests.run.linux.arm64.Release.mch +0.34%
libraries_tests_no_tiered_compilation.run.linux.arm64.Release.mch +0.09%
realworld.run.linux.arm64.checked.mch +0.16%
smoke_tests.nativeaot.linux.arm64.checked.mch +0.21%

Throughput diffs for linux/x64 ran on windows/x64

Overall (+0.09% to +0.41%)
Collection PDIFF
benchmarks.run.linux.x64.checked.mch +0.20%
benchmarks.run_pgo.linux.x64.checked.mch +0.41%
benchmarks.run_tiered.linux.x64.checked.mch +0.16%
coreclr_tests.run.linux.x64.checked.mch +0.09%
libraries.crossgen2.linux.x64.checked.mch +0.15%
libraries.pmi.linux.x64.checked.mch +0.14%
libraries_tests.run.linux.x64.Release.mch +0.29%
libraries_tests_no_tiered_compilation.run.linux.x64.Release.mch +0.10%
realworld.run.linux.x64.checked.mch +0.17%
smoke_tests.nativeaot.linux.x64.checked.mch +0.23%
FullOpts (+0.10% to +0.46%)
Collection PDIFF
benchmarks.run.linux.x64.checked.mch +0.20%
benchmarks.run_pgo.linux.x64.checked.mch +0.46%
benchmarks.run_tiered.linux.x64.checked.mch +0.31%
coreclr_tests.run.linux.x64.checked.mch +0.13%
libraries.crossgen2.linux.x64.checked.mch +0.15%
libraries.pmi.linux.x64.checked.mch +0.14%
libraries_tests.run.linux.x64.Release.mch +0.36%
libraries_tests_no_tiered_compilation.run.linux.x64.Release.mch +0.10%
realworld.run.linux.x64.checked.mch +0.17%
smoke_tests.nativeaot.linux.x64.checked.mch +0.23%

Throughput diffs for osx/arm64 ran on windows/x64

Overall (+0.07% to +0.36%)
Collection PDIFF
benchmarks.run.osx.arm64.checked.mch +0.22%
benchmarks.run_pgo.osx.arm64.checked.mch +0.36%
benchmarks.run_tiered.osx.arm64.checked.mch +0.17%
coreclr_tests.run.osx.arm64.checked.mch +0.07%
libraries.crossgen2.osx.arm64.checked.mch +0.14%
libraries.pmi.osx.arm64.checked.mch +0.13%
libraries_tests.run.osx.arm64.Release.mch +0.16%
libraries_tests_no_tiered_compilation.run.osx.arm64.Release.mch +0.09%
realworld.run.osx.arm64.checked.mch +0.16%
FullOpts (+0.09% to +0.53%)
Collection PDIFF
benchmarks.run.osx.arm64.checked.mch +0.22%
benchmarks.run_pgo.osx.arm64.checked.mch +0.53%
benchmarks.run_tiered.osx.arm64.checked.mch +0.29%
coreclr_tests.run.osx.arm64.checked.mch +0.11%
libraries.crossgen2.osx.arm64.checked.mch +0.14%
libraries.pmi.osx.arm64.checked.mch +0.13%
libraries_tests.run.osx.arm64.Release.mch +0.37%
libraries_tests_no_tiered_compilation.run.osx.arm64.Release.mch +0.09%
realworld.run.osx.arm64.checked.mch +0.16%

Throughput diffs for windows/arm64 ran on windows/x64

Overall (+0.08% to +0.37%)
Collection PDIFF
benchmarks.run.windows.arm64.checked.mch +0.22%
benchmarks.run_pgo.windows.arm64.checked.mch +0.37%
benchmarks.run_tiered.windows.arm64.checked.mch +0.17%
coreclr_tests.run.windows.arm64.checked.mch +0.08%
libraries.crossgen2.windows.arm64.checked.mch +0.14%
libraries.pmi.windows.arm64.checked.mch +0.13%
libraries_tests.run.windows.arm64.Release.mch +0.24%
libraries_tests_no_tiered_compilation.run.windows.arm64.Release.mch +0.09%
realworld.run.windows.arm64.checked.mch +0.16%
smoke_tests.nativeaot.windows.arm64.checked.mch +0.23%
FullOpts (+0.09% to +0.43%)
Collection PDIFF
benchmarks.run.windows.arm64.checked.mch +0.22%
benchmarks.run_pgo.windows.arm64.checked.mch +0.43%
benchmarks.run_tiered.windows.arm64.checked.mch +0.29%
coreclr_tests.run.windows.arm64.checked.mch +0.11%
libraries.crossgen2.windows.arm64.checked.mch +0.14%
libraries.pmi.windows.arm64.checked.mch +0.13%
libraries_tests.run.windows.arm64.Release.mch +0.26%
libraries_tests_no_tiered_compilation.run.windows.arm64.Release.mch +0.09%
realworld.run.windows.arm64.checked.mch +0.16%
smoke_tests.nativeaot.windows.arm64.checked.mch +0.23%

Throughput diffs for windows/x64 ran on windows/x64

Overall (+0.09% to +0.51%)
Collection PDIFF
aspnet.run.windows.x64.checked.mch +0.25%
benchmarks.run.windows.x64.checked.mch +0.22%
benchmarks.run_pgo.windows.x64.checked.mch +0.51%
benchmarks.run_tiered.windows.x64.checked.mch +0.15%
coreclr_tests.run.windows.x64.checked.mch +0.09%
libraries.crossgen2.windows.x64.checked.mch +0.15%
libraries.pmi.windows.x64.checked.mch +0.13%
libraries_tests.run.windows.x64.Release.mch +0.17%
libraries_tests_no_tiered_compilation.run.windows.x64.Release.mch +0.10%
realworld.run.windows.x64.checked.mch +0.17%
smoke_tests.nativeaot.windows.x64.checked.mch +0.24%
FullOpts (+0.10% to +0.65%)
Collection PDIFF
aspnet.run.windows.x64.checked.mch +0.29%
benchmarks.run.windows.x64.checked.mch +0.22%
benchmarks.run_pgo.windows.x64.checked.mch +0.65%
benchmarks.run_tiered.windows.x64.checked.mch +0.28%
coreclr_tests.run.windows.x64.checked.mch +0.13%
libraries.crossgen2.windows.x64.checked.mch +0.15%
libraries.pmi.windows.x64.checked.mch +0.13%
libraries_tests.run.windows.x64.Release.mch +0.30%
libraries_tests_no_tiered_compilation.run.windows.x64.Release.mch +0.10%
realworld.run.windows.x64.checked.mch +0.17%
smoke_tests.nativeaot.windows.x64.checked.mch +0.24%

Details here


Throughput diffs for linux/arm ran on windows/x86

Overall (+0.04% to +0.30%)
Collection PDIFF
benchmarks.run.linux.arm.checked.mch +0.21%
benchmarks.run_pgo.linux.arm.checked.mch +0.04%
benchmarks.run_tiered.linux.arm.checked.mch +0.20%
coreclr_tests.run.linux.arm.checked.mch +0.11%
libraries.crossgen2.linux.arm.checked.mch +0.15%
libraries.pmi.linux.arm.checked.mch +0.15%
libraries_tests.run.linux.arm.Release.mch +0.30%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch +0.11%
realworld.run.linux.arm.checked.mch +0.25%
FullOpts (+0.04% to +0.31%)
Collection PDIFF
benchmarks.run.linux.arm.checked.mch +0.21%
benchmarks.run_pgo.linux.arm.checked.mch +0.04%
benchmarks.run_tiered.linux.arm.checked.mch +0.25%
coreclr_tests.run.linux.arm.checked.mch +0.18%
libraries.crossgen2.linux.arm.checked.mch +0.15%
libraries.pmi.linux.arm.checked.mch +0.15%
libraries_tests.run.linux.arm.Release.mch +0.31%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch +0.12%
realworld.run.linux.arm.checked.mch +0.25%

Throughput diffs for windows/x86 ran on windows/x86

Overall (+0.10% to +0.29%)
Collection PDIFF
benchmarks.run.windows.x86.checked.mch +0.24%
benchmarks.run_pgo.windows.x86.checked.mch +0.10%
benchmarks.run_tiered.windows.x86.checked.mch +0.27%
coreclr_tests.run.windows.x86.checked.mch +0.13%
libraries.crossgen2.windows.x86.checked.mch +0.18%
libraries.pmi.windows.x86.checked.mch +0.16%
libraries_tests.run.windows.x86.Release.mch +0.29%
libraries_tests_no_tiered_compilation.run.windows.x86.Release.mch +0.12%
realworld.run.windows.x86.checked.mch +0.20%
FullOpts (+0.10% to +0.34%)
Collection PDIFF
benchmarks.run.windows.x86.checked.mch +0.24%
benchmarks.run_pgo.windows.x86.checked.mch +0.10%
benchmarks.run_tiered.windows.x86.checked.mch +0.33%
coreclr_tests.run.windows.x86.checked.mch +0.18%
libraries.crossgen2.windows.x86.checked.mch +0.18%
libraries.pmi.windows.x86.checked.mch +0.16%
libraries_tests.run.windows.x86.Release.mch +0.34%
libraries_tests_no_tiered_compilation.run.windows.x86.Release.mch +0.12%
realworld.run.windows.x86.checked.mch +0.20%

Details here


Throughput diffs for linux/arm64 ran on linux/x64

Overall (+0.08% to +0.39%)
Collection PDIFF
coreclr_tests.run.linux.arm64.checked.mch +0.08%
libraries.crossgen2.linux.arm64.checked.mch +0.14%
libraries.pmi.linux.arm64.checked.mch +0.12%
benchmarks.run_pgo.linux.arm64.checked.mch +0.39%
smoke_tests.nativeaot.linux.arm64.checked.mch +0.20%
benchmarks.run_tiered.linux.arm64.checked.mch +0.15%
benchmarks.run.linux.arm64.checked.mch +0.20%
libraries_tests_no_tiered_compilation.run.linux.arm64.Release.mch +0.09%
libraries_tests.run.linux.arm64.Release.mch +0.23%
realworld.run.linux.arm64.checked.mch +0.15%
FullOpts (+0.09% to +0.44%)
Collection PDIFF
coreclr_tests.run.linux.arm64.checked.mch +0.11%
libraries.crossgen2.linux.arm64.checked.mch +0.14%
libraries.pmi.linux.arm64.checked.mch +0.12%
benchmarks.run_pgo.linux.arm64.checked.mch +0.44%
smoke_tests.nativeaot.linux.arm64.checked.mch +0.20%
benchmarks.run_tiered.linux.arm64.checked.mch +0.28%
benchmarks.run.linux.arm64.checked.mch +0.20%
libraries_tests_no_tiered_compilation.run.linux.arm64.Release.mch +0.09%
libraries_tests.run.linux.arm64.Release.mch +0.33%
realworld.run.linux.arm64.checked.mch +0.15%

Throughput diffs for linux/x64 ran on linux/x64

Overall (+0.09% to +0.40%)
Collection PDIFF
libraries_tests_no_tiered_compilation.run.linux.x64.Release.mch +0.09%
realworld.run.linux.x64.checked.mch +0.16%
libraries.pmi.linux.x64.checked.mch +0.13%
benchmarks.run_pgo.linux.x64.checked.mch +0.40%
libraries.crossgen2.linux.x64.checked.mch +0.15%
benchmarks.run_tiered.linux.x64.checked.mch +0.16%
benchmarks.run.linux.x64.checked.mch +0.19%
smoke_tests.nativeaot.linux.x64.checked.mch +0.22%
libraries_tests.run.linux.x64.Release.mch +0.28%
coreclr_tests.run.linux.x64.checked.mch +0.09%
FullOpts (+0.09% to +0.44%)
Collection PDIFF
libraries_tests_no_tiered_compilation.run.linux.x64.Release.mch +0.09%
realworld.run.linux.x64.checked.mch +0.16%
libraries.pmi.linux.x64.checked.mch +0.13%
benchmarks.run_pgo.linux.x64.checked.mch +0.44%
libraries.crossgen2.linux.x64.checked.mch +0.15%
benchmarks.run_tiered.linux.x64.checked.mch +0.31%
benchmarks.run.linux.x64.checked.mch +0.20%
smoke_tests.nativeaot.linux.x64.checked.mch +0.22%
libraries_tests.run.linux.x64.Release.mch +0.35%
coreclr_tests.run.linux.x64.checked.mch +0.13%

Details here


@AndyAyersMS
Copy link
Member

AndyAyersMS commented Feb 7, 2024

@AndyAyersMS I wonder if there's a way to generalize RBO follow predecssors a bit more persistently and then do the jump threading on the BB36 -> BB38 edge instead of trying to do it on the BB38 -> BB39 edge? BB38 is an empty block in this case.

If there are empty preds we ought to be able to look through them. Added a note to #48115.

@jakobbotsch
Copy link
Member Author

/azp run runtime-coreclr jitstress, runtime-coreclr libraries-jitstress

Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@ryujit-bot
Copy link

Diff results for #98096

Assembly diffs

Assembly diffs for linux/arm64 ran on windows/x64

Diffs are based on 1,610,910 contexts (368,644 MinOpts, 1,242,266 FullOpts).

MISSED contexts: 2,790 (0.17%)

Overall (-101,288 bytes)
Collection Base size (bytes) Diff size (bytes)
benchmarks.run.linux.arm64.checked.mch 13,063,852 +20
benchmarks.run_pgo.linux.arm64.checked.mch 65,248,792 -99,188
benchmarks.run_tiered.linux.arm64.checked.mch 20,463,728 -20
coreclr_tests.run.linux.arm64.checked.mch 301,233,192 -404
libraries.crossgen2.linux.arm64.checked.mch 63,764,680 -260
libraries.pmi.linux.arm64.checked.mch 76,209,360 +104
libraries_tests.run.linux.arm64.Release.mch 38,230,684 -1,040
libraries_tests_no_tiered_compilation.run.linux.arm64.Release.mch 161,796,492 +100
realworld.run.linux.arm64.checked.mch 15,928,884 -464
smoke_tests.nativeaot.linux.arm64.checked.mch 2,851,260 -136
FullOpts (-101,288 bytes)
Collection Base size (bytes) Diff size (bytes)
benchmarks.run.linux.arm64.checked.mch 12,930,536 +20
benchmarks.run_pgo.linux.arm64.checked.mch 43,966,168 -99,188
benchmarks.run_tiered.linux.arm64.checked.mch 4,685,104 -20
coreclr_tests.run.linux.arm64.checked.mch 140,439,428 -404
libraries.crossgen2.linux.arm64.checked.mch 63,763,044 -260
libraries.pmi.linux.arm64.checked.mch 76,089,376 +104
libraries_tests.run.linux.arm64.Release.mch 14,335,208 -1,040
libraries_tests_no_tiered_compilation.run.linux.arm64.Release.mch 148,393,660 +100
realworld.run.linux.arm64.checked.mch 15,346,680 -464
smoke_tests.nativeaot.linux.arm64.checked.mch 2,850,272 -136

Assembly diffs for linux/x64 ran on windows/x64

Diffs are based on 1,621,203 contexts (360,162 MinOpts, 1,261,041 FullOpts).

MISSED contexts: 2,647 (0.16%)

Overall (-162,350 bytes)
Collection Base size (bytes) Diff size (bytes)
benchmarks.run.linux.x64.checked.mch 11,931,736 -196
benchmarks.run_pgo.linux.x64.checked.mch 57,208,438 -178,358
benchmarks.run_tiered.linux.x64.checked.mch 18,554,476 -114
coreclr_tests.run.linux.x64.checked.mch 247,130,491 -130
libraries.crossgen2.linux.x64.checked.mch 44,619,341 -256
libraries.pmi.linux.x64.checked.mch 60,394,201 -98
libraries_tests.run.linux.x64.Release.mch 31,730,283 +18,122
libraries_tests_no_tiered_compilation.run.linux.x64.Release.mch 130,013,252 -699
realworld.run.linux.x64.checked.mch 13,219,489 -639
smoke_tests.nativeaot.linux.x64.checked.mch 4,228,743 +18
FullOpts (-162,350 bytes)
Collection Base size (bytes) Diff size (bytes)
benchmarks.run.linux.x64.checked.mch 11,762,034 -196
benchmarks.run_pgo.linux.x64.checked.mch 39,461,926 -178,358
benchmarks.run_tiered.linux.x64.checked.mch 3,498,730 -114
coreclr_tests.run.linux.x64.checked.mch 106,763,610 -130
libraries.crossgen2.linux.x64.checked.mch 44,618,143 -256
libraries.pmi.linux.x64.checked.mch 60,281,344 -98
libraries_tests.run.linux.x64.Release.mch 15,802,466 +18,122
libraries_tests_no_tiered_compilation.run.linux.x64.Release.mch 119,429,397 -699
realworld.run.linux.x64.checked.mch 12,830,953 -639
smoke_tests.nativeaot.linux.x64.checked.mch 4,227,794 +18

Assembly diffs for osx/arm64 ran on windows/x64

Diffs are based on 1,733,619 contexts (561,303 MinOpts, 1,172,316 FullOpts).

MISSED contexts: 2,902 (0.17%)

Overall (-6,016 bytes)
Collection Base size (bytes) Diff size (bytes)
benchmarks.run.osx.arm64.checked.mch 11,101,028 +20
benchmarks.run_pgo.osx.arm64.checked.mch 24,782,000 -3,132
benchmarks.run_tiered.osx.arm64.checked.mch 15,471,752 +44
coreclr_tests.run.osx.arm64.checked.mch 390,213,652 -444
libraries.crossgen2.osx.arm64.checked.mch 63,645,568 -260
libraries.pmi.osx.arm64.checked.mch 80,239,056 +300
libraries_tests.run.osx.arm64.Release.mch 72,839,284 -2,020
libraries_tests_no_tiered_compilation.run.osx.arm64.Release.mch 159,911,512 -56
realworld.run.osx.arm64.checked.mch 15,078,748 -468
FullOpts (-6,016 bytes)
Collection Base size (bytes) Diff size (bytes)
benchmarks.run.osx.arm64.checked.mch 11,100,292 +20
benchmarks.run_pgo.osx.arm64.checked.mch 8,787,588 -3,132
benchmarks.run_tiered.osx.arm64.checked.mch 3,950,116 +44
coreclr_tests.run.osx.arm64.checked.mch 138,802,076 -444
libraries.crossgen2.osx.arm64.checked.mch 63,643,940 -260
libraries.pmi.osx.arm64.checked.mch 80,117,928 +300
libraries_tests.run.osx.arm64.Release.mch 12,454,304 -2,020
libraries_tests_no_tiered_compilation.run.osx.arm64.Release.mch 146,852,152 -56
realworld.run.osx.arm64.checked.mch 14,514,796 -468

Assembly diffs for windows/arm64 ran on windows/x64

Diffs are based on 1,478,010 contexts (263,527 MinOpts, 1,214,483 FullOpts).

MISSED contexts: 2,751 (0.19%)

Overall (-4,376 bytes)
Collection Base size (bytes) Diff size (bytes)
benchmarks.run.windows.arm64.checked.mch 10,887,636 +8
benchmarks.run_pgo.windows.arm64.checked.mch 36,162,312 -1,268
benchmarks.run_tiered.windows.arm64.checked.mch 15,269,056 -4
coreclr_tests.run.windows.arm64.checked.mch 277,085,768 -384
libraries.crossgen2.windows.arm64.checked.mch 66,990,496 -244
libraries.pmi.windows.arm64.checked.mch 79,835,620 +164
libraries_tests.run.windows.arm64.Release.mch 6,478,404 -2,100
libraries_tests_no_tiered_compilation.run.windows.arm64.Release.mch 168,105,436 +80
realworld.run.windows.arm64.checked.mch 15,900,008 -452
smoke_tests.nativeaot.windows.arm64.checked.mch 3,865,048 -176
FullOpts (-4,376 bytes)
Collection Base size (bytes) Diff size (bytes)
benchmarks.run.windows.arm64.checked.mch 10,887,100 +8
benchmarks.run_pgo.windows.arm64.checked.mch 23,135,448 -1,268
benchmarks.run_tiered.windows.arm64.checked.mch 4,070,224 -4
coreclr_tests.run.windows.arm64.checked.mch 138,793,200 -384
libraries.crossgen2.windows.arm64.checked.mch 66,988,860 -244
libraries.pmi.windows.arm64.checked.mch 79,715,636 +164
libraries_tests.run.windows.arm64.Release.mch 5,254,404 -2,100
libraries_tests_no_tiered_compilation.run.windows.arm64.Release.mch 155,046,156 +80
realworld.run.windows.arm64.checked.mch 15,336,032 -452
smoke_tests.nativeaot.windows.arm64.checked.mch 3,864,036 -176

Assembly diffs for windows/x64 ran on windows/x64

Diffs are based on 1,999,649 contexts (587,594 MinOpts, 1,412,055 FullOpts).

MISSED contexts: base: 3,225 (0.16%), diff: 3,239 (0.16%)

Overall (+41,365 bytes)
Collection Base size (bytes) Diff size (bytes)
aspnet.run.windows.x64.checked.mch 46,746,711 +1,189
benchmarks.run.windows.x64.checked.mch 11,727,476 +473
benchmarks.run_pgo.windows.x64.checked.mch 34,353,258 +27,965
benchmarks.run_tiered.windows.x64.checked.mch 19,449,443 +127
coreclr_tests.run.windows.x64.checked.mch 296,148,172 +757
libraries.crossgen2.windows.x64.checked.mch 44,929,099 +208
libraries.pmi.windows.x64.checked.mch 67,669,814 +1,064
libraries_tests.run.windows.x64.Release.mch 42,430,255 +7,704
libraries_tests_no_tiered_compilation.run.windows.x64.Release.mch 142,641,671 +1,436
realworld.run.windows.x64.checked.mch 14,769,832 -151
smoke_tests.nativeaot.windows.x64.checked.mch 5,085,273 +593
FullOpts (+41,365 bytes)
Collection Base size (bytes) Diff size (bytes)
aspnet.run.windows.x64.checked.mch 28,257,971 +1,189
benchmarks.run.windows.x64.checked.mch 11,726,881 +473
benchmarks.run_pgo.windows.x64.checked.mch 15,516,562 +27,965
benchmarks.run_tiered.windows.x64.checked.mch 4,081,554 +127
coreclr_tests.run.windows.x64.checked.mch 110,373,782 +757
libraries.crossgen2.windows.x64.checked.mch 44,927,912 +208
libraries.pmi.windows.x64.checked.mch 67,556,293 +1,064
libraries_tests.run.windows.x64.Release.mch 10,788,375 +7,704
libraries_tests_no_tiered_compilation.run.windows.x64.Release.mch 131,858,801 +1,436
realworld.run.windows.x64.checked.mch 14,383,223 -151
smoke_tests.nativeaot.windows.x64.checked.mch 5,084,326 +593

Details here


Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 1,449,677 contexts (345,734 MinOpts, 1,103,943 FullOpts).

MISSED contexts: 55,309 (3.68%)

Overall (+6,954 bytes)
Collection Base size (bytes) Diff size (bytes)
benchmarks.run.linux.arm.checked.mch 13,691,660 +402
benchmarks.run_pgo.linux.arm.checked.mch 24,676,764 +144
benchmarks.run_tiered.linux.arm.checked.mch 17,983,552 +444
coreclr_tests.run.linux.arm.checked.mch 321,243,680 -626
libraries.crossgen2.linux.arm.checked.mch 35,989,292 -172
libraries.pmi.linux.arm.checked.mch 49,882,798 +678
libraries_tests.run.linux.arm.Release.mch 17,138,332 +4,772
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch 93,857,406 +956
realworld.run.linux.arm.checked.mch 13,598,268 +356
FullOpts (+6,954 bytes)
Collection Base size (bytes) Diff size (bytes)
benchmarks.run.linux.arm.checked.mch 13,379,084 +402
benchmarks.run_pgo.linux.arm.checked.mch 19,755,612 +144
benchmarks.run_tiered.linux.arm.checked.mch 10,616,262 +444
coreclr_tests.run.linux.arm.checked.mch 108,808,730 -626
libraries.crossgen2.linux.arm.checked.mch 35,988,062 -172
libraries.pmi.linux.arm.checked.mch 49,776,574 +678
libraries_tests.run.linux.arm.Release.mch 16,541,272 +4,772
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch 83,827,636 +956
realworld.run.linux.arm.checked.mch 13,163,196 +356

Assembly diffs for windows/x86 ran on windows/x86

Diffs are based on 1,624,674 contexts (327,626 MinOpts, 1,297,048 FullOpts).

MISSED contexts: base: 4,647 (0.29%), diff: 5,061 (0.31%)

Overall (+30,611 bytes)
Collection Base size (bytes) Diff size (bytes)
benchmarks.run.windows.x86.checked.mch 11,289,347 -2,396
benchmarks.run_pgo.windows.x86.checked.mch 33,171,940 +14,944
benchmarks.run_tiered.windows.x86.checked.mch 14,107,190 -2,025
coreclr_tests.run.windows.x86.checked.mch 215,326,611 +14,575
libraries.crossgen2.windows.x86.checked.mch 35,943,892 +445
libraries.pmi.windows.x86.checked.mch 51,244,221 -6
libraries_tests.run.windows.x86.Release.mch 14,891,910 +6,253
libraries_tests_no_tiered_compilation.run.windows.x86.Release.mch 109,390,907 -1,044
realworld.run.windows.x86.checked.mch 11,794,549 -135
FullOpts (+30,611 bytes)
Collection Base size (bytes) Diff size (bytes)
benchmarks.run.windows.x86.checked.mch 11,288,869 -2,396
benchmarks.run_pgo.windows.x86.checked.mch 27,049,992 +14,944
benchmarks.run_tiered.windows.x86.checked.mch 7,252,553 -2,025
coreclr_tests.run.windows.x86.checked.mch 93,065,587 +14,575
libraries.crossgen2.windows.x86.checked.mch 35,942,832 +445
libraries.pmi.windows.x86.checked.mch 51,148,988 -6
libraries_tests.run.windows.x86.Release.mch 9,401,715 +6,253
libraries_tests_no_tiered_compilation.run.windows.x86.Release.mch 100,438,134 -1,044
realworld.run.windows.x86.checked.mch 11,498,835 -135

Details here


Throughput diffs

Throughput diffs for linux/arm64 ran on windows/x64

Overall (+0.08% to +0.40%)
Collection PDIFF
benchmarks.run.linux.arm64.checked.mch +0.20%
benchmarks.run_pgo.linux.arm64.checked.mch +0.40%
benchmarks.run_tiered.linux.arm64.checked.mch +0.16%
coreclr_tests.run.linux.arm64.checked.mch +0.08%
libraries.crossgen2.linux.arm64.checked.mch +0.14%
libraries.pmi.linux.arm64.checked.mch +0.13%
libraries_tests.run.linux.arm64.Release.mch +0.23%
libraries_tests_no_tiered_compilation.run.linux.arm64.Release.mch +0.09%
realworld.run.linux.arm64.checked.mch +0.16%
smoke_tests.nativeaot.linux.arm64.checked.mch +0.21%
FullOpts (+0.09% to +0.45%)
Collection PDIFF
benchmarks.run.linux.arm64.checked.mch +0.20%
benchmarks.run_pgo.linux.arm64.checked.mch +0.45%
benchmarks.run_tiered.linux.arm64.checked.mch +0.29%
coreclr_tests.run.linux.arm64.checked.mch +0.12%
libraries.crossgen2.linux.arm64.checked.mch +0.14%
libraries.pmi.linux.arm64.checked.mch +0.13%
libraries_tests.run.linux.arm64.Release.mch +0.34%
libraries_tests_no_tiered_compilation.run.linux.arm64.Release.mch +0.09%
realworld.run.linux.arm64.checked.mch +0.16%
smoke_tests.nativeaot.linux.arm64.checked.mch +0.21%

Throughput diffs for linux/x64 ran on windows/x64

Overall (+0.09% to +0.41%)
Collection PDIFF
benchmarks.run.linux.x64.checked.mch +0.20%
benchmarks.run_pgo.linux.x64.checked.mch +0.41%
benchmarks.run_tiered.linux.x64.checked.mch +0.16%
coreclr_tests.run.linux.x64.checked.mch +0.09%
libraries.crossgen2.linux.x64.checked.mch +0.15%
libraries.pmi.linux.x64.checked.mch +0.14%
libraries_tests.run.linux.x64.Release.mch +0.29%
libraries_tests_no_tiered_compilation.run.linux.x64.Release.mch +0.10%
realworld.run.linux.x64.checked.mch +0.17%
smoke_tests.nativeaot.linux.x64.checked.mch +0.23%
FullOpts (+0.10% to +0.46%)
Collection PDIFF
benchmarks.run.linux.x64.checked.mch +0.20%
benchmarks.run_pgo.linux.x64.checked.mch +0.46%
benchmarks.run_tiered.linux.x64.checked.mch +0.31%
coreclr_tests.run.linux.x64.checked.mch +0.13%
libraries.crossgen2.linux.x64.checked.mch +0.15%
libraries.pmi.linux.x64.checked.mch +0.14%
libraries_tests.run.linux.x64.Release.mch +0.36%
libraries_tests_no_tiered_compilation.run.linux.x64.Release.mch +0.10%
realworld.run.linux.x64.checked.mch +0.17%
smoke_tests.nativeaot.linux.x64.checked.mch +0.23%

Throughput diffs for osx/arm64 ran on windows/x64

Overall (+0.07% to +0.37%)
Collection PDIFF
benchmarks.run.osx.arm64.checked.mch +0.22%
benchmarks.run_pgo.osx.arm64.checked.mch +0.37%
benchmarks.run_tiered.osx.arm64.checked.mch +0.17%
coreclr_tests.run.osx.arm64.checked.mch +0.07%
libraries.crossgen2.osx.arm64.checked.mch +0.14%
libraries.pmi.osx.arm64.checked.mch +0.13%
libraries_tests.run.osx.arm64.Release.mch +0.16%
libraries_tests_no_tiered_compilation.run.osx.arm64.Release.mch +0.09%
realworld.run.osx.arm64.checked.mch +0.16%
FullOpts (+0.09% to +0.53%)
Collection PDIFF
benchmarks.run.osx.arm64.checked.mch +0.22%
benchmarks.run_pgo.osx.arm64.checked.mch +0.53%
benchmarks.run_tiered.osx.arm64.checked.mch +0.29%
coreclr_tests.run.osx.arm64.checked.mch +0.11%
libraries.crossgen2.osx.arm64.checked.mch +0.14%
libraries.pmi.osx.arm64.checked.mch +0.13%
libraries_tests.run.osx.arm64.Release.mch +0.37%
libraries_tests_no_tiered_compilation.run.osx.arm64.Release.mch +0.09%
realworld.run.osx.arm64.checked.mch +0.16%

Throughput diffs for windows/arm64 ran on windows/x64

Overall (+0.08% to +0.37%)
Collection PDIFF
benchmarks.run.windows.arm64.checked.mch +0.22%
benchmarks.run_pgo.windows.arm64.checked.mch +0.37%
benchmarks.run_tiered.windows.arm64.checked.mch +0.17%
coreclr_tests.run.windows.arm64.checked.mch +0.08%
libraries.crossgen2.windows.arm64.checked.mch +0.14%
libraries.pmi.windows.arm64.checked.mch +0.13%
libraries_tests.run.windows.arm64.Release.mch +0.25%
libraries_tests_no_tiered_compilation.run.windows.arm64.Release.mch +0.09%
realworld.run.windows.arm64.checked.mch +0.16%
smoke_tests.nativeaot.windows.arm64.checked.mch +0.23%
FullOpts (+0.09% to +0.43%)
Collection PDIFF
benchmarks.run.windows.arm64.checked.mch +0.22%
benchmarks.run_pgo.windows.arm64.checked.mch +0.43%
benchmarks.run_tiered.windows.arm64.checked.mch +0.29%
coreclr_tests.run.windows.arm64.checked.mch +0.11%
libraries.crossgen2.windows.arm64.checked.mch +0.14%
libraries.pmi.windows.arm64.checked.mch +0.13%
libraries_tests.run.windows.arm64.Release.mch +0.26%
libraries_tests_no_tiered_compilation.run.windows.arm64.Release.mch +0.09%
realworld.run.windows.arm64.checked.mch +0.16%
smoke_tests.nativeaot.windows.arm64.checked.mch +0.23%

Throughput diffs for windows/x64 ran on windows/x64

Overall (+0.09% to +0.51%)
Collection PDIFF
aspnet.run.windows.x64.checked.mch +0.25%
benchmarks.run.windows.x64.checked.mch +0.22%
benchmarks.run_pgo.windows.x64.checked.mch +0.51%
benchmarks.run_tiered.windows.x64.checked.mch +0.15%
coreclr_tests.run.windows.x64.checked.mch +0.09%
libraries.crossgen2.windows.x64.checked.mch +0.15%
libraries.pmi.windows.x64.checked.mch +0.13%
libraries_tests.run.windows.x64.Release.mch +0.17%
libraries_tests_no_tiered_compilation.run.windows.x64.Release.mch +0.10%
realworld.run.windows.x64.checked.mch +0.17%
smoke_tests.nativeaot.windows.x64.checked.mch +0.24%
FullOpts (+0.10% to +0.65%)
Collection PDIFF
aspnet.run.windows.x64.checked.mch +0.29%
benchmarks.run.windows.x64.checked.mch +0.22%
benchmarks.run_pgo.windows.x64.checked.mch +0.65%
benchmarks.run_tiered.windows.x64.checked.mch +0.28%
coreclr_tests.run.windows.x64.checked.mch +0.13%
libraries.crossgen2.windows.x64.checked.mch +0.15%
libraries.pmi.windows.x64.checked.mch +0.13%
libraries_tests.run.windows.x64.Release.mch +0.30%
libraries_tests_no_tiered_compilation.run.windows.x64.Release.mch +0.10%
realworld.run.windows.x64.checked.mch +0.17%
smoke_tests.nativeaot.windows.x64.checked.mch +0.24%

Details here


Throughput diffs for linux/arm ran on windows/x86

Overall (+0.04% to +0.30%)
Collection PDIFF
benchmarks.run.linux.arm.checked.mch +0.21%
benchmarks.run_pgo.linux.arm.checked.mch +0.04%
benchmarks.run_tiered.linux.arm.checked.mch +0.21%
coreclr_tests.run.linux.arm.checked.mch +0.11%
libraries.crossgen2.linux.arm.checked.mch +0.15%
libraries.pmi.linux.arm.checked.mch +0.15%
libraries_tests.run.linux.arm.Release.mch +0.30%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch +0.11%
realworld.run.linux.arm.checked.mch +0.25%
FullOpts (+0.04% to +0.31%)
Collection PDIFF
benchmarks.run.linux.arm.checked.mch +0.21%
benchmarks.run_pgo.linux.arm.checked.mch +0.04%
benchmarks.run_tiered.linux.arm.checked.mch +0.25%
coreclr_tests.run.linux.arm.checked.mch +0.18%
libraries.crossgen2.linux.arm.checked.mch +0.15%
libraries.pmi.linux.arm.checked.mch +0.15%
libraries_tests.run.linux.arm.Release.mch +0.31%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch +0.12%
realworld.run.linux.arm.checked.mch +0.25%

Throughput diffs for windows/x86 ran on windows/x86

Overall (+0.10% to +0.30%)
Collection PDIFF
benchmarks.run.windows.x86.checked.mch +0.24%
benchmarks.run_pgo.windows.x86.checked.mch +0.10%
benchmarks.run_tiered.windows.x86.checked.mch +0.27%
coreclr_tests.run.windows.x86.checked.mch +0.13%
libraries.crossgen2.windows.x86.checked.mch +0.18%
libraries.pmi.windows.x86.checked.mch +0.16%
libraries_tests.run.windows.x86.Release.mch +0.30%
libraries_tests_no_tiered_compilation.run.windows.x86.Release.mch +0.12%
realworld.run.windows.x86.checked.mch +0.20%
FullOpts (+0.10% to +0.34%)
Collection PDIFF
benchmarks.run.windows.x86.checked.mch +0.24%
benchmarks.run_pgo.windows.x86.checked.mch +0.10%
benchmarks.run_tiered.windows.x86.checked.mch +0.33%
coreclr_tests.run.windows.x86.checked.mch +0.18%
libraries.crossgen2.windows.x86.checked.mch +0.18%
libraries.pmi.windows.x86.checked.mch +0.16%
libraries_tests.run.windows.x86.Release.mch +0.34%
libraries_tests_no_tiered_compilation.run.windows.x86.Release.mch +0.12%
realworld.run.windows.x86.checked.mch +0.20%

Details here


Throughput diffs for linux/arm64 ran on linux/x64

Overall (+0.08% to +0.39%)
Collection PDIFF
realworld.run.linux.arm64.checked.mch +0.15%
benchmarks.run_tiered.linux.arm64.checked.mch +0.15%
libraries_tests.run.linux.arm64.Release.mch +0.23%
smoke_tests.nativeaot.linux.arm64.checked.mch +0.20%
benchmarks.run_pgo.linux.arm64.checked.mch +0.39%
coreclr_tests.run.linux.arm64.checked.mch +0.08%
libraries_tests_no_tiered_compilation.run.linux.arm64.Release.mch +0.09%
benchmarks.run.linux.arm64.checked.mch +0.20%
libraries.crossgen2.linux.arm64.checked.mch +0.14%
libraries.pmi.linux.arm64.checked.mch +0.12%
FullOpts (+0.09% to +0.44%)
Collection PDIFF
realworld.run.linux.arm64.checked.mch +0.15%
benchmarks.run_tiered.linux.arm64.checked.mch +0.28%
libraries_tests.run.linux.arm64.Release.mch +0.33%
smoke_tests.nativeaot.linux.arm64.checked.mch +0.20%
benchmarks.run_pgo.linux.arm64.checked.mch +0.44%
coreclr_tests.run.linux.arm64.checked.mch +0.11%
libraries_tests_no_tiered_compilation.run.linux.arm64.Release.mch +0.09%
benchmarks.run.linux.arm64.checked.mch +0.20%
libraries.crossgen2.linux.arm64.checked.mch +0.14%
libraries.pmi.linux.arm64.checked.mch +0.12%

Throughput diffs for linux/x64 ran on linux/x64

Overall (+0.09% to +0.40%)
Collection PDIFF
coreclr_tests.run.linux.x64.checked.mch +0.09%
libraries_tests.run.linux.x64.Release.mch +0.28%
benchmarks.run_pgo.linux.x64.checked.mch +0.40%
benchmarks.run.linux.x64.checked.mch +0.20%
realworld.run.linux.x64.checked.mch +0.16%
libraries.crossgen2.linux.x64.checked.mch +0.15%
libraries.pmi.linux.x64.checked.mch +0.13%
benchmarks.run_tiered.linux.x64.checked.mch +0.16%
libraries_tests_no_tiered_compilation.run.linux.x64.Release.mch +0.09%
smoke_tests.nativeaot.linux.x64.checked.mch +0.22%
FullOpts (+0.09% to +0.44%)
Collection PDIFF
coreclr_tests.run.linux.x64.checked.mch +0.13%
libraries_tests.run.linux.x64.Release.mch +0.35%
benchmarks.run_pgo.linux.x64.checked.mch +0.44%
benchmarks.run.linux.x64.checked.mch +0.20%
realworld.run.linux.x64.checked.mch +0.16%
libraries.crossgen2.linux.x64.checked.mch +0.15%
libraries.pmi.linux.x64.checked.mch +0.13%
benchmarks.run_tiered.linux.x64.checked.mch +0.31%
libraries_tests_no_tiered_compilation.run.linux.x64.Release.mch +0.09%
smoke_tests.nativeaot.linux.x64.checked.mch +0.22%

Details here


@ryujit-bot
Copy link

Diff results for #98096

Assembly diffs

Assembly diffs for windows/x64 ran on windows/x64

Diffs are based on 1,999,649 contexts (587,594 MinOpts, 1,412,055 FullOpts).

MISSED contexts: base: 3,225 (0.16%), diff: 3,239 (0.16%)

Overall (+41,365 bytes)
Collection Base size (bytes) Diff size (bytes)
aspnet.run.windows.x64.checked.mch 46,746,711 +1,189
benchmarks.run.windows.x64.checked.mch 11,727,476 +473
benchmarks.run_pgo.windows.x64.checked.mch 34,353,258 +27,965
benchmarks.run_tiered.windows.x64.checked.mch 19,449,443 +127
coreclr_tests.run.windows.x64.checked.mch 296,148,172 +757
libraries.crossgen2.windows.x64.checked.mch 44,929,099 +208
libraries.pmi.windows.x64.checked.mch 67,669,814 +1,064
libraries_tests.run.windows.x64.Release.mch 42,430,255 +7,704
libraries_tests_no_tiered_compilation.run.windows.x64.Release.mch 142,641,671 +1,436
realworld.run.windows.x64.checked.mch 14,769,832 -151
smoke_tests.nativeaot.windows.x64.checked.mch 5,085,273 +593
FullOpts (+41,365 bytes)
Collection Base size (bytes) Diff size (bytes)
aspnet.run.windows.x64.checked.mch 28,257,971 +1,189
benchmarks.run.windows.x64.checked.mch 11,726,881 +473
benchmarks.run_pgo.windows.x64.checked.mch 15,516,562 +27,965
benchmarks.run_tiered.windows.x64.checked.mch 4,081,554 +127
coreclr_tests.run.windows.x64.checked.mch 110,373,782 +757
libraries.crossgen2.windows.x64.checked.mch 44,927,912 +208
libraries.pmi.windows.x64.checked.mch 67,556,293 +1,064
libraries_tests.run.windows.x64.Release.mch 10,788,375 +7,704
libraries_tests_no_tiered_compilation.run.windows.x64.Release.mch 131,858,801 +1,436
realworld.run.windows.x64.checked.mch 14,383,223 -151
smoke_tests.nativeaot.windows.x64.checked.mch 5,084,326 +593

Details here


Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 1,449,677 contexts (345,734 MinOpts, 1,103,943 FullOpts).

MISSED contexts: 55,309 (3.68%)

Overall (+6,954 bytes)
Collection Base size (bytes) Diff size (bytes)
benchmarks.run.linux.arm.checked.mch 13,691,660 +402
benchmarks.run_pgo.linux.arm.checked.mch 24,676,764 +144
benchmarks.run_tiered.linux.arm.checked.mch 17,983,552 +444
coreclr_tests.run.linux.arm.checked.mch 321,243,680 -626
libraries.crossgen2.linux.arm.checked.mch 35,989,292 -172
libraries.pmi.linux.arm.checked.mch 49,882,798 +678
libraries_tests.run.linux.arm.Release.mch 17,138,332 +4,772
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch 93,857,406 +956
realworld.run.linux.arm.checked.mch 13,598,268 +356
FullOpts (+6,954 bytes)
Collection Base size (bytes) Diff size (bytes)
benchmarks.run.linux.arm.checked.mch 13,379,084 +402
benchmarks.run_pgo.linux.arm.checked.mch 19,755,612 +144
benchmarks.run_tiered.linux.arm.checked.mch 10,616,262 +444
coreclr_tests.run.linux.arm.checked.mch 108,808,730 -626
libraries.crossgen2.linux.arm.checked.mch 35,988,062 -172
libraries.pmi.linux.arm.checked.mch 49,776,574 +678
libraries_tests.run.linux.arm.Release.mch 16,541,272 +4,772
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch 83,827,636 +956
realworld.run.linux.arm.checked.mch 13,163,196 +356

Assembly diffs for windows/x86 ran on windows/x86

Diffs are based on 1,624,674 contexts (327,626 MinOpts, 1,297,048 FullOpts).

MISSED contexts: base: 4,647 (0.29%), diff: 5,061 (0.31%)

Overall (+30,611 bytes)
Collection Base size (bytes) Diff size (bytes)
benchmarks.run.windows.x86.checked.mch 11,289,347 -2,396
benchmarks.run_pgo.windows.x86.checked.mch 33,171,940 +14,944
benchmarks.run_tiered.windows.x86.checked.mch 14,107,190 -2,025
coreclr_tests.run.windows.x86.checked.mch 215,326,611 +14,575
libraries.crossgen2.windows.x86.checked.mch 35,943,892 +445
libraries.pmi.windows.x86.checked.mch 51,244,221 -6
libraries_tests.run.windows.x86.Release.mch 14,891,910 +6,253
libraries_tests_no_tiered_compilation.run.windows.x86.Release.mch 109,390,907 -1,044
realworld.run.windows.x86.checked.mch 11,794,549 -135
FullOpts (+30,611 bytes)
Collection Base size (bytes) Diff size (bytes)
benchmarks.run.windows.x86.checked.mch 11,288,869 -2,396
benchmarks.run_pgo.windows.x86.checked.mch 27,049,992 +14,944
benchmarks.run_tiered.windows.x86.checked.mch 7,252,553 -2,025
coreclr_tests.run.windows.x86.checked.mch 93,065,587 +14,575
libraries.crossgen2.windows.x86.checked.mch 35,942,832 +445
libraries.pmi.windows.x86.checked.mch 51,148,988 -6
libraries_tests.run.windows.x86.Release.mch 9,401,715 +6,253
libraries_tests_no_tiered_compilation.run.windows.x86.Release.mch 100,438,134 -1,044
realworld.run.windows.x86.checked.mch 11,498,835 -135

Details here


Throughput diffs

Throughput diffs for linux/arm64 ran on linux/x64

Overall (+0.08% to +0.39%)
Collection PDIFF
realworld.run.linux.arm64.checked.mch +0.15%
benchmarks.run_tiered.linux.arm64.checked.mch +0.15%
libraries_tests.run.linux.arm64.Release.mch +0.23%
smoke_tests.nativeaot.linux.arm64.checked.mch +0.20%
benchmarks.run_pgo.linux.arm64.checked.mch +0.39%
coreclr_tests.run.linux.arm64.checked.mch +0.08%
libraries_tests_no_tiered_compilation.run.linux.arm64.Release.mch +0.09%
benchmarks.run.linux.arm64.checked.mch +0.20%
libraries.crossgen2.linux.arm64.checked.mch +0.14%
libraries.pmi.linux.arm64.checked.mch +0.12%
FullOpts (+0.09% to +0.44%)
Collection PDIFF
realworld.run.linux.arm64.checked.mch +0.15%
benchmarks.run_tiered.linux.arm64.checked.mch +0.28%
libraries_tests.run.linux.arm64.Release.mch +0.33%
smoke_tests.nativeaot.linux.arm64.checked.mch +0.20%
benchmarks.run_pgo.linux.arm64.checked.mch +0.44%
coreclr_tests.run.linux.arm64.checked.mch +0.11%
libraries_tests_no_tiered_compilation.run.linux.arm64.Release.mch +0.09%
benchmarks.run.linux.arm64.checked.mch +0.20%
libraries.crossgen2.linux.arm64.checked.mch +0.14%
libraries.pmi.linux.arm64.checked.mch +0.12%

Throughput diffs for linux/x64 ran on linux/x64

Overall (+0.09% to +0.40%)
Collection PDIFF
coreclr_tests.run.linux.x64.checked.mch +0.09%
libraries_tests.run.linux.x64.Release.mch +0.28%
benchmarks.run_pgo.linux.x64.checked.mch +0.40%
benchmarks.run.linux.x64.checked.mch +0.20%
realworld.run.linux.x64.checked.mch +0.16%
libraries.crossgen2.linux.x64.checked.mch +0.15%
libraries.pmi.linux.x64.checked.mch +0.13%
benchmarks.run_tiered.linux.x64.checked.mch +0.16%
libraries_tests_no_tiered_compilation.run.linux.x64.Release.mch +0.09%
smoke_tests.nativeaot.linux.x64.checked.mch +0.22%
FullOpts (+0.09% to +0.44%)
Collection PDIFF
coreclr_tests.run.linux.x64.checked.mch +0.13%
libraries_tests.run.linux.x64.Release.mch +0.35%
benchmarks.run_pgo.linux.x64.checked.mch +0.44%
benchmarks.run.linux.x64.checked.mch +0.20%
realworld.run.linux.x64.checked.mch +0.16%
libraries.crossgen2.linux.x64.checked.mch +0.15%
libraries.pmi.linux.x64.checked.mch +0.13%
benchmarks.run_tiered.linux.x64.checked.mch +0.31%
libraries_tests_no_tiered_compilation.run.linux.x64.Release.mch +0.09%
smoke_tests.nativeaot.linux.x64.checked.mch +0.22%

Details here


// Returns:
// Estimated likelihood of the edge being taken.
//
weight_t Compiler::optEstimateEdgeLikelihood(BasicBlock* from, BasicBlock* to, bool* fromProfile)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hopefully this should make the logic more easily updated once we get to the point of having likelihoods here. I also want to switch the preheader code to use this helper in a separate PR.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it will become much simpler as you can just query the edge.

@ryujit-bot
Copy link

Diff results for #98096

Throughput diffs

Throughput diffs for linux/arm64 ran on linux/x64

Overall (+0.08% to +0.36%)
Collection PDIFF
benchmarks.run_tiered.linux.arm64.checked.mch +0.16%
smoke_tests.nativeaot.linux.arm64.checked.mch +0.19%
libraries.pmi.linux.arm64.checked.mch +0.13%
libraries_tests_no_tiered_compilation.run.linux.arm64.Release.mch +0.09%
coreclr_tests.run.linux.arm64.checked.mch +0.08%
benchmarks.run_pgo.linux.arm64.checked.mch +0.36%
realworld.run.linux.arm64.checked.mch +0.15%
libraries_tests.run.linux.arm64.Release.mch +0.24%
benchmarks.run.linux.arm64.checked.mch +0.20%
libraries.crossgen2.linux.arm64.checked.mch +0.14%
FullOpts (+0.09% to +0.40%)
Collection PDIFF
benchmarks.run_tiered.linux.arm64.checked.mch +0.29%
smoke_tests.nativeaot.linux.arm64.checked.mch +0.19%
libraries.pmi.linux.arm64.checked.mch +0.13%
libraries_tests_no_tiered_compilation.run.linux.arm64.Release.mch +0.09%
coreclr_tests.run.linux.arm64.checked.mch +0.12%
benchmarks.run_pgo.linux.arm64.checked.mch +0.40%
realworld.run.linux.arm64.checked.mch +0.15%
libraries_tests.run.linux.arm64.Release.mch +0.34%
benchmarks.run.linux.arm64.checked.mch +0.20%
libraries.crossgen2.linux.arm64.checked.mch +0.14%

Throughput diffs for linux/x64 ran on linux/x64

Overall (+0.09% to +0.37%)
Collection PDIFF
libraries_tests_no_tiered_compilation.run.linux.x64.Release.mch +0.09%
realworld.run.linux.x64.checked.mch +0.16%
libraries_tests.run.linux.x64.Release.mch +0.28%
smoke_tests.nativeaot.linux.x64.checked.mch +0.23%
libraries.crossgen2.linux.x64.checked.mch +0.15%
benchmarks.run_pgo.linux.x64.checked.mch +0.37%
benchmarks.run_tiered.linux.x64.checked.mch +0.16%
libraries.pmi.linux.x64.checked.mch +0.13%
coreclr_tests.run.linux.x64.checked.mch +0.09%
benchmarks.run.linux.x64.checked.mch +0.20%
FullOpts (+0.10% to +0.41%)
Collection PDIFF
libraries_tests_no_tiered_compilation.run.linux.x64.Release.mch +0.10%
realworld.run.linux.x64.checked.mch +0.16%
libraries_tests.run.linux.x64.Release.mch +0.35%
smoke_tests.nativeaot.linux.x64.checked.mch +0.23%
libraries.crossgen2.linux.x64.checked.mch +0.15%
benchmarks.run_pgo.linux.x64.checked.mch +0.41%
benchmarks.run_tiered.linux.x64.checked.mch +0.32%
libraries.pmi.linux.x64.checked.mch +0.13%
coreclr_tests.run.linux.x64.checked.mch +0.13%
benchmarks.run.linux.x64.checked.mch +0.20%

Details here


Throughput diffs for linux/arm64 ran on windows/x64

Overall (+0.09% to +0.37%)
Collection PDIFF
benchmarks.run.linux.arm64.checked.mch +0.20%
benchmarks.run_pgo.linux.arm64.checked.mch +0.37%
benchmarks.run_tiered.linux.arm64.checked.mch +0.16%
coreclr_tests.run.linux.arm64.checked.mch +0.09%
libraries.crossgen2.linux.arm64.checked.mch +0.14%
libraries.pmi.linux.arm64.checked.mch +0.13%
libraries_tests.run.linux.arm64.Release.mch +0.24%
libraries_tests_no_tiered_compilation.run.linux.arm64.Release.mch +0.09%
realworld.run.linux.arm64.checked.mch +0.16%
smoke_tests.nativeaot.linux.arm64.checked.mch +0.20%
FullOpts (+0.09% to +0.41%)
Collection PDIFF
benchmarks.run.linux.arm64.checked.mch +0.20%
benchmarks.run_pgo.linux.arm64.checked.mch +0.41%
benchmarks.run_tiered.linux.arm64.checked.mch +0.29%
coreclr_tests.run.linux.arm64.checked.mch +0.12%
libraries.crossgen2.linux.arm64.checked.mch +0.14%
libraries.pmi.linux.arm64.checked.mch +0.13%
libraries_tests.run.linux.arm64.Release.mch +0.35%
libraries_tests_no_tiered_compilation.run.linux.arm64.Release.mch +0.09%
realworld.run.linux.arm64.checked.mch +0.16%
smoke_tests.nativeaot.linux.arm64.checked.mch +0.20%

Throughput diffs for linux/x64 ran on windows/x64

Overall (+0.09% to +0.38%)
Collection PDIFF
benchmarks.run.linux.x64.checked.mch +0.20%
benchmarks.run_pgo.linux.x64.checked.mch +0.38%
benchmarks.run_tiered.linux.x64.checked.mch +0.16%
coreclr_tests.run.linux.x64.checked.mch +0.09%
libraries.crossgen2.linux.x64.checked.mch +0.15%
libraries.pmi.linux.x64.checked.mch +0.14%
libraries_tests.run.linux.x64.Release.mch +0.28%
libraries_tests_no_tiered_compilation.run.linux.x64.Release.mch +0.10%
realworld.run.linux.x64.checked.mch +0.16%
smoke_tests.nativeaot.linux.x64.checked.mch +0.23%
FullOpts (+0.10% to +0.43%)
Collection PDIFF
benchmarks.run.linux.x64.checked.mch +0.20%
benchmarks.run_pgo.linux.x64.checked.mch +0.43%
benchmarks.run_tiered.linux.x64.checked.mch +0.32%
coreclr_tests.run.linux.x64.checked.mch +0.13%
libraries.crossgen2.linux.x64.checked.mch +0.15%
libraries.pmi.linux.x64.checked.mch +0.14%
libraries_tests.run.linux.x64.Release.mch +0.35%
libraries_tests_no_tiered_compilation.run.linux.x64.Release.mch +0.10%
realworld.run.linux.x64.checked.mch +0.17%
smoke_tests.nativeaot.linux.x64.checked.mch +0.23%

Throughput diffs for osx/arm64 ran on windows/x64

Overall (+0.07% to +0.39%)
Collection PDIFF
benchmarks.run.osx.arm64.checked.mch +0.22%
benchmarks.run_pgo.osx.arm64.checked.mch +0.39%
benchmarks.run_tiered.osx.arm64.checked.mch +0.17%
coreclr_tests.run.osx.arm64.checked.mch +0.07%
libraries.crossgen2.osx.arm64.checked.mch +0.14%
libraries.pmi.osx.arm64.checked.mch +0.13%
libraries_tests.run.osx.arm64.Release.mch +0.17%
libraries_tests_no_tiered_compilation.run.osx.arm64.Release.mch +0.09%
realworld.run.osx.arm64.checked.mch +0.16%
FullOpts (+0.09% to +0.57%)
Collection PDIFF
benchmarks.run.osx.arm64.checked.mch +0.22%
benchmarks.run_pgo.osx.arm64.checked.mch +0.57%
benchmarks.run_tiered.osx.arm64.checked.mch +0.30%
coreclr_tests.run.osx.arm64.checked.mch +0.11%
libraries.crossgen2.osx.arm64.checked.mch +0.14%
libraries.pmi.osx.arm64.checked.mch +0.13%
libraries_tests.run.osx.arm64.Release.mch +0.40%
libraries_tests_no_tiered_compilation.run.osx.arm64.Release.mch +0.09%
realworld.run.osx.arm64.checked.mch +0.16%

Throughput diffs for windows/arm64 ran on windows/x64

Overall (+0.08% to +0.36%)
Collection PDIFF
benchmarks.run.windows.arm64.checked.mch +0.22%
benchmarks.run_pgo.windows.arm64.checked.mch +0.36%
benchmarks.run_tiered.windows.arm64.checked.mch +0.18%
coreclr_tests.run.windows.arm64.checked.mch +0.08%
libraries.crossgen2.windows.arm64.checked.mch +0.14%
libraries.pmi.windows.arm64.checked.mch +0.13%
libraries_tests.run.windows.arm64.Release.mch +0.25%
libraries_tests_no_tiered_compilation.run.windows.arm64.Release.mch +0.09%
realworld.run.windows.arm64.checked.mch +0.16%
smoke_tests.nativeaot.windows.arm64.checked.mch +0.22%
MinOpts (-0.01% to +0.00%)
Collection PDIFF
libraries.pmi.windows.arm64.checked.mch -0.01%
FullOpts (+0.09% to +0.41%)
Collection PDIFF
benchmarks.run.windows.arm64.checked.mch +0.22%
benchmarks.run_pgo.windows.arm64.checked.mch +0.41%
benchmarks.run_tiered.windows.arm64.checked.mch +0.30%
coreclr_tests.run.windows.arm64.checked.mch +0.11%
libraries.crossgen2.windows.arm64.checked.mch +0.14%
libraries.pmi.windows.arm64.checked.mch +0.13%
libraries_tests.run.windows.arm64.Release.mch +0.27%
libraries_tests_no_tiered_compilation.run.windows.arm64.Release.mch +0.09%
realworld.run.windows.arm64.checked.mch +0.16%
smoke_tests.nativeaot.windows.arm64.checked.mch +0.22%

Throughput diffs for windows/x64 ran on windows/x64

Overall (+0.09% to +0.43%)
Collection PDIFF
aspnet.run.windows.x64.checked.mch +0.25%
benchmarks.run.windows.x64.checked.mch +0.22%
benchmarks.run_pgo.windows.x64.checked.mch +0.43%
benchmarks.run_tiered.windows.x64.checked.mch +0.15%
coreclr_tests.run.windows.x64.checked.mch +0.09%
libraries.crossgen2.windows.x64.checked.mch +0.16%
libraries.pmi.windows.x64.checked.mch +0.14%
libraries_tests.run.windows.x64.Release.mch +0.17%
libraries_tests_no_tiered_compilation.run.windows.x64.Release.mch +0.10%
realworld.run.windows.x64.checked.mch +0.17%
smoke_tests.nativeaot.windows.x64.checked.mch +0.24%
FullOpts (+0.10% to +0.55%)
Collection PDIFF
aspnet.run.windows.x64.checked.mch +0.29%
benchmarks.run.windows.x64.checked.mch +0.22%
benchmarks.run_pgo.windows.x64.checked.mch +0.55%
benchmarks.run_tiered.windows.x64.checked.mch +0.28%
coreclr_tests.run.windows.x64.checked.mch +0.13%
libraries.crossgen2.windows.x64.checked.mch +0.16%
libraries.pmi.windows.x64.checked.mch +0.14%
libraries_tests.run.windows.x64.Release.mch +0.29%
libraries_tests_no_tiered_compilation.run.windows.x64.Release.mch +0.10%
realworld.run.windows.x64.checked.mch +0.17%
smoke_tests.nativeaot.windows.x64.checked.mch +0.24%

Details here


@ryujit-bot
Copy link

Diff results for #98096

Assembly diffs

Assembly diffs for linux/arm64 ran on windows/x64

Diffs are based on 1,610,272 contexts (368,644 MinOpts, 1,241,628 FullOpts).

MISSED contexts: 3,428 (0.21%)

Overall (-7,664 bytes)
Collection Base size (bytes) Diff size (bytes)
benchmarks.run.linux.arm64.checked.mch 13,063,296 +52
benchmarks.run_pgo.linux.arm64.checked.mch 65,248,964 -7,960
benchmarks.run_tiered.linux.arm64.checked.mch 20,463,492 +4
coreclr_tests.run.linux.arm64.checked.mch 301,232,224 -128
libraries.crossgen2.linux.arm64.checked.mch 63,420,392 +168
libraries.pmi.linux.arm64.checked.mch 76,198,412 +136
libraries_tests.run.linux.arm64.Release.mch 38,229,644 -196
libraries_tests_no_tiered_compilation.run.linux.arm64.Release.mch 161,788,104 +300
realworld.run.linux.arm64.checked.mch 15,927,560 -40
smoke_tests.nativeaot.linux.arm64.checked.mch 2,805,868 +0
FullOpts (-7,664 bytes)
Collection Base size (bytes) Diff size (bytes)
benchmarks.run.linux.arm64.checked.mch 12,929,980 +52
benchmarks.run_pgo.linux.arm64.checked.mch 43,966,340 -7,960
benchmarks.run_tiered.linux.arm64.checked.mch 4,684,868 +4
coreclr_tests.run.linux.arm64.checked.mch 140,438,460 -128
libraries.crossgen2.linux.arm64.checked.mch 63,418,756 +168
libraries.pmi.linux.arm64.checked.mch 76,078,428 +136
libraries_tests.run.linux.arm64.Release.mch 14,334,168 -196
libraries_tests_no_tiered_compilation.run.linux.arm64.Release.mch 148,385,272 +300
realworld.run.linux.arm64.checked.mch 15,345,356 -40
smoke_tests.nativeaot.linux.arm64.checked.mch 2,804,880 +0

Assembly diffs for linux/x64 ran on windows/x64

Diffs are based on 1,620,764 contexts (360,162 MinOpts, 1,260,602 FullOpts).

MISSED contexts: 3,086 (0.19%)

Overall (-19,189 bytes)
Collection Base size (bytes) Diff size (bytes)
benchmarks.run.linux.x64.checked.mch 11,931,108 -21
benchmarks.run_pgo.linux.x64.checked.mch 57,210,207 -14,603
benchmarks.run_tiered.linux.x64.checked.mch 18,554,062 -79
coreclr_tests.run.linux.x64.checked.mch 247,129,711 -4,514
libraries.crossgen2.linux.x64.checked.mch 44,465,520 +333
libraries.pmi.linux.x64.checked.mch 60,382,760 -681
libraries_tests.run.linux.x64.Release.mch 31,730,046 -608
libraries_tests_no_tiered_compilation.run.linux.x64.Release.mch 130,006,275 +974
realworld.run.linux.x64.checked.mch 13,217,933 +51
smoke_tests.nativeaot.linux.x64.checked.mch 4,173,941 -41
FullOpts (-19,189 bytes)
Collection Base size (bytes) Diff size (bytes)
benchmarks.run.linux.x64.checked.mch 11,761,406 -21
benchmarks.run_pgo.linux.x64.checked.mch 39,463,695 -14,603
benchmarks.run_tiered.linux.x64.checked.mch 3,498,316 -79
coreclr_tests.run.linux.x64.checked.mch 106,762,830 -4,514
libraries.crossgen2.linux.x64.checked.mch 44,464,322 +333
libraries.pmi.linux.x64.checked.mch 60,269,903 -681
libraries_tests.run.linux.x64.Release.mch 15,802,229 -608
libraries_tests_no_tiered_compilation.run.linux.x64.Release.mch 119,422,420 +974
realworld.run.linux.x64.checked.mch 12,829,397 +51
smoke_tests.nativeaot.linux.x64.checked.mch 4,172,992 -41

Assembly diffs for osx/arm64 ran on windows/x64

Diffs are based on 1,733,061 contexts (561,303 MinOpts, 1,171,758 FullOpts).

MISSED contexts: 3,460 (0.20%)

Overall (-2,384 bytes)
Collection Base size (bytes) Diff size (bytes)
benchmarks.run.osx.arm64.checked.mch 11,100,460 +48
benchmarks.run_pgo.osx.arm64.checked.mch 24,781,864 -1,880
benchmarks.run_tiered.osx.arm64.checked.mch 15,471,592 +68
coreclr_tests.run.osx.arm64.checked.mch 390,212,620 -56
libraries.crossgen2.osx.arm64.checked.mch 63,299,348 +168
libraries.pmi.osx.arm64.checked.mch 80,228,576 +316
libraries_tests.run.osx.arm64.Release.mch 72,838,780 -1,368
libraries_tests_no_tiered_compilation.run.osx.arm64.Release.mch 159,903,272 +384
realworld.run.osx.arm64.checked.mch 15,077,516 -64
FullOpts (-2,384 bytes)
Collection Base size (bytes) Diff size (bytes)
benchmarks.run.osx.arm64.checked.mch 11,099,724 +48
benchmarks.run_pgo.osx.arm64.checked.mch 8,787,452 -1,880
benchmarks.run_tiered.osx.arm64.checked.mch 3,949,956 +68
coreclr_tests.run.osx.arm64.checked.mch 138,801,044 -56
libraries.crossgen2.osx.arm64.checked.mch 63,297,720 +168
libraries.pmi.osx.arm64.checked.mch 80,107,448 +316
libraries_tests.run.osx.arm64.Release.mch 12,453,800 -1,368
libraries_tests_no_tiered_compilation.run.osx.arm64.Release.mch 146,843,912 +384
realworld.run.osx.arm64.checked.mch 14,513,564 -64

Assembly diffs for windows/arm64 ran on windows/x64

Diffs are based on 1,477,297 contexts (263,527 MinOpts, 1,213,770 FullOpts).

MISSED contexts: 3,464 (0.23%)

Overall (-3,368 bytes)
Collection Base size (bytes) Diff size (bytes)
benchmarks.run.windows.arm64.checked.mch 10,887,060 -12
benchmarks.run_pgo.windows.arm64.checked.mch 36,163,000 -4,112
benchmarks.run_tiered.windows.arm64.checked.mch 15,268,852 +8
coreclr_tests.run.windows.arm64.checked.mch 277,084,748 +460
libraries.crossgen2.windows.arm64.checked.mch 66,634,756 +168
libraries.pmi.windows.arm64.checked.mch 79,824,464 +172
libraries_tests.run.windows.arm64.Release.mch 6,477,948 -220
libraries_tests_no_tiered_compilation.run.windows.arm64.Release.mch 168,096,992 +216
realworld.run.windows.arm64.checked.mch 15,898,576 -72
smoke_tests.nativeaot.windows.arm64.checked.mch 3,806,968 +24
FullOpts (-3,368 bytes)
Collection Base size (bytes) Diff size (bytes)
benchmarks.run.windows.arm64.checked.mch 10,886,524 -12
benchmarks.run_pgo.windows.arm64.checked.mch 23,136,136 -4,112
benchmarks.run_tiered.windows.arm64.checked.mch 4,070,020 +8
coreclr_tests.run.windows.arm64.checked.mch 138,792,180 +460
libraries.crossgen2.windows.arm64.checked.mch 66,633,120 +168
libraries.pmi.windows.arm64.checked.mch 79,704,480 +172
libraries_tests.run.windows.arm64.Release.mch 5,253,948 -220
libraries_tests_no_tiered_compilation.run.windows.arm64.Release.mch 155,037,712 +216
realworld.run.windows.arm64.checked.mch 15,334,600 -72
smoke_tests.nativeaot.windows.arm64.checked.mch 3,805,956 +24

Assembly diffs for windows/x64 ran on windows/x64

Diffs are based on 1,999,231 contexts (587,594 MinOpts, 1,411,637 FullOpts).

MISSED contexts: 3,657 (0.18%)

Overall (-11,691 bytes)
Collection Base size (bytes) Diff size (bytes)
aspnet.run.windows.x64.checked.mch 46,755,446 -3,070
benchmarks.run.windows.x64.checked.mch 11,726,698 +337
benchmarks.run_pgo.windows.x64.checked.mch 34,354,002 -12,476
benchmarks.run_tiered.windows.x64.checked.mch 19,448,995 +407
coreclr_tests.run.windows.x64.checked.mch 296,147,901 -564
libraries.crossgen2.windows.x64.checked.mch 44,779,562 +503
libraries.pmi.windows.x64.checked.mch 67,659,393 +1,289
libraries_tests.run.windows.x64.Release.mch 42,430,193 -659
libraries_tests_no_tiered_compilation.run.windows.x64.Release.mch 142,635,440 +1,742
realworld.run.windows.x64.checked.mch 14,768,264 +634
smoke_tests.nativeaot.windows.x64.checked.mch 5,049,681 +166
FullOpts (-11,691 bytes)
Collection Base size (bytes) Diff size (bytes)
aspnet.run.windows.x64.checked.mch 28,266,706 -3,070
benchmarks.run.windows.x64.checked.mch 11,726,103 +337
benchmarks.run_pgo.windows.x64.checked.mch 15,517,306 -12,476
benchmarks.run_tiered.windows.x64.checked.mch 4,081,106 +407
coreclr_tests.run.windows.x64.checked.mch 110,373,511 -564
libraries.crossgen2.windows.x64.checked.mch 44,778,375 +503
libraries.pmi.windows.x64.checked.mch 67,545,872 +1,289
libraries_tests.run.windows.x64.Release.mch 10,788,313 -659
libraries_tests_no_tiered_compilation.run.windows.x64.Release.mch 131,852,570 +1,742
realworld.run.windows.x64.checked.mch 14,381,655 +634
smoke_tests.nativeaot.windows.x64.checked.mch 5,048,734 +166

Details here


Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 1,449,330 contexts (345,734 MinOpts, 1,103,596 FullOpts).

MISSED contexts: 55,656 (3.70%)

Overall (+306 bytes)
Collection Base size (bytes) Diff size (bytes)
benchmarks.run.linux.arm.checked.mch 13,690,874 +242
benchmarks.run_pgo.linux.arm.checked.mch 24,676,696 +70
benchmarks.run_tiered.linux.arm.checked.mch 17,982,904 +278
coreclr_tests.run.linux.arm.checked.mch 321,240,776 +90
libraries.crossgen2.linux.arm.checked.mch 35,803,568 -72
libraries.pmi.linux.arm.checked.mch 49,871,588 +422
libraries_tests.run.linux.arm.Release.mch 17,138,182 -1,874
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch 93,850,820 +1,366
realworld.run.linux.arm.checked.mch 13,596,898 -216
FullOpts (+306 bytes)
Collection Base size (bytes) Diff size (bytes)
benchmarks.run.linux.arm.checked.mch 13,378,298 +242
benchmarks.run_pgo.linux.arm.checked.mch 19,755,544 +70
benchmarks.run_tiered.linux.arm.checked.mch 10,615,614 +278
coreclr_tests.run.linux.arm.checked.mch 108,805,826 +90
libraries.crossgen2.linux.arm.checked.mch 35,802,338 -72
libraries.pmi.linux.arm.checked.mch 49,765,364 +422
libraries_tests.run.linux.arm.Release.mch 16,541,122 -1,874
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch 83,821,050 +1,366
realworld.run.linux.arm.checked.mch 13,161,826 -216

Assembly diffs for windows/x86 ran on windows/x86

Diffs are based on 1,618,548 contexts (327,626 MinOpts, 1,290,922 FullOpts).

MISSED contexts: base: 11,019 (0.68%), diff: 11,173 (0.69%)

Overall (+13,886 bytes)
Collection Base size (bytes) Diff size (bytes)
benchmarks.run.windows.x86.checked.mch 11,103,861 +238
benchmarks.run_pgo.windows.x86.checked.mch 31,808,217 +711
benchmarks.run_tiered.windows.x86.checked.mch 13,978,666 +134
coreclr_tests.run.windows.x86.checked.mch 215,097,885 +9,143
libraries.crossgen2.windows.x86.checked.mch 35,715,688 +716
libraries.pmi.windows.x86.checked.mch 50,205,777 +942
libraries_tests.run.windows.x86.Release.mch 14,786,707 +442
libraries_tests_no_tiered_compilation.run.windows.x86.Release.mch 107,805,173 +1,341
realworld.run.windows.x86.checked.mch 11,475,105 +219
FullOpts (+13,886 bytes)
Collection Base size (bytes) Diff size (bytes)
benchmarks.run.windows.x86.checked.mch 11,103,383 +238
benchmarks.run_pgo.windows.x86.checked.mch 25,686,269 +711
benchmarks.run_tiered.windows.x86.checked.mch 7,124,029 +134
coreclr_tests.run.windows.x86.checked.mch 92,836,861 +9,143
libraries.crossgen2.windows.x86.checked.mch 35,714,628 +716
libraries.pmi.windows.x86.checked.mch 50,110,544 +942
libraries_tests.run.windows.x86.Release.mch 9,296,512 +442
libraries_tests_no_tiered_compilation.run.windows.x86.Release.mch 98,852,400 +1,341
realworld.run.windows.x86.checked.mch 11,179,391 +219

Details here


Throughput diffs

Throughput diffs for windows/x64 ran on windows/x64

Overall (+0.09% to +0.43%)
Collection PDIFF
aspnet.run.windows.x64.checked.mch +0.25%
benchmarks.run.windows.x64.checked.mch +0.22%
benchmarks.run_pgo.windows.x64.checked.mch +0.43%
benchmarks.run_tiered.windows.x64.checked.mch +0.15%
coreclr_tests.run.windows.x64.checked.mch +0.09%
libraries.crossgen2.windows.x64.checked.mch +0.16%
libraries.pmi.windows.x64.checked.mch +0.14%
libraries_tests.run.windows.x64.Release.mch +0.17%
libraries_tests_no_tiered_compilation.run.windows.x64.Release.mch +0.10%
realworld.run.windows.x64.checked.mch +0.17%
smoke_tests.nativeaot.windows.x64.checked.mch +0.24%
FullOpts (+0.10% to +0.55%)
Collection PDIFF
aspnet.run.windows.x64.checked.mch +0.29%
benchmarks.run.windows.x64.checked.mch +0.22%
benchmarks.run_pgo.windows.x64.checked.mch +0.55%
benchmarks.run_tiered.windows.x64.checked.mch +0.28%
coreclr_tests.run.windows.x64.checked.mch +0.13%
libraries.crossgen2.windows.x64.checked.mch +0.16%
libraries.pmi.windows.x64.checked.mch +0.14%
libraries_tests.run.windows.x64.Release.mch +0.29%
libraries_tests_no_tiered_compilation.run.windows.x64.Release.mch +0.10%
realworld.run.windows.x64.checked.mch +0.17%
smoke_tests.nativeaot.windows.x64.checked.mch +0.24%

Details here


Throughput diffs for linux/arm ran on windows/x86

Overall (+0.04% to +0.32%)
Collection PDIFF
benchmarks.run.linux.arm.checked.mch +0.21%
benchmarks.run_pgo.linux.arm.checked.mch +0.04%
benchmarks.run_tiered.linux.arm.checked.mch +0.21%
coreclr_tests.run.linux.arm.checked.mch +0.11%
libraries.crossgen2.linux.arm.checked.mch +0.15%
libraries.pmi.linux.arm.checked.mch +0.15%
libraries_tests.run.linux.arm.Release.mch +0.32%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch +0.12%
realworld.run.linux.arm.checked.mch +0.25%
FullOpts (+0.04% to +0.32%)
Collection PDIFF
benchmarks.run.linux.arm.checked.mch +0.21%
benchmarks.run_pgo.linux.arm.checked.mch +0.04%
benchmarks.run_tiered.linux.arm.checked.mch +0.25%
coreclr_tests.run.linux.arm.checked.mch +0.19%
libraries.crossgen2.linux.arm.checked.mch +0.15%
libraries.pmi.linux.arm.checked.mch +0.15%
libraries_tests.run.linux.arm.Release.mch +0.32%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch +0.12%
realworld.run.linux.arm.checked.mch +0.25%

Throughput diffs for windows/x86 ran on windows/x86

Overall (+0.10% to +0.29%)
Collection PDIFF
benchmarks.run.windows.x86.checked.mch +0.24%
benchmarks.run_pgo.windows.x86.checked.mch +0.10%
benchmarks.run_tiered.windows.x86.checked.mch +0.27%
coreclr_tests.run.windows.x86.checked.mch +0.13%
libraries.crossgen2.windows.x86.checked.mch +0.18%
libraries.pmi.windows.x86.checked.mch +0.16%
libraries_tests.run.windows.x86.Release.mch +0.29%
libraries_tests_no_tiered_compilation.run.windows.x86.Release.mch +0.12%
realworld.run.windows.x86.checked.mch +0.19%
FullOpts (+0.10% to +0.33%)
Collection PDIFF
benchmarks.run.windows.x86.checked.mch +0.24%
benchmarks.run_pgo.windows.x86.checked.mch +0.10%
benchmarks.run_tiered.windows.x86.checked.mch +0.33%
coreclr_tests.run.windows.x86.checked.mch +0.18%
libraries.crossgen2.windows.x86.checked.mch +0.18%
libraries.pmi.windows.x86.checked.mch +0.16%
libraries_tests.run.windows.x86.Release.mch +0.33%
libraries_tests_no_tiered_compilation.run.windows.x86.Release.mch +0.12%
realworld.run.windows.x86.checked.mch +0.19%

Details here


@jakobbotsch
Copy link
Member Author

Current detailed throughput on benchmarks.run_pgo (which has one of the biggest TP regressions) looks like:

Base: 97028407386, Diff: 97444421217, +0.4288%

30325644 : +8.35%   : 6.25%  : +0.0313% : `Compiler::fgRunDfs<`Compiler::fgComputeDfs'::`2'::<lambda_1>,`Compiler::fgComputeDfs'::`2'::<lambda_2>,`Compiler::fgComputeDfs'::`2'::<lambda_3> >'::`2'::<lambda_1>::operator()                                                                                                                                                                                                                                      
29399635 : +11.02%  : 6.06%  : +0.0303% : public: static class BlockReachabilitySets * __cdecl BlockReachabilitySets::Build(class FlowGraphDfsTree *)                                                                                                                                                                                                                                                                                                            
26004409 : +8.19%   : 5.36%  : +0.0268% : private: void __cdecl SsaBuilder::ComputeIteratedDominanceFrontier(struct BasicBlock *, class JitHashTable<struct BasicBlock *, struct JitPtrKeyFuncs<struct BasicBlock>, class jitstd::vector<struct BasicBlock *, class jitstd::allocator<struct BasicBlock *>>, class CompAllocator, class JitHashTableBehavior> const *, class jitstd::vector<struct BasicBlock *, class jitstd::allocator<struct BasicBlock *>> *)
25847460 : +8.79%   : 5.33%  : +0.0266% : public: static class FlowGraphDominatorTree * __cdecl FlowGraphDominatorTree::Build(class FlowGraphDfsTree const *)                                                                                                                                                                                                                                                                                                    
20586307 : +1.37%   : 4.25%  : +0.0212% : private: bool __cdecl LiveVarAnalysis::PerBlockAnalysis(struct BasicBlock *, bool, bool)                                                                                                                                                                                                                                                                                                                               
15109730 : +0.68%   : 3.12%  : +0.0156% : public: void * __cdecl ArenaAllocator::allocateMemory(unsigned __int64)                                                                                                                                                                                                                                                                                                                                                
15029836 : NA       : 3.10%  : +0.0155% : public: bool __cdecl Compiler::optCanonicalizeExit(class FlowGraphNaturalLoop *, struct BasicBlock *)                                                                                                                                                                                                                                                                                                                  
13364811 : +11.53%  : 2.76%  : +0.0138% : public: static class FlowGraphNaturalLoops * __cdecl FlowGraphNaturalLoops::Find(class FlowGraphDfsTree const *)                                                                                                                                                                                                                                                                                                       
10774676 : +11.78%  : 2.22%  : +0.0111% : public: struct FlowEdge * __cdecl Compiler::fgAddRefPred<0>(struct BasicBlock *, struct BasicBlock *, struct FlowEdge *)                                                                                                                                                                                                                                                                                               
9910264  : +1.31%   : 2.04%  : +0.0102% : memset                                                                                                                                                                                                                                                                                                                                                                                                                 
9424309  : +17.94%  : 1.94%  : +0.0097% : public: bool __cdecl FlowGraphNaturalLoop::ContainsBlock(struct BasicBlock *)                                                                                                                                                                                                                                                                                                                                          
9337439  : +8.19%   : 1.93%  : +0.0096% : BasicBlock::VisitAllSuccs<`AllSuccessorEnumerator::AllSuccessorEnumerator'::`2'::<lambda_1> >                                                                                                                                                                                                                                                                                                                          
8249103  : +3.15%   : 1.70%  : +0.0085% : public: virtual enum PhaseStatus __cdecl LinearScan::doLinearScan(void)                                                                                                                                                                                                                                                                                                                                                
8209161  : +6.61%   : 1.69%  : +0.0085% : public: void __cdecl Compiler::fgCompactBlocks(struct BasicBlock *, struct BasicBlock *)                                                                                                                                                                                                                                                                                                                               
7489193  : +4.54%   : 1.54%  : +0.0077% : public: void __cdecl Compiler::optImpliedByTypeOfAssertions(unsigned __int64 *&)                                                                                                                                                                                                                                                                                                                                       
7434216  : +11.80%  : 1.53%  : +0.0077% : public: struct FlowEdge * __cdecl Compiler::fgRemoveRefPred(struct BasicBlock *, struct BasicBlock *)                                                                                                                                                                                                                                                                                                                  
6934584  : +8.68%   : 1.43%  : +0.0071% : private: static bool __cdecl FlowGraphNaturalLoops::FindNaturalLoopBlocks(class FlowGraphNaturalLoop *, class ArrayStack<struct BasicBlock *> &)                                                                                                                                                                                                                                                                       
5724310  : +3.53%   : 1.18%  : +0.0059% : private: void __cdecl SsaBuilder::InsertPhiFunctions(void)                                                                                                                                                                                                                                                                                                                                                             
5204044  : +4.10%   : 1.07%  : +0.0054% : BasicBlock::VisitAllSuccs<`Compiler::optReachable'::`12'::<lambda_1> >                                                                                                                                                                                                                                                                                                                                                 
5194162  : +3.78%   : 1.07%  : +0.0054% : `Compiler::optReachable'::`12'::<lambda_1>::operator()                                                                                                                                                                                                                                                                                                                                                                 
5005719  : NA       : 1.03%  : +0.0052% : public: double __cdecl Compiler::optEstimateEdgeLikelihood(struct BasicBlock *, struct BasicBlock *, bool *)                                                                                                                                                                                                                                                                                                           
4781029  : +72.14%  : 0.99%  : +0.0049% : public: void __cdecl Compiler::fgReplaceJumpTarget(struct BasicBlock *, struct BasicBlock *, struct BasicBlock *)                                                                                                                                                                                                                                                                                                      
4739874  : +9.76%   : 0.98%  : +0.0049% : public: struct FlowEdge * __cdecl Compiler::BlockDominancePreds(struct BasicBlock *)                                                                                                                                                                                                                                                                                                                                   
4657517  : NA       : 0.96%  : +0.0048% : public: bool __cdecl Compiler::optCanonicalizeExits(class FlowGraphNaturalLoop *)                                                                                                                                                                                                                                                                                                                                      
4515950  : +2.63%   : 0.93%  : +0.0047% : public: void __cdecl BasicBlock::ensurePredListOrder(class Compiler *)                                                                                                                                                                                                                                                                                                                                                 
4455957  : +5.95%   : 0.92%  : +0.0046% : private: bool __cdecl jitstd::vector<struct BasicBlock *, class jitstd::allocator<struct BasicBlock *>>::ensure_capacity(unsigned __int64)                                                                                                                                                                                                                                                                             
4303713  : +1.67%   : 0.89%  : +0.0044% : private: void __cdecl SsaBuilder::BlockRenameVariables(struct BasicBlock *)                                                                                                                                                                                                                                                                                                                                            
4195084  : +5.40%   : 0.87%  : +0.0043% : public: enum BasicBlockVisit __cdecl BasicBlock::VisitRegularSuccs<class `public: void __cdecl DataFlow::ForwardAnalysis<class CSE_DataFlow>(class CSE_DataFlow &)'::`16'::<lambda_1>>(class Compiler *, class `public: void __cdecl DataFlow::ForwardAnalysis<class CSE_DataFlow>(class CSE_DataFlow &)'::`16'::<lambda_1>)                                                                                           
3822670  : +1.40%   : 0.79%  : +0.0039% : public: static void __cdecl BitSetOps<unsigned __int64 *, 1, class Compiler *, class TrackedVarBitSetTraits>::ClearD(class Compiler *, unsigned __int64 *&)                                                                                                                                                                                                                                                            
3816270  : +8.32%   : 0.79%  : +0.0039% : VisitEHSuccs<0,`AllSuccessorEnumerator::AllSuccessorEnumerator'::`2'::<lambda_1> >                                                                                                                                                                                                                                                                                                                                     
3801464  : +3.92%   : 0.78%  : +0.0039% : public: static void __cdecl BitSetOps<unsigned __int64 *, 1, struct BitVecTraits *, struct BitVecTraits>::Assign(struct BitVecTraits *, unsigned __int64 *&, unsigned __int64 *)                                                                                                                                                                                                                                       
3698187  : +1.59%   : 0.76%  : +0.0038% : public: void __cdecl Compiler::fgValueNumberBlock(struct BasicBlock *)                                                                                                                                                                                                                                                                                                                                                 
3606886  : +0.98%   : 0.74%  : +0.0037% : public: static void __cdecl BitSetOps<unsigned __int64 *, 1, class Compiler *, class TrackedVarBitSetTraits>::UnionD(class Compiler *, unsigned __int64 *&, unsigned __int64 *)                                                                                                                                                                                                                                        
3485781  : +7.52%   : 0.72%  : +0.0036% : BasicBlock::VisitRegularSuccs<``FlowGraphNaturalLoops::Find'::`7'::<lambda_1>::operator()'::`2'::<lambda_1> >                                                                                                                                                                                                                                                                                                          
3426035  : +1.91%   : 0.71%  : +0.0035% : public: void __cdecl DataFlow::ForwardAnalysis<class AssertionPropFlowCallback>(class AssertionPropFlowCallback &)                                                                                                                                                                                                                                                                                                     
3272310  : +0.35%   : 0.67%  : +0.0034% : public: bool __cdecl Compiler::fgUpdateFlowGraph(bool, bool)                                                                                                                                                                                                                                                                                                                                                           
3202086  : +0.61%   : 0.66%  : +0.0033% : public: void __cdecl Compiler::fgPerBlockLocalVarLiveness(void)                                                                                                                                                                                                                                                                                                                                                        
3147900  : +4.39%   : 0.65%  : +0.0032% : VisitEHSuccs<0,`Compiler::optReachable'::`12'::<lambda_1> >                                                                                                                                                                                                                                                                                                                                                            
3036441  : +1.36%   : 0.63%  : +0.0031% : private: void __cdecl LiveVarAnalysis::Run(bool)                                                                                                                                                                                                                                                                                                                                                                       
2892124  : +4.60%   : 0.60%  : +0.0030% : public: unsigned __int64 ** __cdecl Compiler::optInitAssertionDataflowFlags(void)                                                                                                                                                                                                                                                                                                                                      
2723427  : +4.18%   : 0.56%  : +0.0028% : public: bool __cdecl Compiler::optReachable(struct BasicBlock *const, struct BasicBlock *const, struct BasicBlock *const)                                                                                                                                                                                                                                                                                              
2708291  : +0.78%   : 0.56%  : +0.0028% : public: void __cdecl ArrayStack<struct GenTree *>::Push(struct GenTree *)                                                                                                                                                                                                                                                                                                                                              
2694774  : +0.83%   : 0.56%  : +0.0028% : public: static void __cdecl BitSetOps<unsigned __int64 *, 1, class Compiler *, class TrackedVarBitSetTraits>::Assign(class Compiler *, unsigned __int64 *&, unsigned __int64 *)                                                                                                                                                                                                                                        
2607088  : +1.30%   : 0.54%  : +0.0027% : public: void __cdecl RangeCheck::MergeEdgeAssertions(unsigned int, unsigned __int64 *const &, struct Range *)                                                                                                                                                                                                                                                                                                          
2557973  : +1.69%   : 0.53%  : +0.0026% : public: static struct BasicBlock * __cdecl BasicBlock::New(class Compiler *)                                                                                                                                                                                                                                                                                                                                           
2512966  : +3.22%   : 0.52%  : +0.0026% : public: enum PhaseStatus __cdecl Compiler::fgValueNumber(void)                                                                                                                                                                                                                                                                                                                                                         
2480155  : +4.94%   : 0.51%  : +0.0026% : private: static void __cdecl BitSetOps<unsigned __int64 *, 1, struct BitVecTraits *, struct BitVecTraits>::DataFlowDLong(struct BitVecTraits *, unsigned __int64 *&, unsigned __int64 *const, unsigned __int64 *const)                                                                                                                                                                                                 
2476801  : +2.19%   : 0.51%  : +0.0026% : public: void __cdecl DataFlow::ForwardAnalysis<class CSE_DataFlow>(class CSE_DataFlow &)                                                                                                                                                                                                                                                                                                                               
2384405  : +5.83%   : 0.49%  : +0.0025% : public: struct FlowEdge * __cdecl Compiler::BlockPredsWithEH(struct BasicBlock *)                                                                                                                                                                                                                                                                                                                                      
2370665  : +2.11%   : 0.49%  : +0.0024% : private: void __cdecl SsaBuilder::ComputeDominanceFrontiers(struct BasicBlock **, int, class JitHashTable<struct BasicBlock *, struct JitPtrKeyFuncs<struct BasicBlock>, class jitstd::vector<struct BasicBlock *, class jitstd::allocator<struct BasicBlock *>>, class CompAllocator, class JitHashTableBehavior> *)                                                                                                  
2327029  : +1.31%   : 0.48%  : +0.0024% : private: static void __cdecl BitSetOps<unsigned __int64 *, 1, class Compiler *, class TrackedVarBitSetTraits>::LivenessDLong(class Compiler *, unsigned __int64 *&, unsigned __int64 *const, unsigned __int64 *const, unsigned __int64 *const)                                                                                                                                                                         
2253101  : +0.72%   : 0.46%  : +0.0023% : public: enum PhaseStatus __cdecl Compiler::optAssertionPropMain(void)                                                                                                                                                                                                                                                                                                                                                  
2117591  : +0.46%   : 0.44%  : +0.0022% : public: void __cdecl Compiler::fgInterBlockLocalVarLiveness(void)                                                                                                                                                                                                                                                                                                                                                      
2052538  : +7.86%   : 0.42%  : +0.0021% : public: static unsigned __int64 * __cdecl BitSetOps<unsigned __int64 *, 1, class Compiler *, class TrackedVarBitSetTraits>::MakeEmpty(class Compiler *)                                                                                                                                                                                                                                                                
2001861  : +3.09%   : 0.41%  : +0.0021% : protected: void __cdecl Compiler::optValnumCSE_InitDataFlow(void)                                                                                                                                                                                                                                                                                                                                                      
1907864  : +2.24%   : 0.39%  : +0.0020% : private: void __cdecl SsaBuilder::RenameVariables(void)                                                                                                                                                                                                                                                                                                                                                                
1879814  : +1.85%   : 0.39%  : +0.0019% : `SsaBuilder::AddPhiArgsToSuccessors'::`2'::<lambda_1>::operator()                                                                                                                                                                                                                                                                                                                                                      
1845748  : +2.31%   : 0.38%  : +0.0019% : public: bool __cdecl Compiler::fgHasCycleWithoutGCSafePoint(void)                                                                                                                                                                                                                                                                                                                                                      
1808558  : +1.36%   : 0.37%  : +0.0019% : public: bool __cdecl Compiler::fgCanCompactBlocks(struct BasicBlock *, struct BasicBlock *)                                                                                                                                                                                                                                                                                                                            
1806120  : +216.39% : 0.37%  : +0.0019% : public: struct BasicBlock * __cdecl Compiler::fgNewBBbefore(enum BBKinds, struct BasicBlock *, bool, struct BasicBlock *)                                                                                                                                                                                                                                                                                              
1771031  : +3.61%   : 0.37%  : +0.0018% : public: void __cdecl jitstd::vector<struct FlowEdge *, class jitstd::allocator<struct FlowEdge *>>::push_back(struct FlowEdge *const &)                                                                                                                                                                                                                                                                                
1718771  : +1.05%   : 0.35%  : +0.0018% : public: void __cdecl Compiler::fgInitBlockVarSets(void)                                                                                                                                                                                                                                                                                                                                                                
1716876  : +4.06%   : 0.35%  : +0.0018% : BasicBlock::VisitAllSuccs<`SsaBuilder::AddPhiArgsToSuccessors'::`2'::<lambda_1> >                                                                                                                                                                                                                                                                                                                                      
1703289  : NA       : 0.35%  : +0.0018% : public: bool __cdecl Compiler::optCanonicalizeLoops(void)                                                                                                                                                                                                                                                                                                                                                              
1695760  : +5.76%   : 0.35%  : +0.0017% : public: static void __cdecl BitSetOps<unsigned __int64 *, 1, struct BitVecTraits *, struct BitVecTraits>::ClearD(struct BitVecTraits *, unsigned __int64 *&)                                                                                                                                                                                                                                                           
1549927  : +1.83%   : 0.32%  : +0.0016% : public: bool __cdecl Compiler::fgRenumberBlocks(void)                                                                                                                                                                                                                                                                                                                                                                  
1502424  : +0.55%   : 0.31%  : +0.0015% : public: bool __cdecl Compiler::optBlockCopyProp(struct BasicBlock *, class JitHashTable<unsigned int, struct JitSmallPrimitiveKeyFuncs<unsigned int>, class ArrayStack<class Compiler::CopyPropSsaDef> *, class CompAllocator, class JitHashTableBehavior> *)                                                                                                                                                          
1497554  : +1.20%   : 0.31%  : +0.0015% : public: unsigned __int64 ** __cdecl Compiler::optComputeAssertionGen(void)                                                                                                                                                                                                                                                                                                                                             
1457410  : +2.81%   : 0.30%  : +0.0015% : VisitEHSuccs<0,`Compiler::fgAddHandlerLiveVars'::`2'::<lambda_1> >                                                                                                                                                                                                                                                                                                                                                     
1431654  : +1.25%   : 0.30%  : +0.0015% : public: unsigned int __cdecl ValueNumStore::VNForMapSelectWork(enum ValueNumKind, enum var_types, unsigned int, unsigned int, int *, bool *, class SmallValueNumSet &)                                                                                                                                                                                                                                                 
1404833  : +0.95%   : 0.29%  : +0.0014% : public: enum PhaseStatus __cdecl Compiler::optVnCopyProp(void)                                                                                                                                                                                                                                                                                                                                                         
1340214  : +1.01%   : 0.28%  : +0.0014% : public: struct BasicBlock * __cdecl Compiler::fgFindInsertPoint(unsigned int, bool, struct BasicBlock *, struct BasicBlock *, struct BasicBlock *, struct BasicBlock *, bool)                                                                                                                                                                                                                                          
1252790  : +215.07% : 0.26%  : +0.0013% : public: void __cdecl Compiler::fgExtendEHRegionBefore(struct BasicBlock *)                                                                                                                                                                                                                                                                                                                                             
1110922  : +4.38%   : 0.23%  : +0.0011% : VisitEHSuccs<0,`SsaBuilder::AddPhiArgsToSuccessors'::`2'::<lambda_1> >                                                                                                                                                                                                                                                                                                                                                 
1064221  : NA       : 0.22%  : +0.0011% : BasicBlock::VisitRegularSuccs<`Compiler::optEstimateEdgeLikelihood'::`11'::<lambda_2> >                                                                                                                                                                                                                                                                                                                                
1045442  : +2.06%   : 0.22%  : +0.0011% : public: unsigned int __cdecl BasicBlock::NumSucc(void) const                                                                                                                                                                                                                                                                                                                                                           
982656   : +623.63% : 0.20%  : +0.0010% : public: static bool __cdecl Compiler::fgProfileWeightsConsistent(double, double)                                                                                                                                                                                                                                                                                                                                       
981072   : +1.81%   : 0.20%  : +0.0010% : public: void __cdecl Compiler::lvaMarkLocalVars(struct BasicBlock *, bool)                                                                                                                                                                                                                                                                                                                                             
960577   : +1.94%   : 0.20%  : +0.0010% : public: unsigned int __cdecl ValueNumStore::VNForFunc(enum var_types, enum VNFunc, unsigned int, unsigned int, unsigned int)                                                                                                                                                                                                                                                                                           
866074   : +3.18%   : 0.18%  : +0.0009% : private: void __cdecl JitHashTable<struct BasicBlock *, struct JitPtrKeyFuncs<struct BasicBlock>, struct FlowEdge *, class CompAllocator, class JitHashTableBehavior>::Grow(void)                                                                                                                                                                                                                                      
824600   : +0.19%   : 0.17%  : +0.0008% : protected: static enum Compiler::fgWalkResult __cdecl Compiler::optVNAssertionPropCurStmtVisitor(struct GenTree **, struct Compiler::fgWalkData *)                                                                                                                                                                                                                                                                     
800285   : +0.15%   : 0.17%  : +0.0008% : public: void __cdecl Compiler::optAssertionGen(struct GenTree *)                                                                                                                                                                                                                                                                                                                                                       
781361   : +3.05%   : 0.16%  : +0.0008% : public: enum PhaseStatus __cdecl Compiler::optRedundantBranches(void)                                                                                                                                                                                                                                                                                                                                                  
744362   : +9.51%   : 0.15%  : +0.0008% : public: void __cdecl ValueNumStore::GetCompareCheckedBound(unsigned int, struct ValueNumStore::CompareCheckedBoundArithInfo *)                                                                                                                                                                                                                                                                                         
715014   : +0.21%   : 0.15%  : +0.0007% : public: enum Compiler::fgWalkResult __cdecl GenTreeVisitor<class GenericTreeWalker<0, 1, 0, 1>>::WalkTree(struct GenTree **, struct GenTree *)                                                                                                                                                                                                                                                                         
688709   : +0.43%   : 0.14%  : +0.0007% : protected: void __cdecl Compiler::optValnumCSE_Availability(void)                                                                                                                                                                                                                                                                                                                                                      
665899   : +6.19%   : 0.14%  : +0.0007% : public: struct BasicBlock * __cdecl Compiler::fgRemoveBlock(struct BasicBlock *, bool)                                                                                                                                                                                                                                                                                                                                 
653562   : +2.14%   : 0.13%  : +0.0007% : public: __cdecl GCSafePointSuccessorEnumerator::GCSafePointSuccessorEnumerator(class Compiler *, struct BasicBlock *)                                                                                                                                                                                                                                                                                                  
644460   : +0.22%   : 0.13%  : +0.0007% : private: struct ValueNumStore::Chunk * __cdecl ValueNumStore::GetAllocChunk(enum var_types, enum ValueNumStore::ChunkExtraAttribs)                                                                                                                                                                                                                                                                                     
629868   : +0.17%   : 0.13%  : +0.0006% : __security_check_cookie                                                                                                                                                                                                                                                                                                                                                                                                
605278   : +0.74%   : 0.12%  : +0.0006% : private: unsigned int __cdecl ValueNumStore::VnForConst<int, class ValueNumStore::VNMap<int, struct JitLargePrimitiveKeyFuncs<int>>>(int, class ValueNumStore::VNMap<int, struct JitLargePrimitiveKeyFuncs<int>> *, enum var_types)                                                                                                                                                                                    
593362   : +12.58%  : 0.12%  : +0.0006% : public: bool __cdecl Compiler::fgOptimizeBranchToEmptyUnconditional(struct BasicBlock *, struct BasicBlock *)                                                                                                                                                                                                                                                                                                          
574772   : +0.87%   : 0.12%  : +0.0006% : private: void __cdecl Compiler::optComputeLoopSideEffectsOfBlock(struct BasicBlock *, class FlowGraphNaturalLoop *)                                                                                                                                                                                                                                                                                                    
560695   : +5.14%   : 0.12%  : +0.0006% : public: static void __cdecl BitSetOps<unsigned __int64 *, 1, class Compiler *, class TrackedVarBitSetTraits>::AssignAllowUninitRhs(class Compiler *, unsigned __int64 *&, unsigned __int64 *)                                                                                                                                                                                                                          
553860   : NA       : 0.11%  : +0.0006% : public: void __cdecl Compiler::fgSetEHRegionForNewPreheaderOrExit(struct BasicBlock *)                                                                                                                                                                                                                                                                                                                                 
551370   : +2.30%   : 0.11%  : +0.0006% : public: bool __cdecl ValueNumStore::IsVNCheckedBound(unsigned int)                                                                                                                                                                                                                                                                                                                                                     
514459   : +4.06%   : 0.11%  : +0.0005% : private: void __cdecl JitHashTable<struct ValueNumStore::VNDefFuncApp<3>, struct ValueNumStore::VNDefFuncAppKeyFuncs<3>, unsigned int, class CompAllocator, class JitHashTableBehavior>::Grow(void)                                                                                                                                                                                                                    
509557   : +0.45%   : 0.11%  : +0.0005% : public: enum PhaseStatus __cdecl Compiler::rangeCheckPhase(void)                                                                                                                                                                                                                                                                                                                                                       
501918   : +1.17%   : 0.10%  : +0.0005% : public: bool __cdecl BasicBlock::isEmpty(void) const                                                                                                                                                                                                                                                                                                                                                                   
-491825  : -0.07%   : 0.10%  : -0.0005% : GenTreeVisitor<`Compiler::fgSetTreeSeq'::`2'::SetTreeSeqVisitor>::WalkTree                                                                                                                                                                                                                                                                                                                                             
-563351  : -0.04%   : 0.12%  : -0.0006% : public: unsigned __int64 __cdecl LinearScan::RegisterSelection::select<0>(class Interval *, class RefPosition *)                                                                                                                                                                                                                                                                                                       
-585906  : -4.62%   : 0.12%  : -0.0006% : protected: void __cdecl Compiler::optScaleLoopBlocks(struct BasicBlock *, struct BasicBlock *)                                                                                                                                                                                                                                                                                                                         
-600065  : -4.01%   : 0.12%  : -0.0006% : public: struct BasicBlock * __cdecl Compiler::fgConnectFallThrough(struct BasicBlock *, struct BasicBlock *)                                                                                                                                                                                                                                                                                                           
-642350  : -0.08%   : 0.13%  : -0.0007% : protected: void __cdecl CodeGen::genCodeForBBlist(void)                                                                                                                                                                                                                                                                                                                                                                
-946757  : -0.77%   : 0.20%  : -0.0010% : private: void __cdecl emitter::emitJumpDistBind(void)                                                                                                                                                                                                                                                                                                                                                                  
-982836  : -3.11%   : 0.20%  : -0.0010% : public: bool __cdecl BasicBlock::bbFallsThrough(void) const                                                                                                                                                                                                                                                                                                                                                            
-1067015 : -0.07%   : 0.22%  : -0.0011% : public: unsigned int __cdecl Compiler::gtSetEvalOrder(struct GenTree *)                                                                                                                                                                                                                                                                                                                                                
-1295538 : -0.84%   : 0.27%  : -0.0013% : public: static void __cdecl BitSetOps<unsigned __int64 *, 1, struct BitVecTraits *, struct BitVecTraits>::IntersectionD(struct BitVecTraits *, unsigned __int64 *&, unsigned __int64 *)                                                                                                                                                                                                                                
-3237389 : -0.25%   : 0.67%  : -0.0033% : private: void __cdecl LinearScan::processBlockStartLocations(struct BasicBlock *)                                                                                                                                                                                                                                                                                                                                      
-5147072 : -1.59%   : 1.06%  : -0.0053% : public: bool __cdecl Compiler::fgReorderBlocks(bool)                                                                                                                                                                                                                                                                                                                                                                   
-9839750 : -3.24%   : 2.03%  : -0.0101% : public: enum PhaseStatus __cdecl Compiler::fgComputeEdgeWeights(void)                                                                                                                                                                                                                                                                                                                                                  

I don't think there is much we can do here, this mostly just seems like innate cost of creating more blocks. So probably just going to have to live with the fact that it will eat into some of the TP improvements we got from all the DFS/dominator/loop work.

@jakobbotsch jakobbotsch marked this pull request as ready for review February 9, 2024 20:47
@jakobbotsch
Copy link
Member Author

cc @dotnet/jit-contrib PTAL @AndyAyersMS

Diffs. A bit of churn from flow graph opts as is to be expected when new blocks with new weights are introduced. I hope with future FG opts work we'll get to a point where introduction of no-op blocks like this would be more or less free from diffs.

I'll also give Bruce a chance to review when he's back next week before I merge this.

There is an alternative which is to create these canonical exits on-demand during IV widening. It would presumably get rid of essentially all of the TP regression. However, I think that gets quite messy as we eventually saw with preheaders that used to have the same on-demand strategy but now are created eagerly.

Comment on lines +2976 to +2981
if (optCanonicalizeLoops())
{
fgInvalidateDfsTree();
m_dfsTree = fgComputeDfs();
m_loops = FlowGraphNaturalLoops::Find(m_dfsTree);
}
Copy link
Member Author

@jakobbotsch jakobbotsch Feb 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe one way to improve TP slightly would be to canonicalize exits as part of loop cloning so that we don't have to reinvoke canonicalization here. I might look into what this would save, but I would expect not that much since we're only paying here in cases where we actually did do loop cloning.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These costs are likely dwarfed by the cost of cloning, so if we improve the cloning heuristics (which I assume will mean cloning fewer big loops) we should come out ahead.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like it wouldn't be hard for cloning to also clone all its exit blocks?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would work to clone the exits, although at the tradeoff of duplicating even more IR. Not sure whether that's worth it.

@jakobbotsch
Copy link
Member Author

PTAL @BruceForstall

@AndyAyersMS
Copy link
Member

We could also have a stronger property, namely that all loop exits have only a single predecessor.

We may want this eventually if we start trying to materialize last values -- for multi-exit loops you may need different expressions, depending on the relationship of the exit to the in-loop updates.

Copy link
Member

@AndyAyersMS AndyAyersMS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes LGTM

Comment on lines +2976 to +2981
if (optCanonicalizeLoops())
{
fgInvalidateDfsTree();
m_dfsTree = fgComputeDfs();
m_loops = FlowGraphNaturalLoops::Find(m_dfsTree);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These costs are likely dwarfed by the cost of cloning, so if we improve the cloning heuristics (which I assume will mean cloning fewer big loops) we should come out ahead.

// Returns:
// Estimated likelihood of the edge being taken.
//
weight_t Compiler::optEstimateEdgeLikelihood(BasicBlock* from, BasicBlock* to, bool* fromProfile)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it will become much simpler as you can just query the edge.

@jakobbotsch jakobbotsch merged commit d464313 into dotnet:main Feb 14, 2024
126 of 129 checks passed
@jakobbotsch jakobbotsch deleted the canonicalize-loop-exits branch February 14, 2024 08:50
Comment on lines +2976 to +2981
if (optCanonicalizeLoops())
{
fgInvalidateDfsTree();
m_dfsTree = fgComputeDfs();
m_loops = FlowGraphNaturalLoops::Find(m_dfsTree);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like it wouldn't be hard for cloning to also clone all its exit blocks?

Comment on lines +1322 to +1327
if (optCanonicalizeLoops())
{
fgInvalidateDfsTree();
m_dfsTree = fgComputeDfs();
m_loops = FlowGraphNaturalLoops::Find(m_dfsTree);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this necessary for unrolling? If we've fully unrolled a loop, then the exit blocks are no longer unique (they have N preds for N unrolls), but there is no loop left. Presumably all the other loops haven't changed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Loop unrolling does not necessarily remove the loop; if the loop has multiple backedges then it remains a natural loop after redirecting the loop test backedge.

// predecessors.
//
// Parameters:
// loop - The loop
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing exit param

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will fix as part of a follow up

@github-actions github-actions bot locked and limited conversation to collaborators Mar 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants