-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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: Improve inliner (constant feeds constant test, foldable calls) #50784
Conversation
@@ -66,6 +66,7 @@ INLINE_OBSERVATION(TOO_MUCH_IL, bool, "too many il bytes", | |||
|
|||
// ------ Callee Information ------- | |||
|
|||
INLINE_OBSERVATION(FOLDABLE_CALL, bool, "foldable call", INFORMATION, CALLEE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some future PR, we could also track the intrinsic id here.
This would allow us to determine, at least the following interesting pieces:
- Number of intrinsic calls
- Number of hardware intrinsic calls
- Number of
Type.op_Equality
calls
There may be other interesting bits as well, but these are at least ones that have one or more of:
- significantly decreased cost (hwintrinsics are instructions not calls)
- additional optimizations (many intrinsics have CSE support)
- potential dead code elimination (type equality checks, particularly
where T : struct
)
This is now going to require making String.Length a new-style intrinsic. |
Will re-think this one in a new PR. |
Contribution to @tannergooding's work in #50675
Current codegen for
Test
:New codegen for
Test
:As far as I understand we're going to switch to "PGO-based policy" for inliner in future but maybe some of these pieces will be useful there too?