Generate fewer GenericMethodHashtable entries (#87466)
authorMichal Strehovský <MichalStrehovsky@users.noreply.github.com>
Wed, 14 Jun 2023 05:06:43 +0000 (14:06 +0900)
committerGitHub <noreply@github.com>
Wed, 14 Jun 2023 05:06:43 +0000 (14:06 +0900)
commit6a6339fb6ed7f828242b9557c36e2df669a26587
treed18073a462a506348b9bce1844885634c926e835
parent8b7c300bfdf9e81eec919a232d682a5294b7b7bd
Generate fewer GenericMethodHashtable entries (#87466)

GenericMethodHashtable is a hashtable of all method generic dictionaries statically present in the image. In practice, we don't need a database of all of them - only those that are reflection-visible, or have a type loader template. This PR implements that.

Saves 0.2% on BasicMinimalApi. A bit less than I hoped for but since I already have this...
src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/GenericDictionaryNode.cs
src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/GenericMethodsHashtableEntryNode.cs [new file with mode: 0644]
src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/GenericMethodsHashtableNode.cs
src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/NodeFactory.cs
src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/MetadataManager.cs
src/coreclr/tools/aot/ILCompiler.Compiler/ILCompiler.Compiler.csproj