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: fix another case of early flow graph divergence #85873

Merged

Conversation

AndyAyersMS
Copy link
Member

The JIT will sometimes decide to instrument a Tier0 method even if BBINSTR is not passed by the VM (this is enabled when the VM passes BBINSTR_IF_LOOPS so that we can provide some PGO data to OSR methods).

In such cases we build the flow graph and then decide to instrument, so the flow graph shape may differ from the case where we know up front that we are going to instrument or optimize.

Remedy this by also running the early branch to next flow graph opt when a Tier0 JIT is passed BBINSTR_IF_LOOPS.

Addresses another case of #85856.

The JIT will sometimes decide to instrument a Tier0 method even if `BBINSTR`
is not passed by the VM (this is enabled when the VM passes `BBINSTR_IF_LOOPS`
so that we can provide some PGO data to OSR methods).

In such cases we build the flow graph and then decide to instrument, so the
flow graph shape may differ from the case where we know up front that we are going
to instrument or optimize.

Remedy this by also running the early branch to next flow graph opt when a Tier0
JIT is passed `BBINSTR_IF_LOOPS`.

Addresses another case of dotnet#85856.
@ghost ghost assigned AndyAyersMS May 6, 2023
@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 May 6, 2023
@ghost
Copy link

ghost commented May 6, 2023

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

Issue Details

The JIT will sometimes decide to instrument a Tier0 method even if BBINSTR is not passed by the VM (this is enabled when the VM passes BBINSTR_IF_LOOPS so that we can provide some PGO data to OSR methods).

In such cases we build the flow graph and then decide to instrument, so the flow graph shape may differ from the case where we know up front that we are going to instrument or optimize.

Remedy this by also running the early branch to next flow graph opt when a Tier0 JIT is passed BBINSTR_IF_LOOPS.

Addresses another case of #85856.

Author: AndyAyersMS
Assignees: AndyAyersMS
Labels:

area-CodeGen-coreclr

Milestone: -

@AndyAyersMS
Copy link
Member Author

@EgorBo PTAL
cc @dotnet/jit-contrib

Relatively small number of diffs, but this impacts some important methods....

Copy link
Member

@EgorBo EgorBo left a comment

Choose a reason for hiding this comment

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

The name sounds a bit weird but I don't have a better alternative🙂

@AndyAyersMS
Copy link
Member Author

The name sounds a bit weird but I don't have a better alternative🙂

We can always change it later....

@AndyAyersMS
Copy link
Member Author

Diffs these are all in Tier0 instrumentation strategy / schema.

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