Skip to content

Conversation

agocke
Copy link
Member

@agocke agocke commented Aug 16, 2025

These are commits that were done before the end of the day yesterday, but missed the RC1 snap. We didn't specify a snap time, so it's easiest to just grab everything from yesterday.

MichalStrehovsky and others added 6 commits August 16, 2025 00:41
…lysis (dotnet#118769)

A couple times in the past I needed a way to say "if X is not part of the program, eliminate the entire basic block". We can do this for allocated types (this is how branches under `is` checks elimination works), but we can't do this for more general "characteristics".

This introduces a mechanism where AOT compiler and CoreLib (or System.Private.* universe in general) can define whole program tags such as "whole program has X in it" and CoreLib can condition code on the presence of this tag.

This is easier shown than described, so I extracted the first use of this into a separate commit. In this commit, we eliminate code that tries looking for `StackTraceHiddenAttribute` if we know the whole program has no `StackTraceHiddenAttribute` in it. With this code eliminated, dotnet#118640 can then eliminate all custom attributes on methods, which in turn plays into dotnet#118718 and we can eliminate enum boxing even when StackTraceSupport is not set to false (right now dotnet#118718 really needs the StackTraceSupport=false to get rid of boxed enums; we get more boxed enums from method attributes).

We have a new node that represents the characteristic. The node can be dropped into the graph wherever needed. ILScanner then uses this to condition parts of the method body on this characteristic node. We need similar logic in the substitution IL provider because we need to guarantee that RyuJIT is not going to see basic blocks we didn't scan. So we treat it as a substitution during codegen phase too.
Contributing towards [dotnet#115479](dotnet#115479)

Contains implementations for the set of [SVE2 FP APIs](dotnet#94018 (comment)), aside from `ConvertToSingleOdd` and `ConvertToSingleOddRoundToOdd`. This is due to concerns I have about the API proposal for these intrinsics being incorrect, when I have a resolution to [my comments](dotnet#94018 (comment)) on this they will be implemented.
The assertion only ended up printing stderr, but it would be useful to have all the information about the command that was run (the exit code, stdout).
and if the GCGen0MaxBudget config is specified, always honor it including for DATAS
With large block counts, the CFG convergence takes a long time and performs a lot of Meets, allocating a new Dictionary for each Value in each block. This adds up to gigabytes of allocations in the process.

Ideally we would fix the performance issue with some optimization, but I'm still working on a proper solution. To fix the issue for .NET 10 in the meantime, we can add a limit to the number of iterations to bail out if we reach an excessively large number of iterations. The largest number of iterations in the runtime build is 2600, so 10,000 seems fairly reasonable. The build time of the project in issue dotnet#118121 is around ~20 seconds with 10,000 iterations and ~70 seconds with 20,000.
@Copilot Copilot AI review requested due to automatic review settings August 16, 2025 16:40
@agocke agocke requested a review from mmitche August 16, 2025 16:40
@dotnet-policy-service dotnet-policy-service bot added the linkable-framework Issues associated with delivering a linker friendly framework label Aug 16, 2025
Copy link
Contributor

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

A collection of pre-RC1 commits that were missed from the initial RC1 snapshot. This consolidation includes various improvements and new features across different areas of the codebase.

  • Addition of new ARM SVE2 hardware intrinsics for complex operations and mathematical functions
  • Implementation of new dataflow analysis convergence diagnostics and OIDs updates
  • Introduction of analysis characteristics framework for trimming and stack trace optimization

Reviewed Changes

Copilot reviewed 39 out of 41 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/tools/illink/src/ILLink.Shared/SharedStrings.resx Added diagnostic messages for dataflow analysis timeout
src/tools/illink/src/ILLink.Shared/DiagnosticId.cs Added new diagnostic ID for dataflow analysis convergence
src/tools/illink/src/ILLink.Shared/DataFlow/ForwardDataFlowAnalysis.cs Added iteration limit and convergence detection to Fixpoint method
src/tools/illink/src/ILLink.RoslynAnalyzer/DynamicallyAccessedMembersAnalyzer.cs Added dataflow analysis failure reporting
src/tools/illink/src/ILLink.RoslynAnalyzer/DataFlow/LocalDataFlowAnalysis.cs Added convergence checks to local dataflow analysis
src/tests/nativeaot/SmokeTests/AttributeTrimming/AttributeTrimming.csproj Added new test project for attribute trimming
src/tests/nativeaot/SmokeTests/AttributeTrimming/AttributeTrimming.cs Test implementation for attribute trimming behavior
src/tests/JIT/HardwareIntrinsics/Arm/Shared/Helpers.cs Added new helper methods for ARM hardware intrinsics
src/tests/Common/GenerateHWIntrinsicTests/Arm/Templates.cs Added new test template for SVE narrowing operations
src/tests/Common/GenerateHWIntrinsicTests/Arm/SveTests.cs Updated SVE test configurations
src/libraries/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.cs Added new ARM SVE2 intrinsic method signatures
src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve2.cs Implemented new SVE2 hardware intrinsics
src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve2.PlatformNotSupported.cs Added platform not supported stubs for new intrinsics
src/libraries/Common/src/System/Security/Cryptography/Oids.cs Updated ML-DSA OID constants
src/installer/tests/TestUtils/CommandResult.cs Added diagnostics information getter
src/installer/tests/TestUtils/Assertions/CommandResultExtensions.cs Improved error messaging
src/installer/tests/TestUtils/Assertions/CommandResultAssertions.cs Refactored diagnostics method
src/coreclr/tools/aot/ILCompiler/Program.cs Added analysis characteristics to IL provider
src/coreclr/tools/aot/ILCompiler.Compiler/ILCompiler.Compiler.csproj Added new analysis characteristic node
src/coreclr/tools/aot/ILCompiler.Compiler/IL/ILImporter.Scanner.cs Added analysis characteristic detection
src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/SubstitutedILProvider.cs Added characteristic-based IL substitution
src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/ILScanner.cs Added analysis characteristics collection
src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/NodeFactory.cs Added analysis characteristic node factory
src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/MethodMetadataNode.cs Added StackTraceHidden analysis
src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/AnalysisCharacteristicNode.cs New dependency analysis node type
src/coreclr/nativeaot/System.Private.StackTraceMetadata/src/System.Private.StackTraceMetadata.csproj Added analysis characteristic support
src/coreclr/nativeaot/System.Private.StackTraceMetadata/src/Internal/StackTraceMetadata/StackTraceMetadata.cs Added conditional StackTraceHidden processing
src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/CompilerServices/AnalysisCharacteristicAttribute.cs New attribute for analysis characteristics
src/coreclr/jit/lsraarm64.cpp Added support for new SVE2 intrinsics in register allocation
src/coreclr/jit/lowerarmarch.cpp Added lowering support for new SVE2 intrinsics
src/coreclr/jit/hwintrinsiclistarm64sve.h Added new SVE2 hardware intrinsic definitions
src/coreclr/jit/hwintrinsiccodegenarm64.cpp Added code generation for new SVE2 intrinsics
src/coreclr/jit/hwintrinsicarm64.cpp Added intrinsic bounds checking for new operations
src/coreclr/jit/hwintrinsic.h Added signature validation for new intrinsics
src/coreclr/jit/emitarm64sve.cpp Updated SVE instruction emission
src/coreclr/jit/codegenarm64test.cpp Updated test cases for corrected rotation values
src/coreclr/gc/gcpriv.h Added new GC configuration parameters
src/coreclr/gc/gcconfig.h Added new DATAS configuration options
src/coreclr/gc/gc.cpp Implemented enhanced DATAS configuration handling
Comments suppressed due to low confidence (2)

@agocke agocke merged commit 2768fd5 into dotnet:release/10.0-rc1 Aug 16, 2025
214 of 221 checks passed
@agocke agocke deleted the rc1-mopup branch August 16, 2025 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-NativeAOT-coreclr linkable-framework Issues associated with delivering a linker friendly framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants