Skip to content

JIT: Use postorder numbers as keys into ordinals in 3-opt layout#110922

Merged
amanasifkhalid merged 4 commits intodotnet:mainfrom
amanasifkhalid:postordernum-ordinals
Jan 6, 2025
Merged

JIT: Use postorder numbers as keys into ordinals in 3-opt layout#110922
amanasifkhalid merged 4 commits intodotnet:mainfrom
amanasifkhalid:postordernum-ordinals

Conversation

@amanasifkhalid
Copy link
Copy Markdown
Contributor

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.

@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Dec 24, 2024
@dotnet-policy-service
Copy link
Copy Markdown
Contributor

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

@amanasifkhalid
Copy link
Copy Markdown
Contributor Author

/azp run runtime-coreclr outerloop, Fuzzlyn, Antigen

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

@amanasifkhalid
Copy link
Copy Markdown
Contributor 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
@amanasifkhalid amanasifkhalid deleted the postordernum-ordinals branch January 6, 2025 19:21
@github-actions github-actions bot locked and limited conversation to collaborators Feb 6, 2025
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.

2 participants