Skip to content

When creating destroys for addresses passed into a partial apply, fir… #11230

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
Jul 28, 2017

Conversation

gottesmm
Copy link
Contributor

…st move the values into a stack location with a live range that is guaranteed to be larger than the partial apply's live range.

Otherwise, we may insert destroy_addrs on alloc_stack whose lifetimes have
ended.

rdar://33502257

@gottesmm
Copy link
Contributor Author

@swift-ci smoke test and merge

…st move the values into a stack location with a live range that is guaranteed to be larger than the partial apply's live range.

Otherwise, we may insert destroy_addrs on alloc_stack whose lifetimes have
ended.

rdar://33502257
@gottesmm
Copy link
Contributor Author

@swift-ci smoke test and merge

1 similar comment
@gottesmm
Copy link
Contributor Author

@swift-ci smoke test and merge

// CHECK-NEXT: destroy_addr [[ARG1]]
// CHECK-NEXT: apply [[FN]]<T, T>([[ARG0]], [[TMP]])
Copy link
Contributor Author

Choose a reason for hiding this comment

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

In case anyone looks at this and wonders why this changed, it is b/c our (apply (partial_apply)) -> (partial_apply) (apply') uses the dead partial_apply code to clean up. This is disguised by the optimization that gets rid of trivially dead live ranges. I added a version of this test to the sil_combine_array.sil test (see below) that takes advantage of that optimization being disabled in that file. So it is not as cleaned up and the work being done is obvious.

@swift-ci swift-ci merged commit 781b133 into swiftlang:master Jul 28, 2017
@gottesmm gottesmm deleted the rdar33502257 branch July 28, 2017 04:47
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.

2 participants