-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[DeadFunctionElimination] Pass on keypaths to foreign DeclRef properties #12625
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
[DeadFunctionElimination] Pass on keypaths to foreign DeclRef properties #12625
Conversation
@swift-ci please test |
Can you add a sil test case for DFE? |
@gottesmm I think I did? you'd prefer one added to dead_function_elimination.swift as well? (Note the extra -O execution of the test there and the enclosing function being made-public: means DFE kicks in and asserts with failure if the fix isn't present) |
I meant one with optimization enabled. The tests you added AFAIKT are SILGen tests that do not actually test the optimizer.
… On Oct 25, 2017, at 5:58 PM, Graydon Hoare ***@***.*** ***@***.***>> wrote:
@gottesmm <https://github.com/gottesmm> I think I did? you'd prefer one added to dead_function_elimination.swift as well?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#12625 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAee39gpOaCA-q5WEAkztx9bH-42b7PDks5sv9ksgaJpZM4QG3PL>.
|
@gottesmm I added a secondary copy of the -emit-ir RUN line with -O turned on. It does run the optimizer as far as I know (it crashes with the motivating assert in DFE when I run the test but undo the fix). Again, I can add another if this is insufficiently obvious, but I think it does test the thing it's trying to test. |
…ies. These show up specifically when someone forms a keypath to an ObjC property in a category. They're no-ops from the perspective of DFE but the code has to intentionally skip the case if it wants to avoid the subsequent llvm_unreachable. rdar://34913689
94143b5
to
3ef686b
Compare
@gottesmm split test out into its own file in SILOptimizer. |
@swift-ci please test |
Build failed |
Build failed |
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.
Good catch, thanks Graydon!
@graydon Thanks! |
These show up specifically when someone forms a keypath to an ObjC
property in a category. They're no-ops from the perspective of
DFE but the code has to intentionally skip the case if it wants to
avoid the subsequent llvm_unreachable (in an assertion build).
rdar://34913689