Skip to content

Conversation

SingleAccretion
Copy link

@SingleAccretion SingleAccretion commented Oct 7, 2025

See llvm/llvm-project#79692.

The diffs are a bit mixed, but still overall significantly positive. The regressions are due to the use of the "opaque" add pattern to form non-wrapping offset additions, something we can remove in favor of the new nusw GEP feature once we update to the next EMSDK.

Diffs (WasmDebugging):

Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 647680
Total bytes of diff: 646552
Total bytes of delta: -1128 (-0.17% % of base)
Average relative delta: -1.12%
    diff is an improvement
    average relative diff is an improvement

Top method regressions (percentages):
          21 ( 4.65% of base) : 1079.dasm - S_P_CoreLib_System_Text_EncoderExceptionFallbackBuffer__Fallback_0
           7 ( 3.08% of base) : 1126.dasm - S_P_CoreLib_System_Number__TryFormatFloat<Double__Char>
           7 ( 3.08% of base) : 1137.dasm - S_P_CoreLib_System_Number__TryFormatFloat<Single__Char>
           4 ( 2.74% of base) : 1081.dasm - S_P_CoreLib_System_Reflection_Runtime_TypeInfos_NativeFormat_NativeFormatRuntimeNamedTypeInfo__get_Name
           7 ( 2.48% of base) : 1080.dasm - S_P_CoreLib_System_Reflection_Runtime_TypeInfos_RuntimeNamedTypeInfo__get_FullName
          42 ( 2.10% of base) : 1190.dasm - S_P_Reflection_Execution_Internal_Reflection_Execution_NativeFormatEnumInfo__GetEnumValuesAndNames
           4 ( 1.68% of base) : 1200.dasm - S_P_CoreLib_System_GC___AllocateUninitializedArray_g__AllocateNewUninitializedArray_52_0<Char>
           4 ( 1.68% of base) : 1139.dasm - S_P_CoreLib_System_GC___AllocateUninitializedArray_g__AllocateNewUninitializedArray_52_0<Bool>
          12 ( 1.07% of base) : 1173.dasm - S_P_CoreLib_System_Reflection_Runtime_General_NativeFormatMetadataReaderExtensions__IsCustomAttributeOfType
           4 ( 1.04% of base) : 1116.dasm - S_P_CoreLib_System_Collections_Generic_KeyValuePair__PairToString
           6 ( 0.95% of base) : 1084.dasm - S_P_CoreLib_System_Reflection_Runtime_TypeInfos_NativeFormat_NativeFormatRuntimeNamedTypeInfo__ToString
           4 ( 0.82% of base) : 1175.dasm - S_P_TypeLoader_Internal_Metadata_NativeFormat_MetadataTypeHashingAlgorithms__ComputeHashCode
           2 ( 0.79% of base) : 1220.dasm - S_P_CoreLib_System_Buffers_ProbabilisticMapState__FindModulus
          10 ( 0.75% of base) : 1101.dasm - S_P_StackTraceMetadata_Internal_StackTraceMetadata_MethodNameFormatter__EmitMethodParameters_0
           7 ( 0.72% of base) : 1151.dasm - S_P_CoreLib_System_Reflection_Runtime_General_NamespaceChain___ctor
           4 ( 0.54% of base) : 1165.dasm - S_P_CoreLib_System_CrashInfo__WriteHeader
           2 ( 0.53% of base) : 1171.dasm - S_P_CoreLib_System_Collections_Generic_ArraySortHelper_2<System___Canon__System___Canon>__HeapSort
           5 ( 0.47% of base) : 1182.dasm - S_P_CoreLib_System_Reflection_AssemblyNameFormatter__AppendQuoted
           7 ( 0.45% of base) : 1181.dasm - S_P_TypeLoader_Internal_Runtime_TypeLoader_TypeLoaderEnvironment__TryGetStaticGenericMethodComponents
           2 ( 0.23% of base) : 1205.dasm - S_P_CoreLib_System_Collections_Generic_ArraySortHelper_2<System___Canon__System___Canon>__IntroSort

Top method improvements (percentages):
         -48 (-8.50% of base) : 1217.dasm - S_P_CoreLib_System_SpanHelpers__ClearWithoutReferences
         -12 (-7.79% of base) : 1034.dasm - S_P_StackTraceMetadata_Internal_StackTraceMetadata_MethodNameFormatter__EmitTypeInstantiationName
         -21 (-6.38% of base) : 1038.dasm - S_P_StackTraceMetadata_Internal_StackTraceMetadata_MethodNameFormatter__EmitArrayTypeName
         -15 (-4.24% of base) : 1059.dasm - S_P_CoreLib_System_Reflection_Runtime_General_NativeFormatMetadataReaderExtensions__GetAttributeTypeHandle
         -17 (-4.15% of base) : 1162.dasm - S_P_CoreLib_System_Buffers_ProbabilisticWithAsciiCharSearchValues_1<S_P_CoreLib_System_Buffers_IndexOfAnyAsciiSearcher_Default>___ctor
         -10 (-4.05% of base) : 1037.dasm - S_P_StackTraceMetadata_Internal_StackTraceMetadata_MethodNameFormatter_SigTypeContext__GetHandleAt
          -6 (-3.92% of base) : 1166.dasm - S_P_CoreLib_System_CrashInfo__WriteIntValue
         -13 (-3.81% of base) : 1224.dasm - S_P_CoreLib_System_Number__FormatFloat<Double>
          -3 (-3.80% of base) : 1061.dasm - S_P_CoreLib_System_Reflection_Runtime_TypeInfos_RuntimeFunctionPointerTypeInfo__GetHashCode
          -3 (-3.80% of base) : 1237.dasm - S_P_CoreLib_System_Reflection_Runtime_TypeInfos_RuntimeConstructedGenericTypeInfo__GetHashCode
         -13 (-3.64% of base) : 1136.dasm - S_P_CoreLib_System_Number__FormatFloat<Single>
          -5 (-3.27% of base) : 1078.dasm - S_P_CoreLib_System_Text_EncoderExceptionFallbackBuffer__Fallback
          -5 (-3.23% of base) : 1167.dasm - S_P_CoreLib_System_ArgumentOutOfRangeException__ThrowNegativeOrZero<Int32>
          -5 (-3.23% of base) : 1141.dasm - S_P_CoreLib_System_ArgumentOutOfRangeException__ThrowNegative<Int32>
         -15 (-3.21% of base) : 1015.dasm - S_P_CoreLib_System_Reflection_Runtime_TypeInfos_RuntimeTypeInfo_TypeComponentsCache__CreatePerNameQueryCaches
          -3 (-3.16% of base) : 1202.dasm - String__Format_1
          -8 (-2.87% of base) : 1184.dasm - S_P_CoreLib_System_CrashInfo__WriteHexValue
          -8 (-2.87% of base) : 1186.dasm - S_P_CoreLib_System_CrashInfo__WriteHexValue_0
          -6 (-2.79% of base) : 1209.dasm - S_P_CoreLib_System_GC__GetGCMemoryInfo_0
          -5 (-2.70% of base) : 1164.dasm - S_P_CoreLib_System_ArgumentOutOfRangeException__ThrowLess<Int32>

239 total methods with Code Size differences (216 improved, 23 regressed)

@SingleAccretion SingleAccretion marked this pull request as ready for review October 8, 2025 10:14
@SingleAccretion
Copy link
Author

@dotnet/nativeaot-llvm

Copy link
Contributor

@yowl yowl left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@jkotas jkotas merged commit cbf8308 into dotnet:feature/NativeAOT-LLVM Oct 8, 2025
16 checks passed
@jkotas
Copy link
Member

jkotas commented Oct 8, 2025

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants