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: consider running throw helper merge pass earlier #35135

Closed
AndyAyersMS opened this issue Apr 17, 2020 · 0 comments · Fixed by #35255
Closed

JIT: consider running throw helper merge pass earlier #35135

AndyAyersMS opened this issue Apr 17, 2020 · 0 comments · Fixed by #35255
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI enhancement Product code improvement that does NOT require public API changes/additions optimization
Milestone

Comments

@AndyAyersMS
Copy link
Member

We currently run this after morph, but call morphing can introduce new temps that can introduce diffs between otherwise identical call sequences.

When this phase was introduced I wanted to run it before morph but wasn't able to because we lacked control flow information; now with #1309 we can probably run it pre-morph.

See dotnet/aspnetcore#20885 for one such example.

@AndyAyersMS AndyAyersMS added enhancement Product code improvement that does NOT require public API changes/additions area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI optimization labels Apr 17, 2020
@AndyAyersMS AndyAyersMS added this to the 5.0 milestone Apr 17, 2020
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Apr 17, 2020
@BruceForstall BruceForstall removed the untriaged New issue has not been triaged by the area owner label Apr 20, 2020
AndyAyersMS added a commit to AndyAyersMS/runtime that referenced this issue Apr 21, 2020
Now that we have pred lists before morph, we can move the throw helper
tail merge phase earlier in the phase list.

This has two benefits:
* we can now merge a few more cases, because morph can introduce unique
temps for otherwise identical calls;
* it saves some throughput, because we no longer need to morph duplicate
calls.

There is more opportunity here to reduce code size if we can find the right
heuristic in morph to decide if throw helpers should be called or tail-called,
though the overall benefit is small (~600 methods, ~2000k bytes). I left the
current heuristic in place as I couldn't come up with anything better.

Fixes dotnet#35135.
AndyAyersMS added a commit that referenced this issue Apr 23, 2020
Now that we have pred lists before morph, we can move the throw helper
tail merge phase earlier in the phase list.

This has two benefits:
* we can now merge a few more cases, because morph can introduce unique
temps for otherwise identical calls;
* it saves some throughput, because we no longer need to morph duplicate
calls.

There is more opportunity here to reduce code size if we can find the right
heuristic in morph to decide if throw helpers should be called or tail-called,
though the overall benefit is small (~600 methods, ~2000k bytes). I left the
current heuristic in place as I couldn't come up with anything better.

Fixes #35135.
@ghost ghost locked as resolved and limited conversation to collaborators Dec 9, 2020
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 enhancement Product code improvement that does NOT require public API changes/additions optimization
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants