diff --git a/eng/Versions.props b/eng/Versions.props
index 99f010d68e354..82019b92a18f1 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -50,6 +50,7 @@
TODO: Remove pinned version once arcade supplies a compiler that enables the repo to compile.
-->
4.4.0-1.22358.14
+ 0.1.0
2.0.0-preview.4.22252.4
diff --git a/eng/testing/tests.singlefile.targets b/eng/testing/tests.singlefile.targets
index f95e1957de028..18b342db71ac0 100644
--- a/eng/testing/tests.singlefile.targets
+++ b/eng/testing/tests.singlefile.targets
@@ -26,7 +26,7 @@
$(CoreCLRILCompilerDir)netstandard/ILCompiler.Build.Tasks.dll
$(CoreCLRAotSdkDir)
$(NetCoreAppCurrentTestHostSharedFrameworkPath)
- $(NoWarn);IL3050;IL3051;IL3052;IL3055;IL1005
+ $(NoWarn);IL3050;IL3051;IL3052;IL3055;IL1005;IL3002
false
true
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler.Tests/DependencyGraphTests.cs b/src/coreclr/tools/aot/ILCompiler.Compiler.Tests/DependencyGraphTests.cs
index dc1bf6c9cd0c4..5d7a4ab2eac3c 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler.Tests/DependencyGraphTests.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler.Tests/DependencyGraphTests.cs
@@ -3,7 +3,7 @@
using System;
using System.Collections.Generic;
-
+using ILCompiler.Dataflow;
using Internal.IL;
using Internal.TypeSystem;
using Internal.TypeSystem.Ecma;
@@ -67,11 +67,12 @@ public void TestDependencyGraphInvariants(EcmaMethod method)
CompilationModuleGroup compilationGroup = new SingleFileCompilationModuleGroup();
NativeAotILProvider ilProvider = new NativeAotILProvider();
+ CompilerGeneratedState compilerGeneratedState = new CompilerGeneratedState(ilProvider, Logger.Null);
UsageBasedMetadataManager metadataManager = new UsageBasedMetadataManager(compilationGroup, context,
new FullyBlockedMetadataBlockingPolicy(), new FullyBlockedManifestResourceBlockingPolicy(),
null, new NoStackTraceEmissionPolicy(), new NoDynamicInvokeThunkGenerationPolicy(),
- new ILLink.Shared.TrimAnalysis.FlowAnnotations(Logger.Null, ilProvider), UsageBasedMetadataGenerationOptions.None,
+ new ILLink.Shared.TrimAnalysis.FlowAnnotations(Logger.Null, ilProvider, compilerGeneratedState), UsageBasedMetadataGenerationOptions.None,
Logger.Null, Array.Empty>(), Array.Empty(), Array.Empty());
CompilationBuilder builder = new RyuJitCompilationBuilder(context, compilationGroup)
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Dataflow/ArrayValue.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Dataflow/ArrayValue.cs
index 5c48191c8eca6..23740b13ef31a 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Dataflow/ArrayValue.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Dataflow/ArrayValue.cs
@@ -27,9 +27,9 @@ public static MultiValue Create(MultiValue size, TypeDesc elementType)
return result;
}
- public static MultiValue Create(int size, TypeDesc elementType)
+ public static ArrayValue Create(int size, TypeDesc elementType)
{
- return new MultiValue(new ArrayValue(new ConstIntValue(size), elementType));
+ return new ArrayValue(new ConstIntValue(size), elementType);
}
///
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Dataflow/AttributeDataFlow.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Dataflow/AttributeDataFlow.cs
new file mode 100644
index 0000000000000..afdc85ab9e06e
--- /dev/null
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Dataflow/AttributeDataFlow.cs
@@ -0,0 +1,140 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System;
+using System.Collections.Immutable;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Reflection.Metadata;
+
+using ILCompiler.DependencyAnalysis;
+using ILCompiler.Logging;
+
+using ILLink.Shared.TrimAnalysis;
+
+using Internal.TypeSystem;
+
+using CustomAttributeValue = System.Reflection.Metadata.CustomAttributeValue;
+using DependencyList = ILCompiler.DependencyAnalysisFramework.DependencyNodeCore.DependencyList;
+using MultiValue = ILLink.Shared.DataFlow.ValueSet;
+
+#nullable enable
+
+namespace ILCompiler.Dataflow
+{
+ public readonly struct AttributeDataFlow
+ {
+ readonly Logger _logger;
+ readonly NodeFactory _factory;
+ readonly FlowAnnotations _annotations;
+ readonly MessageOrigin _origin;
+
+ public AttributeDataFlow(Logger logger, NodeFactory factory, FlowAnnotations annotations, in MessageOrigin origin)
+ {
+ _annotations = annotations;
+ _factory = factory;
+ _logger = logger;
+ _origin = origin;
+ }
+
+ public DependencyList? ProcessAttributeDataflow(MethodDesc method, CustomAttributeValue arguments)
+ {
+ DependencyList? result = null;
+
+ // First do the dataflow for the constructor parameters if necessary.
+ if (_annotations.RequiresDataflowAnalysis(method))
+ {
+ var builder = ImmutableArray.CreateBuilder