JIT: Compute fgCalledCount after synthesis#112041
Merged
amanasifkhalid merged 1 commit intodotnet:mainfrom Feb 1, 2025
Merged
Conversation
Contributor
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
6 tasks
jakobbotsch
approved these changes
Jan 31, 2025
Member
jakobbotsch
left a comment
There was a problem hiding this comment.
Nice! I had way larger diffs. Not sure what I was doing wrong.
Contributor
Author
I think #110693 just had to account for the entry block being different from cc @dotnet/jit-contrib. Diffs. Build Analysis caught the "no module named 'requests'" failure in Linux-arm64 CI, but it didn't flag it as a known error... |
Contributor
Author
|
/ba-g blocked by dotnet/dnceng#4892. |
grendello
added a commit
to grendello/runtime
that referenced
this pull request
Feb 3, 2025
* main: System.Net.Http.WinHttpHandler.StartRequestAsync assertion failed (dotnet#109799) Keep test PDB in helix payload for native AOT (dotnet#111949) Build the RID-specific System.IO.Ports packages in the VMR (dotnet#112054) Always inline number conversions (dotnet#112061) Use Contains{Any} in Regex source generator (dotnet#112065) Update dependencies from https://github.com/dotnet/arcade build 20250130.5 (dotnet#112013) JIT: Transform single-reg args to FIELD_LIST in physical promotion (dotnet#111590) Ensure that math calls into the CRT are tracked as needing vzeroupper (dotnet#112011) Use double.ConvertToIntegerNative where safe to do in System.Random (dotnet#112046) JIT: Compute `fgCalledCount` after synthesis (dotnet#112041) Simplify boolean logic in `TimeZoneInfo` (dotnet#112062) JIT: Update type when return temp is freshly created (dotnet#111948) Remove unused build controls and simplify DotNetBuild.props (dotnet#111986) Fix case-insensitive JSON deserialization of enum member names (dotnet#112028) WasmAppBuilder: Remove double computation of a value (dotnet#112047) Disable LTCG for brotli and zlibng. (dotnet#111805) JIT: Improve x86 unsigned to floating cast codegen (dotnet#111595) simplify x86 special intrinsic imports (dotnet#111836) JIT: Try to retain entry weight during profile synthesis (dotnet#111971) Fix explicit offset of ByRefLike fields. (dotnet#111584)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #107749. Follow-up to #111971 and #110693. For methods without profile data, ensure the default call count is available throughout compilation (this had no diffs for me locally). For methods with profile data, compute the call count after synthesis runs to ensure it is available early, and reasonably accurate.
I'm only seeing diffs in OSR methods locally, due to the logic in
fgFixEntryFlowForOSR(which runs right after profile incorporation) no longer affectingfgCalledCount. This method guesses that the loop iterates about 100x the method call count, and scales the method entry block's weight down accordingly. This gives the impression later on thatfgCalledCountis much lower than what we calculated usingfgEntryBB.The actual diffs seem to manifest largely in LSRA, which uses
fgCalledCountto normalize block weights, though there are a few other phases that useBasicBlock::getBBWeightin lieu of the raw weight as well. I think we ought to consolidate our block weight strategy at some point, especially if we have newfound faith infgCalledCount. For example, instead of this check in if conversion:Perhaps we could do:
But that's for another PR.