From fdff30b39bb2cee030e7f5aa3b163cf93d861d0b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 29 Jan 2026 21:57:46 +0000 Subject: [PATCH 1/2] Initial plan From 9394c9ec768867e7bdd5a06619cab5c141f631fd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 29 Jan 2026 22:02:45 +0000 Subject: [PATCH 2/2] Enable cached interface dispatch support by default on non-jit platforms Co-authored-by: davidwrighton <10779849+davidwrighton@users.noreply.github.com> --- src/coreclr/tools/aot/crossgen2/Crossgen2RootCommand.cs | 2 +- src/coreclr/tools/aot/crossgen2/Program.cs | 2 +- src/coreclr/tools/aot/crossgen2/Properties/Resources.resx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/coreclr/tools/aot/crossgen2/Crossgen2RootCommand.cs b/src/coreclr/tools/aot/crossgen2/Crossgen2RootCommand.cs index b63e33f17ac23b..c31f7175e0b7c8 100644 --- a/src/coreclr/tools/aot/crossgen2/Crossgen2RootCommand.cs +++ b/src/coreclr/tools/aot/crossgen2/Crossgen2RootCommand.cs @@ -42,7 +42,7 @@ internal class Crossgen2RootCommand : RootCommand new("--optimize-space", "--Os") { Description = SR.OptimizeSpaceOption }; public Option OptimizeTime { get; } = new("--optimize-time", "--Ot") { Description = SR.OptimizeSpeedOption }; - public Option EnableCachedInterfaceDispatchSupport { get; } = + public Option EnableCachedInterfaceDispatchSupport { get; } = new("--enable-cached-interface-dispatch-support", "--CID") { Description = SR.EnableCachedInterfaceDispatchSupport }; public Option TypeValidation { get; } = new("--type-validation") { DefaultValueFactory = _ => TypeValidationRule.Automatic, Description = SR.TypeValidation, HelpName = "arg" }; diff --git a/src/coreclr/tools/aot/crossgen2/Program.cs b/src/coreclr/tools/aot/crossgen2/Program.cs index ffa238e9e4388a..2ac14e471e8448 100644 --- a/src/coreclr/tools/aot/crossgen2/Program.cs +++ b/src/coreclr/tools/aot/crossgen2/Program.cs @@ -623,7 +623,7 @@ private void RunSingleCompilation(Dictionary inFilePaths, Instru nodeFactoryFlags.TypeValidation = Get(_command.TypeValidation); nodeFactoryFlags.DeterminismStress = Get(_command.DeterminismStress); nodeFactoryFlags.PrintReproArgs = Get(_command.PrintReproInstructions); - nodeFactoryFlags.EnableCachedInterfaceDispatchSupport = Get(_command.EnableCachedInterfaceDispatchSupport); + nodeFactoryFlags.EnableCachedInterfaceDispatchSupport = Get(_command.EnableCachedInterfaceDispatchSupport) ?? !typeSystemContext.TargetAllowsRuntimeCodeGeneration; builder .UseMapFile(Get(_command.Map)) diff --git a/src/coreclr/tools/aot/crossgen2/Properties/Resources.resx b/src/coreclr/tools/aot/crossgen2/Properties/Resources.resx index e1f59a69a5cff7..ca30cc9a5e31d0 100644 --- a/src/coreclr/tools/aot/crossgen2/Properties/Resources.resx +++ b/src/coreclr/tools/aot/crossgen2/Properties/Resources.resx @@ -424,7 +424,7 @@ Number of nested occurrences of a potentially cyclic generic type to cut off - Enable support for cached interface dispatch + Enable support for cached interface dispatch. Default is true on platforms which do not support runtime code generation Target output format for the ReadyToRun image