Skip to content

Implement lazy member loading for mirrored protocol members in imported types #26975

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
Feb 4, 2020

Conversation

slavapestov
Copy link
Contributor

No description provided.

@slavapestov

This comment has been minimized.

@jrose-apple

This comment has been minimized.

@swift-ci

This comment has been minimized.

@jrose-apple

This comment has been minimized.

@slavapestov slavapestov changed the title Implement lazy member loading for constructors and mirrored protocol members in imported types Implement lazy member loading for mirrored protocol members in imported types Jan 22, 2020
@slavapestov slavapestov requested review from CodaFi and removed request for jrose-apple January 22, 2020 06:21
@CodaFi
Copy link
Contributor

CodaFi commented Jan 22, 2020

Can you strike the inherited constructors part of this patch? It's a bit noisy.

@slavapestov
Copy link
Contributor Author

@CodaFi The inherited constructors change is in a separate NFC commit.

@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov
Copy link
Contributor Author

@swift-ci Please test source compatibility

The lambda here was completely unnecessary.
Once lazy loading supports mirrored protocol members, we can end up
calling importSubscript() for a setter method before we've mirrored
the getter. In this case, we call findCounterpart() with the setter,
which finds the imported getter from the ProtocolDecl itself.

Stop processing the potential subscript in this case, since when we
later mirror the protocol member, we'll go and build it again.

This should be NFC without the next change I'm working on.
…MethodsInGlobalPool()

Let's try calling ObjCInterface::lookupMethod() instead. This also
eliminates an order dependency between selector conflict checking
and protocol member mirroring, which fixes a diagnostics regression
once lazy loading is enabled for mirrored protocol members.
@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 slavapestov merged commit d0205d8 into swiftlang:master Feb 4, 2020
@swift-ci
Copy link
Contributor

swift-ci commented Feb 4, 2020

Summary for master smoketest

Regressions found (see below)

Debug

debug brief

Regressed (2)
name old new delta delta_pct
Frontend.NumInstructionsExecuted 882,518,775,174 944,938,220,142 62,419,444,968 7.07% ⛔
time.swift-driver.wall 98.8s 101.7s 2.9s 2.91% ⛔
Improved (0)
name old new delta delta_pct
Unchanged (delta < 1.0% or delta < 100.0ms) (1)
name old new delta delta_pct
LLVM.NumLLVMBytesOutput 50,753,808 50,753,428 -380 -0.0%

debug detailed

Regressed (4)
name old new delta delta_pct
Sema.NumConformancesDeserialized 155,405 186,855 31,450 20.24% ⛔
Sema.NumDeclsDeserialized 1,323,461 1,526,860 203,399 15.37% ⛔
Sema.NumGenericSignatureBuilders 25,766 27,147 1,381 5.36% ⛔
Sema.NumTypesDeserialized 458,552 497,646 39,094 8.53% ⛔
Improved (1)
name old new delta delta_pct
AST.NumTotalClangImportedEntities 181,119 59,080 -122,039 -67.38% ✅
Unchanged (delta < 1.0% or delta < 100.0ms) (13)
name old new delta delta_pct
AST.NumLoadedModules 7,360 7,360 0 0.0%
IRModule.NumIRBasicBlocks 189,026 189,026 0 0.0%
IRModule.NumIRFunctions 101,615 101,615 0 0.0%
IRModule.NumIRGlobals 110,101 110,101 0 0.0%
IRModule.NumIRInsts 2,076,125 2,076,125 0 0.0%
IRModule.NumIRValueSymbols 193,072 193,072 0 0.0%
LLVM.NumLLVMBytesOutput 50,753,808 50,753,428 -380 -0.0%
SILModule.NumSILGenFunctions 49,397 49,397 0 0.0%
SILModule.NumSILOptFunctions 67,748 67,748 0 0.0%
Sema.NumConstraintScopes 976,896 980,567 3,671 0.38%
Sema.NumFunctionsTypechecked 10,984 10,984 0 0.0%
Sema.NumLazyIterableDeclContexts 200,793 199,954 -839 -0.42%
Sema.NumTypesValidated 32,131 32,131 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 1,273,923,223,168 1,271,149,809,140 -2,773,414,028 -0.22%
LLVM.NumLLVMBytesOutput 56,792,812 56,793,752 940 0.0%
time.swift-driver.wall 191.9s 190.8s -1.1s -0.58%

release detailed

Regressed (0)
name old new delta delta_pct
Improved (3)
name old new delta delta_pct
AST.NumTotalClangImportedEntities 33,368 14,646 -18,722 -56.11% ✅
Sema.NumGenericSignatureBuilders 5,291 5,187 -104 -1.97% ✅
Sema.NumLazyIterableDeclContexts 24,818 23,943 -875 -3.53% ✅
Unchanged (delta < 1.0% or delta < 100.0ms) (15)
name old new delta delta_pct
AST.NumLoadedModules 552 552 0 0.0%
IRModule.NumIRBasicBlocks 169,463 169,463 0 0.0%
IRModule.NumIRFunctions 77,865 77,865 0 0.0%
IRModule.NumIRGlobals 88,575 88,575 0 0.0%
IRModule.NumIRInsts 1,454,155 1,454,155 0 0.0%
IRModule.NumIRValueSymbols 155,615 155,615 0 0.0%
LLVM.NumLLVMBytesOutput 56,792,812 56,793,752 940 0.0%
SILModule.NumSILGenFunctions 28,956 28,956 0 0.0%
SILModule.NumSILOptFunctions 24,763 24,763 0 0.0%
Sema.NumConformancesDeserialized 79,161 79,161 0 0.0%
Sema.NumConstraintScopes 968,017 968,017 0 0.0%
Sema.NumDeclsDeserialized 198,541 196,967 -1,574 -0.79%
Sema.NumFunctionsTypechecked 10,984 10,984 0 0.0%
Sema.NumTypesDeserialized 107,203 106,725 -478 -0.45%
Sema.NumTypesValidated 18,705 18,705 0 0.0%

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.

4 participants