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: refactor AddCodeDsc #108095

Merged
merged 2 commits into from
Sep 28, 2024
Merged

Conversation

AndyAyersMS
Copy link
Member

The main aim of this change is to remove the block reference from AddCodeDsc, as it can become stale over time, making it impossible to determine where a throw helper block should be placed, if we have subsequently eliminated EH regions.

Instead we use the try/handler indices plus a bit of extra info to track where the throw helper block should be placed.

I also moved the key formation logic nearby and reworked it a bit, and gave the AddCodeDscs debug indices for dumps.

This should unblock doing late EH region removal.

The main aim of this change is to remove the block reference from AddCodeDsc,
as it can become stale over time, making it impossible to determine where
a throw helper block should be placed, if we have subsequently eliminated
EH regions.

Instead we use the try/handler indices plus a bit of extra info to
track where the throw helper block should be placed.

I also moved the key formation logic nearby and reworked it a bit, and
gave the AddCodeDscs debug indices for dumps.

This should unblock doing late EH region removal.
@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 Sep 21, 2024
Copy link
Contributor

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

@AndyAyersMS
Copy link
Member Author

@BruceForstall PTAL
cc @dotnet/jit-contrib

Small diffs expected, because the throw blocks get placed differently (there is now no "nearby" hint).

@AndyAyersMS
Copy link
Member Author

@BruceForstall ping

Copy link
Member

@BruceForstall BruceForstall left a comment

Choose a reason for hiding this comment

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

LGTM. Sorry for the delay.

@AndyAyersMS AndyAyersMS merged commit 4a99ef1 into dotnet:main Sep 28, 2024
108 checks passed
sirntar pushed a commit to sirntar/runtime that referenced this pull request Sep 30, 2024
The main aim of this change is to remove the block reference from AddCodeDsc,
as it can become stale over time, making it impossible to determine where
a throw helper block should be placed, if we have subsequently eliminated
EH regions.

Instead we use the try/handler indices plus a bit of extra info to
track where the throw helper block should be placed.

I also moved the key formation logic nearby and reworked it a bit, and
gave the AddCodeDscs debug indices for dumps.

This should unblock doing late EH region removal.
@github-actions github-actions bot locked and limited conversation to collaborators Oct 28, 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
Development

Successfully merging this pull request may close these issues.

2 participants