Skip to content

[IRGen] Simplify the ownership of ProtocolInfo #18704

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 1 commit into from
Aug 16, 2018

Conversation

jrose-apple
Copy link
Contributor

Rather than keep a singly-linked list of ProtocolInfo objects to free, just rely on them being cached in the single DenseMap in TypeConverter. No functionality change.

Rather than keep a singly-linked list of ProtocolInfo objects to free,
just rely on them being cached in the single DenseMap in
TypeConverter.
@jrose-apple
Copy link
Contributor Author

@swift-ci Please test

@jrose-apple
Copy link
Contributor Author

@swift-ci Please smoke test compiler performance

@swift-ci
Copy link
Contributor

Build comment file:

Summary for master smoketest

Unexpected test results, excluded stats for Kingfisher, ReactiveCocoa

Regressions found (see below)

Debug

debug 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.NumInstructions 168,239,317,276 168,961,376,499 722,059,223 0.43%
LLVM.NumLLVMBytesOutput 9,415,500 9,415,500 0 0.0%
time.swift-driver.wall 20.5s 20.4s -45.5ms -0.22%

debug detailed

Regressed (1)
name old new delta delta_pct
Sema.NumGenericSignatureBuilders 11,069 11,697 628 5.67% ⛔
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 6,056 6,056 0 0.0%
AST.NumLoadedModules 1,281 1,281 0 0.0%
AST.NumTotalClangImportedEntities 18,776 18,776 0 0.0%
AST.NumUsedConformances 1,344 1,344 0 0.0%
IRModule.NumIRBasicBlocks 31,452 31,452 0 0.0%
IRModule.NumIRFunctions 17,229 17,229 0 0.0%
IRModule.NumIRGlobals 14,039 14,039 0 0.0%
IRModule.NumIRInsts 439,218 439,218 0 0.0%
IRModule.NumIRValueSymbols 29,459 29,459 0 0.0%
LLVM.NumLLVMBytesOutput 9,415,500 9,415,500 0 0.0%
SILModule.NumSILGenFunctions 8,060 8,060 0 0.0%
SILModule.NumSILOptFunctions 11,016 11,016 0 0.0%
Sema.NumConformancesDeserialized 41,249 41,249 0 0.0%
Sema.NumConstraintScopes 75,139 75,139 0 0.0%
Sema.NumDeclsDeserialized 264,034 264,034 0 0.0%
Sema.NumDeclsValidated 18,435 18,435 0 0.0%
Sema.NumFunctionsTypechecked 5,068 5,068 0 0.0%
Sema.NumLazyGenericEnvironments 50,612 50,612 0 0.0%
Sema.NumLazyGenericEnvironmentsLoaded 6,059 6,059 0 0.0%
Sema.NumLazyIterableDeclContexts 40,240 40,240 0 0.0%
Sema.NumTypesDeserialized 123,822 123,822 0 0.0%
Sema.NumTypesValidated 30,918 30,918 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.NumInstructions 217,088,684,253 217,492,353,773 403,669,520 0.19%
LLVM.NumLLVMBytesOutput 10,505,588 10,505,588 0 0.0%
time.swift-driver.wall 34.6s 34.6s -28.3ms -0.08%

release detailed

Regressed (1)
name old new delta delta_pct
Sema.NumGenericSignatureBuilders 2,590 2,844 254 9.81% ⛔
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 1,411 1,411 0 0.0%
AST.NumLoadedModules 100 100 0 0.0%
AST.NumTotalClangImportedEntities 4,908 4,908 0 0.0%
AST.NumUsedConformances 1,346 1,346 0 0.0%
IRModule.NumIRBasicBlocks 34,136 34,136 0 0.0%
IRModule.NumIRFunctions 15,390 15,390 0 0.0%
IRModule.NumIRGlobals 13,539 13,539 0 0.0%
IRModule.NumIRInsts 332,155 332,155 0 0.0%
IRModule.NumIRValueSymbols 27,422 27,422 0 0.0%
LLVM.NumLLVMBytesOutput 10,505,588 10,505,588 0 0.0%
SILModule.NumSILGenFunctions 6,207 6,207 0 0.0%
SILModule.NumSILOptFunctions 9,400 9,400 0 0.0%
Sema.NumConformancesDeserialized 19,794 19,794 0 0.0%
Sema.NumConstraintScopes 73,691 73,691 0 0.0%
Sema.NumDeclsDeserialized 55,121 55,121 0 0.0%
Sema.NumDeclsValidated 12,645 12,645 0 0.0%
Sema.NumFunctionsTypechecked 3,079 3,079 0 0.0%
Sema.NumLazyGenericEnvironments 9,693 9,693 0 0.0%
Sema.NumLazyGenericEnvironmentsLoaded 1,376 1,376 0 0.0%
Sema.NumLazyIterableDeclContexts 5,752 5,752 0 0.0%
Sema.NumTypesDeserialized 36,675 36,675 0 0.0%
Sema.NumTypesValidated 17,088 17,088 0 0.0%

@jrose-apple
Copy link
Contributor Author

The Sema.NumGenericSignatureBuilders changes don't make any sense to me. This table is never cleared and the items in it don't reference GSBs. @graydon, any ideas?

@graydon
Copy link
Contributor

graydon commented Aug 16, 2018

@swift-ci Please smoke test compiler performance

@graydon
Copy link
Contributor

graydon commented Aug 16, 2018

(Re-running smoketest to get archived logs for script diagnosis)

@swift-ci
Copy link
Contributor

Build comment file:

Summary for master smoketest

Unexpected test results, excluded stats for Kingfisher, ReactiveCocoa

No regressions above thresholds

Debug

debug brief

Regressed (0)
name old new delta delta_pct
Improved (1)
name old new delta delta_pct
time.swift-driver.wall 20.6s 20.3s -282.4ms -1.37% ✅
Unchanged (delta < 1.0% or delta < 100.0ms) (2)
name old new delta delta_pct
Frontend.NumInstructions 163,036,596,140 163,120,746,975 84,150,835 0.05%
LLVM.NumLLVMBytesOutput 9,383,948 9,383,948 0 0.0%

debug 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) (23)
name old new delta delta_pct
AST.NumImportedExternalDefinitions 5,978 5,978 0 0.0%
AST.NumLoadedModules 1,281 1,281 0 0.0%
AST.NumTotalClangImportedEntities 18,216 18,216 0 0.0%
AST.NumUsedConformances 1,344 1,344 0 0.0%
IRModule.NumIRBasicBlocks 30,981 30,981 0 0.0%
IRModule.NumIRFunctions 17,124 17,124 0 0.0%
IRModule.NumIRGlobals 14,036 14,036 0 0.0%
IRModule.NumIRInsts 437,736 437,736 0 0.0%
IRModule.NumIRValueSymbols 29,351 29,351 0 0.0%
LLVM.NumLLVMBytesOutput 9,383,948 9,383,948 0 0.0%
SILModule.NumSILGenFunctions 8,060 8,060 0 0.0%
SILModule.NumSILOptFunctions 11,016 11,016 0 0.0%
Sema.NumConformancesDeserialized 41,249 41,249 0 0.0%
Sema.NumConstraintScopes 75,123 75,123 0 0.0%
Sema.NumDeclsDeserialized 261,820 261,820 0 0.0%
Sema.NumDeclsValidated 18,435 18,435 0 0.0%
Sema.NumFunctionsTypechecked 5,036 5,036 0 0.0%
Sema.NumGenericSignatureBuilders 11,007 11,007 0 0.0%
Sema.NumLazyGenericEnvironments 50,212 50,212 0 0.0%
Sema.NumLazyGenericEnvironmentsLoaded 5,975 5,975 0 0.0%
Sema.NumLazyIterableDeclContexts 39,987 39,987 0 0.0%
Sema.NumTypesDeserialized 123,007 123,007 0 0.0%
Sema.NumTypesValidated 30,918 30,918 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.NumInstructions 213,889,848,118 213,897,894,140 8,046,022 0.0%
LLVM.NumLLVMBytesOutput 10,487,480 10,487,480 0 0.0%
time.swift-driver.wall 34.1s 34.1s -11.7ms -0.03%

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) (23)
name old new delta delta_pct
AST.NumImportedExternalDefinitions 1,411 1,411 0 0.0%
AST.NumLoadedModules 100 100 0 0.0%
AST.NumTotalClangImportedEntities 4,911 4,911 0 0.0%
AST.NumUsedConformances 1,346 1,346 0 0.0%
IRModule.NumIRBasicBlocks 33,983 33,983 0 0.0%
IRModule.NumIRFunctions 15,303 15,303 0 0.0%
IRModule.NumIRGlobals 13,533 13,533 0 0.0%
IRModule.NumIRInsts 331,782 331,782 0 0.0%
IRModule.NumIRValueSymbols 27,329 27,329 0 0.0%
LLVM.NumLLVMBytesOutput 10,487,480 10,487,480 0 0.0%
SILModule.NumSILGenFunctions 6,207 6,207 0 0.0%
SILModule.NumSILOptFunctions 9,400 9,400 0 0.0%
Sema.NumConformancesDeserialized 19,794 19,794 0 0.0%
Sema.NumConstraintScopes 73,691 73,691 0 0.0%
Sema.NumDeclsDeserialized 55,136 55,136 0 0.0%
Sema.NumDeclsValidated 12,645 12,645 0 0.0%
Sema.NumFunctionsTypechecked 3,079 3,079 0 0.0%
Sema.NumGenericSignatureBuilders 2,592 2,592 0 0.0%
Sema.NumLazyGenericEnvironments 9,693 9,693 0 0.0%
Sema.NumLazyGenericEnvironmentsLoaded 1,376 1,376 0 0.0%
Sema.NumLazyIterableDeclContexts 5,752 5,752 0 0.0%
Sema.NumTypesDeserialized 36,684 36,684 0 0.0%
Sema.NumTypesValidated 17,088 17,088 0 0.0%

@jrose-apple
Copy link
Contributor Author

Oh, now it works.

@jrose-apple jrose-apple merged commit ef06972 into swiftlang:master Aug 16, 2018
@jrose-apple jrose-apple deleted the unique-solution branch August 16, 2018 20:09
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.

5 participants