-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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: Avoid check for returns in methods with pinvokes in LSRA #103559
JIT: Avoid check for returns in methods with pinvokes in LSRA #103559
Conversation
The pinvoke epilog is explicit on all our targets now, so it seems like this code should be unnecessary everywhere (and in any case, should not have been inside very general and very hot `newRefPosition`).
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
/azp run runtime-coreclr jitstress, runtime-coreclr libraries-jitstress, runtime-coreclr jitstressregs |
Azure Pipelines successfully started running 3 pipeline(s). |
Failures are #103577, #103568, #103545, #102370, #102335, #102706 cc @dotnet/jit-contrib PTAL @kunalspathak A few minor diffs, some good TP improvements. |
Can you point to the relevant code? When I search for |
The pinvoke epilog is inserted as regular IR in lowering: runtime/src/coreclr/jit/lower.cpp Lines 5683 to 5695 in f2bdb75
I suspect the code I am removing here exists because at some point the pinvoke epilog was implicitly generated as part of epilog codegen (or perhaps |
Does that mean we do not need |
Both are only used in x86/arm32, so the definitions outside could be removed. Do you want me to do that as part of this PR? |
The only use I see for runtime/src/coreclr/jit/gentree.cpp Lines 1780 to 1783 in 35437dd
After this PR, there is no usage of
Yes, that will be good. |
There are plenty of other cases where we have Like I mentioned above I think we should consistently define both versions, so I don't think we should remove the |
SGTM |
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.
LGTM. Thanks!
The pinvoke epilog is explicit on all our targets now, so it seems like this code should be unnecessary everywhere (and in any case, should not have been inside very general and very hot
newRefPosition
).