Skip to content

Clean up AbstractStorageDecl validation #21520

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

Conversation

slavapestov
Copy link
Contributor

No description provided.

@slavapestov
Copy link
Contributor Author

@swift-ci Please test source compatibility

@slavapestov
Copy link
Contributor Author

@swift-ci Please test compiler performance

@swift-ci
Copy link
Contributor

Build comment file:

Summary for master full

Unexpected test results, excluded stats for Console, Service, KituraNet, SourceKittenFramework, Html, SWXMLHash, RxBlocking, NIOChatServer, NIOChatClient, URLEncodedForm, NIOEchoClient, ReSwift, NonEmpty, TemplateKit, ReactiveSwift, LaunchScreenSnapshot, Wordy, rswift, Account, Task, FluentSQL, KeychainAccess, Validation, Example, JSQCoreDataKit, NIO, Prelude, RxCocoa, swiftlint, Multipart, SQL, Trinary, SwiftyTextTable, SSLService, NIOHTTP1, LoggerAPI, Starscream, Routing, ReactiveExtensions_TestHelpers, KituraContracts, NIOWebSocketServer, ModelAssistant, Bits, Evergreen, Poker, XcodeEdit, IBAnimatableApp, DatabaseKit, NIOTLS, LineSDK, SiestaUI, Dwifft, RSCore, NIOPriorityQueue, NIOHTTP1Server, NIOEchoServer, RxSwift, Logging, COperatingSystem, Kingfisher, Commandant, PerfectLib, Surge, CoreStore, Command, NIOWebSocket, NIOFoundationCompat, PromiseKit, Deferred, ConsoleDevelopment, GRDB, Binary, Runes, Kommander, SwiftGraph, BigInt, Cub, Siesta, Core, NIOConcurrencyHelpers, RSTree, SwiftyJSON, ProcedureKitCloud, plank, Guitar, TypeDecoder, Kronos, Data, Database, Fluent, SRP, Cryptor, DNS, NIOPerformanceTester, Async, Debugging, Tagged, CoreStoreDemo, FluentBenchmark, Differentiator, Dollar, SwiftyStoreKit, PanelKit, Commander, KituraTemplateEngine, RSWeb, Kitura, RxDataSources, Yams, Octal, Prelude_UIKit, ObjectMapper, Then, SipHash, SwiftLintFramework, ReLax, ReactiveExtensions, Overture, RSDatabase, RxTest, SwiftDate, IBAnimatable, Result, Mapper, RswiftCore, RSParser, NetService, JSQDataSourcesKit, PinkyPromise, Hexadecimal, ReactiveCocoa, SwifterSwift, ProcedureKit

Regressions found (see below)

Debug-batch

debug-batch brief

Regressed (0)
name old new delta delta_pct
Improved (3)
name old new delta delta_pct
Frontend.NumInstructionsExecuted 2,745,097,544,248 2,679,409,334,220 -65,688,210,028 -2.39% ✅
LLVM.NumLLVMBytesOutput 105,755,274 104,378,258 -1,377,016 -1.3% ✅
time.swift-driver.wall 305.7s 286.6s -19.1s -6.26% ✅
Unchanged (delta < 1.0% or delta < 100.0ms) (0)
name old new delta delta_pct

debug-batch detailed

Regressed (5)
name old new delta delta_pct
Sema.AccessLevelRequest 203,995 227,824 23,829 11.68% ⛔
Sema.IsDynamicRequest 181,874 238,879 57,005 31.34% ⛔
Sema.IsObjCRequest 159,069 196,618 37,549 23.61% ⛔
Sema.NumDeclsValidated 178,153 227,783 49,630 27.86% ⛔
Sema.OverriddenDeclsRequest 506,720 517,394 10,674 2.11% ⛔
Improved (44)
name old new delta delta_pct
AST.NumASTBytesAllocated 5,478,183,566 5,253,279,508 -224,904,058 -4.11% ✅
AST.NumInfixOperators 2,014 1,966 -48 -2.38% ✅
AST.NumLoadedModules 22,685 22,453 -232 -1.02% ✅
AST.NumReferencedTopLevelNames 21,267 20,939 -328 -1.54% ✅
AST.NumSourceLines 218,712 210,376 -8,336 -3.81% ✅
AST.NumSourceLinesPerSecond 118,817 116,060 -2,757 -2.32% ✅
AST.NumTotalClangImportedEntities 567,769 561,339 -6,430 -1.13% ✅
AST.NumUsedConformances 16,950 16,762 -188 -1.11% ✅
Driver.ChildrenMaxRSS 7,263,608,832 6,610,528,256 -653,080,576 -8.99% ✅
Driver.NumDriverPipePolls 9,419 9,223 -196 -2.08% ✅
Driver.NumDriverPipeReads 8,740 8,550 -190 -2.17% ✅
Frontend.MaxMallocUsage 46,567,894,968 45,430,973,936 -1,136,921,032 -2.44% ✅
Frontend.NumInstructionsExecuted 2,745,097,544,248 2,679,409,334,220 -65,688,210,028 -2.39% ✅
IRModule.NumIRAliases 15,946 15,658 -288 -1.81% ✅
IRModule.NumIRBasicBlocks 339,721 331,283 -8,438 -2.48% ✅
IRModule.NumIRFunctions 182,317 180,271 -2,046 -1.12% ✅
IRModule.NumIRInsts 3,926,735 3,837,765 -88,970 -2.27% ✅
LLVM.NumLLVMBytesOutput 105,755,274 104,378,258 -1,377,016 -1.3% ✅
SILModule.NumSILGenGlobalVariables 1,367 1,171 -196 -14.34% ✅
SILModule.NumSILGenWitnessTables 2,913 2,883 -30 -1.03% ✅
SILModule.NumSILOptFunctions 126,543 124,239 -2,304 -1.82% ✅
SILModule.NumSILOptGlobalVariables 1,488 1,292 -196 -13.17% ✅
SILModule.NumSILOptWitnessTables 6,177 6,063 -114 -1.85% ✅
Sema.EnumRawTypeRequest 1,495 1,471 -24 -1.61% ✅
Sema.ExtendedNominalRequest 332,422 325,402 -7,020 -2.11% ✅
Sema.InheritedDeclsReferencedRequest 13,458,640 13,201,593 -257,047 -1.91% ✅
Sema.NamedLazyMemberLoadSuccessCount 1,253,815 1,224,502 -29,313 -2.34% ✅
Sema.NominalTypeLookupDirectCount 3,553,206 3,499,327 -53,879 -1.52% ✅
Sema.NumConformancesDeserialized 410,859 389,192 -21,667 -5.27% ✅
Sema.NumConstraintScopes 999,421 932,187 -67,234 -6.73% ✅
Sema.NumConstraintsConsideredForEdgeContraction 1,109,570 1,034,954 -74,616 -6.72% ✅
Sema.NumDeclsDeserialized 3,977,114 3,833,338 -143,776 -3.62% ✅
Sema.NumGenericSignatureBuilders 125,199 122,831 -2,368 -1.89% ✅
Sema.NumLazyGenericEnvironments 763,625 740,345 -23,280 -3.05% ✅
Sema.NumLazyIterableDeclContexts 644,882 632,821 -12,061 -1.87% ✅
Sema.NumLeafScopes 731,291 680,402 -50,889 -6.96% ✅
Sema.NumTypesDeserialized 1,378,440 1,344,950 -33,490 -2.43% ✅
Sema.NumTypesValidated 104,382 102,596 -1,786 -1.71% ✅
Sema.NumUnloadedLazyIterableDeclContexts 439,967 435,143 -4,824 -1.1% ✅
Sema.SelfBoundsFromWhereClauseRequest 7,372,056 7,146,552 -225,504 -3.06% ✅
Sema.SetterAccessLevelRequest 13,932 13,552 -380 -2.73% ✅
Sema.SuperclassDeclRequest 9,782,708 9,642,538 -140,170 -1.43% ✅
Sema.SuperclassTypeRequest 4,271 4,187 -84 -1.97% ✅
Sema.USRGenerationRequest 734,779 666,388 -68,391 -9.31% ✅
Unchanged (delta < 1.0% or delta < 100.0ms) (46)
name old new delta delta_pct
AST.NumDecls 5,298 5,260 -38 -0.72%
AST.NumDependencies 18,726 18,618 -108 -0.58%
AST.NumImportedExternalDefinitions 164,435 163,503 -932 -0.57%
AST.NumLinkLibraries 0 0 0 0.0%
AST.NumLocalTypeDecls 60 60 0 0.0%
AST.NumObjCMethods 1,483 1,481 -2 -0.13%
AST.NumPostfixOperators 0 0 0 0.0%
AST.NumPrecedenceGroups 1,310 1,302 -8 -0.61%
AST.NumPrefixOperators 0 0 0 0.0%
AST.NumReferencedDynamicNames 9 9 0 0.0%
AST.NumReferencedMemberNames 368,425 365,225 -3,200 -0.87%
AST.NumSourceBuffers 26,018 26,000 -18 -0.07%
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 1,208 1,200 -8 -0.66%
Driver.NumDriverJobsSkipped 0 0 0 0.0%
Driver.NumProcessFailures 0 0 0 0.0%
Frontend.NumProcessFailures 0 0 0 0.0%
IRModule.NumIRComdatSymbols 0 0 0 0.0%
IRModule.NumIRGlobals 242,887 241,059 -1,828 -0.75%
IRModule.NumIRIFuncs 0 0 0 0.0%
IRModule.NumIRNamedMetaData 5,840 5,810 -30 -0.51%
IRModule.NumIRValueSymbols 383,177 379,457 -3,720 -0.97%
Parse.NumFunctionsParsed 205,552 205,312 -240 -0.12%
Parse.NumIterableDeclContextParsed 77,359 77,261 -98 -0.13%
SILModule.NumSILGenDefaultWitnessTables 0 0 0 0.0%
SILModule.NumSILGenFunctions 213,497 212,075 -1,422 -0.67%
SILModule.NumSILGenVtables 905 903 -2 -0.22%
SILModule.NumSILOptDefaultWitnessTables 0 0 0 0.0%
SILModule.NumSILOptVtables 1,650 1,646 -4 -0.24%
Sema.DefaultAndMaxAccessLevelRequest 3,458 3,444 -14 -0.4%
Sema.InheritedTypeRequest 58,353 58,088 -265 -0.45%
Sema.NamedLazyMemberLoadFailureCount 3,204 3,177 -27 -0.84%
Sema.NumFunctionsTypechecked 125,096 124,018 -1,078 -0.86%
Sema.NumLazyGenericEnvironmentsLoaded 12,651 12,529 -122 -0.96%
Sema.RequirementRequest 2,365 2,359 -6 -0.25%
Sema.TypeDeclsFromWhereClauseRequest 2,221 2,221 0 0.0%
Sema.UnderlyingTypeDeclsReferencedRequest 635,445 637,254 1,809 0.28%

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 2,204,380,861,708 2,207,039,672,931 2,658,811,223 0.12%
LLVM.NumLLVMBytesOutput 100,492,034 100,492,202 168 0.0%
time.swift-driver.wall 450.1s 451.6s 1.5s 0.32%

release detailed

Regressed (1)
name old new delta delta_pct
Sema.NumDeclsValidated 84,918 140,396 55,478 65.33% ⛔
Improved (0)
name old new delta delta_pct
Unchanged (delta < 1.0% or delta < 100.0ms) (22)
name old new delta delta_pct
AST.NumImportedExternalDefinitions 37,795 37,795 0 0.0%
AST.NumLoadedModules 1,232 1,232 0 0.0%
AST.NumTotalClangImportedEntities 117,961 117,961 0 0.0%
AST.NumUsedConformances 17,113 17,113 0 0.0%
IRModule.NumIRBasicBlocks 327,622 327,622 0 0.0%
IRModule.NumIRFunctions 139,063 139,063 0 0.0%
IRModule.NumIRGlobals 171,208 171,208 0 0.0%
IRModule.NumIRInsts 2,990,703 2,990,703 0 0.0%
IRModule.NumIRValueSymbols 301,100 301,100 0 0.0%
LLVM.NumLLVMBytesOutput 100,492,034 100,492,202 168 0.0%
SILModule.NumSILGenFunctions 68,936 68,936 0 0.0%
SILModule.NumSILOptFunctions 70,374 70,374 0 0.0%
Sema.NumConformancesDeserialized 178,790 178,790 0 0.0%
Sema.NumConstraintScopes 792,102 792,102 0 0.0%
Sema.NumDeclsDeserialized 482,629 482,629 0 0.0%
Sema.NumFunctionsTypechecked 49,758 49,756 -2 -0.0%
Sema.NumGenericSignatureBuilders 18,650 18,650 0 0.0%
Sema.NumLazyGenericEnvironments 90,923 90,923 0 0.0%
Sema.NumLazyGenericEnvironmentsLoaded 1,826 1,826 0 0.0%
Sema.NumLazyIterableDeclContexts 65,641 65,641 0 0.0%
Sema.NumTypesDeserialized 248,656 248,656 0 0.0%
Sema.NumTypesValidated 37,834 37,834 0 0.0%

…alidateDecl()

We only ever use this in TBDGen and interface printing, and we only ever
generate TBD files or print interfaces for declarations in primary files,
so let's avoid unnecessary work in validateDecl().

Eventually we want validateDecl() to be replaced with a getInterfaceType()
request, so adding new attributes in this path (or other side effects in
general) is a big no-no.
…isitPatternBindingDecl()

The following only needs to happen in primary files:

- The weak/unowned immediate deallocation warning
- Checking error handling
- Re-contextualizing autoclosures
@slavapestov slavapestov force-pushed the clean-up-storage-validation branch from 238d77a to 6bcdc4b Compare January 2, 2019 20:12
@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 smoke test

@slavapestov
Copy link
Contributor Author

@swift-ci Please test source compatibility

@slavapestov slavapestov merged commit 5ec4c1c into swiftlang:master Jan 2, 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