JIT: devirtualization next steps
dotnet/coreclr#9230 introduced some simple devirtualization. Some areas for future enhancements: - [x] Devirtualize interface calls. Logic for this is more complex than for virtual calls (see dotnet/coreclr#10192, dotnet/coreclr#10371). - [x] Devirtualize calls on struct types. Make sure the right method entry point in invoked; virtual struct methods come in "boxed" and "unboxed" flavors (see dotnet/coreclr#14698, which removes the box). - [x] After calling the unboxed entry point, try and remove the upstream box and copy too (likely requires [first-class structs](https://github.com/dotnet/coreclr/blob/master/Documentation/design-docs/first-class-structs.md). Some progress in dotnet/coreclr#14698 and dotnet/coreclr#17006). Resolved via https://github.com/dotnet/runtime/pull/52210. - [ ] If we can't call the unboxed entry point, we may still know that the method called won't allow the the `this` pointer in the call to escape. So we can perhaps stack-allocate the object in its boxed form and pass that. Here we'd be counting on the fact that methods on mutable GC value types should already be using checked write barriers for updates. - [ ] Likewise we can consider using "boxed on stack" for some boxed arguments to well known methods. - [ ] Refactor the jit to retain type information for a larger variety of tree nodes. Likely requires carefully breaking the widespread assumption in the jit that class handles are captured only for struct types. - [ ] Do some simplistic type propa
Posted by AndyAyersMS on Mar 2, 2017, 4:07 PM
Tags
Related issues
- [Meta] Feedback on granular control over Copilot changes
- unexpected status 401 Unauthorized issue
- [MODEL] Measurable quality regression in Claude generation 5 (Fable 5 / Opus 5 / Sonnet 5): worse nonsense detection, ~2x verbosity, under-disclosed model fallb
- [CRITICAL] Subagent spawning and subagent pattern bugs trigger infinite recursion, infinite token usage, grossly inefficient token usage, and lost accumulated s
- Video stops playing after some minutes
- [MODEL] Claude verbose code comments by default — ignores instructions to stop.
Raise real-world problems, find people facing the same issue, and discuss solutions.4,500 issues0 comments
github (Software)
[Meta] Feedback on granular control over Copilot changes
unexpected status 401 Unauthorized issue
[MODEL] Measurable quality regression in Claude generation 5 (Fable 5 / Opus 5 / Sonnet 5): worse nonsense detection, ~2x verbosity, under-disclosed model fallb
[CRITICAL] Subagent spawning and subagent pattern bugs trigger infinite recursion, infinite token usage, grossly inefficient token usage, and lost accumulated s
Video stops playing after some minutes
[MODEL] Claude verbose code comments by default — ignores instructions to stop.
Scope Codex VS Code chats to the current workspace/project
Update on "Co-authored-by: Copilot" in commit messages
JIT: devirtualization next steps
dotnet/coreclr#9230 introduced some simple devirtualization. Some areas for future enhancements: - [x] Devirtualize interface calls. Logic for this is more complex than for virtual calls (see dotnet/coreclr#10192, dotnet/coreclr#10371). - [x] Devirtualize calls on struct types. Make sure the right method entry point in invoked; virtual struct methods come in "boxed" and "unboxed" flavors (see dotnet/coreclr#14698, which removes the box). - [x] After calling the unboxed entry point, try and remove the upstream box and copy too (likely requires [first-class structs](https://github.com/dotnet/coreclr/blob/master/Documentation/design-docs/first-class-structs.md). Some progress in dotnet/coreclr#14698 and dotnet/coreclr#17006). Resolved via https://github.com/dotnet/runtime/pull/52210. - [ ] If we can't call the unboxed entry point, we may still know that the method called won't allow the the `this` pointer in the call to escape. So we can perhaps stack-allocate the object in its boxed form and pass that. Here we'd be counting on the fact that methods on mutable GC value types should already be using checked write barriers for updates. - [ ] Likewise we can consider using "boxed on stack" for some boxed arguments to well known methods. - [ ] Refactor the jit to retain type information for a larger variety of tree nodes. Likely requires carefully breaking the widespread assumption in the jit that class handles are captured only for struct types. - [ ] Do some simplistic type propa
Comments (0)
No comments yet. Start the discussion.