-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Make __consuming
meaningful for code generation.
#19613
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
@swift-ci Please test |
@swift-ci Please benchmark |
!AI->getSubstCalleeType()->getExtInfo().hasGuaranteedSelfParam()) | ||
if (Release && AI /* | ||
&& (!AI->getSubstCalleeType()->hasSelfParam() | ||
|| !AI->getSubstCalleeType()->getSelfParameter().isGuaranteed())*/) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gottesmm Do you know what this hasGuaranteedSelfParam
check was trying to accomplish? Removing doesn't appear to have any effect on the test suite, and this was the only remaining use of a broken SILFunctionType::hasGuaranteedSelfParam()
method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would just rip it out.
Previously, the `__consuming` decl modifier failed to get propagated to the value ownership of the method's `self` parameter, causing it to effectively be a no-op. Fix this, and address some of the downstream issues this exposes: - `coerceCallArguments` in the type checker failing to handle the single `__owned` parameter case - Various places in SILGen and optimizer passes that made inappropriate assertions that `self` was always passed guaranteed
bc49480
to
9c5432c
Compare
@swift-ci Please test |
@swift-ci Please benchmark |
1 similar comment
@swift-ci Please benchmark |
Build failed |
Build failed |
Build comment file:Performance: -O
Code size: -O
Performance: -Osize
Code size: -Osize
Performance: -Onone
Code size: Swift libraries
How to read the dataThe 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
|
@@ -5753,6 +5753,17 @@ Expr *ExprRewriter::coerceCallArguments( | |||
// If we came from a scalar, create a scalar-to-tuple conversion. | |||
TupleShuffleExpr::TypeImpact typeImpact; | |||
if (argTuple == nullptr) { | |||
// Deal with a difference in only scalar ownership. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yuck. Hopefully this all goes away one day.
!AI->getSubstCalleeType()->getExtInfo().hasGuaranteedSelfParam()) | ||
if (Release && AI /* | ||
&& (!AI->getSubstCalleeType()->hasSelfParam() | ||
|| !AI->getSubstCalleeType()->getSelfParameter().isGuaranteed())*/) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would just rip it out.
@swift-ci Please test source compatibility |
Compat suite failure in 'Fluent' looks unrelated. |
Previously, the
__consuming
decl modifier failed to get propagated to the value ownership of themethod's
self
parameter, causing it to effectively be a no-op. Fix this, and address some of thedownstream issues this exposes:
coerceCallArguments
in the type checker failing to handle the single__owned
parameter caseself
was always passed guaranteed
rdar://problem/44769874