Skip to content

[SILGen] Always serialize witness tables in non-resilient modules #20390

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

Conversation

jrose-apple
Copy link
Contributor

...even if the conforming nominal type is resilient. It's the owner of the conformance whose resilience matters.

I also factored this part out into a separate check at the AST level so we can tweak it, and also so I can use it to (slightly) speed up compiling a resilient swiftinterface.

@jrose-apple
Copy link
Contributor Author

@swift-ci Please test

@jrose-apple
Copy link
Contributor Author

@swift-ci Please benchmark

@jrose-apple
Copy link
Contributor Author

@swift-ci Please test source compatibility

@swift-ci
Copy link
Contributor

swift-ci commented Nov 7, 2018

Build comment file:

No performance and code size changes

How to read the data The tables contain differences in performance which are larger than 8% and differences in code size which are larger than 1%.

If you see any unexpected regressions, you should consider fixing the regressions before you merge the PR.

Noise: Sometimes the performance results (not code size!) contain false alarms. Unexpected regressions which are marked with '(?)' are probably noise. If you see regressions which you cannot explain you can try to run the benchmarks again. If regressions still show up, please consult with the performance team (@eeckstein).

Hardware Overview
  Model Name: Mac Pro
  Model Identifier: MacPro6,1
  Processor Name: 12-Core Intel Xeon E5
  Processor Speed: 2.7 GHz
  Number of Processors: 1
  Total Number of Cores: 12
  L2 Cache (per Core): 256 KB
  L3 Cache: 30 MB
  Memory: 64 GB

// FIXME: Looking at the type is not the right long-term solution. We need an
// explicit mechanism for declaring conformances as 'fragile', or even
// individual witnesses.
if (!getType()->getAnyNominal()->isFormallyResilient())
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this checking isFormallyResilient() and not isResilient()? It seems weird for a resilient module (one defining the conformance) to depend on a non-resilient module (the one defining the type).

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 was assuming that couldn't happen with a public type because everything would break, but I'll change it back if you want.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, I think any change at the SIL level and below should use isResilient() and not isFormallyResilient().

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This isn't at the SIL level, though. I'm about to use it for an AST thing.

@swift-ci
Copy link
Contributor

swift-ci commented Nov 7, 2018

Build failed
Swift Test OS X Platform
Git Sha - b51b1c87edf6a02511e315ca50432851f42b1e05

@jrose-apple
Copy link
Contributor Author

Failure seems unrelated.

@swift-ci Please test macOS

...even if the conforming nominal type is resilient. It's the owner
of the conformance whose resilience matters.

I also factored this part out into a separate check at the AST level
so we can tweak it, and also so I can use it to (slightly) speed up
compiling a resilient swiftinterface.
@jrose-apple jrose-apple force-pushed the why-are-there-never-any-witness-chairs branch from b51b1c8 to 8af5216 Compare November 8, 2018 00:58
@jrose-apple
Copy link
Contributor Author

I'd still like to run the source compat suite, if it's fixed soon, but meanwhile…

@swift-ci Please smoke test

@jrose-apple
Copy link
Contributor Author

@swift-ci Please smoke test

@jrose-apple
Copy link
Contributor Author

@swift-ci Please test source compatibility

@jrose-apple jrose-apple merged commit d3edf7c into swiftlang:master Nov 8, 2018
@jrose-apple jrose-apple deleted the why-are-there-never-any-witness-chairs branch November 8, 2018 23:34
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