Skip to content

Commit d454374

Browse files
authored
[mono][aot] Enable dedup on tvOS device + arm64 simulators (#82403)
* Enable dedup on ioslike platforms (tvOS device + arm64 simulators)
1 parent 74cd441 commit d454374

File tree

3 files changed

+1
-15
lines changed

3 files changed

+1
-15
lines changed

src/mono/mono/mini/aot-compiler.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14894,12 +14894,6 @@ aot_assembly (MonoAssembly *ass, guint32 jit_opts, MonoAotOptions *aot_options)
1489414894
TV_GETTIME (btv);
1489514895

1489614896
acfg->stats.jit_time = GINT64_TO_INT (TV_ELAPSED (atv, btv));
14897-
// Current implementation uses dedup_methods hash table for storing extra methods which are emitted in a dedup AOT image.
14898-
// Previously, cfg->skip flag in dedup_skip_methods is used for indicating if a method should be emitted in an AOT image.
14899-
// Method dedup_skip_methods is used only for wasm.
14900-
#ifdef TARGET_WASM
14901-
dedup_skip_methods (acfg);
14902-
#endif
1490314897
if (acfg->dedup_collect_only) {
1490414898
/* We only collected methods from this assembly */
1490514899
acfg_free (acfg);

src/mono/mono/mini/aot-runtime.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4492,8 +4492,6 @@ inst_is_private (MonoGenericInst *inst)
44924492
gboolean
44934493
mono_aot_can_dedup (MonoMethod *method)
44944494
{
4495-
// Dedup enabled for wasm and iOS
4496-
#if defined(TARGET_WASM) || defined(TARGET_IOS)
44974495
/* Use a set of wrappers/instances which work and useful */
44984496
switch (method->wrapper_type) {
44994497
case MONO_WRAPPER_RUNTIME_INVOKE:
@@ -4541,12 +4539,6 @@ mono_aot_can_dedup (MonoMethod *method)
45414539
return TRUE;
45424540
}
45434541
return FALSE;
4544-
#else
4545-
gboolean not_normal_gshared = method->is_inflated && !mono_method_is_generic_sharable_full (method, TRUE, FALSE, FALSE);
4546-
gboolean extra_method = (method->wrapper_type != MONO_WRAPPER_NONE) || not_normal_gshared;
4547-
4548-
return extra_method;
4549-
#endif
45504542
}
45514543

45524544

src/mono/msbuild/apple/build/AppleApp.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!-- iOS/tvOS device + arm64 simulators need to AOT -->
33
<PropertyGroup Condition="'$(TargetOS)' == 'ios' or '$(TargetOS)' == 'tvos' or (('$(TargetOS)' == 'iossimulator' or '$(TargetOS)' == 'tvossimulator') And '$(TargetArchitecture)' == 'arm64')">
44
<RunAOTCompilation Condition="'$(RunAOTCompilation)' == ''">true</RunAOTCompilation>
5-
<iOSLikeDedup Condition="'$(RunAOTCompilation)' == 'true' and '$(TargetOS)' == 'ios'">true</iOSLikeDedup>
5+
<iOSLikeDedup>true</iOSLikeDedup>
66
</PropertyGroup>
77

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

0 commit comments

Comments
 (0)