Skip to content

Storage validation cleanup #26031

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

Merged
merged 6 commits into from
Jul 12, 2019

Conversation

slavapestov
Copy link
Contributor

Some smaller but very subtle changes to lay the groundwork for request-based accessor synthesis. Since our test suite doesn't do the best job exercising multi-file type checking I'm mostly sending this out in its current state to run source compat testing.

@swift-ci
Copy link
Contributor

swift-ci commented Jul 9, 2019

Build failed
Swift Test Linux Platform
Git Sha - 019b3b925b92520ae7f811fa2bf02453f199a8a8

@slavapestov slavapestov force-pushed the storage-validation-cleanup branch from 019b3b9 to 0928279 Compare July 11, 2019 21:03
…ckDecl()

finalizeDecl() would kick off certain requests. This was necessary
before we had the long-lived type checker to ensure that requests
that required a type checker could be completed in time for SILGen.

It was also necessary to always emit diagnostics for declarations in
primary files.

Since we now have a long lived type checker, the first reason is no
longer valid, so we can move this work from finalizeDecl() to
typeCheckDecl(), where it will run for declarations in primary files
only.

To ensure that @objc selector conflict diagnostics still get emitted,
we also walk the superclass chain and force isObjC() to be computed
for each declaration in each superclass.
Also since we're lazier about validating accessors now, relax some
checks in the ASTVerifier so that it can tolerate implicit accessors
without interface types. All other declarations must still have
interface types in verifyChecked().

ASTVerifier: Tolerate implicit accessors without interface types
Validating a variable or subscript no longer forces accessor synthesis.
@slavapestov slavapestov force-pushed the storage-validation-cleanup branch from 0928279 to ecc9e32 Compare July 12, 2019 00:56
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov
Copy link
Contributor Author

@swift-ci Please test source compatibility

@slavapestov
Copy link
Contributor Author

@swift-ci Please test compiler performance

@swiftlang swiftlang deleted a comment from swift-ci Jul 12, 2019
@swift-ci
Copy link
Contributor

Summary for master full

Unexpected test results, excluded stats for ProcedureKit, Tagged, Wordy, SwifterSwift, Deferred

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 23,519,525,284,821 23,499,957,847,399 -19,567,437,422 -0.08%
LLVM.NumLLVMBytesOutput 1,160,950,316 1,160,951,844 1,528 0.0%
time.swift-driver.wall 1676.2s 1685.7s 9.5s 0.56%

debug-batch detailed

Regressed (0)
name old new delta delta_pct
Improved (11)
name old new delta delta_pct
AST.NumObjCMethods 15,290 13,966 -1,324 -8.66% ✅
Sema.AccessLevelRequest 6,722,005 6,338,621 -383,384 -5.7% ✅
Sema.IsDynamicRequest 1,696,770 1,035,171 -661,599 -38.99% ✅
Sema.IsFinalRequest 2,903,714 2,725,712 -178,002 -6.13% ✅
Sema.IsGetterMutatingRequest 351,330 347,695 -3,635 -1.03% ✅
Sema.IsObjCRequest 1,516,756 1,032,977 -483,779 -31.9% ✅
Sema.NumDeclsFinalized 1,474,451 1,169,107 -305,344 -20.71% ✅
Sema.NumDeclsValidated 2,013,376 1,791,374 -222,002 -11.03% ✅
Sema.OpaqueReadOwnershipRequest 367,991 361,339 -6,652 -1.81% ✅
Sema.OverriddenDeclsRequest 1,932,955 1,397,411 -535,544 -27.71% ✅
Sema.SetterAccessLevelRequest 134,331 90,050 -44,281 -32.96% ✅
Unchanged (delta < 1.0% or delta < 100.0ms) (107)
name old new delta delta_pct
AST.NumASTBytesAllocated 33,015,650,528 33,077,165,930 61,515,402 0.19%
AST.NumDecls 93,543 93,543 0 0.0%
AST.NumDependencies 136,807 136,797 -10 -0.01%
AST.NumInfixOperators 34,812 34,812 0 0.0%
AST.NumLinkLibraries 0 0 0 0.0%
AST.NumLoadedModules 174,310 174,310 0 0.0%
AST.NumLocalTypeDecls 123 123 0 0.0%
AST.NumPostfixOperators 18 18 0 0.0%
AST.NumPrecedenceGroups 17,193 17,193 0 0.0%
AST.NumPrefixOperators 60 60 0 0.0%
AST.NumReferencedDynamicNames 122 122 0 0.0%
AST.NumReferencedMemberNames 4,071,280 4,071,280 0 0.0%
AST.NumReferencedTopLevelNames 315,682 315,682 0 0.0%
AST.NumSourceBuffers 213,408 213,408 0 0.0%
AST.NumSourceLines 3,118,982 3,118,982 0 0.0%
AST.NumSourceLinesPerSecond 3,403,748 3,404,950 1,202 0.04%
AST.NumStoredPropertiesQueries 9,229,010 9,229,114 104 0.0%
AST.NumTotalClangImportedEntities 3,340,594 3,335,938 -4,656 -0.14%
Driver.ChildrenMaxRSS 131,976,290,304 132,202,065,920 225,775,616 0.17%
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 19,038 19,038 0 0.0%
Driver.NumDriverJobsSkipped 0 0 0 0.0%
Driver.NumDriverPipePolls 132,114 131,829 -285 -0.22%
Driver.NumDriverPipeReads 130,424 129,891 -533 -0.41%
Driver.NumProcessFailures 0 0 0 0.0%
Frontend.MaxMallocUsage 584,866,264,168 584,692,452,064 -173,812,104 -0.03%
Frontend.NumInstructionsExecuted 23,519,525,284,821 23,499,957,847,399 -19,567,437,422 -0.08%
Frontend.NumProcessFailures 0 0 0 0.0%
IRModule.NumIRAliases 120,775 120,775 0 0.0%
IRModule.NumIRBasicBlocks 4,609,887 4,609,887 0 0.0%
IRModule.NumIRComdatSymbols 0 0 0 0.0%
IRModule.NumIRFunctions 2,144,147 2,144,147 0 0.0%
IRModule.NumIRGlobals 2,243,379 2,243,379 0 0.0%
IRModule.NumIRIFuncs 0 0 0 0.0%
IRModule.NumIRInsts 60,935,359 60,935,359 0 0.0%
IRModule.NumIRNamedMetaData 92,490 92,490 0 0.0%
IRModule.NumIRValueSymbols 3,922,904 3,922,904 0 0.0%
LLVM.NumLLVMBytesOutput 1,160,950,316 1,160,951,844 1,528 0.0%
Parse.NumFunctionsParsed 171,430 171,430 0 0.0%
Parse.NumIterableDeclContextParsed 628,394 628,394 0 0.0%
SILModule.NumSILGenDefaultWitnessTables 0 0 0 0.0%
SILModule.NumSILGenFunctions 1,081,632 1,081,632 0 0.0%
SILModule.NumSILGenGlobalVariables 36,840 36,840 0 0.0%
SILModule.NumSILGenVtables 12,417 12,417 0 0.0%
SILModule.NumSILGenWitnessTables 46,027 46,027 0 0.0%
SILModule.NumSILOptDefaultWitnessTables 0 0 0 0.0%
SILModule.NumSILOptFunctions 1,535,399 1,535,399 0 0.0%
SILModule.NumSILOptGlobalVariables 37,716 37,716 0 0.0%
SILModule.NumSILOptVtables 20,593 20,593 0 0.0%
SILModule.NumSILOptWitnessTables 101,019 101,019 0 0.0%
Sema.AttachedFunctionBuilderRequest 0 0 0 0.0%
Sema.AttachedPropertyWrapperTypeRequest 304,320 303,916 -404 -0.13%
Sema.AttachedPropertyWrappersRequest 1,265,528 1,267,138 1,610 0.13%
Sema.CustomAttrNominalRequest 0 0 0 0.0%
Sema.DefaultAndMaxAccessLevelRequest 49,421 49,418 -3 -0.01%
Sema.DefaultDefinitionTypeRequest 5,108 5,108 0 0.0%
Sema.DefaultTypeRequest 320,709 320,709 0 0.0%
Sema.EnumRawTypeRequest 13,877 13,877 0 0.0%
Sema.ExtendedNominalRequest 2,558,166 2,556,892 -1,274 -0.05%
Sema.FunctionBuilderTypeRequest 0 0 0 0.0%
Sema.InheritedDeclsReferencedRequest 3,121,019 3,111,154 -9,865 -0.32%
Sema.InheritedTypeRequest 200,780 200,703 -77 -0.04%
Sema.IsSetterMutatingRequest 256,806 255,155 -1,651 -0.64%
Sema.LazyStoragePropertyRequest 1,912 1,912 0 0.0%
Sema.MangleLocalTypeDeclRequest 246 246 0 0.0%
Sema.NamedLazyMemberLoadFailureCount 17,601 17,556 -45 -0.26%
Sema.NamedLazyMemberLoadSuccessCount 17,914,586 17,900,560 -14,026 -0.08%
Sema.NominalTypeLookupDirectCount 23,225,287 23,133,096 -92,191 -0.4%
Sema.NumConformancesDeserialized 5,187,883 5,190,284 2,401 0.05%
Sema.NumConstraintScopes 17,841,373 17,841,312 -61 -0.0%
Sema.NumConstraintsConsideredForEdgeContraction 52,792,824 52,792,288 -536 -0.0%
Sema.NumDeclsDeserialized 37,254,893 37,244,719 -10,174 -0.03%
Sema.NumDeclsTypechecked 888,291 888,291 0 0.0%
Sema.NumFunctionsTypechecked 198,539 198,539 0 0.0%
Sema.NumGenericSignatureBuilders 872,762 872,785 23 0.0%
Sema.NumLazyGenericEnvironments 6,897,394 6,913,491 16,097 0.23%
Sema.NumLazyGenericEnvironmentsLoaded 200,384 200,390 6 0.0%
Sema.NumLazyIterableDeclContexts 4,643,459 4,640,385 -3,074 -0.07%
Sema.NumLazyRequirementSignatures 468,119 468,162 43 0.01%
Sema.NumLazyRequirementSignaturesLoaded 314,721 314,739 18 0.01%
Sema.NumLeafScopes 11,467,771 11,467,767 -4 -0.0%
Sema.NumTypesDeserialized 11,330,997 11,333,969 2,972 0.03%
Sema.NumTypesValidated 1,484,995 1,486,764 1,769 0.12%
Sema.NumUnloadedLazyIterableDeclContexts 2,894,818 2,889,271 -5,547 -0.19%
Sema.PropertyWrapperBackingPropertyInfoRequest 302,029 301,625 -404 -0.13%
Sema.PropertyWrapperBackingPropertyTypeRequest 304,320 303,916 -404 -0.13%
Sema.PropertyWrapperTypeInfoRequest 0 0 0 0.0%
Sema.RequirementRequest 62,959 62,959 0 0.0%
Sema.RequirementSignatureRequest 366,140 366,041 -99 -0.03%
Sema.SelfAccessKindRequest 3,328,524 3,319,613 -8,911 -0.27%
Sema.SelfBoundsFromWhereClauseRequest 4,120,162 4,107,452 -12,710 -0.31%
Sema.StructuralTypeRequest 0 0 0 0.0%
Sema.SuperclassDeclRequest 255,161 255,181 20 0.01%
Sema.SuperclassTypeRequest 34,527 34,527 0 0.0%
Sema.TypeCheckFunctionBodyRequest 318,606 318,606 0 0.0%
Sema.TypeDeclsFromWhereClauseRequest 27,704 27,703 -1 -0.0%
Sema.USRGenerationRequest 4,270,749 4,264,404 -6,345 -0.15%
Sema.UnderlyingTypeDeclsReferencedRequest 141,316 141,143 -173 -0.12%

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 30,535,069,102,206 30,545,628,177,814 10,559,075,608 0.03%
LLVM.NumLLVMBytesOutput 993,094,998 993,098,718 3,720 0.0%
time.swift-driver.wall 3270.2s 3275.8s 5.6s 0.17%

release detailed

Regressed (0)
name old new delta delta_pct
Improved (1)
name old new delta delta_pct
Sema.NumDeclsValidated 1,197,884 1,178,686 -19,198 -1.6% ✅
Unchanged (delta < 1.0% or delta < 100.0ms) (20)
name old new delta delta_pct
AST.NumLoadedModules 17,619 17,619 0 0.0%
AST.NumTotalClangImportedEntities 778,391 778,589 198 0.03%
IRModule.NumIRBasicBlocks 3,931,136 3,931,136 0 0.0%
IRModule.NumIRFunctions 1,811,885 1,811,885 0 0.0%
IRModule.NumIRGlobals 1,989,946 1,989,946 0 0.0%
IRModule.NumIRInsts 36,194,966 36,194,966 0 0.0%
IRModule.NumIRValueSymbols 3,533,288 3,533,288 0 0.0%
LLVM.NumLLVMBytesOutput 993,094,998 993,098,718 3,720 0.0%
SILModule.NumSILGenFunctions 748,037 748,037 0 0.0%
SILModule.NumSILOptFunctions 1,001,547 1,001,547 0 0.0%
Sema.NumConformancesDeserialized 2,288,921 2,288,921 0 0.0%
Sema.NumConstraintScopes 17,599,082 17,599,082 0 0.0%
Sema.NumDeclsDeserialized 6,154,292 6,154,292 0 0.0%
Sema.NumFunctionsTypechecked 201,866 201,866 0 0.0%
Sema.NumGenericSignatureBuilders 207,868 207,868 0 0.0%
Sema.NumLazyGenericEnvironments 1,197,652 1,197,652 0 0.0%
Sema.NumLazyGenericEnvironmentsLoaded 22,075 22,075 0 0.0%
Sema.NumLazyIterableDeclContexts 762,403 762,403 0 0.0%
Sema.NumTypesDeserialized 3,168,577 3,168,577 0 0.0%
Sema.NumTypesValidated 741,424 741,424 0 0.0%

@slavapestov slavapestov merged commit fdecd00 into swiftlang:master Jul 12, 2019
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