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 ability to order blocks in dump by bbNum or bbID #70399

Merged
merged 1 commit into from
Jun 8, 2022

Conversation

AndyAyersMS
Copy link
Member

By default the JIT will dump blocks in bbNext order. This adds
other ordering options, specified by JitDumpFgBlockOrder:

  • 0 (default) bbNext
  • 1 bbNum
  • 2 bbID

bbID in particular is useful when comparing JIT dumps where blocks
have been reordered but the blocks themselves have similar content.

By default the JIT will dump blocks in bbNext order. This adds
other ordering options, specified by `JitDumpFgBlockOrder`:
* `0 (default) bbNext`
* `1 bbNum`
* `2 bbID`

`bbID` in particular is useful when comparing JIT dumps where blocks
have been reordered but the blocks themselves have similar content.
@ghost ghost assigned AndyAyersMS Jun 7, 2022
@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 Jun 7, 2022
@AndyAyersMS
Copy link
Member Author

cc @dotnet/jit-contrib

@ghost
Copy link

ghost commented Jun 7, 2022

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

Issue Details

By default the JIT will dump blocks in bbNext order. This adds
other ordering options, specified by JitDumpFgBlockOrder:

  • 0 (default) bbNext
  • 1 bbNum
  • 2 bbID

bbID in particular is useful when comparing JIT dumps where blocks
have been reordered but the blocks themselves have similar content.

Author: AndyAyersMS
Assignees: AndyAyersMS
Labels:

area-CodeGen-coreclr

Milestone: -

//
if (JitConfig.JitDumpFgBlockOrder() == 1)
{
jitstd::sort(fgBBOrder->begin(), fgBBOrder->end(), fgBBNumCmp());
Copy link
Member

Choose a reason for hiding this comment

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

nit: probably a more elegant solution is to define a lambda and check mode inside? 🙂

@AndyAyersMS
Copy link
Member Author

Failure is #70231

@AndyAyersMS AndyAyersMS merged commit 655f414 into dotnet:main Jun 8, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Jul 8, 2022
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.

3 participants