Skip to content

Commit

Permalink
[mono][aot] Enable dedup on tvOS device + arm64 simulators (#82403)
Browse files Browse the repository at this point in the history
* Enable dedup on ioslike platforms (tvOS device + arm64 simulators)
  • Loading branch information
kotlarmilos authored Feb 22, 2023
1 parent 74cd441 commit d454374
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 15 deletions.
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

0 comments on commit d454374

Please sign in to comment.