-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add more DataFlow tests from linker to NativeAOT #72777
Conversation
This adds several dataflow tests from linker - only those which are passing with the fixes in this change. More will be added later. Fixes: - Correctly handle Requires attributes in generic types - Recognize `ref Type` as interesting for data flow - Fix generic parameter propagation for compiler generated types - Treat multi-dimensional arrays as "Unknown" values (to match linker behavior)
The changes to the tests are ported back to linker in dotnet/linker#2912. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we sure about having all these tests whose main focus is to verify if things are kept? I think once we start to validate the kept attribute now we will have to do it 100% right or we will break CI
src/coreclr/tools/aot/Mono.Linker.Tests.Cases/DataFlow/AttributePropertyDataflow.cs
Outdated
Show resolved
Hide resolved
src/coreclr/tools/aot/Mono.Linker.Tests.Cases/DataFlow/MethodByRefReturnDataFlow.cs
Outdated
Show resolved
Hide resolved
src/coreclr/tools/aot/Mono.Linker.Tests.Cases/DataFlow/UnresolvedMembers.cs
Show resolved
Hide resolved
…his changes MetadataManager interface, but it should not be a problem. This fixes the attribute test failures. The CompilerGeneratedCodeDataflow test was failing because AOT didn't scan the body of the MoveNext method in the state machine for iterators. This is because the test actually never references IEnumerator<>.MoveNext and so the interface method and all of its implementations are removed. Fixed by making an explicit reference to it at least once.
Please see c1ca4bc for fixes to all CI failures. |
This was missed during porting of the changes from linker. More cleanup of tests.
...t/ILCompiler.Compiler/Compiler/DependencyAnalysis/CustomAttributeBasedDependencyAlgorithm.cs
Show resolved
Hide resolved
...t/ILCompiler.Compiler/Compiler/DependencyAnalysis/CustomAttributeBasedDependencyAlgorithm.cs
Show resolved
Hide resolved
src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Dataflow/MethodBodyScanner.cs
Outdated
Show resolved
Hide resolved
...t/ILCompiler.Compiler/Compiler/DependencyAnalysis/CustomAttributeBasedDependencyAlgorithm.cs
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
This adds several dataflow tests from linker - only those which are passing with the fixes in this change. More will be added later.
Fixes:
ref Type
as interesting for data flow