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: Add 3-opt stress mode #111640

Merged
merged 1 commit into from
Jan 21, 2025
Merged

Conversation

amanasifkhalid
Copy link
Member

If this stress mode is enabled, skip the preliminary reordering passes -- RPO layout and cold code motion -- to create more work for 3-opt, thus exercising new cut points. We could probably do something more aggressive, like reverse the initial layout order (though we'd need to respect EH invariants), but this was enough to help me repro some failures like #111347 locally.

@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 Jan 20, 2025
Copy link
Contributor

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

fgDoReversePostOrderLayout();
fgMoveColdBlocks();
// Skip preliminary reordering passes to create more work for 3-opt layout
if (compStressCompile(STRESS_THREE_OPT_LAYOUT, 10))
Copy link
Member Author

Choose a reason for hiding this comment

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

I picked this frequency arbitrarily, though I suppose it doesn't have to be too high since this stress mode will always kick in for JitStress=2. I'm open to suggestions here.

@amanasifkhalid
Copy link
Member Author

cc @dotnet/jit-contrib, @AndyAyersMS PTAL. No diffs. Thanks!

@amanasifkhalid amanasifkhalid merged commit fc2603e into dotnet:main Jan 21, 2025
105 of 109 checks passed
@amanasifkhalid amanasifkhalid deleted the stress-3-opt branch January 21, 2025 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.

2 participants