Skip to content

Make ConformanceLookupTable less recursive and don't imply conformances from conditional ones #15268

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
Apr 4, 2018

Conversation

huonw
Copy link
Contributor

@huonw huonw commented Mar 15, 2018

This is preparation for https://bugs.swift.org/browse/SR-6569 along with a proposed fix for rdar://problem/36499373 . This is explicitly not what SE-0143 says, so I'll have to get to amending that before this lands (at least, before the last two commits do).

There was a pile of recursion between ConformanceLookupTable::updateLookupTable and the TypeChecker/extension validation, especially for conditional conformances. This takes one approach to breaking that recursion by letting updateLookupTable validate much less of the extension until much later. The recursion meant that conformances weren't being constructed when they need to have been. (The commit messages themselves contain a lot more of text/description about exactly what and why things were recurring.)

@huonw huonw requested a review from DougGregor March 15, 2018 12:08
@huonw
Copy link
Contributor Author

huonw commented Mar 15, 2018

@swift-ci please smoke test

@huonw
Copy link
Contributor Author

huonw commented Mar 15, 2018

@swift-ci please test compiler performance

@huonw
Copy link
Contributor Author

huonw commented Mar 15, 2018

@swift-ci please test source compatibility

auto hasAdditionalRequirements = [&](ConformanceEntry *entry) {
if (auto ED = dyn_cast<ExtensionDecl>(entry->getDeclContext()))
if (auto TWC = ED->getTrailingWhereClause())
return !TWC->getRequirements().empty();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose we're avoiding ExtensionDecl::isConstrainedExtension() because it's looking at generic signatures. Yeah, that makes sense.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I guess my comment isn't very clear in that it doesn't explicit state that.

TypeResolutionOptions options = TypeResolutionFlags::GenericSignature;
options |= TypeResolutionFlags::InheritanceClause;
options |= TypeResolutionFlags::AllowUnavailableProtocol;
GenericTypeToArchetypeResolver resolver(ext->getInnermostDeclContext());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GenericTypeToArchetypeResolver is going to want a full-fledged generic environment for the extension. Can we make this even more lazy by only attempting name binding on the types in the inheritance clause?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, I guess this should avoid marking things invalid then, given there might be the valid type SomeClass<T> there (which is invalid, but the type itself isn't, right?).

I guess using the generic environment of the nominal type isn't correct?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The generic environment of the nominal type would have different archetypes, which would then get recorded in the extension's inheritance list for something like SomeClass<T>. You're right that we currently reject something like that further down the line, but it seems like taking the name-binding approach dodges the issue entirely.

@@ -372,7 +372,8 @@ class ConformanceLookupTable {

/// Resolve the given conformance entry to an actual protocol conformance.
ProtocolConformance *getConformance(NominalTypeDecl *nominal,
ConformanceEntry *entry);
ConformanceEntry *entry,
LazyResolver *resolver);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can grab the lazy resolver from nominal->getASTContext().getLazyResolver(), rather than having to pass it along.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I didn't realise that was okay, since the other places here seem to thread it through.

@huonw
Copy link
Contributor Author

huonw commented Mar 16, 2018

Note to self: CoreStore is failing in the source compat suite. One example is reproduced here for posterity/for when jenkins deletes old runs:

CompileSwift normal x86_64 /Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/Value.swift
    cd /Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore
    /Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/build/compat_macos/install/toolchain/usr/bin/swift -frontend -c -filelist /var/folders/_8/79jmzf2142z2xydc_01btlx00000gn/T/sources-37e69a -primary-file /Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/Value.swift -target x86_64-apple-macosx10.10 -enable-objc-interop -sdk /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -I /Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/build/Build/Products/Release -F /Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/build/Build/Products/Release -application-extension -enable-testing -g -import-underlying-module -module-cache-path /Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/build/ModuleCache.noindex -swift-version 4 -O -disable-swift3-objc-inference -serialize-debugging-options -Xcc "-I/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/build/Build/Intermediates.noindex/CoreStore.build/Release/CoreStore OSX.build/swift-overrides.hmap" -Xcc -iquote -Xcc "/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/build/Build/Intermediates.noindex/CoreStore.build/Release/CoreStore OSX.build/CoreStore-generated-files.hmap" -Xcc "-I/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/build/Build/Intermediates.noindex/CoreStore.build/Release/CoreStore OSX.build/CoreStore-own-target-headers.hmap" -Xcc "-I/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/build/Build/Intermediates.noindex/CoreStore.build/Release/CoreStore OSX.build/CoreStore-all-non-framework-target-headers.hmap" -Xcc -ivfsoverlay -Xcc /Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/build/Build/Intermediates.noindex/CoreStore.build/all-product-headers.yaml -Xcc -iquote -Xcc "/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/build/Build/Intermediates.noindex/CoreStore.build/Release/CoreStore OSX.build/CoreStore-project-headers.hmap" -Xcc -I/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/build/Build/Products/Release/include -Xcc "-I/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/build/Build/Intermediates.noindex/CoreStore.build/Release/CoreStore OSX.build/DerivedSources/x86_64" -Xcc "-I/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/build/Build/Intermediates.noindex/CoreStore.build/Release/CoreStore OSX.build/DerivedSources" -Xcc -ivfsoverlay -Xcc "/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/build/Build/Intermediates.noindex/CoreStore.build/Release/CoreStore OSX.build/unextended-module-overlay.yaml" -Xcc -working-directory/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore -emit-module-doc-path "/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/build/Build/Intermediates.noindex/CoreStore.build/Release/CoreStore OSX.build/Objects-normal/x86_64/Value~partial.swiftdoc" -serialize-diagnostics-path "/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/build/Build/Intermediates.noindex/CoreStore.build/Release/CoreStore OSX.build/Objects-normal/x86_64/Value.dia" -module-name CoreStore -emit-module-path "/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/build/Build/Intermediates.noindex/CoreStore.build/Release/CoreStore OSX.build/Objects-normal/x86_64/Value~partial.swiftmodule" -emit-dependencies-path "/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/build/Build/Intermediates.noindex/CoreStore.build/Release/CoreStore OSX.build/Objects-normal/x86_64/Value.d" -emit-reference-dependencies-path "/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/build/Build/Intermediates.noindex/CoreStore.build/Release/CoreStore OSX.build/Objects-normal/x86_64/Value.swiftdeps" -o "/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/build/Build/Intermediates.noindex/CoreStore.build/Release/CoreStore OSX.build/Objects-normal/x86_64/Value.o"
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/AttributeProtocol.swift:44:5: warning: 'weak' should not be applied to a property declaration in a protocol and will be disallowed in future versions
    weak var parentObject: CoreStoreObject? { get set }
    ^~~~~
    
Assertion failed: (resolver && "Too late to resolve extensions"), function computeExtensionType, file /Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/swift/lib/AST/DeclContext.cpp, line 118.
0  swift                    0x000000010c72b5b8 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
1  swift                    0x000000010c72bc46 SignalHandler(int) + 422
2  libsystem_platform.dylib 0x00007fff67c20f5a _sigtramp + 26
3  libsystem_platform.dylib 0x00007fe9ab2fc080 _sigtramp + 1131262272
4  libsystem_c.dylib        0x00007fff67a4b312 abort + 127
5  libsystem_c.dylib        0x00007fff67a13368 basename_r + 0
6  swift                    0x0000000109f36b9d computeExtensionType(swift::ExtensionDecl const*, DeclTypeKind) + 509
7  swift                    0x0000000109f17e8e swift::ConformanceLookupTable::getConformance(swift::NominalTypeDecl*, swift::ConformanceLookupTable::ConformanceEntry*, swift::LazyResolver*) + 190
8  swift                    0x0000000109f18e93 swift::ConformanceLookupTable::getAllConformances(swift::NominalTypeDecl*, swift::LazyResolver*, bool, llvm::SmallVectorImpl<swift::ProtocolConformance*>&) + 163
9  swift                    0x0000000109fc6d75 swift::NominalTypeDecl::getAllConformances(bool) const + 117
10 swift                    0x0000000108dd950c swift::irgen::IRGenModule::addRuntimeResolvableType(swift::NominalTypeDecl*) + 60
11 swift                    0x0000000108de21e0 swift::irgen::IRGenModule::getAddrOfTypeMetadataPattern(swift::NominalTypeDecl*, bool, swift::irgen::ConstantInit, llvm::StringRef) + 288
12 swift                    0x0000000108de1ad0 swift::irgen::IRGenModule::defineTypeMetadata(swift::CanType, bool, bool, bool, clang::CodeGen::ConstantInitFuture, llvm::StringRef) + 112
13 swift                    0x0000000108e4e2d5 swift::irgen::emitClassMetadata(swift::irgen::IRGenModule&, swift::ClassDecl*, swift::irgen::StructLayout const&, swift::irgen::ClassLayout const&) + 4853
14 swift                    0x0000000108dc90b0 swift::irgen::IRGenModule::emitClassDecl(swift::ClassDecl*) + 208
15 swift                    0x0000000108de348c swift::irgen::IRGenModule::emitNestedTypeDecls(swift::IteratorRange<swift::DeclIterator>) + 92
16 swift                    0x0000000108def258 swift::irgen::IRGenModule::emitEnumDecl(swift::EnumDecl*) + 56
17 swift                    0x0000000108dd5c85 swift::irgen::IRGenModule::emitSourceFile(swift::SourceFile&, unsigned int) + 133
18 swift                    0x0000000108eae489 performIRGeneration(swift::IRGenOptions&, swift::ModuleDecl*, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule> >, llvm::StringRef, swift::PrimarySpecificPaths const&, llvm::LLVMContext&, swift::SourceFile*, llvm::GlobalVariable**, unsigned int) + 1225
19 swift                    0x0000000108eaeb0e swift::performIRGeneration(swift::IRGenOptions&, swift::SourceFile&, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule> >, llvm::StringRef, swift::PrimarySpecificPaths const&, llvm::LLVMContext&, unsigned int, llvm::GlobalVariable**) + 94
20 swift                    0x0000000108d3f8d9 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 15609
21 swift                    0x0000000108d3abce swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 3310
22 swift                    0x0000000108cf1623 main + 2051
23 libdyld.dylib            0x00007fff6799f115 start + 1
Stack dump:
0.	Program arguments: /Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/build/compat_macos/install/toolchain/usr/bin/swift -frontend -c -filelist /var/folders/_8/79jmzf2142z2xydc_01btlx00000gn/T/sources-37e69a -primary-file /Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/Value.swift -target x86_64-apple-macosx10.10 -enable-objc-interop -sdk /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -I /Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/build/Build/Products/Release -F /Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/build/Build/Products/Release -application-extension -enable-testing -g -import-underlying-module -module-cache-path /Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/build/ModuleCache.noindex -swift-version 4 -O -disable-swift3-objc-inference -serialize-debugging-options -Xcc -I/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/build/Build/Intermediates.noindex/CoreStore.build/Release/CoreStore OSX.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/build/Build/Intermediates.noindex/CoreStore.build/Release/CoreStore OSX.build/CoreStore-generated-files.hmap -Xcc -I/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/build/Build/Intermediates.noindex/CoreStore.build/Release/CoreStore OSX.build/CoreStore-own-target-headers.hmap -Xcc -I/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/build/Build/Intermediates.noindex/CoreStore.build/Release/CoreStore OSX.build/CoreStore-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/build/Build/Intermediates.noindex/CoreStore.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/build/Build/Intermediates.noindex/CoreStore.build/Release/CoreStore OSX.build/CoreStore-project-headers.hmap -Xcc -I/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/build/Build/Products/Release/include -Xcc -I/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/build/Build/Intermediates.noindex/CoreStore.build/Release/CoreStore OSX.build/DerivedSources/x86_64 -Xcc -I/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/build/Build/Intermediates.noindex/CoreStore.build/Release/CoreStore OSX.build/DerivedSources -Xcc -ivfsoverlay -Xcc /Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/build/Build/Intermediates.noindex/CoreStore.build/Release/CoreStore OSX.build/unextended-module-overlay.yaml -Xcc -working-directory/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore -emit-module-doc-path /Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/build/Build/Intermediates.noindex/CoreStore.build/Release/CoreStore OSX.build/Objects-normal/x86_64/Value~partial.swiftdoc -serialize-diagnostics-path /Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/build/Build/Intermediates.noindex/CoreStore.build/Release/CoreStore OSX.build/Objects-normal/x86_64/Value.dia -module-name CoreStore -emit-module-path /Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/build/Build/Intermediates.noindex/CoreStore.build/Release/CoreStore OSX.build/Objects-normal/x86_64/Value~partial.swiftmodule -emit-dependencies-path /Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/build/Build/Intermediates.noindex/CoreStore.build/Release/CoreStore OSX.build/Objects-normal/x86_64/Value.d -emit-reference-dependencies-path /Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/build/Build/Intermediates.noindex/CoreStore.build/Release/CoreStore OSX.build/Objects-normal/x86_64/Value.swiftdeps -o /Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/build/Build/Intermediates.noindex/CoreStore.build/Release/CoreStore OSX.build/Objects-normal/x86_64/Value.o 
1.	Contents of /var/folders/_8/79jmzf2142z2xydc_01btlx00000gn/T/sources-37e69a:
---
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CSListMonitor.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CSCoreStore.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/WhereClauseType.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/ICloudStoreObserver.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CSDynamicSchema.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/Progress+Convenience.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/NSEntityDescription+DynamicModel.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CSTweak.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/SetupResult.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/Progress+ObjectiveC.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CSCoreStore+Querying.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CoreStoreObject.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CoreStoreError.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CSXcodeDataModelSchema.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/From+Querying.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/QueryableSource.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CSSQliteStore.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CSGroupBy.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CSDataStack+Querying.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/MigrationManager.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/NSManagedObject+Logging.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/UnsafeDataModelSchema.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CSDataStack+Transaction.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/UserInfo.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CSInto.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/Value.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CSSelect.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CSCoreStore+Observing.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/NSPersistentStore+Setup.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/From.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CSCoreStore+Setup.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/DataStack+Transaction.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/LegacySQLiteStore.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/FetchedResultsControllerDelegate.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/AsynchronousDataTransaction.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/RelationshipProtocol.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CoreStore+Setup.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CoreStoreStrings.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/NSFetchedResultsController+Convenience.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CSSetupResult.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CSFrom.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CoreDataNativeType.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/ImportableAttributeType.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CSListObserver.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CoreStore.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/BaseDataTransaction+Importing.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/XcodeSchemaMappingProvider.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CSDataStack+Observing.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CoreStore+Querying.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CSError.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CSDataStack+Migrating.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/DataStack.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/NSManagedObjectContext+ObjectiveC.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/NSManagedObject+Convenience.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/PartialObject.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/Where.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/NSManagedObject+ObjectiveC.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/EntityIdentifier.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CSBaseDataTransaction+Querying.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CSWhere.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/Select.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/SQLiteStore.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/NSManagedObjectContext+Querying.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/NSManagedObjectContext+Setup.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/NotificationObserver.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CoreStoreFetchRequest+CoreStore.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/DataStack+Querying.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CSSectionBy.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/MigrationResult.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/NSFetchedResultsController+ObjectiveC.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/BaseDataTransaction.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/SectionBy.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CSStorageInterface.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/DynamicSchema+Convenience.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CSClauseTypes.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/KeyPath+Querying.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/DataStack+Migration.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CSOrderBy.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/NSEntityDescription+Migration.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/ImportableUniqueObject.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CSSynchronousDataTransaction.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/XcodeDataModelSchema.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CSAsynchronousDataTransaction.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/Into.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/StorageInterface.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/FetchableSource.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CSSaveResult.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/InMemoryStore.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/GroupBy.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/Tweak.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/ImportableObject.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/ObjectMonitor.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/DynamicObject.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/OrderBy.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/MigrationChain.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/NSManagedObject+Transaction.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/SchemaHistory.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/SaveResult.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CSObjectObserver.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CoreStoreObject+Querying.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/SynchronousDataTransaction.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/WeakObject.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/Functions.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CoreStoreFetchedResultsController.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/QueryChainBuilder.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CSCoreStore+Migrating.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CoreStoreSchema.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/ICloudStore.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CoreStore+Logging.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/BaseDataTransaction+Querying.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CSInMemoryStore.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/InferredSchemaMappingProvider.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CoreStoreManagedObject.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/FetchChainBuilder.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/Relationship.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/NSManagedObjectContext+CoreStore.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/NSManagedObjectModel+Migration.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CustomSchemaMappingProvider.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/NSManagedObject+DynamicModel.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/DispatchQueue+CoreStore.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/DataStack+Observing.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CoreStore+Transaction.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CSUnsafeDataTransaction.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/ListMonitor.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/ObjectObserver.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/ListObserver.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CoreStoreObject+Convenience.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/UnsafeDataTransaction.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CSCoreStore+Transaction.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/MigrationType.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/Transformable.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/NSManagedObjectContext+Transaction.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CoreStore+Observing.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/QueryableAttributeType.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CoreStoreLogger.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/DefaultLogger.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/DynamicKeyPath.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/VersionLock.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CSObjectMonitor.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/DynamicSchema.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CSUnsafeDataModelSchema.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/SectionMonitorBuilder.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/UnsafeDataTransaction+Observing.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/SchemaMappingProvider.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CSMigrationType.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CoreStore+Migration.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CSBaseDataTransaction.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CSDataStack.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/AttributeProtocol.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CoreStoreBridge.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/NSPersistentStoreCoordinator+Setup.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/Entity.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/TypeErasedClauses.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CSMigrationResult.swift
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/CoreStore+CustomDebugStringConvertible.swift
---
2.	While emitting IR for source file /Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/Value.swift
3.	While emitting class metadata for 'Required' at /Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite/project_cache/CoreStore/Sources/Value.swift:76:18

@swift-ci
Copy link
Contributor

Build comment file:

Summary for master full

Unexpected test results, excluded stats for SourceKittenFramework, ProcedureKit, ChattoAdditions, StencilSwiftKit, AMScrollingNavbar, CoreStore, PromiseKit, GRDB, ReactiveSwift, JSQDataSourcesKit, AsyncNinja, ReactiveCocoa, IBAnimatable, ObjectMapper, Routing

No regressions above thresholds

Debug

debug brief

Regressed (0)
name old new delta delta_pct
Improved (2)
name old new delta delta_pct
LLVM.NumLLVMBytesOutput 621,300,449 588,236,614 -33,063,835 -5.32% ✅
time.swift-driver.wall 1345.4s 1277.1s -68.4s -5.08% ✅
Unchanged (delta < 1.0% or delta < 100.0ms) (0)
name old new delta delta_pct

debug detailed

Regressed (0)
name old new delta delta_pct
Improved (23)
name old new delta delta_pct
AST.NumImportedExternalDefinitions 955,826 891,560 -64,266 -6.72% ✅
AST.NumLoadedModules 224,685 203,628 -21,057 -9.37% ✅
AST.NumTotalClangImportedEntities 3,100,292 2,899,853 -200,439 -6.47% ✅
AST.NumUsedConformances 95,920 91,587 -4,333 -4.52% ✅
IRModule.NumIRBasicBlocks 1,888,016 1,819,596 -68,420 -3.62% ✅
IRModule.NumIRFunctions 943,161 904,756 -38,405 -4.07% ✅
IRModule.NumIRGlobals 926,909 888,875 -38,034 -4.1% ✅
IRModule.NumIRInsts 19,647,936 18,893,402 -754,534 -3.84% ✅
IRModule.NumIRValueSymbols 1,644,404 1,575,992 -68,412 -4.16% ✅
LLVM.NumLLVMBytesOutput 621,300,449 588,236,614 -33,063,835 -5.32% ✅
SILModule.NumSILGenFunctions 623,086 595,726 -27,360 -4.39% ✅
SILModule.NumSILOptFunctions 945,261 907,644 -37,617 -3.98% ✅
Sema.NumConformancesDeserialized 3,866,817 3,690,203 -176,614 -4.57% ✅
Sema.NumConstraintScopes 8,146,453 7,828,963 -317,490 -3.9% ✅
Sema.NumDeclsDeserialized 32,071,947 30,241,249 -1,830,698 -5.71% ✅
Sema.NumDeclsValidated 1,161,927 1,136,801 -25,126 -2.16% ✅
Sema.NumFunctionsTypechecked 567,213 532,974 -34,239 -6.04% ✅
Sema.NumGenericSignatureBuilders 926,438 846,356 -80,082 -8.64% ✅
Sema.NumLazyGenericEnvironments 6,387,557 5,996,270 -391,287 -6.13% ✅
Sema.NumLazyGenericEnvironmentsLoaded 533,919 504,027 -29,892 -5.6% ✅
Sema.NumLazyIterableDeclContexts 5,021,465 4,710,071 -311,394 -6.2% ✅
Sema.NumTypesDeserialized 33,569,310 31,558,766 -2,010,544 -5.99% ✅
Sema.NumTypesValidated 2,361,870 2,151,828 -210,042 -8.89% ✅
Unchanged (delta < 1.0% or delta < 100.0ms) (0)
name old new delta delta_pct

Debug-opt

debug-opt brief

Regressed (0)
name old new delta delta_pct
Improved (2)
name old new delta delta_pct
LLVM.NumLLVMBytesOutput 626,714,856 595,674,905 -31,039,951 -4.95% ✅
time.swift-driver.wall 2357.7s 2259.1s -98.5s -4.18% ✅
Unchanged (delta < 1.0% or delta < 100.0ms) (0)
name old new delta delta_pct

debug-opt detailed

Regressed (0)
name old new delta delta_pct
Improved (23)
name old new delta delta_pct
AST.NumImportedExternalDefinitions 955,826 895,225 -60,601 -6.34% ✅
AST.NumLoadedModules 216,042 196,461 -19,581 -9.06% ✅
AST.NumTotalClangImportedEntities 3,164,353 2,972,086 -192,267 -6.08% ✅
AST.NumUsedConformances 95,920 92,166 -3,754 -3.91% ✅
IRModule.NumIRBasicBlocks 2,325,812 2,232,070 -93,742 -4.03% ✅
IRModule.NumIRFunctions 770,730 741,428 -29,302 -3.8% ✅
IRModule.NumIRGlobals 750,177 721,305 -28,872 -3.85% ✅
IRModule.NumIRInsts 18,439,790 17,749,819 -689,971 -3.74% ✅
IRModule.NumIRValueSymbols 1,370,324 1,316,942 -53,382 -3.9% ✅
LLVM.NumLLVMBytesOutput 626,714,856 595,674,905 -31,039,951 -4.95% ✅
SILModule.NumSILGenFunctions 621,907 596,765 -25,142 -4.04% ✅
SILModule.NumSILOptFunctions 1,343,861 1,297,207 -46,654 -3.47% ✅
Sema.NumConformancesDeserialized 8,645,083 8,321,230 -323,853 -3.75% ✅
Sema.NumConstraintScopes 8,146,453 7,869,923 -276,530 -3.39% ✅
Sema.NumDeclsDeserialized 37,007,899 35,108,795 -1,899,104 -5.13% ✅
Sema.NumDeclsValidated 1,161,927 1,142,287 -19,640 -1.69% ✅
Sema.NumFunctionsTypechecked 567,213 534,961 -32,252 -5.69% ✅
Sema.NumGenericSignatureBuilders 965,619 887,350 -78,269 -8.11% ✅
Sema.NumLazyGenericEnvironments 7,183,909 6,792,913 -390,996 -5.44% ✅
Sema.NumLazyGenericEnvironmentsLoaded 548,620 521,010 -27,610 -5.03% ✅
Sema.NumLazyIterableDeclContexts 5,313,122 5,010,667 -302,455 -5.69% ✅
Sema.NumTypesDeserialized 39,898,721 37,797,669 -2,101,052 -5.27% ✅
Sema.NumTypesValidated 2,361,870 2,159,404 -202,466 -8.57% ✅
Unchanged (delta < 1.0% or delta < 100.0ms) (0)
name old new delta delta_pct

Wmo-onone

wmo-onone 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) (2)
name old new delta delta_pct
LLVM.NumLLVMBytesOutput 556,634,768 555,591,780 -1,042,988 -0.19%
time.swift-driver.wall 1178.4s 1180.1s 1.7s 0.14%

wmo-onone 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 143,737 143,737 0 0.0%
AST.NumLoadedModules 9,611 9,611 0 0.0%
AST.NumTotalClangImportedEntities 450,233 450,233 0 0.0%
AST.NumUsedConformances 99,106 99,106 0 0.0%
IRModule.NumIRBasicBlocks 1,558,005 1,548,033 -9,972 -0.64%
IRModule.NumIRFunctions 864,835 863,494 -1,341 -0.16%
IRModule.NumIRGlobals 810,190 810,192 2 0.0%
IRModule.NumIRInsts 17,851,655 17,755,270 -96,385 -0.54%
IRModule.NumIRValueSymbols 1,492,734 1,491,395 -1,339 -0.09%
LLVM.NumLLVMBytesOutput 556,634,768 555,591,780 -1,042,988 -0.19%
SILModule.NumSILGenFunctions 354,705 354,705 0 0.0%
SILModule.NumSILOptFunctions 420,115 420,115 0 0.0%
Sema.NumConformancesDeserialized 1,056,926 1,057,076 150 0.01%
Sema.NumConstraintScopes 7,879,004 7,879,004 0 0.0%
Sema.NumDeclsDeserialized 3,799,584 3,797,250 -2,334 -0.06%
Sema.NumDeclsValidated 582,334 582,336 2 0.0%
Sema.NumFunctionsTypechecked 194,149 194,149 0 0.0%
Sema.NumGenericSignatureBuilders 110,706 110,508 -198 -0.18%
Sema.NumLazyGenericEnvironments 656,017 655,133 -884 -0.13%
Sema.NumLazyGenericEnvironmentsLoaded 74,390 73,835 -555 -0.75%
Sema.NumLazyIterableDeclContexts 414,808 414,694 -114 -0.03%
Sema.NumTypesDeserialized 3,921,700 3,916,439 -5,261 -0.13%
Sema.NumTypesValidated 596,031 596,022 -9 -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) (2)
name old new delta delta_pct
LLVM.NumLLVMBytesOutput 586,732,644 582,344,141 -4,388,503 -0.75%
time.swift-driver.wall 2558.2s 2540.6s -17.6s -0.69%

release detailed

Regressed (0)
name old new delta delta_pct
Improved (5)
name old new delta delta_pct
AST.NumImportedExternalDefinitions 262,583 259,651 -2,932 -1.12% ✅
AST.NumTotalClangImportedEntities 810,633 798,678 -11,955 -1.47% ✅
Sema.NumGenericSignatureBuilders 237,073 225,965 -11,108 -4.69% ✅
Sema.NumLazyGenericEnvironmentsLoaded 131,670 130,019 -1,651 -1.25% ✅
Sema.NumTypesValidated 875,617 822,550 -53,067 -6.06% ✅
Unchanged (delta < 1.0% or delta < 100.0ms) (18)
name old new delta delta_pct
AST.NumLoadedModules 37,200 37,132 -68 -0.18%
AST.NumUsedConformances 102,310 101,610 -700 -0.68%
IRModule.NumIRBasicBlocks 1,892,532 1,879,451 -13,081 -0.69%
IRModule.NumIRFunctions 785,818 780,707 -5,111 -0.65%
IRModule.NumIRGlobals 810,796 803,557 -7,239 -0.89%
IRModule.NumIRInsts 16,199,257 16,077,461 -121,796 -0.75%
IRModule.NumIRValueSymbols 1,429,539 1,418,789 -10,750 -0.75%
LLVM.NumLLVMBytesOutput 586,732,644 582,344,141 -4,388,503 -0.75%
SILModule.NumSILGenFunctions 374,417 372,347 -2,070 -0.55%
SILModule.NumSILOptFunctions 628,444 624,428 -4,016 -0.64%
Sema.NumConformancesDeserialized 2,741,084 2,723,954 -17,130 -0.62%
Sema.NumConstraintScopes 8,090,524 8,058,288 -32,236 -0.4%
Sema.NumDeclsDeserialized 7,653,052 7,615,271 -37,781 -0.49%
Sema.NumDeclsValidated 636,108 634,380 -1,728 -0.27%
Sema.NumFunctionsTypechecked 249,585 247,785 -1,800 -0.72%
Sema.NumLazyGenericEnvironments 1,374,730 1,368,794 -5,936 -0.43%
Sema.NumLazyIterableDeclContexts 1,008,108 1,001,055 -7,053 -0.7%
Sema.NumTypesDeserialized 8,501,669 8,455,917 -45,752 -0.54%

@huonw huonw force-pushed the dont-infer-conditional branch from bdd3714 to 491c461 Compare March 29, 2018 09:49
@huonw
Copy link
Contributor Author

huonw commented Mar 29, 2018

@swift-ci please smoke test

@@ -404,6 +405,36 @@ static void bindExtensionDecl(ExtensionDecl *ED, TypeChecker &TC) {
void TypeChecker::bindExtension(ExtensionDecl *ext) {
::bindExtensionDecl(ext, *this);
}
void TypeChecker::resolveExtensionForConformanceConstruction(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've made this more complicated, using resolveType and ResolveStructure rather than validateType. Thoughts?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this looks like an improvement. I really want the iterative type checker to be the right answer here, but it doesn't really do the "resolve structure" thing yet.

@@ -1447,6 +1447,11 @@ ERROR(objc_generics_cannot_conditionally_conform,none,
"type %0 cannot conditionally conform to protocol %1 because "
"the type uses the Objective-C generics model",
(Type, Type))
ERROR(conditional_conformances_cannot_imply_conformances,none,
"conformance of type %0 to protocol %1 does not imply conformance to "
"inherited protocol %2 because it is conditional; explicitly state the "
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we say "conditional conformance" in the beginning and remove the "because it is conditional" bit, to make this shorter? Additionally, how about we only suggest the "separate extension" remedy, because that's the style we've been advocating elsewhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, that's a more succinct phrasing thanks.

@huonw huonw force-pushed the dont-infer-conditional branch from 491c461 to ad646ba Compare April 3, 2018 13:29
@huonw
Copy link
Contributor Author

huonw commented Apr 3, 2018

I've changed the non-Swifty fixit to ... three fixits! Similar to try/try!/try?, it suggests three possibly-sensible things, e.g. given protocol Sub: Base {} and extension X: Sub where T: Sub it offers:

  • "relaxed" requirements: extension X: Base where T: Base,
  • the same requirements: extension X: Base where T: Sub,
  • different requirements: extension X: Base where <#requirements#>.

The relaxed requirements is a heuristic trying to match the common patterns with protocols like Hashable/Equatable, and the collection hierarchy. It only triggers if all the requirements are of the form <parameter>: Sub, and they each get rewritten to <parameter>: Base (meaning this fixit isn't offered for extension X: Sub where T == Int or extension X: Sub where T: Unrelated). The other two are offered in all cases.

The full experience of accepting any of them is, for instance:

extension X: Sub where T: Sub {}

extension X: Base where <#requirements#> {
    <#witnesses#>
}

extension X: Sub where T: Sub {}

@huonw
Copy link
Contributor Author

huonw commented Apr 3, 2018

@swift-ci please smoke test

Copy link
Member

@DougGregor DougGregor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huon, this looks fantastic! The Fix-Its are great.

@huonw huonw force-pushed the dont-infer-conditional branch from ad646ba to d8e54bf Compare April 4, 2018 00:25
huonw added 6 commits April 4, 2018 10:26
The old `existingEntry->getProtocol() == protocol` condition was always
true (the only way for `existingEntry` to get into the array it comes
from is if is exactly for `protocol`), which meant this checking loop
always bailed out, and that there was never more than one implied
candidate ever. This probably isn't what was intended, given there's
more code for handling this case directly after this condition, and
`compareConformances` has extensive code for ranking two implied
conformances for the same nominal/protocol pair.
…er conformance searching.

We need to be able to find which conformances need to be
declared/constructed without forcing extensions to be completely
validated. This is important for both SR-6569 and
rdar://problem/36499373. The former due to the source-level recursion,
and the latter because implied conformances weren't always
constructed (but are needed for good diagnostics).

They weren't always constructed because:

1. ConformanceLookupTable's updateLookupTable on an early stage (before
   implied conformances are found) triggers extension
   validation *before* constructing any conformances, but *after*
   updating the stage state
2. extension validation validates the conditional requirements
3. validating the conditional requirements requires setting up generic
   signatures
4. setting up generic signatures forces the types conformances and so
   ends up in updateLookupTable on the same nominal again, skipping over
   the earlier stages that are complete/in progress
5. we expand the conformances that are implied by all the conformances we
   know about... But we don't know any, because we haven't finished the
   first updateLookupTable.

This breaks the loop at step 2: we instead do the minimal work needed to
know what conformances an extension (might) declare, which is connect
the extension to a type, and then resolve the inherited TypeReprs to
Types.
Given

  protocol P1 {}
  protocol P2: P1 {}
  protocol P3: P1 {}

  struct S<T> {}

  extension S: P2 {}
  extension S: P3 where T: P1 {}

Per SE-0143, we need to make sure that we notice that we can infer S: P1
completely unconditionally from S: P2, and ignore the constrained
one. This is a fairly crude approximation, because doing it accurately
would make this extremely recursive. The approximation used is a
conformance non-conditional if the conformance is from the type, or
there's syntactically no 'where' clause, which is a sufficient condition
for being non-conditional but not necessary (an extension *could* have a
completely redundant 'where' clause).

The recursion problem is checking if something is truly conditional
requires knowing the generic signature of the DeclContext, but knowing
this generic signature requires validating the extension/knowing the
type's conformances, which means hitting this table. (This is made worse
by actual recursive use of conformances, as in SR-6569.)
This single location can, theoretically, be made more intelligent about
deducing indent from elsewhere and all the consumers will just work.
Many uses of conditional conformance to protocols with super-protocols
are for wrappers, where the conformances to those super-protocols
usually ends up using weaker bounds, such as:

  struct MyWrapper<Wrapped: Sequence> {}
  extension Wrapped: Sequence {} // Wrapped: Sequence
  extension Wrapped: Collection where Wrapped: Collection {} // *
  extension Wrapped: BidirectionalCollection where Wrapped: BidirectionalCollection {}

If this code was instead written:

  struct MyWrapper<Wrapped: Sequence> {}
  extension Wrapped: Sequence {} // Wrapped: Sequence
  extension Wrapped: BidirectionalCollection where Wrapped: BidirectionalCollection {}

Inferring a Collection conformance would have to mean

  extension Wrapped: Collection where Wrapped: BidirectionalCollection {}

which is unnecessarily strong.

It is a breaking change to change a protocol bound, and so we're
thinking we'd prefer that the compiler didn't magic up that incorrect
conformance. It also only is a small change (and the compiler even
suggests it, with a fixit) to explicitly get the implying behaviour:
declare the conformance explicitly.

  extension Wrapped: Collection, BidirectionalCollection where Wrapped: BidirectionalCollection {}

Fixes rdar://problem/36499373.
@huonw huonw force-pushed the dont-infer-conditional branch from d8e54bf to c104452 Compare April 4, 2018 00:37
@huonw huonw changed the title [Don't merge] Make ConformanceLookupTable less recursive and don't imply conformances from conditional ones Make ConformanceLookupTable less recursive and don't imply conformances from conditional ones Apr 4, 2018
@huonw
Copy link
Contributor Author

huonw commented Apr 4, 2018

@swift-ci please smoke test

2 similar comments
@huonw
Copy link
Contributor Author

huonw commented Apr 4, 2018

@swift-ci please smoke test

@huonw
Copy link
Contributor Author

huonw commented Apr 4, 2018

@swift-ci please smoke test

@huonw
Copy link
Contributor Author

huonw commented Apr 4, 2018

@swift-ci smoke test

@huonw
Copy link
Contributor Author

huonw commented Apr 4, 2018

@swift-ci please smoke test.

@huonw huonw merged commit 306e878 into swiftlang:master Apr 4, 2018
@huonw huonw deleted the dont-infer-conditional branch April 4, 2018 06:46
@rintaro
Copy link
Member

rintaro commented Apr 4, 2018

Question: Can the fix-it be like this?

protocol Base {}
protocol Sub: Base {}

struct X<T> {}
extension X: Sub where T: Sub {
}

extension X: Base, Sub where T: Sub {
}

@huonw
Copy link
Contributor Author

huonw commented Apr 4, 2018

I had that originally, but @DougGregor informed me (the last review comment above, it seems I can't easily link to it 🙁 ) that we're trying to move away from that style, and instead prefer having one conformance per extension.

@rintaro
Copy link
Member

rintaro commented Apr 4, 2018

Thanks for clarifying. I understand, but the current command line experience is too bad:

test.swift:5:1: error: conditional conformance of type 'X<T>' to protocol 'Sub' does not imply conformance to inherited protocol 'Base'
extension X: Sub where T: Sub {
^
test.swift:5:1: note: did you mean to explicitly state the conformance with relaxed bounds?
extension X: Sub where T: Sub {
^
test.swift:5:1: note: did you mean to explicitly state the conformance with the same bounds?
extension X: Sub where T: Sub {
^
test.swift:5:1: note: did you mean to explicitly state the conformance with different bounds?
extension X: Sub where T: Sub {
^

Maybe we might want to emit separate messages depending on DiagnosticsEditorMode.

@huonw
Copy link
Contributor Author

huonw commented Apr 4, 2018

Oh! Do command line diagnostics not include multi-line fixits? That does look bad. I've opened https://bugs.swift.org/browse/SR-7352.

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