Skip to content

Update logic around BB_MAX_WEIGHT#51027

Merged
AndyAyersMS merged 1 commit intodotnet:mainfrom
AndyAyersMS:FixMaxProfileWeight
Apr 10, 2021
Merged

Update logic around BB_MAX_WEIGHT#51027
AndyAyersMS merged 1 commit intodotnet:mainfrom
AndyAyersMS:FixMaxProfileWeight

Conversation

@AndyAyersMS
Copy link
Member

Consider any weight greater or equal to be a max weight. Rule of thumb
is that you can assign BB_MAX_WEIGHT but for comparsions one should always
use an inequality or call the helper method.

Fixes #50808.

Consider any weight greater or equal to be a max weight. Rule of thumb
is that you can assign BB_MAX_WEIGHT but for comparsions one should always
use an inequality or call the helper method.

Fixes dotnet#50808.
@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Apr 9, 2021
@AndyAyersMS
Copy link
Member Author

No SPMI diffs (looks like asp.net collection needs an update, I'll work on that).

cc @dotnet/jit-contrib

Copy link
Contributor

@BruceForstall BruceForstall left a comment

Choose a reason for hiding this comment

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

How does this change anything if BB_MAX_WEIGHT is FLT_MAX? Is there anything greater? Does +infinity compare greater, and calculations saturate to +infinity?

@AndyAyersMS
Copy link
Member Author

Yes, FLT_MAX is the largest non-infinite value, and things saturate at infinity and it compares larger than FLT_MAX.

We might want to set the maximum value lower; the largest we'll ever see from real PGO is maybe 10^12 or so.

@AndyAyersMS
Copy link
Member Author

Innerloop failure:

We stopped hearing from agent Azure Pipelines 58....

@AndyAyersMS AndyAyersMS merged commit 9b647fe into dotnet:main Apr 10, 2021
@AndyAyersMS AndyAyersMS deleted the FixMaxProfileWeight branch April 10, 2021 16:16
@JulieLeeMSFT JulieLeeMSFT added this to the 6.0.0 milestone Apr 15, 2021
@ghost ghost locked as resolved and limited conversation to collaborators May 15, 2021
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: improve handling of extremely large profile weights

3 participants