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

PGO considerations for finally cloning #48925

Open
2 of 4 tasks
Tracked by #74873
AndyAyersMS opened this issue Mar 1, 2021 · 3 comments
Open
2 of 4 tasks
Tracked by #74873

PGO considerations for finally cloning #48925

AndyAyersMS opened this issue Mar 1, 2021 · 3 comments
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Milestone

Comments

@AndyAyersMS
Copy link
Member

AndyAyersMS commented Mar 1, 2021

Current finally cloning algorithm is roughly:

   foreach try-finally in the method
       if the finally is not too big, not rare, and is not must throw
           find the "normal" exit path from the try-finally (lexically last exit)
           move the normal exit path to be the fall through path if necessary
           clone the finally and reroute the normal exit and any other exit that can share the normal path to the clone

With PGO data, we should reconsider:

At a minimum, we should do the rescaling.

category:cq
theme:profile-feedback

@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Mar 1, 2021
@AndyAyersMS AndyAyersMS added area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI and removed untriaged New issue has not been triaged by the area owner labels Mar 1, 2021
@AndyAyersMS AndyAyersMS added this to the 6.0.0 milestone Mar 1, 2021
@AndyAyersMS
Copy link
Member Author

See also #48850 (comment)

@AndyAyersMS AndyAyersMS mentioned this issue Mar 3, 2021
54 tasks
AndyAyersMS added a commit to AndyAyersMS/runtime that referenced this issue Mar 4, 2021
Update `impImportLeave` to propagate IBC counts to new blocks.

Fix profile weights during callfinally chain merging.

Scale profile weights for cloned finallys. Choose the continuation path based
on profile weight. Make sure to keep handler entry hot.

Partial fix for dotnet#48925.
AndyAyersMS added a commit that referenced this issue Mar 5, 2021
Update `impImportLeave` to propagate IBC counts to new blocks.

Fix profile weights during callfinally chain merging.

Scale profile weights for cloned finallys. Choose the continuation path based
on profile weight. Make sure to keep handler entry hot.

Partial fix for #48925.
@AndyAyersMS
Copy link
Member Author

Will defer the rest for now.

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
Development

No branches or pull requests

1 participant