| Age | Commit message (Collapse) | Author | Lines |
|
|
|
This reverts commit 99492e41b60f21f2f461e8131605e054020d328e.
|
|
r=ecstatic-morse
MIR: use HirId instead of NodeId to avoid cycles while inlining
I wanted to see if I could limit the number of uses of `NodeId` when `HirId` is available and I saw that some of the MIR `Inliner` code could use `Span` instead of `NodeId`, not unlike in https://github.com/rust-lang/rust/pull/71197.
~If I'm understanding the reason for not calling `optimized_mir` in incremental builds here correctly, this change could also allow us to do so.~
This change could affect performance, so if this approach makes sense, a perf run is probably a good idea.
|
|
Make the necessary changes to support concurrency in Miri.
This pull request makes the necessary changes to the Rust compiler to allow Miri to support concurrency:
1. Move stack from the interpretation context (`InterpCx`) to machine, so that the machine can switch the stacks when it changes the thread being executed.
2. Add the callbacks that allow the machine to generate fresh allocation ids for each thread local allocation and to translate them back to original allocations when needed. This allows the machine to ensure the property that allocation ids are unique, which allows using a simpler representation of the memory.
r? @oli-obk
cc @RalfJung
|
|
|
|
|
|
|
|
|
|
Don't use the HirId to NodeId map in MIR
Another step towards not having to build a `HirId` to `NodeId` map other than for doc and RLS purposes.
We are currently sorting `unsafe` blocks by `NodeId` in `check_unsafety`; change it to sorting by `Span` instead; this passes the tests, but better ideas are welcome.
In addition, simplify the split between the used and unused `unsafe` blocks for readability and less sorting.
cc https://github.com/rust-lang/rust/issues/50928
|
|
Rollup of 5 pull requests
Successful merges:
- #70566 (Don't bail out before linting in generic contexts.)
- #71141 (Provide better compiler output when using `?` on `Option` in fn returning `Result` and vice-versa)
- #71149 (remove an impossible branch from check_consts)
- #71179 (fix more clippy warnings)
- #71191 (Clean up E0520 explanation)
Failed merges:
r? @ghost
|
|
|
|
method group.
|
|
fix more clippy warnings
|
|
remove an impossible branch from check_consts
All function calleess are either `FnPtr` or `FnDef`, so we can remove the alternative from check_consts and just make it ICE instead.
|
|
Don't bail out before linting in generic contexts.
Fixes #69021.
cc #70017
r? @RalfJung
|
|
|
|
- Remove reads of indirect `Place`s
- Add comments explaining what the algorithm does
|
|
|
|
|
|
Fixes perf regression in `optimized_mir` query
|
|
|
|
|
|
|
|
Miri: expand frame hooks
This is needed to make https://github.com/rust-lang/miri/pull/1330 work.
r? @oli-obk @eddyb
|
|
unit rvalue, use constant `()` instead of tuple
fixes #70886
r? @eddyb
|
|
|
|
|
|
r=ecstatic-morse,RalfJung
Don't always run `add_call_guards` pass
It is only needed when `add_retag` runs.
(the pass is run again to split critical edges before codegen, that one is required)
|
|
This ensures we get still get lints for generic contexts.
|
|
|
|
|
|
|
|
|
|
Pass the `PlaceElem::Index` local to `visit_local`
Fixes https://github.com/rust-lang/rust/issues/71008
cc @rust-lang/wg-mir-opt
r? @spastorino
|
|
Rollup of 5 pull requests
Successful merges:
- #69573 (tests encoding current behavior for various cases of "binding" to _.)
- #70881 (bootstrap: work around "unused attribute" errors in incremental stdlib rebuilds.)
- #70957 (Normalize MIR locals' types for generator layout computation.)
- #70962 (added machine hooks to track deallocations)
- #70982 (Normalize function signature in function casting check procedure)
Failed merges:
r? @ghost
|
|
Normalize MIR locals' types for generator layout computation.
fixes #70905
|
|
|
|
r=eddyb
rustc_middle: return `LocalDefId` where possible in hir::map module
This changes the return type of the following functions to return a `LocalDefId` instead of a `DefId`:
* opt_local_def_id_from_node_id
* opt_local_def_id
* body_owner_def_id
* local_def_id_from_node_id
* get_parent_id
This is another step in the right direction for #70853
This pull request will be followed by another (substantial one) which changes the return type of `local_def_id` function but this change being more invasive, we might want to wait for #70956 or #70961 (or some other form it) to land first.
|
|
Use `PredicateObligation`s instead of `Predicate`s
Keep more information about trait binding failures. Use more specific spans by pointing at bindings that introduce obligations.
Subset of #69709.
r? @eddyb
|
|
|
|
|
|
|
|
|
|
Keep more information about trait binding failures.
|
|
|
|
Miri terminator handling: only do progress sanity check for 'Call' terminator
This will still catch mistakes in bad intrinsic/foreign-item shims, which is the main source of errors here.
Fixes https://github.com/rust-lang/rust/issues/70723
r? @oli-obk
|
|
|
|
|
|
Remove unused discriminant reads from MIR bodies
Allow the `SimplifyLocals` pass to remove reads of discriminants if the
read is never used.
Fixes #70531
r? @oli-obk
|
|
Allow the `SimplifyLocals` pass to remove reads of discriminants if the
read is never used.
|