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

Set IL offsets for calls created during devirtualization #61189

Merged

Conversation

jakobbotsch
Copy link
Member

Since inlined statements use the IL location of the inliner's statement
all statements created while inlining devirtualized calls would get no
debug info before, while normally these will have IL location pointing
to the call statement in the root.

This behavior seems unwanted and was hard to keep with my upcoming debug info changes since there we are always able to walk back to the root context and get the IL offset from there, and it is hard to check for this particular case (call statement in an inlinee that previously would have had no debug info instead of pointing into root).

I've only changed this for the call statements and not for the various other statements inserted in this transformation as I need to think more about those first. For the call it seems logical that we do it, especially since we mainly use this information as a "stepping stone" since the devirtualized call should get inlined.

No code diffs, only debug info diffs. We see some more entries around devirtualized calls as expected. A lot of the time these diffs look like

-IL offs NO_MAP : 0x0000004A ( STACK_EMPTY )
+IL offs 0x0003 : 0x0000004A ( STACK_EMPTY )

since we can now associate a statement in an inlinee with the call in the root.

cc @dotnet/jit-contrib

Since inlined statements use the IL location of the inliner's statement
all statements created while inlining devirtualized calls would get no
debug info before, while normally these will have IL location pointing
to the call statement in the root.
@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 Nov 3, 2021
@ghost
Copy link

ghost commented Nov 3, 2021

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

Issue Details

Since inlined statements use the IL location of the inliner's statement
all statements created while inlining devirtualized calls would get no
debug info before, while normally these will have IL location pointing
to the call statement in the root.

This behavior seems unwanted and was hard to keep with my upcoming debug info changes since there we are always able to walk back to the root context and get the IL offset from there, and it is hard to check for this particular case (call statement in an inlinee that previously would have had no debug info instead of pointing into root).

I've only changed this for the call statements and not for the various other statements inserted in this transformation as I need to think more about those first. For the call it seems logical that we do it, especially since we mainly use this information as a "stepping stone" since the devirtualized call should get inlined.

No code diffs, only debug info diffs. We see some more entries around devirtualized calls as expected. A lot of the time these diffs look like

-IL offs NO_MAP : 0x0000004A ( STACK_EMPTY )
+IL offs 0x0003 : 0x0000004A ( STACK_EMPTY )

since we can now associate a statement in an inlinee with the call in the root.

cc @dotnet/jit-contrib

Author: jakobbotsch
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

Copy link
Member

@AndyAyersMS AndyAyersMS left a comment

Choose a reason for hiding this comment

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

LGTM

@jakobbotsch
Copy link
Member Author

Failure looks unrelated, and the "in progress" job seems to have hit a "System.IO.IOException: No space left on device", not sure why it is still reporting as in progress.

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