Skip to content

[semantic-arc-opts] Shrink size of arrays in LiveRange. #30152

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

Conversation

gottesmm
Copy link
Contributor

@gottesmm gottesmm commented Mar 2, 2020

I looked when building the stdlib/overlays and the vast majority of uses were < 2 for all
of these values, so it makes sense to shrink them.

Part of the reason I am doing this is that I think the pass is starting to
coalesce a little bit and also I want to start optimizing owned phi arguments so
I am going to need to start storing these. I don't want to be storing such large
small arrays in any data structure anywhere.

I looked when building the stdlib/overlays and the vast majority of uses were < 2 for all
of these values, so it makes sense to shrink them.

Part of the reason I am doing this is that I think the pass is starting to
coalesce a little bit and also I want to start optimizing owned phi arguments so
I am going to need to start storing these. I don't want to be storing such large
small arrays in any data structure anywhere.
@gottesmm
Copy link
Contributor Author

gottesmm commented Mar 2, 2020

@swift-ci smoke test and merge

@gottesmm
Copy link
Contributor Author

gottesmm commented Mar 2, 2020

@swift-ci test compiler performance

@gottesmm
Copy link
Contributor Author

gottesmm commented Mar 2, 2020

@swift-ci smoke test

@gottesmm
Copy link
Contributor Author

gottesmm commented Mar 2, 2020

Did a smoke test after a smoke test and merge to kill the smoke test jobs. I want to let the compiler perf bot finish.

@gottesmm
Copy link
Contributor Author

gottesmm commented Mar 2, 2020

@swift-ci smoke test

@swift-ci swift-ci merged commit fd6060b into swiftlang:master Mar 2, 2020
@swift-ci
Copy link
Contributor

swift-ci commented Mar 2, 2020

Summary for master full

Unexpected test results, excluded stats for RxCocoa, SwifterSwift, Base64CoderSwiftUI

No regressions above thresholds

Debug-batch

debug-batch brief

Regressed (0)
name old new delta delta_pct
Improved (0)
name old new delta delta_pct
Unchanged (delta < 1.0% or delta < 100.0ms) (3)
name old new delta delta_pct
Frontend.NumInstructionsExecuted 50,205,564,324,793 49,827,275,411,790 -378,288,913,003 -0.75%
LLVM.NumLLVMBytesOutput 1,952,763,368 1,952,761,068 -2,300 -0.0%
time.swift-driver.wall 5469.9s 5426.7s -43.2s -0.79%

debug-batch detailed

Regressed (0)
name old new delta delta_pct
Improved (13)
name old new delta delta_pct
AST.NumASTBytesAllocated 59,002,678,137 57,976,248,766 -1,026,429,371 -1.74% ✅
Driver.NumDriverPipePolls 65,241 63,720 -1,521 -2.33% ✅
Driver.NumDriverPipeReads 52,364 50,923 -1,441 -2.75% ✅
Sema.AccessLevelRequest 11,170,523 10,791,305 -379,218 -3.39% ✅
Sema.CollectOverriddenDeclsRequest 6,802,161 6,555,138 -247,023 -3.63% ✅
Sema.GenericParamListRequest 9,045,572 8,827,138 -218,434 -2.41% ✅
Sema.InterfaceTypeRequest 13,802,802 13,596,069 -206,733 -1.5% ✅
Sema.IsFinalRequest 2,617,357 2,587,545 -29,812 -1.14% ✅
Sema.NumConformancesDeserialized 9,408,471 9,270,635 -137,836 -1.47% ✅
Sema.NumDeclsDeserialized 76,170,990 75,215,395 -955,595 -1.25% ✅
Sema.OverriddenDeclsRequest 2,423,593 2,391,626 -31,967 -1.32% ✅
Sema.ProvideDefaultImplForRequest 6,802,161 6,555,138 -247,023 -3.63% ✅
Sema.USRGenerationRequest 8,285,396 8,039,687 -245,709 -2.97% ✅
Unchanged (delta < 1.0% or delta < 100.0ms) (202)
name old new delta delta_pct
AST.ImportSetCacheHit 2,192,650 2,193,060 410 0.02%
AST.ImportSetCacheMiss 999,563 999,590 27 0.0%
AST.ImportSetFoldHit 528,114 528,116 2 0.0%
AST.ImportSetFoldMiss 471,448 471,474 26 0.01%
AST.ModuleShadowCacheHit 3,606 3,606 0 0.0%
AST.ModuleShadowCacheMiss 1,913 1,913 0 0.0%
AST.ModuleVisibilityCacheHit 35,039 35,039 0 0.0%
AST.ModuleVisibilityCacheMiss 9,093 9,093 0 0.0%
AST.NumASTScopeLookups 4,397,724 4,397,382 -342 -0.01%
AST.NumBraceStmtASTScopeExpansions 641,425 641,425 0 0.0%
AST.NumBraceStmtASTScopes 641,425 641,425 0 0.0%
AST.NumDecls 143,591 143,591 0 0.0%
AST.NumDependencies 439,977 439,829 -148 -0.03%
AST.NumInfixOperators 54,567 54,567 0 0.0%
AST.NumIterableTypeBodyASTScopeExpansions 283,257 283,244 -13 -0.0%
AST.NumIterableTypeBodyASTScopes 365,349 365,222 -127 -0.03%
AST.NumLinkLibraries 0 0 0 0.0%
AST.NumLoadedModules 406,143 406,143 0 0.0%
AST.NumLocalTypeDecls 255 255 0 0.0%
AST.NumModuleLookupClassMember 6,927 6,927 0 0.0%
AST.NumModuleLookupValue 54,945,246 54,950,378 5,132 0.01%
AST.NumObjCMethods 24,747 24,747 0 0.0%
AST.NumPostfixOperators 49 49 0 0.0%
AST.NumPrecedenceGroups 26,333 26,333 0 0.0%
AST.NumPrefixOperators 99 99 0 0.0%
AST.NumReferencedDynamicNames 189 189 0 0.0%
AST.NumReferencedMemberNames 6,474,095 6,474,095 0 0.0%
AST.NumReferencedTopLevelNames 565,742 565,742 0 0.0%
AST.NumSourceBuffers 592,152 592,152 0 0.0%
AST.NumSourceLines 4,795,458 4,795,458 0 0.0%
AST.NumSourceLinesPerSecond 3,330,022 3,335,305 5,283 0.16%
AST.NumTotalClangImportedEntities 2,140,488 2,127,968 -12,520 -0.58%
Driver.ChildrenMaxRSS 257,939,316,736 258,508,851,200 569,534,464 0.22%
Driver.DriverDepCascadingDynamic 0 0 0 0.0%
Driver.DriverDepCascadingExternal 0 0 0 0.0%
Driver.DriverDepCascadingMember 0 0 0 0.0%
Driver.DriverDepCascadingNominal 0 0 0 0.0%
Driver.DriverDepCascadingTopLevel 0 0 0 0.0%
Driver.DriverDepDynamic 0 0 0 0.0%
Driver.DriverDepExternal 0 0 0 0.0%
Driver.DriverDepMember 0 0 0 0.0%
Driver.DriverDepNominal 0 0 0 0.0%
Driver.DriverDepTopLevel 0 0 0 0.0%
Driver.NumDriverJobsRun 28,508 28,508 0 0.0%
Driver.NumDriverJobsSkipped 0 0 0 0.0%
Driver.NumProcessFailures 0 0 0 0.0%
Frontend.MaxMallocUsage 1,434,060,533,512 1,428,474,716,032 -5,585,817,480 -0.39%
Frontend.NumInstructionsExecuted 50,205,564,324,793 49,827,275,411,790 -378,288,913,003 -0.75%
Frontend.NumProcessFailures 0 0 0 0.0%
IRModule.NumGOTEntries 246,785 246,785 0 0.0%
IRModule.NumIRAliases 199,593 199,593 0 0.0%
IRModule.NumIRBasicBlocks 12,409,835 12,409,835 0 0.0%
IRModule.NumIRComdatSymbols 0 0 0 0.0%
IRModule.NumIRFunctions 3,378,477 3,378,477 0 0.0%
IRModule.NumIRGlobals 3,797,094 3,797,094 0 0.0%
IRModule.NumIRIFuncs 0 0 0 0.0%
IRModule.NumIRInsts 106,934,248 106,934,248 0 0.0%
IRModule.NumIRNamedMetaData 137,660 137,660 0 0.0%
IRModule.NumIRValueSymbols 6,508,768 6,508,768 0 0.0%
LLVM.NumLLVMBytesOutput 1,952,763,368 1,952,761,068 -2,300 -0.0%
Parse.NumFunctionsParsed 274,000 274,000 0 0.0%
Parse.NumIterableDeclContextParsed 952,908 952,873 -35 -0.0%
Parse.ParseAbstractFunctionBodyRequest 250,020 250,020 0 0.0%
Parse.ParseMembersRequest 784,394 784,359 -35 -0.0%
SILGen.SILGenSourceFileRequest 27,212 27,212 0 0.0%
SILGen.SILGenWholeModuleRequest 1,285 1,285 0 0.0%
SILModule.NumSILGenDefaultWitnessTables 0 0 0 0.0%
SILModule.NumSILGenFunctions 1,734,232 1,734,232 0 0.0%
SILModule.NumSILGenGlobalVariables 54,724 54,724 0 0.0%
SILModule.NumSILGenVtables 18,938 18,938 0 0.0%
SILModule.NumSILGenWitnessTables 73,914 73,914 0 0.0%
SILModule.NumSILOptDefaultWitnessTables 0 0 0 0.0%
SILModule.NumSILOptFunctions 2,560,282 2,560,282 0 0.0%
SILModule.NumSILOptGlobalVariables 56,390 56,390 0 0.0%
SILModule.NumSILOptVtables 32,041 32,041 0 0.0%
SILModule.NumSILOptWitnessTables 171,972 171,972 0 0.0%
Sema.AbstractGenericSignatureRequest 34,713 34,713 0 0.0%
Sema.AnyObjectLookupRequest 281 281 0 0.0%
Sema.AreAllStoredPropertiesDefaultInitableRequest 23,639 23,639 0 0.0%
Sema.AttachedFunctionBuilderRequest 1 1 0 0.0%
Sema.AttachedPropertyWrapperTypeRequest 575,642 575,642 0 0.0%
Sema.AttachedPropertyWrappersRequest 2,297,321 2,297,321 0 0.0%
Sema.CallerSideDefaultArgExprRequest 78,987 78,987 0 0.0%
Sema.ClassAncestryFlagsRequest 116,623 116,623 0 0.0%
Sema.CompareDeclSpecializationRequest 478,753 477,709 -1,044 -0.22%
Sema.CursorInfoRequest 0 0 0 0.0%
Sema.CustomAttrNominalRequest 1 1 0 0.0%
Sema.DefaultAndMaxAccessLevelRequest 59,757 59,765 8 0.01%
Sema.DefaultArgumentExprRequest 39,323 39,323 0 0.0%
Sema.DefaultArgumentInitContextRequest 458 458 0 0.0%
Sema.DefaultDefinitionTypeRequest 8,593 8,593 0 0.0%
Sema.DefaultTypeRequest 489,473 489,473 0 0.0%
Sema.DifferentiableAttributeTypeCheckRequest 0 0 0 0.0%
Sema.DirectLookupRequest 33,602,864 33,470,991 -131,873 -0.39%
Sema.DynamicallyReplacedDeclRequest 1,088,865 1,088,865 0 0.0%
Sema.EmittedMembersRequest 28,531 28,531 0 0.0%
Sema.EnumRawTypeRequest 26,617 26,617 0 0.0%
Sema.EnumRawValuesRequest 10,742 10,742 0 0.0%
Sema.ExistentialConformsToSelfRequest 12,463 12,379 -84 -0.67%
Sema.ExistentialTypeSupportedRequest 18,179 18,179 0 0.0%
Sema.ExpandASTScopeRequest 7,953,507 7,953,257 -250 -0.0%
Sema.ExtendedNominalRequest 912,418 912,418 0 0.0%
Sema.ExtendedTypeRequest 86,383 86,375 -8 -0.01%
Sema.FunctionBuilderTypeRequest 1 1 0 0.0%
Sema.FunctionOperatorRequest 73,750 73,750 0 0.0%
Sema.GenericSignatureRequest 2,744,739 2,742,050 -2,689 -0.1%
Sema.GetDestructorRequest 29,008 29,008 0 0.0%
Sema.HasCircularInheritanceRequest 24,222 24,222 0 0.0%
Sema.HasCircularInheritedProtocolsRequest 10,474 10,474 0 0.0%
Sema.HasCircularRawValueRequest 9,127 9,127 0 0.0%
Sema.HasDefaultInitRequest 58,379 58,379 0 0.0%
Sema.HasDynamicMemberLookupAttributeRequest 660,274 659,458 -816 -0.12%
Sema.HasMemberwiseInitRequest 20,867 20,867 0 0.0%
Sema.HasMissingDesignatedInitializersRequest 27,046 27,046 0 0.0%
Sema.HasUserDefinedDesignatedInitRequest 58,390 58,390 0 0.0%
Sema.InferredGenericSignatureRequest 194,045 194,023 -22 -0.01%
Sema.InheritedDeclsReferencedRequest 5,920,851 5,887,302 -33,549 -0.57%
Sema.InheritedTypeRequest 321,897 322,090 193 0.06%
Sema.InheritsSuperclassInitializersRequest 29,400 29,400 0 0.0%
Sema.InitKindRequest 100,493 100,493 0 0.0%
Sema.IsABICompatibleOverrideRequest 138,427 138,427 0 0.0%
Sema.IsAccessorTransparentRequest 324,417 324,417 0 0.0%
Sema.IsCallableNominalTypeRequest 2,133 2,133 0 0.0%
Sema.IsDeclApplicableRequest 0 0 0 0.0%
Sema.IsDynamicRequest 1,785,153 1,785,153 0 0.0%
Sema.IsGetterMutatingRequest 443,561 443,561 0 0.0%
Sema.IsImplicitlyUnwrappedOptionalRequest 2,508,555 2,508,363 -192 -0.01%
Sema.IsObjCRequest 1,608,247 1,604,702 -3,545 -0.22%
Sema.IsSetterMutatingRequest 349,551 349,551 0 0.0%
Sema.IsStaticRequest 960,672 960,886 214 0.02%
Sema.LazyStoragePropertyRequest 2,913 2,913 0 0.0%
Sema.LookupInModuleRequest 7,238,225 7,241,925 3,700 0.05%
Sema.LookupPrecedenceGroupRequest 180,430 180,430 0 0.0%
Sema.MangleLocalTypeDeclRequest 510 510 0 0.0%
Sema.ModuleQualifiedLookupRequest 3,131,611 3,135,633 4,022 0.13%
Sema.NamedLazyMemberLoadSuccessCount 22,179,326 22,197,796 18,470 0.08%
Sema.NamingPatternRequest 236,577 236,577 0 0.0%
Sema.NeedsNewVTableEntryRequest 707,826 707,826 0 0.0%
Sema.NumAccessorBodiesSynthesized 191,884 191,884 0 0.0%
Sema.NumAccessorsSynthesized 300,832 300,832 0 0.0%
Sema.NumConstraintScopes 31,336,292 31,321,521 -14,771 -0.05%
Sema.NumConstraintsConsideredForEdgeContraction 110,741,960 110,740,389 -1,571 -0.0%
Sema.NumCrossImportsChecked 0 0 0 0.0%
Sema.NumCrossImportsFound 0 0 0 0.0%
Sema.NumCyclicOneWayComponentsCollapsed 0 0 0 0.0%
Sema.NumDeclsTypechecked 1,438,015 1,438,015 0 0.0%
Sema.NumGenericSignatureBuilders 1,429,487 1,419,316 -10,171 -0.71%
Sema.NumLazyIterableDeclContexts 9,758,539 9,717,716 -40,823 -0.42%
Sema.NumLazyRequirementSignatures 1,037,819 1,035,977 -1,842 -0.18%
Sema.NumLazyRequirementSignaturesLoaded 747,927 746,602 -1,325 -0.18%
Sema.NumLeafScopes 19,999,562 19,986,418 -13,144 -0.07%
Sema.NumTypesDeserialized 23,693,348 23,502,144 -191,204 -0.81%
Sema.NumTypesValidated 1,578,171 1,578,162 -9 -0.0%
Sema.NumUnloadedLazyIterableDeclContexts 6,712,350 6,735,863 23,513 0.35%
Sema.OpaqueReadOwnershipRequest 287,048 287,048 0 0.0%
Sema.OpaqueResultTypeRequest 0 0 0 0.0%
Sema.OperatorPrecedenceGroupRequest 747 747 0 0.0%
Sema.ParamSpecifierRequest 1,331,839 1,331,830 -9 -0.0%
Sema.PatternBindingEntryRequest 498,354 498,354 0 0.0%
Sema.PatternTypeRequest 622,235 622,235 0 0.0%
Sema.PreCheckFunctionBuilderRequest 0 0 0 0.0%
Sema.PropertyWrapperBackingPropertyInfoRequest 570,670 570,670 0 0.0%
Sema.PropertyWrapperBackingPropertyTypeRequest 575,642 575,642 0 0.0%
Sema.PropertyWrapperMutabilityRequest 643,525 643,525 0 0.0%
Sema.PropertyWrapperTypeInfoRequest 7 7 0 0.0%
Sema.ProtocolRequiresClassRequest 44,474 44,596 122 0.27%
Sema.QualifiedLookupRequest 5,654,450 5,628,281 -26,169 -0.46%
Sema.RangeInfoRequest 0 0 0 0.0%
Sema.RequirementRequest 120,219 120,210 -9 -0.01%
Sema.RequirementSignatureRequest 815,010 813,913 -1,097 -0.13%
Sema.RequiresOpaqueAccessorsRequest 1,341,189 1,341,189 0 0.0%
Sema.RequiresOpaqueModifyCoroutineRequest 277,349 277,349 0 0.0%
Sema.ResilienceExpansionRequest 1,910,600 1,910,572 -28 -0.0%
Sema.ResolveImplicitMemberRequest 384,327 381,426 -2,901 -0.75%
Sema.ResolveProtocolNameRequest 0 0 0 0.0%
Sema.ResultTypeRequest 706,803 706,792 -11 -0.0%
Sema.RootAndResultTypeOfKeypathDynamicMemberRequest 0 0 0 0.0%
Sema.RootTypeOfKeypathDynamicMemberRequest 0 0 0 0.0%
Sema.ScopedImportLookupRequest 1,076 1,076 0 0.0%
Sema.SelfAccessKindRequest 673,940 674,120 180 0.03%
Sema.SelfBoundsFromWhereClauseRequest 1,885,217 1,886,964 1,747 0.09%
Sema.SetterAccessLevelRequest 147,956 147,956 0 0.0%
Sema.StorageImplInfoRequest 1,479,530 1,479,530 0 0.0%
Sema.StoredPropertiesAndMissingMembersRequest 34,146 34,146 0 0.0%
Sema.StoredPropertiesRequest 388,838 388,838 0 0.0%
Sema.StructuralTypeRequest 2,342 2,342 0 0.0%
Sema.SuperclassDeclRequest 509,593 508,491 -1,102 -0.22%
Sema.SuperclassTypeRequest 62,093 62,093 0 0.0%
Sema.SynthesizeAccessorRequest 300,832 300,832 0 0.0%
Sema.SynthesizeDefaultInitRequest 5,488 5,488 0 0.0%
Sema.SynthesizeMemberwiseInitRequest 3,286 3,286 0 0.0%
Sema.TypeCheckFunctionBodyUntilRequest 538,772 538,772 0 0.0%
Sema.TypeCheckSourceFileRequest 27,532 27,532 0 0.0%
Sema.TypeDeclsFromWhereClauseRequest 31,292 31,300 8 0.03%
Sema.TypeEraserHasViableInitRequest 0 0 0 0.0%
Sema.TypeRelationCheckRequest 0 0 0 0.0%
Sema.TypeWitnessRequest 10,121 10,117 -4 -0.04%
Sema.UnderlyingTypeDeclsReferencedRequest 298,001 296,955 -1,046 -0.35%
Sema.UnderlyingTypeRequest 40,046 40,046 0 0.0%
Sema.UnqualifiedLookupRequest 4,547,598 4,547,256 -342 -0.01%
Sema.ValueWitnessRequest 70,084 70,084 0 0.0%
TBDGen.GenerateTBDRequest 27,232 27,232 0 0.0%

Release

release brief

Regressed (0)
name old new delta delta_pct
Improved (0)
name old new delta delta_pct
Unchanged (delta < 1.0% or delta < 100.0ms) (3)
name old new delta delta_pct
Frontend.NumInstructionsExecuted 52,094,226,260,208 52,102,545,771,683 8,319,511,475 0.02%
LLVM.NumLLVMBytesOutput 1,840,828,120 1,840,825,316 -2,804 -0.0%
time.swift-driver.wall 9131.1s 9138.2s 7.1s 0.08%

release detailed

Regressed (0)
name old new delta delta_pct
Improved (0)
name old new delta delta_pct
Unchanged (delta < 1.0% or delta < 100.0ms) (17)
name old new delta delta_pct
AST.NumLoadedModules 30,691 30,691 0 0.0%
AST.NumTotalClangImportedEntities 456,643 456,643 0 0.0%
IRModule.NumIRBasicBlocks 5,201,217 5,201,217 0 0.0%
IRModule.NumIRFunctions 2,800,718 2,800,718 0 0.0%
IRModule.NumIRGlobals 3,301,741 3,301,741 0 0.0%
IRModule.NumIRInsts 50,214,478 50,214,478 0 0.0%
IRModule.NumIRValueSymbols 5,737,321 5,737,321 0 0.0%
LLVM.NumLLVMBytesOutput 1,840,828,120 1,840,825,316 -2,804 -0.0%
SILModule.NumSILGenFunctions 1,213,251 1,213,251 0 0.0%
SILModule.NumSILOptFunctions 1,022,823 1,022,823 0 0.0%
Sema.NumConformancesDeserialized 3,523,786 3,523,786 0 0.0%
Sema.NumConstraintScopes 30,991,325 30,991,325 0 0.0%
Sema.NumDeclsDeserialized 10,890,407 10,890,407 0 0.0%
Sema.NumGenericSignatureBuilders 280,575 280,575 0 0.0%
Sema.NumLazyIterableDeclContexts 1,335,918 1,335,918 0 0.0%
Sema.NumTypesDeserialized 5,292,949 5,292,949 0 0.0%
Sema.NumTypesValidated 841,849 841,849 0 0.0%

@gottesmm gottesmm deleted the pr-c76b9e059534e964d03ea4628f3d7325598632fa branch July 23, 2021 21:54
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.

2 participants