Skip to content

Commit df3bc5a

Browse files
committed
Remove --enable-generic-cycle-detection
1 parent 2243dc2 commit df3bc5a

7 files changed

Lines changed: 8 additions & 17 deletions

File tree

src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCodegenCompilationBuilder.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ public sealed class ReadyToRunCodegenCompilationBuilder : CompilationBuilder
4343
private CompositeImageSettings _compositeImageSettings;
4444
private ulong _imageBase;
4545
private NodeFactoryOptimizationFlags _nodeFactoryOptimizationFlags = new NodeFactoryOptimizationFlags();
46-
private int _genericCycleDetectionDepthCutoff = ReadyToRunCompilerContext.DefaultGenericCycleDepthCutoff;
47-
private int _genericCycleDetectionBreadthCutoff = ReadyToRunCompilerContext.DefaultGenericCycleBreadthCutoff;
46+
private int _genericCycleDetectionDepthCutoff = -1;
47+
private int _genericCycleDetectionBreadthCutoff = -1;
4848
private ReadyToRunContainerFormat _format = ReadyToRunContainerFormat.PE;
4949

5050
private string _jitPath;

src/coreclr/tools/aot/crossgen2/Crossgen2RootCommand.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,6 @@ internal class Crossgen2RootCommand : RootCommand
8888
new("--imagebase") { Description = SR.ImageBase };
8989
public Option<string> TargetArchitecture { get; } =
9090
new("--targetarch") { Description = SR.TargetArchOption };
91-
public Option<bool> EnableGenericCycleDetection { get; } =
92-
new("--enable-generic-cycle-detection") { Description = SR.EnableGenericCycleDetection };
9391
public Option<int> GenericCycleDepthCutoff { get; } =
9492
new("--maxgenericcycle") { DefaultValueFactory = _ => ReadyToRunCompilerContext.DefaultGenericCycleDepthCutoff, Description = SR.GenericCycleDepthCutoff };
9593
public Option<int> GenericCycleBreadthCutoff { get; } =
@@ -197,7 +195,6 @@ public Crossgen2RootCommand(string[] args) : base(SR.Crossgen2BannerText)
197195
Options.Add(SupportIbc);
198196
Options.Add(Resilient);
199197
Options.Add(ImageBase);
200-
Options.Add(EnableGenericCycleDetection);
201198
Options.Add(GenericCycleDepthCutoff);
202199
Options.Add(GenericCycleBreadthCutoff);
203200
Options.Add(TargetArchitecture);

src/coreclr/tools/aot/crossgen2/Program.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -679,12 +679,9 @@ private void RunSingleCompilation(Dictionary<string, string> inFilePaths, Instru
679679
.UseCompilationRoots(compilationRoots)
680680
.UseOptimizationMode(optimizationMode);
681681

682-
if (Get(_command.EnableGenericCycleDetection))
683-
{
684-
builder.UseGenericCycleDetection(
685-
depthCutoff: Get(_command.GenericCycleDepthCutoff),
686-
breadthCutoff: Get(_command.GenericCycleBreadthCutoff));
687-
}
682+
builder.UseGenericCycleDetection(
683+
depthCutoff: Get(_command.GenericCycleDepthCutoff),
684+
breadthCutoff: Get(_command.GenericCycleBreadthCutoff));
688685

689686
builder.UsePrintReproInstructions(CreateReproArgumentString);
690687

src/coreclr/tools/aot/crossgen2/Properties/Resources.resx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -423,9 +423,6 @@
423423
<data name="TypeValidation" xml:space="preserve">
424424
<value>Configure the runtime's behavior around validating the correctness of types defined in assemblies compiled via crossgen2</value>
425425
</data>
426-
<data name="EnableGenericCycleDetection" xml:space="preserve">
427-
<value>Perform generic cycle detection during compilation (incurs longer compilation time)</value>
428-
</data>
429426
<data name="GenericCycleBreadthCutoff" xml:space="preserve">
430427
<value>Total number of occurrences of potentially cyclic generic types within a generic type to cut off</value>
431428
</data>

src/tests/readytorun/GenericCycleDetection/Breadth1Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<!-- This is an explicit crossgen test -->
77
<AlwaysUseCrossGen2>true</AlwaysUseCrossGen2>
88
<!-- Without this flag Crossgen2 crashes after several minutes with arithmetic overflow -->
9-
<CrossGen2TestExtraArguments>--enable-generic-cycle-detection --maxgenericcycle:1 --maxgenericcyclebreadth:1</CrossGen2TestExtraArguments>
9+
<CrossGen2TestExtraArguments>--maxgenericcycle:1 --maxgenericcyclebreadth:1</CrossGen2TestExtraArguments>
1010
</PropertyGroup>
1111
<ItemGroup>
1212
<Compile Include="$(MSBuildProjectName).cs" />

src/tests/readytorun/GenericCycleDetection/Depth1Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<!-- This is an explicit crossgen test -->
77
<AlwaysUseCrossGen2>true</AlwaysUseCrossGen2>
88
<!-- Without this flag Crossgen2 crashes after several minutes with arithmetic overflow -->
9-
<CrossGen2TestExtraArguments>--enable-generic-cycle-detection --maxgenericcycle:1 --maxgenericcyclebreadth:-1</CrossGen2TestExtraArguments>
9+
<CrossGen2TestExtraArguments>--maxgenericcycle:1 --maxgenericcyclebreadth:-1</CrossGen2TestExtraArguments>
1010
</PropertyGroup>
1111
<ItemGroup>
1212
<Compile Include="$(MSBuildProjectName).cs" />

src/tests/readytorun/GenericCycleDetection/Depth3Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<!-- This is an explicit crossgen test -->
77
<AlwaysUseCrossGen2>true</AlwaysUseCrossGen2>
88
<!-- Without this flag Crossgen2 crashes after several minutes with arithmetic overflow -->
9-
<CrossGen2TestExtraArguments>--enable-generic-cycle-detection --maxgenericcycle:3 --maxgenericcyclebreadth:-1</CrossGen2TestExtraArguments>
9+
<CrossGen2TestExtraArguments>--maxgenericcycle:3 --maxgenericcyclebreadth:-1</CrossGen2TestExtraArguments>
1010
<!-- This test OOMs Crossgen2 when running in 32-bit address space -->
1111
<CLRTestTargetUnsupported Condition="'$(TargetBits)' == '32'">true</CLRTestTargetUnsupported>
1212
</PropertyGroup>

0 commit comments

Comments
 (0)