Skip to content
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] Enable dedup on tvOS device + arm64 simulators #82403

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions src/mono/mono/mini/aot-compiler.c
Original file line number Diff line number Diff line change
Expand Up @@ -14894,12 +14894,6 @@ aot_assembly (MonoAssembly *ass, guint32 jit_opts, MonoAotOptions *aot_options)
TV_GETTIME (btv);

acfg->stats.jit_time = GINT64_TO_INT (TV_ELAPSED (atv, btv));
// Current implementation uses dedup_methods hash table for storing extra methods which are emitted in a dedup AOT image.
// Previously, cfg->skip flag in dedup_skip_methods is used for indicating if a method should be emitted in an AOT image.
// Method dedup_skip_methods is used only for wasm.
#ifdef TARGET_WASM
dedup_skip_methods (acfg);
#endif
if (acfg->dedup_collect_only) {
/* We only collected methods from this assembly */
acfg_free (acfg);
Expand Down
8 changes: 0 additions & 8 deletions src/mono/mono/mini/aot-runtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -4492,8 +4492,6 @@ inst_is_private (MonoGenericInst *inst)
gboolean
mono_aot_can_dedup (MonoMethod *method)
{
// Dedup enabled for wasm and iOS
#if defined(TARGET_WASM) || defined(TARGET_IOS)
/* Use a set of wrappers/instances which work and useful */
switch (method->wrapper_type) {
case MONO_WRAPPER_RUNTIME_INVOKE:
Expand Down Expand Up @@ -4541,12 +4539,6 @@ mono_aot_can_dedup (MonoMethod *method)
return TRUE;
}
return FALSE;
#else
gboolean not_normal_gshared = method->is_inflated && !mono_method_is_generic_sharable_full (method, TRUE, FALSE, FALSE);
gboolean extra_method = (method->wrapper_type != MONO_WRAPPER_NONE) || not_normal_gshared;

return extra_method;
#endif
}


Expand Down
2 changes: 1 addition & 1 deletion src/mono/msbuild/apple/build/AppleApp.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- iOS/tvOS device + arm64 simulators need to AOT -->
<PropertyGroup Condition="'$(TargetOS)' == 'ios' or '$(TargetOS)' == 'tvos' or (('$(TargetOS)' == 'iossimulator' or '$(TargetOS)' == 'tvossimulator') And '$(TargetArchitecture)' == 'arm64')">
<RunAOTCompilation Condition="'$(RunAOTCompilation)' == ''">true</RunAOTCompilation>
<iOSLikeDedup Condition="'$(RunAOTCompilation)' == 'true' and '$(TargetOS)' == 'ios'">true</iOSLikeDedup>
<iOSLikeDedup>true</iOSLikeDedup>
</PropertyGroup>

<!-- iOS/tvOS arm64 simulators do not support JIT, so force interpreter fallback, devices should FullAOT -->
Expand Down