Add more DataFlow tests from linker to NativeAOT#72777
Merged
vitek-karas merged 7 commits intodotnet:mainfrom Aug 1, 2022
Merged
Add more DataFlow tests from linker to NativeAOT#72777vitek-karas merged 7 commits intodotnet:mainfrom
vitek-karas merged 7 commits intodotnet:mainfrom
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)
Member
Author
|
The changes to the tests are ported back to linker in dotnet/linker#2912. |
tlakollo
reviewed
Jul 25, 2022
Contributor
tlakollo
left a comment
There was a problem hiding this comment.
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.
Member
Author
|
Please see c1ca4bc for fixes to all CI failures. |
This was missed during porting of the changes from linker. More cleanup of tests.
vitek-karas
commented
Jul 28, 2022
...t/ILCompiler.Compiler/Compiler/DependencyAnalysis/CustomAttributeBasedDependencyAlgorithm.cs
Show resolved
Hide resolved
vitek-karas
commented
Jul 28, 2022
...t/ILCompiler.Compiler/Compiler/DependencyAnalysis/CustomAttributeBasedDependencyAlgorithm.cs
Show resolved
Hide resolved
src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Dataflow/MethodBodyScanner.cs
Show resolved
Hide resolved
...t/ILCompiler.Compiler/Compiler/DependencyAnalysis/CustomAttributeBasedDependencyAlgorithm.cs
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 Typeas interesting for data flow