-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Fix debugger stepping for consts assigned to local vars #141349
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
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
Please add a debuginfo test that checks for the desired behavior. @rustbot author |
This comment has been minimized.
This comment has been minimized.
I don't think this is the right approach. There not being an assignment is perfectly fine here, and important for simplified codegen. That assembly you're looking at is the debug spill for the debug information. Maybe this wants to emit those spills in a smarter order instead? |
@scottmcm The problem is not an absence of an assignment in disassembly, but rather a reorder of existing assignments |
There's no assignment in MIR, so seeing an assignment in assembly is caused by the debug info. If that debug info artifact is being emitted poorly, that to me is a debug info problem, not a MIR statements problem. |
Okay, that makes sense |
The job Click to see the possible cause of the failure (guessed by this bot)
|
Fixes #141344
rustc should not optimize assignments to local vars (with debuginfo) in debug mode.
r? @scottmcm
r? @saethlin