Skip to content

[semantic-arc] Handle the rest of the unqualified mem opts in SILGen. #5692

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

Conversation

gottesmm
Copy link
Contributor

@gottesmm gottesmm commented Nov 9, 2016

[semantic-arc] Handle the rest of the unqualified mem opts in SILGen.

Keep in mind that these are approximations that will not impact correctness
since in all cases I ensured that the SIL will be the same after the
OwnershipModelEliminator has run. The cases that I was unsure of I commented
with SEMANTIC ARC TODO. Once we have the verifier any confusion that may have
occurred here will be dealt with.

rdar://28685236

@gottesmm
Copy link
Contributor Author

gottesmm commented Nov 9, 2016

I have 2x DI tests to fix still (gotta love it). But in the mean time, I want to start the testing on Linux/simulators.

@gottesmm
Copy link
Contributor Author

gottesmm commented Nov 9, 2016

@swift-ci Please test

@swift-ci
Copy link
Contributor

swift-ci commented Nov 9, 2016

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - 3a7be4a8134abf2b09e9eaa11b81ea3a2c23401a
Test requested by - @gottesmm

@swift-ci
Copy link
Contributor

swift-ci commented Nov 9, 2016

Build failed
Jenkins build - Swift Test OS X Platform
Git Commit - 3a7be4a8134abf2b09e9eaa11b81ea3a2c23401a
Test requested by - @gottesmm

@gottesmm gottesmm force-pushed the change_silgen_emit_qualified_loadstrong branch from 3a7be4a to 45fed52 Compare November 9, 2016 04:08
@gottesmm
Copy link
Contributor Author

gottesmm commented Nov 9, 2016

I am pretty sure the DI bugs are use-list ordering issues since I am running the ownership model eliminator before running DI. Really the first priority should be moving the ownership model eliminator /after/ DI to prevent these issues.

Keep in mind that these are approximations that will not impact correctness
since in all cases I ensured that the SIL will be the same after the
OwnershipModelEliminator has run. The cases that I was unsure of I commented
with SEMANTIC ARC TODO. Once we have the verifier any confusion that may have
occurred here will be dealt with.

rdar://28685236
…operations, tighten up the verifier in functions with qualified ownership.

rdar://28685236
… for DI violations, not class_method.

This is working around an additional use-list DI ordering issue that I exposed
when implementing High Level Memory Operations. Specifically, DI started to
error on:

  (class_method x)

instead of on:

  (apply (class_method x) x)

We would also try to emit an error on the apply, but we would squelch the apply
error (which is more accuracte) since we had already emitted the class_method
error.

This commit conservatively checks for this condition and skips the class method
so we can emit the more descriptive error on the apply.
@gottesmm gottesmm force-pushed the change_silgen_emit_qualified_loadstrong branch from 45fed52 to 35acc0f Compare November 9, 2016 19:38
@gottesmm
Copy link
Contributor Author

gottesmm commented Nov 9, 2016

@swift-ci Please test and merge

1 similar comment
@gottesmm
Copy link
Contributor Author

gottesmm commented Nov 9, 2016

@swift-ci Please test and merge

@gottesmm
Copy link
Contributor Author

gottesmm commented Nov 9, 2016

@swift-ci Please smoke test and merge

@gottesmm
Copy link
Contributor Author

gottesmm commented Nov 9, 2016

OS X passed the full test, but linux failed due to a libstdc++ issue. The commit I just pushed fixed the issue. This should not affect the full test results on OS X, so I am just going to do a smoke test.

@gottesmm
Copy link
Contributor Author

gottesmm commented Nov 9, 2016

@swift-ci Please smoke test and merge

@gottesmm gottesmm merged commit 0b27fe9 into swiftlang:master Nov 9, 2016
@gottesmm gottesmm deleted the change_silgen_emit_qualified_loadstrong branch November 9, 2016 23:09
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