-
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
[mono][aot] Further optimizations for dedup improvement #83973
Comments
To simplify the build process we could avoid generating an additional assembly as it is empty. However, assembly |
We do need the assemby for aot compilation, we just don't need it at runtime. |
Right, as you described it would simplify the AOT compilation, but with the current code, AOT images need an associated assembly. |
When runtime invoke wrappers are deduplicated, Before merging the deduplication of runtime invoke wrappers on iOS, the CI should be updated to report any error logs that occurred during startup, as discussed in dotnet/arcade#11683. |
Description
This issue tracks further optimizations for the introduced dedup improvement.
Build without a container assemblyBy introducing #83511, container AOT module is loaded by using assembly name. Therefore, there is no need for additional AOT assembly in a bundle anymore.
UPDATE: With the current code, it would be a high effort to decouple AOT image and an associated assembly.
Runtime invoke wrappers on iOS
Current implementation doesn't cover cases where both shared method and its inflated instances could be deduplicated. During the compilation, the shared method is emitted in corresponding AOT module, while inflated instances are emitted in a container AOT module. During the runtime, the shared method can't be retrieved as it was searched in the container AOT module.
Here is an example. During the compilation, the following list of inflated instances emitted in the dedup AOT module.
During the runtime,
(wrapper runtime-invoke) void object:runtime_invoke_dynamic (intptr,intptr,intptr,intptr)
was searched in the dedup AOT module as it isRUNTIME_INVOKE_WRAPPER
, but not emitted in the dedup AOT module. It could be addressed by updatingmono_aot_get_method
method to handle such cases. Alternative approach could be adding a dedup flag inMonoMethod
struct but it looks like inefficient approach.Investigate gshared methods emitted into the dedup AOT module
Dedup AOT module should contain extra methods and generic instances only. However, the following gshared methods are emitted in addition to its instances.
Tasks
Simplify build process by excluding dedup assemblyThe text was updated successfully, but these errors were encountered: