-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[IRGenDebugInfo] Fix usage of dbg.declare #73769
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
Conversation
This is unnecessarily dropping debug info, as there is currently no assertion in LLVM. The sharing of stack slot can happen because of AllocStackHoisting, which is run at -Onone too.
@swift-ci please test |
@swift-ci please test source compatibility |
We're getting
This is something I've been meaning to fix at the LLVM level (rdar://124625723) — LLVM should be able to just split two overlapping fragments into two. |
In SwiftArgumentParser, we also have a
which is the same as rdar://128155050 |
@swift-ci please test |
@swift-ci please test source compatibility |
Except for the async context, where it is needed (arguments within an async function). We don't support dbg.declare in optimized code, as variables can be moved by SIL optimization passes. If a partial store is eliminated, we want a dbg.value on the allocation, and another dbg.value with a fragment in place of the partial store. rdar://128155050
425dbc0
to
5606fbc
Compare
Source compatibility tests are passing, fixed the one failing AutoDiff test |
@swift-ci please smoke test |
@swift-ci please test |
@swift-ci please test macOS platform |
Uh oh!
There was an error while loading. Please reload this page.