-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Add a pointer to address cast kind #97582
Conversation
A pointer to address cast are often special-cased. Introduce a dedicated cast kind to make them easy distinguishable.
Some changes occured to rustc_codegen_cranelift cc @bjorn3 Some changes occured to the CTFE / Miri engine cc @rust-lang/miri |
(rust-highfive has picked a reviewer for you, use r? to override) |
dc14747
to
dff602f
Compare
IMO we should also have a cast kind for the opposite direction. They don't read or write state, but they might be non-deterministic (depending on the model we end up with), which for some analyses is also a "side-effect". |
Oh, looks like the "may have side effects" commit was moved out of this MR. Please ping me in the PR where it is added then, I might have some comments. :) |
cc @rust-lang/wg-mir-opt @bors r+ misc casts do sound like we just gave up on categorization. Maybe we should do all the decision making in mir building and get rid of the catch-all |
📌 Commit dff602f has been approved by |
…-obk Add a pointer to address cast kind A pointer to address cast are often special-cased. Introduce a dedicated cast kind to make them easy distinguishable.
…-obk Add a pointer to address cast kind A pointer to address cast are often special-cased. Introduce a dedicated cast kind to make them easy distinguishable.
☀️ Test successful - checks-actions |
Finished benchmarking commit (e094492): comparison url. Instruction countThis benchmark run did not return any relevant results for this metric. 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 |
Yes... I opened #97649 to track the cleanup here. |
add cast kind of from_exposed_addr (int-to-ptr casts) This is basically the dual to rust-lang#97582, for int2ptr casts. Cc `@tmiasko` rust-lang#97649
add cast kind of from_exposed_addr (int-to-ptr casts) This is basically the dual to rust-lang/rust#97582, for int2ptr casts. Cc `@tmiasko` rust-lang/rust#97649
A pointer to address cast are often special-cased. Introduce a dedicated cast kind to make them easy distinguishable.