-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
interpret: track place alignment together with the type, not the value #98846
Conversation
Some changes occurred to the CTFE / Miri engine cc @rust-lang/miri |
This makes |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 8955686 with merge 66f86800cc3af8ccdffbe1b0ab2f547612df788d... |
☀️ Try build successful - checks-actions |
Queued 66f86800cc3af8ccdffbe1b0ab2f547612df788d with parent f99f9e4, future comparison URL. |
Finished benchmarking commit (66f86800cc3af8ccdffbe1b0ab2f547612df788d): comparison url. Instruction count
Max RSS (memory usage)Results
CyclesResults
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. @bors rollup=never Footnotes |
/// This means `layout.align` should never be used for an `OpTy`! | ||
/// `None` means "alignment does not matter since this is a by-value operand" | ||
/// (`Operand::Immediate`). | ||
pub align: Option<Align>, |
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.
So afaict this field is never used, and after lots of going through this PRs diff, I came to the conclusion it will only be used to check reads from Operand::Indirect
, and only in miri.
Please document the miri part, the other part is already documented after all.
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.
Yeah currently this field cannot cause UB I think. But I want to relax the rules for *ptr
and once we do, this can cause UB again.
@bors r+ |
📌 Commit b1568e6 has been approved by |
☀️ Test successful - checks-actions |
Finished benchmarking commit (4008dd8): comparison url. Instruction count
Max RSS (memory usage)Results
CyclesResults
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression Footnotes |
Ah, those Max-RSS regressions are unfortunate. I have some ideas for how to make |
Okay, that plan actually works. But it is the 4th PR in a linear chain starting with #98831 ...^^ |
This matches how I handle alignment in MiniRust. I think it makes conceptually a lot more sense.
Fixes #63085
r? @oli-obk