Skip to content

Commit 41ce20a

Browse files
authored
Fix AttributePresence in composite mode (#70737)
According to my comparative perf measurements composite framework spends about 5M more instructions in the method coreclr.dll!CMiniMdTemplate<CMiniMd>::SearchTableForMultipleRows(CMiniColDef sColumn) I tracked this down to the R2R table AttributePresence which is used to speed up attribute queries against the ECMA metadata model. In composite mode we were putting the table in the image header, not component header, and so the runtime was unable to locate it. This change fixes generation of the table in Crossgen2; I have verified that with this change I no longer see the 5M outlier. Thanks Tomas
1 parent c8654e7 commit 41ce20a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRunCodegenNodeFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@ public void AttachToDependencyGraph(DependencyAnalyzerBase<NodeFactory> graph)
663663
if (inputModule == TypeSystemContext.SystemModule)
664664
{
665665
AttributePresenceFilterNode attributePresenceTable = new AttributePresenceFilterNode(inputModule);
666-
Header.Add(Internal.Runtime.ReadyToRunSectionType.AttributePresence, attributePresenceTable, attributePresenceTable);
666+
tableHeader.Add(Internal.Runtime.ReadyToRunSectionType.AttributePresence, attributePresenceTable, attributePresenceTable);
667667
}
668668
}
669669

0 commit comments

Comments
 (0)