JIT: Avoid check for returns in methods with pinvokes in LSRA#103559
JIT: Avoid check for returns in methods with pinvokes in LSRA#103559jakobbotsch merged 2 commits intodotnet:mainfrom
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 |
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).