Skip to content

[ConstraintSystem] Simplify addOverloadSet #23194

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
Mar 11, 2019

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Mar 9, 2019

  • Remove whole disjunction favoring which has no effect;
  • Avoid creating separate disjunction for "inner" choices,
    which is going to be flattened later anyway.

- Remove whole disjunction favoring which has no effect;
- Avoid creating separate disjunction for "inner" choices,
  which is going to be flattened later anyway.
@xedin xedin requested a review from DougGregor March 9, 2019 02:27
@xedin
Copy link
Contributor Author

xedin commented Mar 9, 2019

@swift-ci please smoke test

@xedin
Copy link
Contributor Author

xedin commented Mar 9, 2019

@swift-ci please smoke test compiler performance

@xedin
Copy link
Contributor Author

xedin commented Mar 9, 2019

@swift-ci please test source compatibility

@swift-ci
Copy link
Contributor

swift-ci commented Mar 9, 2019

Summary for master smoketest

Unexpected test results, excluded stats for ReactiveCocoa

Regressions found (see below)

Debug

debug brief

Regressed (1)
name old new delta delta_pct
time.swift-driver.wall 14.2s 14.3s 144.4ms 1.02% ⛔
Improved (0)
name old new delta delta_pct
Unchanged (delta < 1.0% or delta < 100.0ms) (2)
name old new delta delta_pct
Frontend.NumInstructionsExecuted 107,236,997,103 107,279,073,248 42,076,145 0.04%
LLVM.NumLLVMBytesOutput 6,141,900 6,141,904 4 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 1,110 1,110 0 0.0%
AST.NumLoadedModules 1,038 1,038 0 0.0%
AST.NumTotalClangImportedEntities 4,462 4,462 0 0.0%
AST.NumUsedConformances 886 886 0 0.0%
IRModule.NumIRBasicBlocks 18,028 18,028 0 0.0%
IRModule.NumIRFunctions 10,554 10,554 0 0.0%
IRModule.NumIRGlobals 8,013 8,013 0 0.0%
IRModule.NumIRInsts 312,431 312,431 0 0.0%
IRModule.NumIRValueSymbols 17,630 17,630 0 0.0%
LLVM.NumLLVMBytesOutput 6,141,900 6,141,904 4 0.0%
SILModule.NumSILGenFunctions 5,382 5,382 0 0.0%
SILModule.NumSILOptFunctions 7,055 7,055 0 0.0%
Sema.NumConformancesDeserialized 17,297 17,297 0 0.0%
Sema.NumConstraintScopes 40,476 40,476 0 0.0%
Sema.NumDeclsDeserialized 147,033 147,033 0 0.0%
Sema.NumDeclsValidated 11,580 11,580 0 0.0%
Sema.NumFunctionsTypechecked 2,540 2,540 0 0.0%
Sema.NumGenericSignatureBuilders 5,030 5,030 0 0.0%
Sema.NumLazyGenericEnvironments 33,154 33,154 0 0.0%
Sema.NumLazyGenericEnvironmentsLoaded 2,036 2,036 0 0.0%
Sema.NumLazyIterableDeclContexts 26,980 26,980 0 0.0%
Sema.NumTypesDeserialized 66,876 66,876 0 0.0%
Sema.NumTypesValidated 12,154 12,154 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 140,947,087,779 140,895,236,774 -51,851,005 -0.04%
LLVM.NumLLVMBytesOutput 7,131,976 7,131,880 -96 -0.0%
time.swift-driver.wall 26.4s 26.4s 2.3ms 0.01%

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 402 402 0 0.0%
AST.NumLoadedModules 76 76 0 0.0%
AST.NumTotalClangImportedEntities 2,146 2,146 0 0.0%
AST.NumUsedConformances 890 890 0 0.0%
IRModule.NumIRBasicBlocks 20,921 20,921 0 0.0%
IRModule.NumIRFunctions 10,070 10,070 0 0.0%
IRModule.NumIRGlobals 8,102 8,102 0 0.0%
IRModule.NumIRInsts 220,156 220,156 0 0.0%
IRModule.NumIRValueSymbols 17,316 17,316 0 0.0%
LLVM.NumLLVMBytesOutput 7,131,976 7,131,880 -96 -0.0%
SILModule.NumSILGenFunctions 4,178 4,178 0 0.0%
SILModule.NumSILOptFunctions 5,857 5,857 0 0.0%
Sema.NumConformancesDeserialized 12,445 12,445 0 0.0%
Sema.NumConstraintScopes 39,280 39,280 0 0.0%
Sema.NumDeclsDeserialized 32,447 32,447 0 0.0%
Sema.NumDeclsValidated 7,874 7,874 0 0.0%
Sema.NumFunctionsTypechecked 2,204 2,204 0 0.0%
Sema.NumGenericSignatureBuilders 1,718 1,718 0 0.0%
Sema.NumLazyGenericEnvironments 6,873 6,873 0 0.0%
Sema.NumLazyGenericEnvironmentsLoaded 130 130 0 0.0%
Sema.NumLazyIterableDeclContexts 4,259 4,259 0 0.0%
Sema.NumTypesDeserialized 18,170 18,170 0 0.0%
Sema.NumTypesValidated 6,942 6,942 0 0.0%

@xedin
Copy link
Contributor Author

xedin commented Mar 9, 2019

That looks like jitter, let’s try again.

@xedin
Copy link
Contributor Author

xedin commented Mar 9, 2019

@swift-ci please smoke test compiler performance

@swift-ci
Copy link
Contributor

swift-ci commented Mar 9, 2019

Summary for master smoketest

Unexpected test results, excluded stats for ReactiveCocoa

No regressions above thresholds

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.NumInstructionsExecuted 106,964,027,064 107,057,642,253 93,615,189 0.09%
LLVM.NumLLVMBytesOutput 6,141,900 6,141,904 4 0.0%
time.swift-driver.wall 14.2s 14.3s 51.0ms 0.36%

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 1,110 1,110 0 0.0%
AST.NumLoadedModules 1,038 1,038 0 0.0%
AST.NumTotalClangImportedEntities 4,462 4,462 0 0.0%
AST.NumUsedConformances 886 886 0 0.0%
IRModule.NumIRBasicBlocks 18,028 18,028 0 0.0%
IRModule.NumIRFunctions 10,554 10,554 0 0.0%
IRModule.NumIRGlobals 8,013 8,013 0 0.0%
IRModule.NumIRInsts 312,431 312,431 0 0.0%
IRModule.NumIRValueSymbols 17,630 17,630 0 0.0%
LLVM.NumLLVMBytesOutput 6,141,900 6,141,904 4 0.0%
SILModule.NumSILGenFunctions 5,382 5,382 0 0.0%
SILModule.NumSILOptFunctions 7,055 7,055 0 0.0%
Sema.NumConformancesDeserialized 17,297 17,297 0 0.0%
Sema.NumConstraintScopes 40,476 40,476 0 0.0%
Sema.NumDeclsDeserialized 147,033 147,033 0 0.0%
Sema.NumDeclsValidated 11,580 11,580 0 0.0%
Sema.NumFunctionsTypechecked 2,540 2,540 0 0.0%
Sema.NumGenericSignatureBuilders 5,030 5,030 0 0.0%
Sema.NumLazyGenericEnvironments 33,154 33,154 0 0.0%
Sema.NumLazyGenericEnvironmentsLoaded 2,036 2,036 0 0.0%
Sema.NumLazyIterableDeclContexts 26,980 26,980 0 0.0%
Sema.NumTypesDeserialized 66,876 66,876 0 0.0%
Sema.NumTypesValidated 12,154 12,154 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 140,860,824,181 140,958,520,117 97,695,936 0.07%
LLVM.NumLLVMBytesOutput 7,131,976 7,131,952 -24 -0.0%
time.swift-driver.wall 26.3s 26.3s -18.9ms -0.07%

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 402 402 0 0.0%
AST.NumLoadedModules 76 76 0 0.0%
AST.NumTotalClangImportedEntities 2,146 2,146 0 0.0%
AST.NumUsedConformances 890 890 0 0.0%
IRModule.NumIRBasicBlocks 20,921 20,921 0 0.0%
IRModule.NumIRFunctions 10,070 10,070 0 0.0%
IRModule.NumIRGlobals 8,102 8,102 0 0.0%
IRModule.NumIRInsts 220,156 220,156 0 0.0%
IRModule.NumIRValueSymbols 17,316 17,316 0 0.0%
LLVM.NumLLVMBytesOutput 7,131,976 7,131,952 -24 -0.0%
SILModule.NumSILGenFunctions 4,178 4,178 0 0.0%
SILModule.NumSILOptFunctions 5,857 5,857 0 0.0%
Sema.NumConformancesDeserialized 12,445 12,445 0 0.0%
Sema.NumConstraintScopes 39,280 39,280 0 0.0%
Sema.NumDeclsDeserialized 32,447 32,447 0 0.0%
Sema.NumDeclsValidated 7,874 7,874 0 0.0%
Sema.NumFunctionsTypechecked 2,204 2,204 0 0.0%
Sema.NumGenericSignatureBuilders 1,718 1,718 0 0.0%
Sema.NumLazyGenericEnvironments 6,873 6,873 0 0.0%
Sema.NumLazyGenericEnvironmentsLoaded 130 130 0 0.0%
Sema.NumLazyIterableDeclContexts 4,259 4,259 0 0.0%
Sema.NumTypesDeserialized 18,170 18,170 0 0.0%
Sema.NumTypesValidated 6,942 6,942 0 0.0%

@xedin
Copy link
Contributor Author

xedin commented Mar 9, 2019

Alright, that’s better :)

@xedin xedin merged commit fbd7949 into swiftlang:master Mar 11, 2019
xedin added a commit to xedin/swift that referenced this pull request Mar 12, 2019
This is a follow-up to swiftlang#23194,
which broke a case were single local overload choice was preferred
over any number of outer alternatives.
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