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: Use postorder numbers as keys into ordinals in 3-opt layout #110922

Merged
merged 4 commits into from
Jan 6, 2025

Conversation

amanasifkhalid
Copy link
Member

Now that most fgRenumberBlocks calls are gone, bbNum-indexed arrays are likely to be quite sparse by the time we get to the backend. Using postorder numbers in lieu of bbNum during block layout is more efficient; to do this, we have to keep references to the initial RPO traversal around throughout the phase, though these data structures might be useful for influencing future decisions 3-opt may make as we expand its capabilities.

This change was motivated by my efforts to support dumping CFG data that can be consumed by external TSP optimizers -- the one I'm considering requires nodes to be numbered with contiguous indices, which postorder numbers are good for.

@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 Dec 24, 2024
Copy link
Contributor

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

@amanasifkhalid
Copy link
Member Author

/azp run runtime-coreclr outerloop, Fuzzlyn, Antigen

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@amanasifkhalid
Copy link
Member Author

amanasifkhalid commented Jan 6, 2025

cc @dotnet/jit-contrib, @AndyAyersMS PTAL. No diffs, and nominal TP impact (though TP diffs seem to be having some infra issues). Thanks!

@amanasifkhalid amanasifkhalid merged commit 2979d1b into dotnet:main Jan 6, 2025
105 of 108 checks passed
@amanasifkhalid amanasifkhalid deleted the postordernum-ordinals branch January 6, 2025 19:21
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