Skip to content

ARC code motion: handle unowned retains/releases correctly. #16817

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
May 24, 2018

Conversation

eeckstein
Copy link
Contributor

This fixes an assert-crash in the ReleaseHoisting pass.

rdar://problem/40525543

This fixes an assert-crash in the ReleaseHoisting pass.

rdar://problem/40525543
@eeckstein
Copy link
Contributor Author

@swift-ci smoke test and merge

@swift-ci swift-ci merged commit 15da203 into swiftlang:master May 24, 2018
@eeckstein eeckstein deleted the fix-release-hoisting branch May 24, 2018 19:05
@gottesmm
Copy link
Contributor

@eeckstein you never describe what the actual error was in the commit message. Why was it crashing?

@eeckstein
Copy link
Contributor Author

It was crashing with this assert:

Assertion failed: (isRetainInstruction(I) || isReleaseInstruction(I) && "Extracting RC root from invalid instruction"), function getRCRoot, file /Users/erik/proj/swift-work/swift/lib/SILOptimizer/Transforms/ARCCodeMotion.cpp, line 193.

because the check for unowned ARC instructions was missing.

@gottesmm
Copy link
Contributor

Thanks!

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