Skip to content

CopyForwarding - small redesign to fix bugs. #13356

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 2 commits into from
Dec 11, 2017
Merged

CopyForwarding - small redesign to fix bugs. #13356

merged 2 commits into from
Dec 11, 2017

Conversation

atrick
Copy link
Contributor

@atrick atrick commented Dec 10, 2017

Copy forwarding was designed with some assumptions about symmetry of
operations. If copy_value/destroy_value are expanded somewhere for a given
value, then they should be expanded everywhere. The pass took a conservative
approach to SIL patterns that were guaranteed safe and bailed out on unknown
patterns. However, due to some over-aggressive code factoring, the assumption
wasn't being checked in one corner case.

This redesign makes a clear distinction between the requirements for forward
vs. backward propagation.

Fixes rdar://35646292 Swift CI: resilience bot seg faults in
stdlib/RangeReplaceable.swift.gyb

Copy forwarding was designed with some assumptions about symmetry of
operations. If copy_value/destroy_value are expanded somewhere for a given
value, then they should be expanded everywhere. The pass took a conservative
approach to SIL patterns that were guaranteed safe, and bailed out on unknown
patterns. However, due to some over-aggressive code factoring, the assumption
wasn't being checked in one corner case.

This redesign makes a clear distinction between the requirements for forward
vs. backward propagation.

Fixes <rdar://35646292> Swift CI: resilience bot seg faults in
stdlib/RangeReplaceable.swift.gyb
@atrick
Copy link
Contributor Author

atrick commented Dec 10, 2017

@swift-ci test.

@slavapestov
Copy link
Contributor

Thanks for fixing this! Don't forget you need to un-XFAIL the actual failing test though.

@atrick
Copy link
Contributor Author

atrick commented Dec 10, 2017

@swift-ci test and merge.

1 similar comment
@atrick
Copy link
Contributor Author

atrick commented Dec 10, 2017

@swift-ci test and merge.

@swift-ci swift-ci merged commit 9d0464c into swiftlang:master Dec 11, 2017
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.

3 participants