-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[mono][aot] Optimize constrained calls made from gsharedvt methods. #79339
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
Conversation
|
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
|
This will also avoid some interpreter transitions on wasm, making the stack traces on BCL test suite crashes etc. smaller. |
4d41c57 to
03a6dcf
Compare
03a6dcf to
ec5e62d
Compare
|
The failures look relevant. |
|
cc @ivanpovazan @jandupej @kotlarmilos @fanyang-mono --fyi |
cbe44f4 to
ef2aec6
Compare
5229775 to
f144a24
Compare
src/mono/mono/mini/method-to-ir.c
Outdated
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.
what would be the additional cases that would fit into the fastpath approach?
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.
The cases excluded by the if.
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.
I am trying to understand the code and the effect that covering more cases would bring.
f144a24 to
03e2564
Compare
|
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Failures are relevant. |
03e2564 to
8088965
Compare
|
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Failures are unrelated. |
|
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
b772123 to
68b30bc
Compare
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.
We don't have some helper function that does this already?
The calls are of the form: .constrained T_GSHAREDVT callvirt <method> Whenever T_GSHAREDVT is a reference or value type is only known at runtime. Previously these were handled by passing the arguments to a JIT icall which computed the target method and did a runtime invoke. Added 2 optimizations: * Precompute the data which depends only on the type and the method, store it in an rgctx slot and pass it to the JIT icall. * Add a fastpath for simpler cases which makes an indirect call from generated code.
68b30bc to
0033318
Compare
|
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Failures are unrelated |
The calls are of the form:
.constrained T_GSHAREDVT
callvirt
Whenever T_GSHAREDVT is a reference or value type is only known at runtime.
Previously these were handled by passing the arguments to a JIT icall which computed the target method and did a runtime invoke.
Add 2 optimizations: