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

Keep instrumentings some intrinsics #85130

Merged
merged 4 commits into from
Apr 21, 2023

Conversation

EgorBo
Copy link
Member

@EgorBo EgorBo commented Apr 20, 2023

Address comment in #84517 (comment)

Some [Intrinsic] methods aren't expanded and we should not ignore them for instrumentation

@AndyAyersMS PTAL

@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 Apr 20, 2023
@ghost ghost assigned EgorBo Apr 20, 2023
@ghost
Copy link

ghost commented Apr 20, 2023

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

Issue Details

Address comment in #84517 (comment)

Some [Intrinsic] methods aren't expanded and we should not ignore them for instrumentation

@AndyAyersMS PTAL

Author: EgorBo
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

return PhaseStatus::MODIFIED_NOTHING;
bool shouldBeInstrumented = false;

// Some intrinsics should still be instrumented.
Copy link
Member

Choose a reason for hiding this comment

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

Maybe say a bit more about why these particular intrinsics are the ones that should still be instrumented? In particular, if somebody adds a new intrinsic, how will they know if it should go on this list or not?

Copy link
Member

Choose a reason for hiding this comment

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

Can we filter it primarily based on whether or not its recursive?

In general things that are recursive are considered "must expand" and never have a meaningful implementation, while things that are non-recursive are only "might expand" and it can depend on factors such as optimization level, what the inputs are, what the hardware supports, etc.

We could then still have this switch to handle the other cases and we could default to instrumenting with some selective logic for things we still don't want to instrument (say Math.Floor when Sse4.1 is supported).

-- This would also be a motivation to finish up the S.R.CS.Unsafe work for example, as we were planning on making those recursive once that was completed.

Copy link
Member Author

Choose a reason for hiding this comment

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

@AndyAyersMS added comments. We might want to compose a single .h table where we'll list all these properties for each intrinsics (e.g. display name, instrumentability, etc)

Copy link
Member Author

Choose a reason for hiding this comment

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

Can we filter it primarily based on whether or not its recursive?

Not really unless you go and implement them all in Mono too (and interp) 🙂
The existing Tier0 must-expand won't hit this path because Tier0 will inline them so they won't be instrumented anyway

@EgorBo EgorBo merged commit 8f14016 into dotnet:main Apr 21, 2023
@EgorBo EgorBo deleted the keep-instrumenting-some-intrinsics branch April 21, 2023 16:02
@ghost ghost locked as resolved and limited conversation to collaborators May 21, 2023
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.

3 participants