Skip to content

[ParseableInterface] Turn on -enable-parseable-module-interface always #23331

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 16, 2019

Conversation

jrose-apple
Copy link
Contributor

...and remove the option. This is ~technically~ CLI-breaking because Swift 5 shipped this as a hidden driver option, but it wouldn't have done anything in Swift 5, so I think it's okay to remove.

Note that if a parseable interface (.swiftinterface) and a binary interface (.swiftmodule) are both present, the binary one will still be preferred. This just allows parseable interfaces to be used.

This is made possible by @harlanhaskins and @nathawes' work over the last two months! There's still more to be done, but we're getting to a livable state, and it's great.

rdar://problem/36885834

...and remove the option. This is ~technically~ CLI-breaking because
Swift 5 shipped this as a hidden driver option, but it wouldn't have
/done/ anything in Swift 5, so I think it's okay to remove.

Note that if a parseable interface (.swiftinterface) and a binary
interface (.swiftmodule) are both present, the binary one will still
be preferred. This just /allows/ parseable interfaces to be used.

rdar://problem/36885834
@jrose-apple jrose-apple reopened this Mar 15, 2019
@jrose-apple
Copy link
Contributor Author

@swift-ci Please test

@jrose-apple
Copy link
Contributor Author

@swift-ci Please test source compatibility

@jrose-apple
Copy link
Contributor Author

@swift-ci Please test compiler performance

@@ -713,9 +712,6 @@ class ParseableInterfaceModuleLoaderImpl {
if (validationInfo.status != serialization::Status::Valid)
return false;

assert(validationInfo.name == moduleName &&
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason this was removed as part of these changes? I think it's fine to remove.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The change uncovered a bug: now that we use this function for adjacent swiftmodules as well as cached swiftmodules, the assertion is no longer valid. This was tested by test/Serialization/load-wrong-name.swift.

Copy link
Contributor

@harlanhaskins harlanhaskins left a comment

Choose a reason for hiding this comment

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

🎉

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 0babd26

@jrose-apple
Copy link
Contributor Author

Looks like this may need a paired LLDB change too.

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 0babd26

@jrose-apple
Copy link
Contributor Author

apple/swift-lldb#1386
@swift-ci Please test

@swift-ci
Copy link
Contributor

Summary for master full

Unexpected test results, excluded stats for CoreStore, Deferred, Tagged, Wordy, ProcedureKit

No regressions above thresholds

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 26,840,360,892,956 26,720,852,135,393 -119,508,757,563 -0.45%
LLVM.NumLLVMBytesOutput 962,761,048 962,761,540 492 0.0%
time.swift-driver.wall 2555.7s 2549.7s -6.0s -0.24%

debug-batch detailed

Regressed (0)
name old new delta delta_pct
Improved (9)
name old new delta delta_pct
AST.NumASTBytesAllocated 66,084,345,255 65,039,636,679 -1,044,708,576 -1.58% ✅
Driver.NumDriverPipePolls 166,938 164,391 -2,547 -1.53% ✅
Driver.NumDriverPipeReads 183,241 180,715 -2,526 -1.38% ✅
Sema.InheritedDeclsReferencedRequest 4,396,778 4,344,865 -51,913 -1.18% ✅
Sema.NumConformancesDeserialized 6,449,313 6,356,814 -92,499 -1.43% ✅
Sema.NumDeclsDeserialized 47,435,209 46,780,274 -654,935 -1.38% ✅
Sema.OverriddenDeclsRequest 7,405,020 7,194,503 -210,517 -2.84% ✅
Sema.SelfBoundsFromWhereClauseRequest 6,189,097 6,119,996 -69,101 -1.12% ✅
Sema.USRGenerationRequest 12,369,393 11,918,967 -450,426 -3.64% ✅
Unchanged (delta < 1.0% or delta < 100.0ms) (90)
name old new delta delta_pct
AST.NumDecls 80,388 80,388 0 0.0%
AST.NumDependencies 204,300 204,312 12 0.01%
AST.NumImportedExternalDefinitions 1,084,910 1,084,910 0 0.0%
AST.NumInfixOperators 30,900 30,900 0 0.0%
AST.NumLinkLibraries 0 0 0 0.0%
AST.NumLoadedModules 243,405 243,405 0 0.0%
AST.NumLocalTypeDecls 108 108 0 0.0%
AST.NumObjCMethods 9,687 9,687 0 0.0%
AST.NumPostfixOperators 18 18 0 0.0%
AST.NumPrecedenceGroups 14,446 14,446 0 0.0%
AST.NumPrefixOperators 70 70 0 0.0%
AST.NumReferencedDynamicNames 91 91 0 0.0%
AST.NumReferencedMemberNames 3,491,615 3,491,615 0 0.0%
AST.NumReferencedTopLevelNames 269,687 269,687 0 0.0%
AST.NumSourceBuffers 330,950 330,950 0 0.0%
AST.NumSourceLines 2,419,104 2,419,104 0 0.0%
AST.NumSourceLinesPerSecond 2,176,075 2,164,857 -11,218 -0.52%
AST.NumTotalClangImportedEntities 4,103,724 4,076,290 -27,434 -0.67%
AST.NumUsedConformances 225,744 225,744 0 0.0%
Driver.ChildrenMaxRSS 105,732,417,536 105,347,807,232 -384,610,304 -0.36%
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 16,141 16,141 0 0.0%
Driver.NumDriverJobsSkipped 0 0 0 0.0%
Driver.NumProcessFailures 0 0 0 0.0%
Frontend.MaxMallocUsage 684,420,182,336 679,765,560,520 -4,654,621,816 -0.68%
Frontend.NumInstructionsExecuted 26,840,360,892,956 26,720,852,135,393 -119,508,757,563 -0.45%
Frontend.NumProcessFailures 0 0 0 0.0%
IRModule.NumIRAliases 107,127 107,127 0 0.0%
IRModule.NumIRBasicBlocks 3,815,510 3,815,510 0 0.0%
IRModule.NumIRComdatSymbols 0 0 0 0.0%
IRModule.NumIRFunctions 1,789,525 1,789,525 0 0.0%
IRModule.NumIRGlobals 1,843,874 1,843,874 0 0.0%
IRModule.NumIRIFuncs 0 0 0 0.0%
IRModule.NumIRInsts 46,919,316 46,919,316 0 0.0%
IRModule.NumIRNamedMetaData 78,122 78,122 0 0.0%
IRModule.NumIRValueSymbols 3,277,436 3,277,436 0 0.0%
LLVM.NumLLVMBytesOutput 962,761,048 962,761,540 492 0.0%
Parse.NumFunctionsParsed 141,858 141,858 0 0.0%
Parse.NumIterableDeclContextParsed 1,000,666 1,000,666 0 0.0%
SILModule.NumSILGenDefaultWitnessTables 0 0 0 0.0%
SILModule.NumSILGenFunctions 925,652 925,652 0 0.0%
SILModule.NumSILGenGlobalVariables 37,118 37,118 0 0.0%
SILModule.NumSILGenVtables 10,668 10,668 0 0.0%
SILModule.NumSILGenWitnessTables 39,057 39,057 0 0.0%
SILModule.NumSILOptDefaultWitnessTables 0 0 0 0.0%
SILModule.NumSILOptFunctions 1,319,135 1,319,135 0 0.0%
SILModule.NumSILOptGlobalVariables 37,865 37,865 0 0.0%
SILModule.NumSILOptVtables 17,156 17,156 0 0.0%
SILModule.NumSILOptWitnessTables 85,971 85,971 0 0.0%
Sema.AccessLevelRequest 2,322,010 2,316,700 -5,310 -0.23%
Sema.DefaultAndMaxAccessLevelRequest 54,326 54,305 -21 -0.04%
Sema.DefaultTypeRequest 315,699 315,699 0 0.0%
Sema.EnumRawTypeRequest 16,934 16,934 0 0.0%
Sema.ExtendedNominalRequest 3,694,399 3,678,316 -16,083 -0.44%
Sema.InheritedTypeRequest 528,150 527,240 -910 -0.17%
Sema.IsDynamicRequest 1,820,123 1,820,123 0 0.0%
Sema.IsObjCRequest 1,555,209 1,553,762 -1,447 -0.09%
Sema.MangleLocalTypeDeclRequest 216 216 0 0.0%
Sema.NamedLazyMemberLoadFailureCount 18,796 18,656 -140 -0.74%
Sema.NamedLazyMemberLoadSuccessCount 17,303,066 17,303,541 475 0.0%
Sema.NominalTypeLookupDirectCount 28,909,076 28,808,679 -100,397 -0.35%
Sema.NumConstraintScopes 14,720,589 14,709,090 -11,499 -0.08%
Sema.NumConstraintsConsideredForEdgeContraction 38,454,708 38,451,374 -3,334 -0.01%
Sema.NumDeclsFinalized 1,634,523 1,634,523 0 0.0%
Sema.NumDeclsTypechecked 890,758 890,758 0 0.0%
Sema.NumDeclsValidated 1,934,359 1,934,349 -10 -0.0%
Sema.NumFunctionsTypechecked 942,937 942,937 0 0.0%
Sema.NumGenericSignatureBuilders 1,134,746 1,127,796 -6,950 -0.61%
Sema.NumLazyGenericEnvironments 9,545,209 9,481,916 -63,293 -0.66%
Sema.NumLazyGenericEnvironmentsLoaded 194,750 194,490 -260 -0.13%
Sema.NumLazyIterableDeclContexts 6,641,303 6,616,571 -24,732 -0.37%
Sema.NumLeafScopes 9,647,116 9,637,596 -9,520 -0.1%
Sema.NumTypesDeserialized 15,979,443 15,871,758 -107,685 -0.67%
Sema.NumTypesValidated 1,310,227 1,310,215 -12 -0.0%
Sema.NumUnloadedLazyIterableDeclContexts 4,376,245 4,383,635 7,390 0.17%
Sema.RequirementRequest 62,142 62,140 -2 -0.0%
Sema.SetterAccessLevelRequest 136,606 136,606 0 0.0%
Sema.SuperclassDeclRequest 66,915 66,551 -364 -0.54%
Sema.SuperclassTypeRequest 30,680 30,680 0 0.0%
Sema.TypeDeclsFromWhereClauseRequest 29,878 29,857 -21 -0.07%
Sema.UnderlyingTypeDeclsReferencedRequest 194,180 192,629 -1,551 -0.8%

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 25,587,230,031,895 25,604,614,410,725 17,384,378,830 0.07%
LLVM.NumLLVMBytesOutput 785,390,824 785,394,500 3,676 0.0%
time.swift-driver.wall 4580.7s 4569.9s -10.7s -0.23%

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 214,665 214,665 0 0.0%
AST.NumLoadedModules 16,334 16,334 0 0.0%
AST.NumTotalClangImportedEntities 729,870 729,870 0 0.0%
AST.NumUsedConformances 226,707 226,707 0 0.0%
IRModule.NumIRBasicBlocks 3,233,344 3,233,344 0 0.0%
IRModule.NumIRFunctions 1,491,690 1,491,690 0 0.0%
IRModule.NumIRGlobals 1,629,515 1,629,515 0 0.0%
IRModule.NumIRInsts 29,474,351 29,474,351 0 0.0%
IRModule.NumIRValueSymbols 2,908,733 2,908,733 0 0.0%
LLVM.NumLLVMBytesOutput 785,390,824 785,394,500 3,676 0.0%
SILModule.NumSILGenFunctions 649,405 649,405 0 0.0%
SILModule.NumSILOptFunctions 883,157 883,157 0 0.0%
Sema.NumConformancesDeserialized 2,207,967 2,207,967 0 0.0%
Sema.NumConstraintScopes 13,080,935 13,080,935 0 0.0%
Sema.NumDeclsDeserialized 5,959,238 5,959,238 0 0.0%
Sema.NumDeclsValidated 1,031,871 1,031,871 0 0.0%
Sema.NumFunctionsTypechecked 426,107 426,107 0 0.0%
Sema.NumGenericSignatureBuilders 188,939 188,939 0 0.0%
Sema.NumLazyGenericEnvironments 1,232,035 1,232,035 0 0.0%
Sema.NumLazyGenericEnvironmentsLoaded 20,965 20,965 0 0.0%
Sema.NumLazyIterableDeclContexts 758,183 758,183 0 0.0%
Sema.NumTypesDeserialized 3,156,763 3,156,763 0 0.0%
Sema.NumTypesValidated 613,443 613,443 0 0.0%

@jrose-apple
Copy link
Contributor Author

*sigh* Those improvements are not possible, so something must still be wrong with this bot. Merging.

@jrose-apple jrose-apple merged commit 22f9853 into swiftlang:master Mar 16, 2019
@jrose-apple jrose-apple deleted the interfacetime branch March 16, 2019 22:31
jrose-apple added a commit to jrose-apple/swift that referenced this pull request Mar 16, 2019
swiftlang#23331)

...and remove the option. This is ~technically~ CLI-breaking because
Swift 5 shipped this as a hidden driver option, but it wouldn't have
/done/ anything in Swift 5, so I think it's okay to remove.

Note that if a parseable interface (.swiftinterface) and a binary
interface (.swiftmodule) are both present, the binary one will still
be preferred. This just /allows/ parseable interfaces to be used.

rdar://problem/36885834
(cherry picked from commit 22f9853)
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