-
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
[interp] Inline more AggressiveInlining methods #48513
[interp] Inline more AggressiveInlining methods #48513
Conversation
Tagging subscribers to this area: @BrzVlad Issue DetailsBy default, the interpreter stops inlining when encountering a call that it cannot inline or a throw. Inline the method anyway if the aggressive inlining attribute is present.
|
Aids with methods like https://github.com/dotnet/runtime/blob/master/src/libraries/System.Private.CoreLib/src/System/Numerics/Vector_1.cs#L839, which the interpreter wouldn't inline, even though the code for the method would be just :
This makes Vector<int>.Equals twice as fast. Contributes to #47520 |
@@ -5453,7 +5456,8 @@ generate_code (TransformData *td, MonoMethod *method, MonoMethodHeader *header, | |||
// Inlining failed. Set the method to be executed as part of newobj instruction | |||
newobj_fast->data [0] = get_data_item_index (td, mono_interp_get_imethod (domain, m, error)); | |||
/* The constructor was not inlined, abort inlining of current method */ | |||
INLINE_FAILURE; | |||
if (inlining && !td->aggressive_inlining) | |||
goto exit; |
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.
Might want
if (....)
INLINE_FAILURE;
By default, the interpreter stops inlining when encountering a call that it cannot inline or a throw. Inline the method anyway if the aggressive inlining attribute is present.
98260b2
to
dacbb29
Compare
By default, the interpreter stops inlining when encountering a call that it cannot inline or a throw. Inline the method anyway if the aggressive inlining attribute is present.