Skip to content

[Diagnostics] Port name shadowing diagnostics #29024

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 8 commits into from
Jan 31, 2020

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Jan 6, 2020

Diagnose an attempt to reference a top-level name shadowed by
a local member e.g.

extension Sequence {
  func test() -> Int {
    return max(1, 2)
  }
}

Here max refers to a global function max<T>(_: T, _: T) in Swift
module and can only be accessed by adding Swift. to it, because Sequence
has a member named max which accepts a single argument.

Resolves: rdar://problem/25197358
Resolves: rdar://problem/30528057
Resolves: rdar://problem/32854314
Resolves: rdar://problem/58939370

@xedin xedin requested review from DougGregor and hborla January 6, 2020 19:34
@xedin
Copy link
Contributor Author

xedin commented Jan 6, 2020

@swift-ci please smoke test compiler performance

@xedin
Copy link
Contributor Author

xedin commented Jan 6, 2020

I think this should be okay to use performance wise until we figure out a better solution by refactoring resolveDeclRefExpr. All of the "outer" results are going to be disabled by default.

@xedin
Copy link
Contributor Author

xedin commented Jan 6, 2020

@swift-ci please smoke test compiler performance

@xedin
Copy link
Contributor Author

xedin commented Jan 6, 2020

@swift-ci please test source compatibility

@swift-ci
Copy link
Contributor

swift-ci commented Jan 6, 2020

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 107,960,287,458 107,934,114,760 -26,172,698 -0.02%
LLVM.NumLLVMBytesOutput 6,152,336 6,152,280 -56 -0.0%
time.swift-driver.wall 9.3s 9.4s 83.3ms 0.89%

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) (18)
name old new delta delta_pct
AST.NumLoadedModules 702 702 0 0.0%
AST.NumTotalClangImportedEntities 3,684 3,692 8 0.22%
IRModule.NumIRBasicBlocks 17,957 17,957 0 0.0%
IRModule.NumIRFunctions 10,605 10,605 0 0.0%
IRModule.NumIRGlobals 8,836 8,836 0 0.0%
IRModule.NumIRInsts 309,329 309,329 0 0.0%
IRModule.NumIRValueSymbols 18,465 18,465 0 0.0%
LLVM.NumLLVMBytesOutput 6,152,336 6,152,280 -56 -0.0%
SILModule.NumSILGenFunctions 5,348 5,348 0 0.0%
SILModule.NumSILOptFunctions 7,344 7,344 0 0.0%
Sema.NumConformancesDeserialized 12,530 12,530 0 0.0%
Sema.NumConstraintScopes 39,060 39,072 12 0.03%
Sema.NumDeclsDeserialized 124,804 124,838 34 0.03%
Sema.NumFunctionsTypechecked 2,034 2,034 0 0.0%
Sema.NumGenericSignatureBuilders 4,208 4,212 4 0.1%
Sema.NumLazyIterableDeclContexts 20,292 20,298 6 0.03%
Sema.NumTypesDeserialized 49,404 49,422 18 0.04%
Sema.NumTypesValidated 5,940 5,940 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 149,661,115,774 149,694,456,648 33,340,874 0.02%
LLVM.NumLLVMBytesOutput 6,862,844 6,862,828 -16 -0.0%
time.swift-driver.wall 17.9s 17.9s -12.5ms -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) (18)
name old new delta delta_pct
AST.NumLoadedModules 76 76 0 0.0%
AST.NumTotalClangImportedEntities 2,132 2,136 4 0.19%
IRModule.NumIRBasicBlocks 17,943 17,943 0 0.0%
IRModule.NumIRFunctions 9,908 9,908 0 0.0%
IRModule.NumIRGlobals 8,923 8,923 0 0.0%
IRModule.NumIRInsts 200,019 200,019 0 0.0%
IRModule.NumIRValueSymbols 18,009 18,009 0 0.0%
LLVM.NumLLVMBytesOutput 6,862,844 6,862,828 -16 -0.0%
SILModule.NumSILGenFunctions 4,162 4,162 0 0.0%
SILModule.NumSILOptFunctions 6,271 6,271 0 0.0%
Sema.NumConformancesDeserialized 11,675 11,675 0 0.0%
Sema.NumConstraintScopes 38,854 38,866 12 0.03%
Sema.NumDeclsDeserialized 33,153 33,163 10 0.03%
Sema.NumFunctionsTypechecked 2,034 2,034 0 0.0%
Sema.NumGenericSignatureBuilders 1,583 1,583 0 0.0%
Sema.NumLazyIterableDeclContexts 4,275 4,275 0 0.0%
Sema.NumTypesDeserialized 17,043 17,045 2 0.01%
Sema.NumTypesValidated 3,914 3,914 0 0.0%

@xedin
Copy link
Contributor Author

xedin commented Jan 7, 2020

@swift-ci please build toolchain macOS platform

@xedin
Copy link
Contributor Author

xedin commented Jan 7, 2020

@swift-ci please build toolchain macOS platform

@swift-ci
Copy link
Contributor

swift-ci commented Jan 7, 2020

macOS Toolchain
Download Toolchain
Git Sha - 0acc5e9387f8c3c6c957d85c7f334b904e7ed3bf

Install command
tar -zxf swift-PR-29024-462-osx.tar.gz --directory ~/

@xedin xedin force-pushed the diagnose-shadowing branch from 0acc5e9 to 5f394a5 Compare January 7, 2020 03:51
@xedin
Copy link
Contributor Author

xedin commented Jan 7, 2020

@swift-ci please smoke test compiler performance

@swift-ci
Copy link
Contributor

swift-ci commented Jan 7, 2020

Summary for master smoketest

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 1,179,493,153,663 1,180,396,233,280 903,079,617 0.08%
LLVM.NumLLVMBytesOutput 51,143,412 51,142,584 -828 -0.0%
time.swift-driver.wall 119.5s 119.9s 414.8ms 0.35%

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) (18)
name old new delta delta_pct
AST.NumLoadedModules 9,536 9,536 0 0.0%
AST.NumTotalClangImportedEntities 225,042 225,136 94 0.04%
IRModule.NumIRBasicBlocks 188,586 188,586 0 0.0%
IRModule.NumIRFunctions 101,602 101,602 0 0.0%
IRModule.NumIRGlobals 110,556 110,556 0 0.0%
IRModule.NumIRInsts 2,100,091 2,100,091 0 0.0%
IRModule.NumIRValueSymbols 193,514 193,514 0 0.0%
LLVM.NumLLVMBytesOutput 51,143,412 51,142,584 -828 -0.0%
SILModule.NumSILGenFunctions 49,400 49,400 0 0.0%
SILModule.NumSILOptFunctions 67,887 67,887 0 0.0%
Sema.NumConformancesDeserialized 205,426 205,782 356 0.17%
Sema.NumConstraintScopes 1,043,329 1,043,539 210 0.02%
Sema.NumDeclsDeserialized 1,733,617 1,734,615 998 0.06%
Sema.NumFunctionsTypechecked 10,984 10,984 0 0.0%
Sema.NumGenericSignatureBuilders 31,674 31,723 49 0.15%
Sema.NumLazyIterableDeclContexts 247,049 247,264 215 0.09%
Sema.NumTypesDeserialized 567,413 567,824 411 0.07%
Sema.NumTypesValidated 33,456 33,464 8 0.02%

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,463,579,073,380 1,463,332,732,038 -246,341,342 -0.02%
LLVM.NumLLVMBytesOutput 61,377,328 61,376,784 -544 -0.0%
time.swift-driver.wall 246.4s 245.3s -1.2s -0.47%

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) (18)
name old new delta delta_pct
AST.NumLoadedModules 552 552 0 0.0%
AST.NumTotalClangImportedEntities 35,937 35,969 32 0.09%
IRModule.NumIRBasicBlocks 188,328 188,328 0 0.0%
IRModule.NumIRFunctions 80,707 80,707 0 0.0%
IRModule.NumIRGlobals 88,852 88,852 0 0.0%
IRModule.NumIRInsts 1,623,320 1,623,320 0 0.0%
IRModule.NumIRValueSymbols 158,826 158,826 0 0.0%
LLVM.NumLLVMBytesOutput 61,377,328 61,376,784 -544 -0.0%
SILModule.NumSILGenFunctions 28,959 28,959 0 0.0%
SILModule.NumSILOptFunctions 43,156 43,156 0 0.0%
Sema.NumConformancesDeserialized 82,471 82,471 0 0.0%
Sema.NumConstraintScopes 1,028,891 1,029,027 136 0.01%
Sema.NumDeclsDeserialized 199,328 199,359 31 0.02%
Sema.NumFunctionsTypechecked 10,984 10,984 0 0.0%
Sema.NumGenericSignatureBuilders 5,337 5,343 6 0.11%
Sema.NumLazyIterableDeclContexts 24,913 24,915 2 0.01%
Sema.NumTypesDeserialized 110,992 111,022 30 0.03%
Sema.NumTypesValidated 18,705 18,705 0 0.0%

@xedin
Copy link
Contributor Author

xedin commented Jan 7, 2020

@swift-ci please test

@xedin
Copy link
Contributor Author

xedin commented Jan 7, 2020

@swift-ci please test source compatibility

@swiftlang swiftlang deleted a comment from swift-ci Jan 7, 2020
@swiftlang swiftlang deleted a comment from swift-ci Jan 7, 2020
@xedin
Copy link
Contributor Author

xedin commented Jan 7, 2020

@swift-ci please test Linux platform

@swift-ci
Copy link
Contributor

swift-ci commented Jan 7, 2020

Build failed
Swift Test Linux Platform
Git Sha - 5f394a5bebbeb74cbea300d6ceac3a23fb3993c4

@xedin
Copy link
Contributor Author

xedin commented Jan 7, 2020

There are a couple of LLDB failures:

12:53:33     lldb-Suite :: lang/swift/private_var/TestSwiftPrivateVar.py
12:53:33     lldb-Suite :: lang/swift/resilience/TestResilience.py

which have to do with unknown symbol for unsafeMutableAddressor. Don't seem related to my changes.

@xedin
Copy link
Contributor Author

xedin commented Jan 8, 2020

@swift-ci please test

@swift-ci
Copy link
Contributor

swift-ci commented Jan 8, 2020

Build failed
Swift Test Linux Platform
Git Sha - 5f394a5bebbeb74cbea300d6ceac3a23fb3993c4

@xedin
Copy link
Contributor Author

xedin commented Jan 8, 2020

@swift-ci please smoke test macOS platform

@swift-ci
Copy link
Contributor

swift-ci commented Jan 8, 2020

Build failed
Swift Test OS X Platform
Git Sha - 5f394a5bebbeb74cbea300d6ceac3a23fb3993c4

@xedin
Copy link
Contributor Author

xedin commented Jan 9, 2020

@swift-ci please smoke test macOS platform

xedin added 5 commits January 29, 2020 09:14
Diagnose an attempt to reference a top-level name shadowed by
a local member e.g.

```swift
extension Sequence {
  func test() -> Int {
    return max(1, 2)
  }
}
```

Here `min` refers to a global function `min<T>(_: T, _: T)` in `Swift`
module and can only be accessed by adding `Swift.` to it, because `Sequence`
has a member named `min` which accepts a single argument.
Stop filtering outer overload choices while trying to pre-check
expression, instead have it always fetch those and use new
fix to only attempt them in diagnostic mode (unless it's min/max
situation with conditional conformances).
Although such functionality is not yet supported we have to
mirror AST lookup and add such members into results, otherwise
there is a risk of inner/outer results mismatch.
@xedin xedin force-pushed the diagnose-shadowing branch from e75de93 to 93c2321 Compare January 29, 2020 17:20
The current way that VarDecl::isLazilyInitializedGlobal() is implemented does
not work in the debugger, since the DeclContext of all VarDecls are deserialized
Swift modules. By adding a bit to the VarDecl we can recover the fact that a
VarDecl was in fact a global even in the debugger.

<rdar://problem/58939370>
This is in preparation to a change in serialization of global variables where
this detail will matter.
@xedin
Copy link
Contributor Author

xedin commented Jan 29, 2020

test with swiftlang/llvm-project#674
@swift-ci test

@xedin
Copy link
Contributor Author

xedin commented Jan 29, 2020

test with swiftlang/llvm-project#674
@swift-ci please smoke test compiler performance

@swift-ci
Copy link
Contributor

Summary for master smoketest

No regressions above thresholds

Debug

debug brief

Regressed (0)
name old new delta delta_pct
Improved (2)
name old new delta delta_pct
Frontend.NumInstructionsExecuted 1,679,218,368,046 1,621,879,125,768 -57,339,242,278 -3.41% ✅
time.swift-driver.wall 141.0s 137.1s -3.9s -2.78% ✅
Unchanged (delta < 1.0% or delta < 100.0ms) (1)
name old new delta delta_pct
LLVM.NumLLVMBytesOutput 50,733,848 50,734,188 340 0.0%

debug detailed

Regressed (0)
name old new delta delta_pct
Improved (6)
name old new delta delta_pct
AST.NumTotalClangImportedEntities 187,443 184,746 -2,697 -1.44% ✅
Sema.NumConformancesDeserialized 222,255 213,476 -8,779 -3.95% ✅
Sema.NumDeclsDeserialized 1,779,117 1,705,651 -73,466 -4.13% ✅
Sema.NumGenericSignatureBuilders 32,631 32,254 -377 -1.16% ✅
Sema.NumLazyIterableDeclContexts 220,500 217,378 -3,122 -1.42% ✅
Sema.NumTypesDeserialized 552,936 541,894 -11,042 -2.0% ✅
Unchanged (delta < 1.0% or delta < 100.0ms) (12)
name old new delta delta_pct
AST.NumLoadedModules 7,360 7,360 0 0.0%
IRModule.NumIRBasicBlocks 189,031 189,031 0 0.0%
IRModule.NumIRFunctions 101,626 101,626 0 0.0%
IRModule.NumIRGlobals 110,101 110,101 0 0.0%
IRModule.NumIRInsts 2,076,129 2,076,129 0 0.0%
IRModule.NumIRValueSymbols 193,083 193,083 0 0.0%
LLVM.NumLLVMBytesOutput 50,733,848 50,734,188 340 0.0%
SILModule.NumSILGenFunctions 49,397 49,397 0 0.0%
SILModule.NumSILOptFunctions 67,748 67,748 0 0.0%
Sema.NumConstraintScopes 984,482 983,456 -1,026 -0.1%
Sema.NumFunctionsTypechecked 10,984 10,984 0 0.0%
Sema.NumTypesValidated 32,125 32,131 6 0.02%

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,313,539,276,715 1,313,822,410,859 283,134,144 0.02%
LLVM.NumLLVMBytesOutput 57,431,376 57,431,896 520 0.0%
time.swift-driver.wall 195.8s 194.9s -931.9ms -0.48%

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) (18)
name old new delta delta_pct
AST.NumLoadedModules 552 552 0 0.0%
AST.NumTotalClangImportedEntities 33,336 33,368 32 0.1%
IRModule.NumIRBasicBlocks 170,702 170,702 0 0.0%
IRModule.NumIRFunctions 77,884 77,884 0 0.0%
IRModule.NumIRGlobals 88,574 88,574 0 0.0%
IRModule.NumIRInsts 1,467,592 1,467,592 0 0.0%
IRModule.NumIRValueSymbols 155,632 155,632 0 0.0%
LLVM.NumLLVMBytesOutput 57,431,376 57,431,896 520 0.0%
SILModule.NumSILGenFunctions 28,956 28,956 0 0.0%
SILModule.NumSILOptFunctions 24,755 24,755 0 0.0%
Sema.NumConformancesDeserialized 79,161 79,161 0 0.0%
Sema.NumConstraintScopes 967,873 968,017 144 0.01%
Sema.NumDeclsDeserialized 198,535 198,566 31 0.02%
Sema.NumFunctionsTypechecked 10,984 10,984 0 0.0%
Sema.NumGenericSignatureBuilders 5,301 5,307 6 0.11%
Sema.NumLazyIterableDeclContexts 24,816 24,818 2 0.01%
Sema.NumTypesDeserialized 107,198 107,228 30 0.03%
Sema.NumTypesValidated 18,705 18,705 0 0.0%

@xedin
Copy link
Contributor Author

xedin commented Jan 30, 2020

@swift-ci please test source compatibility

@xedin
Copy link
Contributor Author

xedin commented Jan 30, 2020

@swift-ci please test compiler performance

@xedin
Copy link
Contributor Author

xedin commented Jan 30, 2020

Summary for master full

Unexpected test results, excluded stats for RxCocoa, SwifterSwift, Base64CoderSwiftUI

Regressions found (see below)

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 79,946,409,430,760 79,817,329,963,083 -129,079,467,677 -0.16%
LLVM.NumLLVMBytesOutput 1,822,118,222 1,822,117,268 -954 -0.0%
time.swift-driver.wall 6241.6s 6234.8s -6.7s -0.11%

debug-batch detailed

Regressed (8)
name old new delta delta_pct
AST.ImportSetCacheHit 1,945,753 2,169,858 224,105 11.52% ⛔
AST.ModuleShadowCacheHit 2,356 3,602 1,246 52.89% ⛔
AST.ModuleShadowCacheMiss 1,667 1,913 246 14.76% ⛔
AST.NumModuleLookupValue 49,775,293 54,983,428 5,208,135 10.46% ⛔
AST.NumReferencedTopLevelNames 484,793 565,430 80,637 16.63% ⛔
Sema.DefaultTypeRequest 480,641 485,948 5,307 1.1% ⛔
Sema.LookupInModuleRequest 7,068,252 7,293,583 225,331 3.19% ⛔
Sema.TypeWitnessRequest 9,657 9,906 249 2.58% ⛔
Improved (3)
name old new delta delta_pct
Driver.NumDriverPipePolls 80,516 79,156 -1,360 -1.69% ✅
Driver.NumDriverPipeReads 67,897 66,611 -1,286 -1.89% ✅
Sema.ExistentialConformsToSelfRequest 17,258 14,478 -2,780 -16.11% ✅
Unchanged (delta < 1.0% or delta < 100.0ms) (199)
name old new delta delta_pct
AST.ImportSetCacheMiss 1,044,754 1,044,718 -36 -0.0%
AST.ImportSetFoldHit 563,437 563,430 -7 -0.0%
AST.ImportSetFoldMiss 481,316 481,287 -29 -0.01%
AST.ModuleVisibilityCacheHit 34,969 35,063 94 0.27%
AST.ModuleVisibilityCacheMiss 9,151 9,157 6 0.07%
AST.NumASTBytesAllocated 72,079,702,413 72,005,122,198 -74,580,215 -0.1%
AST.NumASTScopeLookups 4,397,979 4,401,631 3,652 0.08%
AST.NumBraceStmtASTScopeExpansions 639,722 639,722 0 0.0%
AST.NumBraceStmtASTScopes 639,722 639,722 0 0.0%
AST.NumDecls 143,587 143,587 0 0.0%
AST.NumDependencies 448,517 448,585 68 0.02%
AST.NumInfixOperators 54,567 54,567 0 0.0%
AST.NumIterableTypeBodyASTScopeExpansions 278,303 278,370 67 0.02%
AST.NumIterableTypeBodyASTScopes 365,167 365,149 -18 -0.0%
AST.NumLinkLibraries 0 0 0 0.0%
AST.NumLoadedModules 414,192 414,192 0 0.0%
AST.NumLocalTypeDecls 254 254 0 0.0%
AST.NumModuleLookupClassMember 6,927 6,927 0 0.0%
AST.NumObjCMethods 24,747 24,747 0 0.0%
AST.NumPostfixOperators 49 49 0 0.0%
AST.NumPrecedenceGroups 26,329 26,329 0 0.0%
AST.NumPrefixOperators 99 99 0 0.0%
AST.NumReferencedDynamicNames 189 189 0 0.0%
AST.NumReferencedMemberNames 6,437,299 6,469,647 32,348 0.5%
AST.NumSourceBuffers 1,033,777 1,033,788 11 0.0%
AST.NumSourceLines 4,795,108 4,795,108 0 0.0%
AST.NumSourceLinesPerSecond 3,264,694 3,272,358 7,664 0.23%
AST.NumTotalClangImportedEntities 6,361,738 6,361,901 163 0.0%
Driver.ChildrenMaxRSS 252,445,878,272 251,975,567,360 -470,310,912 -0.19%
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 28,508 28,508 0 0.0%
Driver.NumDriverJobsSkipped 0 0 0 0.0%
Driver.NumProcessFailures 0 0 0 0.0%
Frontend.MaxMallocUsage 1,493,756,096,416 1,492,964,903,288 -791,193,128 -0.05%
Frontend.NumInstructionsExecuted 79,946,409,430,760 79,817,329,963,083 -129,079,467,677 -0.16%
Frontend.NumProcessFailures 0 0 0 0.0%
IRModule.NumIRAliases 199,469 199,469 0 0.0%
IRModule.NumIRBasicBlocks 6,985,707 6,985,707 0 0.0%
IRModule.NumIRComdatSymbols 0 0 0 0.0%
IRModule.NumIRFunctions 3,437,768 3,437,768 0 0.0%
IRModule.NumIRGlobals 3,735,700 3,735,700 0 0.0%
IRModule.NumIRIFuncs 0 0 0 0.0%
IRModule.NumIRInsts 88,378,438 88,378,438 0 0.0%
IRModule.NumIRNamedMetaData 137,660 137,660 0 0.0%
IRModule.NumIRValueSymbols 6,508,017 6,508,017 0 0.0%
LLVM.NumLLVMBytesOutput 1,822,118,222 1,822,117,268 -954 -0.0%
Parse.NumFunctionsParsed 273,969 273,969 0 0.0%
Parse.NumIterableDeclContextParsed 962,809 963,579 770 0.08%
Parse.ParseAbstractFunctionBodyRequest 250,031 250,031 0 0.0%
Parse.ParseMembersRequest 791,614 792,384 770 0.1%
SILGen.GenerateSILRequest 28,497 28,497 0 0.0%
SILModule.NumSILGenDefaultWitnessTables 0 0 0 0.0%
SILModule.NumSILGenFunctions 1,733,138 1,733,138 0 0.0%
SILModule.NumSILGenGlobalVariables 54,724 54,724 0 0.0%
SILModule.NumSILGenVtables 18,938 18,938 0 0.0%
SILModule.NumSILGenWitnessTables 73,908 73,908 0 0.0%
SILModule.NumSILOptDefaultWitnessTables 0 0 0 0.0%
SILModule.NumSILOptFunctions 2,558,124 2,558,124 0 0.0%
SILModule.NumSILOptGlobalVariables 56,390 56,390 0 0.0%
SILModule.NumSILOptVtables 32,041 32,041 0 0.0%
SILModule.NumSILOptWitnessTables 171,962 171,962 0 0.0%
Sema.AbstractGenericSignatureRequest 35,189 35,189 0 0.0%
Sema.AccessLevelRequest 14,694,952 14,658,099 -36,853 -0.25%
Sema.AnyObjectLookupRequest 281 281 0 0.0%
Sema.AreAllStoredPropertiesDefaultInitableRequest 23,540 23,540 0 0.0%
Sema.AttachedFunctionBuilderRequest 1 1 0 0.0%
Sema.AttachedPropertyWrapperTypeRequest 550,960 550,960 0 0.0%
Sema.AttachedPropertyWrappersRequest 2,423,743 2,423,734 -9 -0.0%
Sema.CallerSideDefaultArgExprRequest 78,971 78,971 0 0.0%
Sema.ClassAncestryFlagsRequest 113,887 113,887 0 0.0%
Sema.CollectOverriddenDeclsRequest 9,078,822 9,044,315 -34,507 -0.38%
Sema.CompareDeclSpecializationRequest 488,947 488,494 -453 -0.09%
Sema.CursorInfoRequest 0 0 0 0.0%
Sema.CustomAttrNominalRequest 1 1 0 0.0%
Sema.DefaultAndMaxAccessLevelRequest 59,752 59,764 12 0.02%
Sema.DefaultArgumentExprRequest 39,319 39,319 0 0.0%
Sema.DefaultArgumentInitContextRequest 458 458 0 0.0%
Sema.DefaultDefinitionTypeRequest 8,411 8,411 0 0.0%
Sema.DifferentiableAttributeTypeCheckRequest 0 0 0 0.0%
Sema.DirectLookupRequest 35,375,554 35,467,709 92,155 0.26%
Sema.DynamicallyReplacedDeclRequest 1,089,887 1,089,887 0 0.0%
Sema.EmittedMembersRequest 28,512 28,512 0 0.0%
Sema.EnumRawTypeRequest 26,378 26,380 2 0.01%
Sema.EnumRawValuesRequest 10,748 10,748 0 0.0%
Sema.ExistentialTypeSupportedRequest 18,355 18,355 0 0.0%
Sema.ExpandASTScopeRequest 7,847,080 7,850,498 3,418 0.04%
Sema.ExtendedNominalRequest 942,165 942,165 0 0.0%
Sema.ExtendedTypeRequest 86,281 86,340 59 0.07%
Sema.FunctionBuilderTypeRequest 1 1 0 0.0%
Sema.FunctionOperatorRequest 74,104 74,104 0 0.0%
Sema.GenericParamListRequest 11,863,808 11,842,553 -21,255 -0.18%
Sema.GenericSignatureRequest 3,355,599 3,357,290 1,691 0.05%
Sema.GetDestructorRequest 28,919 28,919 0 0.0%
Sema.HasCircularInheritanceRequest 24,294 24,294 0 0.0%
Sema.HasCircularInheritedProtocolsRequest 10,466 10,466 0 0.0%
Sema.HasCircularRawValueRequest 9,127 9,127 0 0.0%
Sema.HasDefaultInitRequest 58,039 58,039 0 0.0%
Sema.HasDynamicMemberLookupAttributeRequest 677,187 677,140 -47 -0.01%
Sema.HasMemberwiseInitRequest 20,721 20,721 0 0.0%
Sema.HasMissingDesignatedInitializersRequest 27,324 27,324 0 0.0%
Sema.HasUserDefinedDesignatedInitRequest 58,050 58,050 0 0.0%
Sema.InferredGenericSignatureRequest 193,792 194,174 382 0.2%
Sema.InheritedDeclsReferencedRequest 7,480,128 7,473,011 -7,117 -0.1%
Sema.InheritedTypeRequest 323,150 324,782 1,632 0.51%
Sema.InheritsSuperclassInitializersRequest 30,498 30,498 0 0.0%
Sema.InitKindRequest 100,173 100,173 0 0.0%
Sema.InterfaceTypeRequest 20,519,461 20,485,182 -34,279 -0.17%
Sema.IsABICompatibleOverrideRequest 138,436 138,436 0 0.0%
Sema.IsAccessorTransparentRequest 324,533 324,533 0 0.0%
Sema.IsCallableNominalTypeRequest 2,132 2,132 0 0.0%
Sema.IsDeclApplicableRequest 0 0 0 0.0%
Sema.IsDynamicRequest 1,786,375 1,786,419 44 0.0%
Sema.IsFinalRequest 2,885,109 2,881,858 -3,251 -0.11%
Sema.IsGetterMutatingRequest 443,646 443,653 7 0.0%
Sema.IsImplicitlyUnwrappedOptionalRequest 2,580,321 2,581,105 784 0.03%
Sema.IsObjCRequest 1,700,824 1,700,542 -282 -0.02%
Sema.IsSetterMutatingRequest 349,588 349,588 0 0.0%
Sema.IsStaticRequest 3,759,140 3,758,049 -1,091 -0.03%
Sema.LazyStoragePropertyRequest 2,570 2,570 0 0.0%
Sema.LookupPrecedenceGroupRequest 179,608 179,608 0 0.0%
Sema.MangleLocalTypeDeclRequest 508 508 0 0.0%
Sema.ModuleQualifiedLookupRequest 3,162,425 3,160,133 -2,292 -0.07%
Sema.NamedLazyMemberLoadFailureCount 15,471 15,467 -4 -0.03%
Sema.NamedLazyMemberLoadSuccessCount 12,976,338 13,005,645 29,307 0.23%
Sema.NamingPatternRequest 212,939 212,962 23 0.01%
Sema.NeedsNewVTableEntryRequest 708,793 708,793 0 0.0%
Sema.NumAccessorBodiesSynthesized 191,878 191,878 0 0.0%
Sema.NumAccessorsSynthesized 300,881 300,881 0 0.0%
Sema.NumConformancesDeserialized 10,746,327 10,731,261 -15,066 -0.14%
Sema.NumConstraintScopes 28,893,540 28,913,975 20,435 0.07%
Sema.NumConstraintsConsideredForEdgeContraction 98,520,334 98,540,647 20,313 0.02%
Sema.NumCyclicOneWayComponentsCollapsed 0 0 0 0.0%
Sema.NumDeclsDeserialized 85,022,865 84,923,583 -99,282 -0.12%
Sema.NumDeclsTypechecked 1,437,871 1,437,915 44 0.0%
Sema.NumFunctionsTypechecked 538,730 538,730 0 0.0%
Sema.NumGenericSignatureBuilders 1,637,474 1,637,244 -230 -0.01%
Sema.NumLazyIterableDeclContexts 10,351,098 10,347,176 -3,922 -0.04%
Sema.NumLazyRequirementSignatures 1,080,655 1,080,595 -60 -0.01%
Sema.NumLazyRequirementSignaturesLoaded 799,266 799,229 -37 -0.0%
Sema.NumLeafScopes 18,591,716 18,608,311 16,595 0.09%
Sema.NumTypesDeserialized 25,398,885 25,386,733 -12,152 -0.05%
Sema.NumTypesValidated 1,554,366 1,556,662 2,296 0.15%
Sema.NumUnloadedLazyIterableDeclContexts 6,401,325 6,403,169 1,844 0.03%
Sema.OpaqueReadOwnershipRequest 287,508 287,502 -6 -0.0%
Sema.OpaqueResultTypeRequest 0 0 0 0.0%
Sema.OperatorPrecedenceGroupRequest 747 747 0 0.0%
Sema.OverriddenDeclsRequest 2,723,618 2,720,669 -2,949 -0.11%
Sema.ParamSpecifierRequest 1,331,237 1,333,467 2,230 0.17%
Sema.PatternBindingEntryRequest 474,569 474,589 20 0.0%
Sema.PatternTypeRequest 598,446 598,466 20 0.0%
Sema.PreCheckFunctionBuilderRequest 0 0 0 0.0%
Sema.PropertyWrapperBackingPropertyInfoRequest 545,513 545,513 0 0.0%
Sema.PropertyWrapperBackingPropertyTypeRequest 550,960 550,960 0 0.0%
Sema.PropertyWrapperMutabilityRequest 643,545 643,552 7 0.0%
Sema.PropertyWrapperTypeInfoRequest 7 7 0 0.0%
Sema.ProtocolRequiresClassRequest 77,452 77,421 -31 -0.04%
Sema.ProvideDefaultImplForRequest 9,078,822 9,044,315 -34,507 -0.38%
Sema.QualifiedLookupRequest 7,542,968 7,565,080 22,112 0.29%
Sema.RangeInfoRequest 0 0 0 0.0%
Sema.RequirementRequest 119,395 120,117 722 0.6%
Sema.RequirementSignatureRequest 880,770 880,757 -13 -0.0%
Sema.RequiresOpaqueAccessorsRequest 1,341,327 1,341,327 0 0.0%
Sema.RequiresOpaqueModifyCoroutineRequest 278,072 278,072 0 0.0%
Sema.ResilienceExpansionRequest 1,903,354 1,904,113 759 0.04%
Sema.ResolveImplicitMemberRequest 407,323 407,181 -142 -0.03%
Sema.ResolveProtocolNameRequest 0 0 0 0.0%
Sema.ResultTypeRequest 708,087 708,714 627 0.09%
Sema.RootAndResultTypeOfKeypathDynamicMemberRequest 0 0 0 0.0%
Sema.RootTypeOfKeypathDynamicMemberRequest 0 0 0 0.0%
Sema.SelfAccessKindRequest 937,149 936,390 -759 -0.08%
Sema.SelfBoundsFromWhereClauseRequest 1,906,389 1,905,942 -447 -0.02%
Sema.SetterAccessLevelRequest 147,874 147,874 0 0.0%
Sema.StorageImplInfoRequest 1,453,713 1,453,715 2 0.0%
Sema.StoredPropertiesAndMissingMembersRequest 33,206 33,206 0 0.0%
Sema.StoredPropertiesRequest 378,155 378,155 0 0.0%
Sema.StructuralTypeRequest 2,336 2,336 0 0.0%
Sema.SuperclassDeclRequest 520,189 520,110 -79 -0.02%
Sema.SuperclassTypeRequest 61,701 61,701 0 0.0%
Sema.SynthesizeAccessorRequest 300,881 300,881 0 0.0%
Sema.SynthesizeDefaultInitRequest 5,421 5,421 0 0.0%
Sema.SynthesizeMemberwiseInitRequest 3,247 3,247 0 0.0%
Sema.TypeCheckFunctionBodyUntilRequest 538,730 538,730 0 0.0%
Sema.TypeCheckSourceFileRequest 27,532 27,532 0 0.0%
Sema.TypeDeclsFromWhereClauseRequest 31,205 31,217 12 0.04%
Sema.TypeRelationCheckRequest 0 0 0 0.0%
Sema.USRGenerationRequest 29,341,294 29,248,093 -93,201 -0.32%
Sema.UnderlyingTypeDeclsReferencedRequest 406,389 406,244 -145 -0.04%
Sema.UnderlyingTypeRequest 39,284 39,330 46 0.12%
Sema.UnqualifiedLookupRequest 4,545,114 4,548,766 3,652 0.08%
Sema.ValueWitnessRequest 70,304 70,316 12 0.02%

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 49,394,321,687,141 49,358,978,208,522 -35,343,478,619 -0.07%
LLVM.NumLLVMBytesOutput 1,862,180,780 1,862,198,624 17,844 0.0%
time.swift-driver.wall 9063.8s 9050.9s -13.0s -0.14%

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) (18)
name old new delta delta_pct
AST.NumLoadedModules 30,691 30,691 0 0.0%
AST.NumTotalClangImportedEntities 1,152,447 1,155,245 2,798 0.24%
IRModule.NumIRBasicBlocks 5,035,260 5,035,260 0 0.0%
IRModule.NumIRFunctions 2,828,694 2,828,694 0 0.0%
IRModule.NumIRGlobals 3,256,565 3,256,565 0 0.0%
IRModule.NumIRInsts 50,642,167 50,642,167 0 0.0%
IRModule.NumIRValueSymbols 5,720,660 5,720,660 0 0.0%
LLVM.NumLLVMBytesOutput 1,862,180,780 1,862,198,624 17,844 0.0%
SILModule.NumSILGenFunctions 1,212,481 1,212,481 0 0.0%
SILModule.NumSILOptFunctions 1,027,129 1,027,129 0 0.0%
Sema.NumConformancesDeserialized 3,528,797 3,528,955 158 0.0%
Sema.NumConstraintScopes 28,428,076 28,450,539 22,463 0.08%
Sema.NumDeclsDeserialized 10,868,715 10,872,555 3,840 0.04%
Sema.NumFunctionsTypechecked 542,352 542,352 0 0.0%
Sema.NumGenericSignatureBuilders 285,897 285,906 9 0.0%
Sema.NumLazyIterableDeclContexts 1,345,916 1,345,984 68 0.01%
Sema.NumTypesDeserialized 5,267,948 5,270,754 2,806 0.05%
Sema.NumTypesValidated 841,795 841,795 0 0.0%

@xedin
Copy link
Contributor Author

xedin commented Jan 30, 2020

Looks like the only counters regressed are associated with debug configuration and expected as they are all about global requests which with IncludeOuterResult we definitely do more of. But wall time didn't regress, so it looks like we can go ahead and merge these changes after I made a small change @slavapestov has requested.

@xedin
Copy link
Contributor Author

xedin commented Jan 30, 2020

Ok, VarDecl::isLazilyInitializedGlobal() simplification is in and I'm going to run CI one more time.

@xedin
Copy link
Contributor Author

xedin commented Jan 30, 2020

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 15c1b4e

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 15c1b4e

@xedin
Copy link
Contributor Author

xedin commented Jan 30, 2020

test with swiftlang/llvm-project#674
@swift-ci please test

1 similar comment
@xedin
Copy link
Contributor Author

xedin commented Jan 30, 2020

test with swiftlang/llvm-project#674
@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 0899a9ef87289c01dd087dd253902d17eefa28e5

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 0899a9ef87289c01dd087dd253902d17eefa28e5

@xedin xedin force-pushed the diagnose-shadowing branch from 0899a9e to 15c1b4e Compare January 31, 2020 00:05
@xedin
Copy link
Contributor Author

xedin commented Jan 31, 2020

test with swiftlang/llvm-project#674
@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 0899a9ef87289c01dd087dd253902d17eefa28e5

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 0899a9ef87289c01dd087dd253902d17eefa28e5

@xedin xedin merged commit d24537f into swiftlang:master Jan 31, 2020
DougGregor added a commit to DougGregor/swift that referenced this pull request Feb 1, 2020
The change to introduce a "top-level" bit for VarDecls requires a
module format version bump, per swiftlang#29024.
Fixes rdar://problem/59078925
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