Skip to content

Conversation

@amanasifkhalid
Copy link
Contributor

Fixes #109984.

@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Nov 21, 2024
//
// Returns:
// The region's layout cost
// The region's layout cost, or 'BB_MAX_WEIGHT' for pathalogically costly layouts
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// The region's layout cost, or 'BB_MAX_WEIGHT' for pathalogically costly layouts
// The region's layout cost, or 'BB_MAX_WEIGHT' for pathologically costly layouts

@amanasifkhalid
Copy link
Contributor Author

/azp run runtime-coreclr libraries-jitstress, Antigen

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

Copy link

@mslovelymia mslovelymia left a comment

Choose a reason for hiding this comment

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

dont wanna approve anything

@amanasifkhalid
Copy link
Contributor Author

/azp run runtime-coreclr libraries-jitstress

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@amanasifkhalid amanasifkhalid changed the title JIT: Detect and handle imprecision in 3-opt layout cost computation JIT: Skip cost improvement check in 3-opt for exceptionally costly layouts Nov 22, 2024
@amanasifkhalid amanasifkhalid marked this pull request as ready for review November 22, 2024 18:32
@amanasifkhalid
Copy link
Contributor Author

cc @dotnet/jit-contrib, @AndyAyersMS PTAL. libraries-jitstress failures don't look related. For the cases I looked at, the failure in #109984 only seems to hit under JitOptRepeat stress scenarios where optSetBlockWeights inflates loop block weights, thus causing the layout cost calculation to lose precision when summing large values. The simplest solution seems to be to skip the assertion if we detect that we're dealing with some pathologically large layout cost.

@amanasifkhalid
Copy link
Contributor Author

/ba-g Linux-arm64 NativeAOT build timed out.

@amanasifkhalid amanasifkhalid merged commit 4045d1b into dotnet:main Nov 22, 2024
108 of 115 checks passed
@amanasifkhalid amanasifkhalid deleted the fix-3-opt-assert-pt2 branch November 22, 2024 19:57
mikelle-rogers pushed a commit to mikelle-rogers/runtime that referenced this pull request Dec 10, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Dec 23, 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

4 participants