Skip to content

JIT: Recompute test block weights after loop inversion - #112197

Merged
amanasifkhalid merged 1 commit into
dotnet:mainfrom
amanasifkhalid:profile-consistency-loop-inversion
Feb 6, 2025
Merged

amanasifkhalid merged 1 commit into
dotnet:mainfrom
amanasifkhalid:profile-consistency-loop-inversion

Conversation

@amanasifkhalid

Copy link
Copy Markdown
Contributor

Fixes #112196.

@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Feb 5, 2025
@amanasifkhalid

Copy link
Copy Markdown
Contributor Author

/azp run runtime-coreclr libraries-pgo

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@amanasifkhalid

Copy link
Copy Markdown
Contributor Author

Diffs show more churn than I expected. I'm seeing quite a few OSR methods where loop inversion changed flow into the OSR entry block, but profile consistency checks didn't flag anything because OSR blocks are excluded from analysis. We now seem to be getting it right in more cases; for example, in LinqBenchmarks:GroupBy00LinqMethodX(), we go from this:

BB19 [0023]  2       BB17,BB18           167.07 167 [039..03D)-> BB20(1)                 (always)                     i IBC hascall gcsafe bwd
BB20 [0004]  1       BB19                165.39 165 [03D..045)-> BB05(0.994),BB21(0.00595)   ( cond )                     i IBC bwd bwd-src osr-entry

to this:

BB19 [0023]  2       BB17,BB18           167.07 167 [039..03D)-> BB20(1)                 (always)                     i IBC hascall gcsafe bwd
BB20 [0004]  1       BB19                167.07 167 [03D..045)-> BB05(0.994),BB21(0.00595)   ( cond )                     i IBC bwd bwd-src osr-entry

@amanasifkhalid
amanasifkhalid marked this pull request as ready for review February 5, 2025 20:02
@amanasifkhalid

amanasifkhalid commented Feb 5, 2025 •

Copy link
Copy Markdown
Contributor Author

cc @dotnet/jit-contrib, @AndyAyersMS PTAL. libraries-pgo isn't hitting profile consistency asserts anymore. Looks like SPMI hit an infra issue on win-x64. Thanks!

@amanasifkhalid

Copy link
Copy Markdown
Contributor Author

ping @dotnet/jit-contrib

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.

JIT: Assertion failed '!"Inconsistent profile data"' in System.Text.Json.Tests with random GDV

2 participants